From owner-svn-src-all@freebsd.org Sun Dec 9 00:41:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DACE132EF28; Sun, 9 Dec 2018 00:41:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32E716FE43; Sun, 9 Dec 2018 00:41:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13ED019E6; Sun, 9 Dec 2018 00:41:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB90fkb2074719; Sun, 9 Dec 2018 00:41:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB90fkt5074718; Sun, 9 Dec 2018 00:41:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812090041.wB90fkt5074718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Dec 2018 00:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341747 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 341747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 32E716FE43 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 00:41:47 -0000 Author: kib Date: Sun Dec 9 00:41:46 2018 New Revision: 341747 URL: https://svnweb.freebsd.org/changeset/base/341747 Log: MFC r341397: Correct accuracy of the barrier writes accounting. Modified: stable/12/sys/kern/vfs_bio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_bio.c ============================================================================== --- stable/12/sys/kern/vfs_bio.c Sat Dec 8 22:12:57 2018 (r341746) +++ stable/12/sys/kern/vfs_bio.c Sun Dec 9 00:41:46 2018 (r341747) @@ -2231,7 +2231,7 @@ bufwrite(struct buf *bp) } if (bp->b_flags & B_BARRIER) - barrierwrites++; + atomic_add_long(&barrierwrites, 1); oldflags = bp->b_flags; From owner-svn-src-all@freebsd.org Sun Dec 9 00:42:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F18B5132EFFA; Sun, 9 Dec 2018 00:42:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98DB370023; Sun, 9 Dec 2018 00:42:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79E9C1B18; Sun, 9 Dec 2018 00:42:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB90guUH078723; Sun, 9 Dec 2018 00:42:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB90gu7G078722; Sun, 9 Dec 2018 00:42:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812090042.wB90gu7G078722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Dec 2018 00:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341748 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 341748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 98DB370023 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 00:42:57 -0000 Author: kib Date: Sun Dec 9 00:42:56 2018 New Revision: 341748 URL: https://svnweb.freebsd.org/changeset/base/341748 Log: MFC r341397: Correct accuracy of the barrier writes accounting. Modified: stable/11/sys/kern/vfs_bio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Sun Dec 9 00:41:46 2018 (r341747) +++ stable/11/sys/kern/vfs_bio.c Sun Dec 9 00:42:56 2018 (r341748) @@ -1933,7 +1933,7 @@ bufwrite(struct buf *bp) } if (bp->b_flags & B_BARRIER) - barrierwrites++; + atomic_add_long(&barrierwrites, 1); oldflags = bp->b_flags; From owner-svn-src-all@freebsd.org Sun Dec 9 02:58:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFCEF1334125; Sun, 9 Dec 2018 02:58:54 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 901D874B78; Sun, 9 Dec 2018 02:58:54 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D0FD31AF; Sun, 9 Dec 2018 02:58:54 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB92ws0d047060; Sun, 9 Dec 2018 02:58:54 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB92wsRS047058; Sun, 9 Dec 2018 02:58:54 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201812090258.wB92wsRS047058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sun, 9 Dec 2018 02:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341749 - in head: share/man/man4 sys/modules/netgraph X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: in head: share/man/man4 sys/modules/netgraph X-SVN-Commit-Revision: 341749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 901D874B78 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 02:58:55 -0000 Author: sobomax Date: Sun Dec 9 02:58:53 2018 New Revision: 341749 URL: https://svnweb.freebsd.org/changeset/base/341749 Log: Hook up ng_checksum(4) module and appropriate manpage to the build. The module was added back in 2016, but has never been connected. MFC after: 1 week Modified: head/share/man/man4/Makefile head/sys/modules/netgraph/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Dec 9 00:42:56 2018 (r341748) +++ head/share/man/man4/Makefile Sun Dec 9 02:58:53 2018 (r341749) @@ -323,6 +323,7 @@ MAN= aac.4 \ ng_btsocket.4 \ ng_car.4 \ ng_ccatm.4 \ + ng_checksum.4 \ ng_cisco.4 \ ng_deflate.4 \ ng_device.4 \ Modified: head/sys/modules/netgraph/Makefile ============================================================================== --- head/sys/modules/netgraph/Makefile Sun Dec 9 00:42:56 2018 (r341748) +++ head/sys/modules/netgraph/Makefile Sun Dec 9 02:58:53 2018 (r341749) @@ -11,6 +11,7 @@ SUBDIR= async \ bpf \ bridge \ car \ + checksum \ cisco \ deflate \ device \ From owner-svn-src-all@freebsd.org Sun Dec 9 03:36:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90C7A1335554 for ; Sun, 9 Dec 2018 03:36:36 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-it1-x12a.google.com (mail-it1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD54766B0 for ; Sun, 9 Dec 2018 03:36:35 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-it1-x12a.google.com with SMTP id h193so12961278ita.5 for ; Sat, 08 Dec 2018 19:36:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sbpeO+kvtDtOj/eyQfTsVGHNtIPUhrH83B4cpTtb4jc=; b=ddOZg43uZQ5YsRuP7gB1ujxwcxcRHTtCix/O8y/aK1/C7YEwTUxV9FGGo9/gIxcieD egXHTuonGnkN30yuwEuE0MOflh7h/tXAXrZeSEzezwUDvd3VG8FplD8wgDKX9dLUbCct J7mnNytnNymqH9evxHHFhhdyYiTIeE68y4rLw= 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=sbpeO+kvtDtOj/eyQfTsVGHNtIPUhrH83B4cpTtb4jc=; b=hm9N3jZ+MpY+5utM7byKm0LJjx7cgGzHZr608LpUvNlM+nyBmFmbKmg/ZgNByB9e2I hjT26A5Y25rhWhNP0I8G+I+h7lmXcHf5oLA2Mwmn/6n9C0AaICnxjW6RpHMRp4ggUmIv F8pYwUny4yAD05TK6+xxHgVbHIXXyuCEBNtsLqLdUMEOY/vba5zTMJ016lbJIINLavI+ qFnqZptoL2qwMuAFm1eVgRzpOa4PM06PMptCbBNakBV+TRoYbru06ojEljMPuEuWExh9 XTmXQolUv/SEC7HaAqdRciym7hfBV3twhpvu8IgEKRpUs30HhO1soSorYJ5UC3GhR70S Esog== X-Gm-Message-State: AA+aEWY67gqIJMUEObDRdeIE4BYTWocOKe8a089QajKmH77ieiaUEF1j jOgTZySiGVY1IlvjBhQzwYX9hwyV4L/u5avHGw6IRtfSKUI= X-Google-Smtp-Source: AFSGD/WLsWK16pdT860od4lb/A6BfJJEPw+ptPCRRIT49h+2XQwdtEOvGUehFQVhnXf1IVQLd99GXJgtq6Ub2RzQOD0= X-Received: by 2002:a24:b50a:: with SMTP id v10mr7505645ite.21.1544326594588; Sat, 08 Dec 2018 19:36:34 -0800 (PST) MIME-Version: 1.0 References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> In-Reply-To: From: Kevin Bowling Date: Sat, 8 Dec 2018 20:36:22 -0700 Message-ID: Subject: Re: svn commit: r341682 - head/sys/sys To: mjguzik@gmail.com Cc: ian@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6BD54766B0 X-Spamd-Result: default: False [-4.74 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[kev009.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kev009.com:~]; MX_GOOD(-0.01)[alt1.aspmx.l.google.com,aspmx.l.google.com,aspmx2.googlemail.com,alt2.aspmx.l.google.com,aspmx3.googlemail.com]; RCVD_IN_DNSWL_NONE(0.00)[a.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.52)[-0.523,0]; R_DKIM_PERMFAIL(0.00)[kev009.com]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.91)[ip: (-6.65), ipnet: 2607:f8b0::/32(-1.49), asn: 15169(-1.30), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 03:36:36 -0000 On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik wrote: > > Fully satisfying solution would be that all architectures get 64-bit > ops, even if in the worst case they end up taking a lock. Then > subsystems would not have to ifdef on anything. However, there > was some opposition to this proposal and I don't think this is > important enough to push. Mateusz, Who is opposing this particular polyfill solution? Scott Long brought up a situation in driver development where this would be useful as well. The polyfills lower the cognitive load and #ifdef soup which are the right call here regardless of performance on toy ports. Regards, Kevin From owner-svn-src-all@freebsd.org Sun Dec 9 03:07:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0574913344E7; Sun, 9 Dec 2018 03:07:46 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BA247535F; Sun, 9 Dec 2018 03:07:45 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7718433BD; Sun, 9 Dec 2018 03:07:45 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB937j7x053132; Sun, 9 Dec 2018 03:07:45 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB937jmO053131; Sun, 9 Dec 2018 03:07:45 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201812090307.wB937jmO053131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sun, 9 Dec 2018 03:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341750 - stable/11/contrib/elftoolchain/readelf X-SVN-Group: stable-11 X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: stable/11/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 341750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BA247535F X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 03:07:46 -0000 Author: sobomax Date: Sun Dec 9 03:07:45 2018 New Revision: 341750 URL: https://svnweb.freebsd.org/changeset/base/341750 Log: MFC: r340745, fix CU: output of the --debug-dump=decodedline. Differential Revision: https://reviews.freebsd.org/D18290 Modified: stable/11/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/11/contrib/elftoolchain/readelf/readelf.c Sun Dec 9 02:58:53 2018 (r341749) +++ stable/11/contrib/elftoolchain/readelf/readelf.c Sun Dec 9 03:07:45 2018 (r341750) @@ -4720,7 +4720,7 @@ dump_dwarf_line_decoded(struct readelf *re) DW_DLV_OK) dir = NULL; printf("CU: "); - if (dir && file) + if (dir && file && file[0] != '/') printf("%s/", dir); if (file) printf("%s", file); From owner-svn-src-all@freebsd.org Sun Dec 9 03:43:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDB99133597E for ; Sun, 9 Dec 2018 03:43:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4A6776E09 for ; Sun, 9 Dec 2018 03:43:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id d18so8853644qto.8 for ; Sat, 08 Dec 2018 19:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6HUKmTDzhqBXb/l97uVcn4S2Ivnf+U9anVR6/fi+uek=; b=VRv2uzhq2WBrrtbXQg64uV1DOs/g2wgCuLjMuFRxD9zxospNM8hXHfBXlKqRS2yQLl DriLg2gZnvaWjajUhPe9mK2breuxNpdqZO70P5nP2I0WnnpLHr/OkW59NuR/ir5GTGFt dtjKpk50RuplzLJXgbPRwJYFnyCaVSv9uJnlXCl+6RisOY4qmOVnlAW8wlh8hMJpnTNJ 115tYPCNhb6F5nubmXV/KZ091gmAR+ESTvjgr+9dt3DZQ6hFt8OYIz/RVpi6XscOrjwN Mu+AoU2soyI3CI4Vl3ERCRp7sFPhyfe0oJhFDxIzuz7Mt6VPkFwbRhsIDSIQtjmvBsIQ 1DEw== 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=6HUKmTDzhqBXb/l97uVcn4S2Ivnf+U9anVR6/fi+uek=; b=q0B046xrX8YBQcfYe6FYz21IM+U6wJC+Fx6CsjlBseKV4frYgY5Cj7MwcN5tqR0cL4 OC1Jxyorxq0LWuEGZ4W33P6/vimkty201QE4AgwrZ54Ee+yVw1JkZn4hLINlgSpzANJ+ JmwwQXXKH4YrOAj69naFnO4kq5f0QKym81dM0iQPsk1rOmQrOW+q6JmDxbtWmtVRUZHL wqblp4H89Oz4iic8x+PsQPgUJ8q2pmuojTiZmOsBW9bEsVHwfrEbS0JnBQt0hp6semf0 STmb+/QE5OOUXH2zbc4q9Lx3P/tSYoQnVJB1UZWt96gdFjv0X8c+WLp9/PdiPEEudAlz uDbw== X-Gm-Message-State: AA+aEWY7IVs6cr99OoyEu2rqqS5V/5ac0xdV25jwVa8REENQVEvbzBrR 9tDT+UOtJezDJtGri5IcbFKRmtGT4iTKAsXj/4ksWw== X-Google-Smtp-Source: AFSGD/U2HtIqvvc1BKD8d2sbsHfpa/+5+yQmaZTWLjPalhWogS0ScrFYpblDXZkGyDuEVmhCKjwNokM3J35ngj+JDX0= X-Received: by 2002:ac8:3f2d:: with SMTP id c42mr7517166qtk.33.1544327004907; Sat, 08 Dec 2018 19:43:24 -0800 (PST) MIME-Version: 1.0 References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> In-Reply-To: From: Warner Losh Date: Sat, 8 Dec 2018 20:43:12 -0700 Message-ID: Subject: Re: svn commit: r341682 - head/sys/sys To: Kevin Bowling Cc: Mateusz Guzik , Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org X-Rspamd-Queue-Id: A4A6776E09 X-Spamd-Result: default: False [-4.32 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_HAM_SHORT(-0.49)[-0.491,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[ALT1.aspmx.l.google.com,aspmx.l.google.com,ALT2.aspmx.l.google.com]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[0.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.82)[ip: (-6.20), ipnet: 2607:f8b0::/32(-1.49), asn: 15169(-1.30), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_CC(0.00)[gmail.com] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 03:43:27 -0000 On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik wrote: > > > > > Fully satisfying solution would be that all architectures get 64-bit > > ops, even if in the worst case they end up taking a lock. Then > > subsystems would not have to ifdef on anything. However, there > > was some opposition to this proposal and I don't think this is > > important enough to push. > > Mateusz, > > Who is opposing this particular polyfill solution? Scott Long brought > up a situation in driver development where this would be useful as > well. The polyfills lower the cognitive load and #ifdef soup which > are the right call here regardless of performance on toy ports. > I don't recall seeing the opposition either. It would have to be a global lock for all 64bit atomics.... but I think it would only be 2 atomics on those architectures. Warner > From owner-svn-src-all@freebsd.org Sun Dec 9 04:13:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73FBE130A4AE; Sun, 9 Dec 2018 04:13:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BF6977AB8; Sun, 9 Dec 2018 04:13:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F10A243FB; Sun, 9 Dec 2018 04:13:14 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB94DENQ089026; Sun, 9 Dec 2018 04:13:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB94DEeT089025; Sun, 9 Dec 2018 04:13:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812090413.wB94DEeT089025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 9 Dec 2018 04:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341751 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 341751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1BF6977AB8 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 04:13:15 -0000 Author: jhibbits Date: Sun Dec 9 04:13:14 2018 New Revision: 341751 URL: https://svnweb.freebsd.org/changeset/base/341751 Log: powerpc/SPE: Reload vector registers after efdabs/efdnabs/efdneg While here, also style(9)-adjust indents around this code. Modified: head/sys/powerpc/booke/spe.c Modified: head/sys/powerpc/booke/spe.c ============================================================================== --- head/sys/powerpc/booke/spe.c Sun Dec 9 03:07:45 2018 (r341750) +++ head/sys/powerpc/booke/spe.c Sun Dec 9 04:13:14 2018 (r341751) @@ -464,17 +464,17 @@ spe_handle_fpdata(struct trapframe *frame) switch (instr_sec_op) { case EVFSABS: curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); frame->fixreg[rd] = frame->fixreg[ra] & ~(1U << 31); break; case EVFSNABS: curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); frame->fixreg[rd] = frame->fixreg[ra] | (1U << 31); break; case EVFSNEG: curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); frame->fixreg[rd] = frame->fixreg[ra] ^ (1U << 31); break; default: @@ -542,15 +542,18 @@ spe_handle_fpdata(struct trapframe *frame) switch (instr_sec_op) { case EFDABS: curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + enable_vec(curthread); break; case EFDNABS: curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + enable_vec(curthread); break; case EFDNEG: curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + enable_vec(curthread); break; case EFDCFS: spe_explode(&fpemu, &fpemu.fe_f3, SINGLE, From owner-svn-src-all@freebsd.org Sun Dec 9 05:35:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B09FE130D620; Sun, 9 Dec 2018 05:35:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55D4E7A830; Sun, 9 Dec 2018 05:35:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36F14511B; Sun, 9 Dec 2018 05:35:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB95ZMKm029906; Sun, 9 Dec 2018 05:35:22 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB95ZMTd029904; Sun, 9 Dec 2018 05:35:22 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201812090535.wB95ZMTd029904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 9 Dec 2018 05:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341753 - stable/11/lib/lib80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/11/lib/lib80211 X-SVN-Commit-Revision: 341753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 55D4E7A830 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 05:35:23 -0000 Author: avos Date: Sun Dec 9 05:35:22 2018 New Revision: 341753 URL: https://svnweb.freebsd.org/changeset/base/341753 Log: MFC r316939: [lib80211] fix a missing cleanup path. PR: lib/218655 Reported by: Modified: stable/11/lib/lib80211/lib80211_regdomain.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/lib80211/lib80211_regdomain.c ============================================================================== --- stable/11/lib/lib80211/lib80211_regdomain.c Sun Dec 9 04:54:55 2018 (r341752) +++ stable/11/lib/lib80211/lib80211_regdomain.c Sun Dec 9 05:35:22 2018 (r341753) @@ -539,6 +539,7 @@ cleanup_bands(netband_head *head) nb = LIST_FIRST(head); if (nb == NULL) break; + LIST_REMOVE(nb, next); free(nb); } } From owner-svn-src-all@freebsd.org Sun Dec 9 04:54:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A9DE130BBE5; Sun, 9 Dec 2018 04:54:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22A667926C; Sun, 9 Dec 2018 04:54:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 052C34AA7; Sun, 9 Dec 2018 04:54:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB94st5l009608; Sun, 9 Dec 2018 04:54:55 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB94staQ009607; Sun, 9 Dec 2018 04:54:55 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812090454.wB94staQ009607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 9 Dec 2018 04:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341752 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 341752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 22A667926C X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 04:54:56 -0000 Author: jhibbits Date: Sun Dec 9 04:54:55 2018 New Revision: 341752 URL: https://svnweb.freebsd.org/changeset/base/341752 Log: powerpc/SPE: Copy lower part of source register to target for efdabs/efdnabs/efdneg MFC after: 1 week MFC With: r341751 Modified: head/sys/powerpc/booke/spe.c Modified: head/sys/powerpc/booke/spe.c ============================================================================== --- head/sys/powerpc/booke/spe.c Sun Dec 9 04:13:14 2018 (r341751) +++ head/sys/powerpc/booke/spe.c Sun Dec 9 04:54:55 2018 (r341752) @@ -543,16 +543,19 @@ spe_handle_fpdata(struct trapframe *frame) case EFDABS: curthread->td_pcb->pcb_vec.vr[rd][0] = curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + frame->fixreg[rd] = frame->fixreg[ra]; enable_vec(curthread); break; case EFDNABS: curthread->td_pcb->pcb_vec.vr[rd][0] = curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + frame->fixreg[rd] = frame->fixreg[ra]; enable_vec(curthread); break; case EFDNEG: curthread->td_pcb->pcb_vec.vr[rd][0] = curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + frame->fixreg[rd] = frame->fixreg[ra]; enable_vec(curthread); break; case EFDCFS: From owner-svn-src-all@freebsd.org Sun Dec 9 06:10:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52323130E70A; Sun, 9 Dec 2018 06:10:12 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6F817B805; Sun, 9 Dec 2018 06:10:11 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C379A560D; Sun, 9 Dec 2018 06:10:11 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96ABME045825; Sun, 9 Dec 2018 06:10:11 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96ABUf045821; Sun, 9 Dec 2018 06:10:11 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201812090610.wB96ABUf045821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 9 Dec 2018 06:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341755 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 341755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E6F817B805 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.991,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:10:12 -0000 Author: scottl Date: Sun Dec 9 06:10:11 2018 New Revision: 341755 URL: https://svnweb.freebsd.org/changeset/base/341755 Log: Copy and clear the reply descriptor atomically. This prevents concurrency in the interrupt handlers (usually due to timeout/error recovery) from seeing and processing the same descriptor twice. Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mps/mps.c Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Sun Dec 9 06:06:06 2018 (r341754) +++ head/sys/dev/mpr/mpr.c Sun Dec 9 06:10:11 2018 (r341755) @@ -2493,12 +2493,13 @@ void mpr_intr_locked(void *data) { MPI2_REPLY_DESCRIPTORS_UNION *desc; + MPI2_DIAG_RELEASE_REPLY *rel_rep; + mpr_fw_diagnostic_buffer_t *pBuffer; struct mpr_softc *sc; + uint64_t tdesc; struct mpr_command *cm = NULL; uint8_t flags; u_int pq; - MPI2_DIAG_RELEASE_REPLY *rel_rep; - mpr_fw_diagnostic_buffer_t *pBuffer; sc = (struct mpr_softc *)data; @@ -2510,6 +2511,17 @@ mpr_intr_locked(void *data) for ( ;; ) { cm = NULL; desc = &sc->post_queue[sc->replypostindex]; + + /* + * Copy and clear out the descriptor so that any reentry will + * immediately know that this descriptor has already been + * looked at. There is unfortunate casting magic because the + * MPI API doesn't have a cardinal 64bit type. + */ + tdesc = 0xffffffffffffffff; + tdesc = atomic_swap_64((uint64_t *)desc, tdesc); + desc = (MPI2_REPLY_DESCRIPTORS_UNION *)&tdesc; + flags = desc->Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) || @@ -2604,7 +2616,8 @@ mpr_intr_locked(void *data) cm = &sc->commands[ le16toh(desc->AddressReply.SMID)]; KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE, - ("command not inqueue\n")); + ("command SMID %d not inqueue\n", + desc->AddressReply.SMID)); cm->cm_state = MPR_CM_STATE_BUSY; cm->cm_reply = reply; cm->cm_reply_data = @@ -2630,9 +2643,6 @@ mpr_intr_locked(void *data) mpr_display_reply_info(sc,cm->cm_reply); mpr_complete_command(sc, cm); } - - desc->Words.Low = 0xffffffff; - desc->Words.High = 0xffffffff; } if (pq != sc->replypostindex) { Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Dec 9 06:06:06 2018 (r341754) +++ head/sys/dev/mps/mps.c Sun Dec 9 06:10:11 2018 (r341755) @@ -2361,12 +2361,13 @@ void mps_intr_locked(void *data) { MPI2_REPLY_DESCRIPTORS_UNION *desc; + MPI2_DIAG_RELEASE_REPLY *rel_rep; + mps_fw_diagnostic_buffer_t *pBuffer; struct mps_softc *sc; struct mps_command *cm = NULL; + uint64_t tdesc; uint8_t flags; u_int pq; - MPI2_DIAG_RELEASE_REPLY *rel_rep; - mps_fw_diagnostic_buffer_t *pBuffer; sc = (struct mps_softc *)data; @@ -2378,6 +2379,17 @@ mps_intr_locked(void *data) for ( ;; ) { cm = NULL; desc = &sc->post_queue[sc->replypostindex]; + + /* + * Copy and clear out the descriptor so that any reentry will + * immediately know that this descriptor has already been + * looked at. There is unfortunate casting magic because the + * MPI API doesn't have a cardinal 64bit type. + */ + tdesc = 0xffffffffffffffff; + tdesc = atomic_swap_64((uint64_t *)desc, tdesc); + desc = (MPI2_REPLY_DESCRIPTORS_UNION *)&tdesc; + flags = desc->Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) @@ -2496,9 +2508,6 @@ mps_intr_locked(void *data) mps_display_reply_info(sc,cm->cm_reply); mps_complete_command(sc, cm); } - - desc->Words.Low = 0xffffffff; - desc->Words.High = 0xffffffff; } if (pq != sc->replypostindex) { From owner-svn-src-all@freebsd.org Sun Dec 9 06:16:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3809F130EC14; Sun, 9 Dec 2018 06:16:55 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFB547BEF9; Sun, 9 Dec 2018 06:16:54 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAEFC57A0; Sun, 9 Dec 2018 06:16:54 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96GsGq050782; Sun, 9 Dec 2018 06:16:54 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96GsAH050781; Sun, 9 Dec 2018 06:16:54 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201812090616.wB96GsAH050781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 9 Dec 2018 06:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341756 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 341756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CFB547BEF9 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:16:55 -0000 Author: scottl Date: Sun Dec 9 06:16:54 2018 New Revision: 341756 URL: https://svnweb.freebsd.org/changeset/base/341756 Log: Don't allocate the config_intrhook separately from the softc, it's small enough that it costs more code to handle the malloc/free than it saves. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Dec 9 06:10:11 2018 (r341755) +++ head/sys/cam/cam_xpt.c Sun Dec 9 06:16:54 2018 (r341756) @@ -129,7 +129,7 @@ struct xpt_softc { TAILQ_HEAD(,cam_eb) xpt_busses; u_int bus_generation; - struct intr_config_hook *xpt_config_hook; + struct intr_config_hook xpt_config_hook; int boot_delay; struct callout boot_callout; @@ -982,17 +982,8 @@ xpt_init(void *dummy) /* * Register a callback for when interrupts are enabled. */ - xsoftc.xpt_config_hook = - (struct intr_config_hook *)malloc(sizeof(struct intr_config_hook), - M_CAMXPT, M_NOWAIT | M_ZERO); - if (xsoftc.xpt_config_hook == NULL) { - printf("xpt_init: Cannot malloc config hook " - "- failing attach\n"); - return (ENOMEM); - } - xsoftc.xpt_config_hook->ich_func = xpt_config; - if (config_intrhook_establish(xsoftc.xpt_config_hook) != 0) { - free (xsoftc.xpt_config_hook, M_CAMXPT); + xsoftc.xpt_config_hook.ich_func = xpt_config; + if (config_intrhook_establish(&xsoftc.xpt_config_hook) != 0) { printf("xpt_init: config_intrhook_establish failed " "- failing attach\n"); } @@ -5245,9 +5236,7 @@ xpt_finishconfig_task(void *context, int pending) xpt_for_all_devices(xptpassannouncefunc, NULL); /* Release our hook so that the boot can continue. */ - config_intrhook_disestablish(xsoftc.xpt_config_hook); - free(xsoftc.xpt_config_hook, M_CAMXPT); - xsoftc.xpt_config_hook = NULL; + config_intrhook_disestablish(&xsoftc.xpt_config_hook); free(context, M_CAMXPT); } From owner-svn-src-all@freebsd.org Sun Dec 9 06:06:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CF4E130E62E; Sun, 9 Dec 2018 06:06:08 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F93F7B644; Sun, 9 Dec 2018 06:06:07 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AC145603; Sun, 9 Dec 2018 06:06:07 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9667vf045393; Sun, 9 Dec 2018 06:06:07 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9667Kf045391; Sun, 9 Dec 2018 06:06:07 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201812090606.wB9667Kf045391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 9 Dec 2018 06:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341754 - in head/sys: modules powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys: modules powerpc/conf X-SVN-Commit-Revision: 341754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F93F7B644 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:06:08 -0000 Author: scottl Date: Sun Dec 9 06:06:06 2018 New Revision: 341754 URL: https://svnweb.freebsd.org/changeset/base/341754 Log: Remove the mps driver from powerpc 32bit GENERIC, and don't build it and mpr as a module for powerpc or mips. An upcoming commit will cause these drivers to rely on the presence of 64bit atomic operations. Discussed with jhibbits. Modified: head/sys/modules/Makefile head/sys/powerpc/conf/GENERIC Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Dec 9 05:35:22 2018 (r341753) +++ head/sys/modules/Makefile Sun Dec 9 06:06:06 2018 (r341754) @@ -250,8 +250,8 @@ SUBDIR= \ ${_mly} \ mmc \ mmcsd \ - mpr \ - mps \ + ${_mpr} \ + ${_mps} \ mpt \ mqueue \ mrsas \ @@ -521,6 +521,12 @@ _rtwnfw= rtwnfw ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ ${MACHINE_CPUARCH} != "riscv" _cxgbe= cxgbe +.endif + +# These rely on 64bit atomics +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "mips" +_mps= mps +_mpr= mpr .endif .if ${MK_TESTS} != "no" || defined(ALL_MODULES) Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Dec 9 05:35:22 2018 (r341753) +++ head/sys/powerpc/conf/GENERIC Sun Dec 9 06:06:06 2018 (r341754) @@ -129,7 +129,6 @@ options AHC_ALLOW_MEMIO # Attempt to use memory mappe device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion -device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-all@freebsd.org Sun Dec 9 07:01:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 040F41310250; Sun, 9 Dec 2018 07:01:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EFFF07D9CE; Sun, 9 Dec 2018 07:01:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Vt5KgvawtctraVt5Lg78e3; Sun, 09 Dec 2018 00:01:05 -0700 X-Authority-Analysis: v=2.3 cv=Io3Pj43g c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=2ur7OfE09M0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=AD9GVtJHjYr9fbXkUkMA:9 a=CjuIK1q_8ugA:10 a=e9gMuUFOb40A:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 99DF98E0; Sat, 8 Dec 2018 23:01:01 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id wB97112c058759; Sat, 8 Dec 2018 23:01:01 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id wB9711aN058754; Sat, 8 Dec 2018 23:01:01 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201812090701.wB9711aN058754@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: Message from Cy Schubert of "Sun, 09 Dec 2018 06:45:49 +0000." <201812090645.wB96jnso066329@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 08 Dec 2018 23:01:01 -0800 X-CMAE-Envelope: MS4wfAqxHsbGsO2M1yeFgSdKGTSZIAwMDJSjzLzq/A7uaDfeZEgYFAJKN3/At5qvN3Wdkc6xdjPjCucPIzLBLuLrcYJ7RuTuvd0m6/yodQLrsFjQ+hBD1OsR LBaeukcpPWRwKVyzKJV/lUI9exIyrH0lgwzNaHBiDF19hG7Q7UzDHclys9VdP8zKipOgDHADKYZSzpRAQWjor+mLGAi41Jqdn0DHHOQsil3V+FDiUJVRAiU6 qyCfb3MpVbt8s52gwexmtaP9e9zLhsKMPy4iO1FDVnCdQFqyfNlUF+/LCt8H3+VX X-Rspamd-Queue-Id: EFFF07D9CE X-Spamd-Result: default: False [-2.26 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; LONG_SUBJ(1.52)[203]; IP_SCORE(-1.97)[ip: (-4.63), ipnet: 64.59.128.0/20(-2.84), asn: 6327(-2.28), country: CA(-0.09)]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; REPLYTO_EQ_FROM(0.00)[]; NEURAL_HAM_SHORT(-0.11)[-0.106,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 07:01:14 -0000 In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Sun Dec 9 06:45:49 2018 > New Revision: 341759 > URL: https://svnweb.freebsd.org/changeset/base/341759 > > Log: > MFV r341618: > > Update wpa 2.6 --> 2.7. Relnotes: yes -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Dec 9 06:41:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B8EF130F6A6; Sun, 9 Dec 2018 06:41:58 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E14347CA2F; Sun, 9 Dec 2018 06:41:57 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1CA25C5B; Sun, 9 Dec 2018 06:41:57 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96fvwS066024; Sun, 9 Dec 2018 06:41:57 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96fvwo066023; Sun, 9 Dec 2018 06:41:57 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201812090641.wB96fvwo066023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 9 Dec 2018 06:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341757 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 341757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E14347CA2F X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.991,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:41:58 -0000 Author: araujo Date: Sun Dec 9 06:41:57 2018 New Revision: 341757 URL: https://svnweb.freebsd.org/changeset/base/341757 Log: MFC r340046, r340050 r340046: Add support ps/2 scancodes for NumLock, ScrollLock and numerical keypad keys. PR: 213835 Submitted by: Vasily Postnicov Relnotes: Yes Sponsored by: iXsystems Inc. r340050: Remove printf for debug purpose forgotten on r340046. Reported by: Dmitry Luhtionov Modified: stable/12/usr.sbin/bhyve/ps2kbd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/ps2kbd.c ============================================================================== --- stable/12/usr.sbin/bhyve/ps2kbd.c Sun Dec 9 06:16:54 2018 (r341756) +++ stable/12/usr.sbin/bhyve/ps2kbd.c Sun Dec 9 06:41:57 2018 (r341757) @@ -76,6 +76,107 @@ struct ps2kbd_softc { uint8_t curcmd; /* current command for next byte */ }; +#define SCANCODE_E0_PREFIX 1 +struct extended_translation { + uint32_t keysym; + uint8_t scancode; + int flags; +}; + +/* + * FIXME: Pause/break and Print Screen/SysRq require special handling. + */ +static const struct extended_translation extended_translations[] = { + {0xff08, 0x66}, /* Back space */ + {0xff09, 0x0d}, /* Tab */ + {0xff0d, 0x5a}, /* Return */ + {0xff1b, 0x76}, /* Escape */ + {0xff50, 0x6c, SCANCODE_E0_PREFIX}, /* Home */ + {0xff51, 0x6b, SCANCODE_E0_PREFIX}, /* Left arrow */ + {0xff52, 0x75, SCANCODE_E0_PREFIX}, /* Up arrow */ + {0xff53, 0x74, SCANCODE_E0_PREFIX}, /* Right arrow */ + {0xff54, 0x72, SCANCODE_E0_PREFIX}, /* Down arrow */ + {0xff55, 0x7d, SCANCODE_E0_PREFIX}, /* PgUp */ + {0xff56, 0x7a, SCANCODE_E0_PREFIX}, /* PgDown */ + {0xff57, 0x69, SCANCODE_E0_PREFIX}, /* End */ + {0xff63, 0x70, SCANCODE_E0_PREFIX}, /* Ins */ + {0xff8d, 0x5a, SCANCODE_E0_PREFIX}, /* Keypad Enter */ + {0xffe1, 0x12}, /* Left shift */ + {0xffe2, 0x59}, /* Right shift */ + {0xffe3, 0x14}, /* Left control */ + {0xffe4, 0x14, SCANCODE_E0_PREFIX}, /* Right control */ + /* {0xffe7, XXX}, Left meta */ + /* {0xffe8, XXX}, Right meta */ + {0xffe9, 0x11}, /* Left alt */ + {0xfe03, 0x11, SCANCODE_E0_PREFIX}, /* AltGr */ + {0xffea, 0x11, SCANCODE_E0_PREFIX}, /* Right alt */ + {0xffeb, 0x1f, SCANCODE_E0_PREFIX}, /* Left Windows */ + {0xffec, 0x27, SCANCODE_E0_PREFIX}, /* Right Windows */ + {0xffbe, 0x05}, /* F1 */ + {0xffbf, 0x06}, /* F2 */ + {0xffc0, 0x04}, /* F3 */ + {0xffc1, 0x0c}, /* F4 */ + {0xffc2, 0x03}, /* F5 */ + {0xffc3, 0x0b}, /* F6 */ + {0xffc4, 0x83}, /* F7 */ + {0xffc5, 0x0a}, /* F8 */ + {0xffc6, 0x01}, /* F9 */ + {0xffc7, 0x09}, /* F10 */ + {0xffc8, 0x78}, /* F11 */ + {0xffc9, 0x07}, /* F12 */ + {0xffff, 0x71, SCANCODE_E0_PREFIX}, /* Del */ + {0xff14, 0x7e}, /* ScrollLock */ + /* NumLock and Keypads*/ + {0xff7f, 0x77}, /* NumLock */ + {0xffaf, 0x4a, SCANCODE_E0_PREFIX}, /* Keypad slash */ + {0xffaa, 0x7c}, /* Keypad asterisk */ + {0xffad, 0x7b}, /* Keypad minus */ + {0xffab, 0x79}, /* Keypad plus */ + {0xffb7, 0x6c}, /* Keypad 7 */ + {0xff95, 0x6c}, /* Keypad home */ + {0xffb8, 0x75}, /* Keypad 8 */ + {0xff97, 0x75}, /* Keypad up arrow */ + {0xffb9, 0x7d}, /* Keypad 9 */ + {0xff9a, 0x7d}, /* Keypad PgUp */ + {0xffb4, 0x6b}, /* Keypad 4 */ + {0xff96, 0x6b}, /* Keypad left arrow */ + {0xffb5, 0x73}, /* Keypad 5 */ + {0xff9d, 0x73}, /* Keypad empty */ + {0xffb6, 0x74}, /* Keypad 6 */ + {0xff98, 0x74}, /* Keypad right arrow */ + {0xffb1, 0x69}, /* Keypad 1 */ + {0xff9c, 0x69}, /* Keypad end */ + {0xffb2, 0x72}, /* Keypad 2 */ + {0xff99, 0x72}, /* Keypad down arrow */ + {0xffb3, 0x7a}, /* Keypad 3 */ + {0xff9b, 0x7a}, /* Keypad PgDown */ + {0xffb0, 0x70}, /* Keypad 0 */ + {0xff9e, 0x70}, /* Keypad ins */ + {0xffae, 0x71}, /* Keypad . */ + {0xff9f, 0x71}, /* Keypad del */ + {0, 0, 0} /* Terminator */ +}; + +/* ASCII to type 2 scancode lookup table */ +static const uint8_t ascii_translations[128] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x29, 0x16, 0x52, 0x26, 0x25, 0x2e, 0x3d, 0x52, + 0x46, 0x45, 0x3e, 0x55, 0x41, 0x4e, 0x49, 0x4a, + 0x45, 0x16, 0x1e, 0x26, 0x25, 0x2e, 0x36, 0x3d, + 0x3e, 0x46, 0x4c, 0x4c, 0x41, 0x55, 0x49, 0x4a, + 0x1e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, + 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, + 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, + 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x36, 0x4e, + 0x0e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, + 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, + 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, + 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x0e, 0x00, +}; + static void fifo_init(struct ps2kbd_softc *sc) { @@ -212,236 +313,38 @@ static void ps2kbd_keysym_queue(struct ps2kbd_softc *sc, int down, uint32_t keysym) { - /* ASCII to type 2 scancode lookup table */ - const uint8_t translation[128] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x29, 0x16, 0x52, 0x26, 0x25, 0x2e, 0x3d, 0x52, - 0x46, 0x45, 0x3e, 0x55, 0x41, 0x4e, 0x49, 0x4a, - 0x45, 0x16, 0x1e, 0x26, 0x25, 0x2e, 0x36, 0x3d, - 0x3e, 0x46, 0x4c, 0x4c, 0x41, 0x55, 0x49, 0x4a, - 0x1e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, - 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, - 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, - 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x36, 0x4e, - 0x0e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, - 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, - 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, - 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x0e, 0x00, - }; - assert(pthread_mutex_isowned_np(&sc->mtx)); + int e0_prefix, found; + uint8_t code; + const struct extended_translation *trans; - switch (keysym) { - case 0x0 ... 0x7f: - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, translation[keysym]); - break; - case 0xff08: /* Back space */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x66); - break; - case 0xff09: /* Tab */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0d); - break; - case 0xff0d: /* Return */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x5a); - break; - case 0xff1b: /* Escape */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x76); - break; - case 0xff50: /* Home */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x6c); - break; - case 0xff51: /* Left arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x6b); - break; - case 0xff52: /* Up arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x75); - break; - case 0xff53: /* Right arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x74); - break; - case 0xff54: /* Down arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x72); - break; - case 0xff55: /* PgUp */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x7d); - break; - case 0xff56: /* PgDwn */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x7a); - break; - case 0xff57: /* End */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x69); - break; - case 0xff63: /* Ins */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x70); - break; - case 0xff8d: /* Keypad Enter */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x5a); - break; - case 0xffe1: /* Left shift */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x12); - break; - case 0xffe2: /* Right shift */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x59); - break; - case 0xffe3: /* Left control */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x14); - break; - case 0xffe4: /* Right control */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x14); - break; - case 0xffe7: /* Left meta */ - /* XXX */ - break; - case 0xffe8: /* Right meta */ - /* XXX */ - break; - case 0xffe9: /* Left alt */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x11); - break; - case 0xfe03: /* AltGr */ - case 0xffea: /* Right alt */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x11); - break; - case 0xffeb: /* Left Windows */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x1f); - break; - case 0xffec: /* Right Windows */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x27); - break; - case 0xffbe: /* F1 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x05); - break; - case 0xffbf: /* F2 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x06); - break; - case 0xffc0: /* F3 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x04); - break; - case 0xffc1: /* F4 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0C); - break; - case 0xffc2: /* F5 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x03); - break; - case 0xffc3: /* F6 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0B); - break; - case 0xffc4: /* F7 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x83); - break; - case 0xffc5: /* F8 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0A); - break; - case 0xffc6: /* F9 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x01); - break; - case 0xffc7: /* F10 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x09); - break; - case 0xffc8: /* F11 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x78); - break; - case 0xffc9: /* F12 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x07); - break; - case 0xffff: /* Del */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x71); - break; - default: - fprintf(stderr, "Unhandled ps2 keyboard keysym 0x%x\n", - keysym); - break; + found = 0; + if (keysym < 0x80) { + code = ascii_translations[keysym]; + e0_prefix = 0; + found = 1; + } else { + for (trans = &(extended_translations[0]); trans->keysym != 0; + trans++) { + if (keysym == trans->keysym) { + code = trans->scancode; + e0_prefix = trans->flags & SCANCODE_E0_PREFIX; + found = 1; + break; + } + } } + + if (!found) { + fprintf(stderr, "Unhandled ps2 keyboard keysym 0x%x\n", keysym); + return; + } + + if (e0_prefix) + fifo_put(sc, 0xe0); + if (!down) + fifo_put(sc, 0xf0); + fifo_put(sc, code); } static void From owner-svn-src-all@freebsd.org Sun Dec 9 06:42:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE4E2130F6B7; Sun, 9 Dec 2018 06:42:10 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 898877CB27; Sun, 9 Dec 2018 06:42:10 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67C625C67; Sun, 9 Dec 2018 06:42:07 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96g7D5066091; Sun, 9 Dec 2018 06:42:07 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96g7Yh066090; Sun, 9 Dec 2018 06:42:07 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201812090642.wB96g7Yh066090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 9 Dec 2018 06:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341758 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 341758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 898877CB27 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.991,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:42:11 -0000 Author: araujo Date: Sun Dec 9 06:42:06 2018 New Revision: 341758 URL: https://svnweb.freebsd.org/changeset/base/341758 Log: MFC r340046, r340050 r340046: Add support ps/2 scancodes for NumLock, ScrollLock and numerical keypad keys. PR: 213835 Submitted by: Vasily Postnicov Relnotes: Yes Sponsored by: iXsystems Inc. r340050: Remove printf for debug purpose forgotten on r340046. Reported by: Dmitry Luhtionov Modified: stable/11/usr.sbin/bhyve/ps2kbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/ps2kbd.c ============================================================================== --- stable/11/usr.sbin/bhyve/ps2kbd.c Sun Dec 9 06:41:57 2018 (r341757) +++ stable/11/usr.sbin/bhyve/ps2kbd.c Sun Dec 9 06:42:06 2018 (r341758) @@ -76,6 +76,107 @@ struct ps2kbd_softc { uint8_t curcmd; /* current command for next byte */ }; +#define SCANCODE_E0_PREFIX 1 +struct extended_translation { + uint32_t keysym; + uint8_t scancode; + int flags; +}; + +/* + * FIXME: Pause/break and Print Screen/SysRq require special handling. + */ +static const struct extended_translation extended_translations[] = { + {0xff08, 0x66}, /* Back space */ + {0xff09, 0x0d}, /* Tab */ + {0xff0d, 0x5a}, /* Return */ + {0xff1b, 0x76}, /* Escape */ + {0xff50, 0x6c, SCANCODE_E0_PREFIX}, /* Home */ + {0xff51, 0x6b, SCANCODE_E0_PREFIX}, /* Left arrow */ + {0xff52, 0x75, SCANCODE_E0_PREFIX}, /* Up arrow */ + {0xff53, 0x74, SCANCODE_E0_PREFIX}, /* Right arrow */ + {0xff54, 0x72, SCANCODE_E0_PREFIX}, /* Down arrow */ + {0xff55, 0x7d, SCANCODE_E0_PREFIX}, /* PgUp */ + {0xff56, 0x7a, SCANCODE_E0_PREFIX}, /* PgDown */ + {0xff57, 0x69, SCANCODE_E0_PREFIX}, /* End */ + {0xff63, 0x70, SCANCODE_E0_PREFIX}, /* Ins */ + {0xff8d, 0x5a, SCANCODE_E0_PREFIX}, /* Keypad Enter */ + {0xffe1, 0x12}, /* Left shift */ + {0xffe2, 0x59}, /* Right shift */ + {0xffe3, 0x14}, /* Left control */ + {0xffe4, 0x14, SCANCODE_E0_PREFIX}, /* Right control */ + /* {0xffe7, XXX}, Left meta */ + /* {0xffe8, XXX}, Right meta */ + {0xffe9, 0x11}, /* Left alt */ + {0xfe03, 0x11, SCANCODE_E0_PREFIX}, /* AltGr */ + {0xffea, 0x11, SCANCODE_E0_PREFIX}, /* Right alt */ + {0xffeb, 0x1f, SCANCODE_E0_PREFIX}, /* Left Windows */ + {0xffec, 0x27, SCANCODE_E0_PREFIX}, /* Right Windows */ + {0xffbe, 0x05}, /* F1 */ + {0xffbf, 0x06}, /* F2 */ + {0xffc0, 0x04}, /* F3 */ + {0xffc1, 0x0c}, /* F4 */ + {0xffc2, 0x03}, /* F5 */ + {0xffc3, 0x0b}, /* F6 */ + {0xffc4, 0x83}, /* F7 */ + {0xffc5, 0x0a}, /* F8 */ + {0xffc6, 0x01}, /* F9 */ + {0xffc7, 0x09}, /* F10 */ + {0xffc8, 0x78}, /* F11 */ + {0xffc9, 0x07}, /* F12 */ + {0xffff, 0x71, SCANCODE_E0_PREFIX}, /* Del */ + {0xff14, 0x7e}, /* ScrollLock */ + /* NumLock and Keypads*/ + {0xff7f, 0x77}, /* NumLock */ + {0xffaf, 0x4a, SCANCODE_E0_PREFIX}, /* Keypad slash */ + {0xffaa, 0x7c}, /* Keypad asterisk */ + {0xffad, 0x7b}, /* Keypad minus */ + {0xffab, 0x79}, /* Keypad plus */ + {0xffb7, 0x6c}, /* Keypad 7 */ + {0xff95, 0x6c}, /* Keypad home */ + {0xffb8, 0x75}, /* Keypad 8 */ + {0xff97, 0x75}, /* Keypad up arrow */ + {0xffb9, 0x7d}, /* Keypad 9 */ + {0xff9a, 0x7d}, /* Keypad PgUp */ + {0xffb4, 0x6b}, /* Keypad 4 */ + {0xff96, 0x6b}, /* Keypad left arrow */ + {0xffb5, 0x73}, /* Keypad 5 */ + {0xff9d, 0x73}, /* Keypad empty */ + {0xffb6, 0x74}, /* Keypad 6 */ + {0xff98, 0x74}, /* Keypad right arrow */ + {0xffb1, 0x69}, /* Keypad 1 */ + {0xff9c, 0x69}, /* Keypad end */ + {0xffb2, 0x72}, /* Keypad 2 */ + {0xff99, 0x72}, /* Keypad down arrow */ + {0xffb3, 0x7a}, /* Keypad 3 */ + {0xff9b, 0x7a}, /* Keypad PgDown */ + {0xffb0, 0x70}, /* Keypad 0 */ + {0xff9e, 0x70}, /* Keypad ins */ + {0xffae, 0x71}, /* Keypad . */ + {0xff9f, 0x71}, /* Keypad del */ + {0, 0, 0} /* Terminator */ +}; + +/* ASCII to type 2 scancode lookup table */ +static const uint8_t ascii_translations[128] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x29, 0x16, 0x52, 0x26, 0x25, 0x2e, 0x3d, 0x52, + 0x46, 0x45, 0x3e, 0x55, 0x41, 0x4e, 0x49, 0x4a, + 0x45, 0x16, 0x1e, 0x26, 0x25, 0x2e, 0x36, 0x3d, + 0x3e, 0x46, 0x4c, 0x4c, 0x41, 0x55, 0x49, 0x4a, + 0x1e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, + 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, + 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, + 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x36, 0x4e, + 0x0e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, + 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, + 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, + 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x0e, 0x00, +}; + static void fifo_init(struct ps2kbd_softc *sc) { @@ -212,236 +313,38 @@ static void ps2kbd_keysym_queue(struct ps2kbd_softc *sc, int down, uint32_t keysym) { - /* ASCII to type 2 scancode lookup table */ - const uint8_t translation[128] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x29, 0x16, 0x52, 0x26, 0x25, 0x2e, 0x3d, 0x52, - 0x46, 0x45, 0x3e, 0x55, 0x41, 0x4e, 0x49, 0x4a, - 0x45, 0x16, 0x1e, 0x26, 0x25, 0x2e, 0x36, 0x3d, - 0x3e, 0x46, 0x4c, 0x4c, 0x41, 0x55, 0x49, 0x4a, - 0x1e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, - 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, - 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, - 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x36, 0x4e, - 0x0e, 0x1c, 0x32, 0x21, 0x23, 0x24, 0x2b, 0x34, - 0x33, 0x43, 0x3b, 0x42, 0x4b, 0x3a, 0x31, 0x44, - 0x4d, 0x15, 0x2d, 0x1b, 0x2c, 0x3c, 0x2a, 0x1d, - 0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x0e, 0x00, - }; - assert(pthread_mutex_isowned_np(&sc->mtx)); + int e0_prefix, found; + uint8_t code; + const struct extended_translation *trans; - switch (keysym) { - case 0x0 ... 0x7f: - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, translation[keysym]); - break; - case 0xff08: /* Back space */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x66); - break; - case 0xff09: /* Tab */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0d); - break; - case 0xff0d: /* Return */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x5a); - break; - case 0xff1b: /* Escape */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x76); - break; - case 0xff50: /* Home */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x6c); - break; - case 0xff51: /* Left arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x6b); - break; - case 0xff52: /* Up arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x75); - break; - case 0xff53: /* Right arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x74); - break; - case 0xff54: /* Down arrow */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x72); - break; - case 0xff55: /* PgUp */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x7d); - break; - case 0xff56: /* PgDwn */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x7a); - break; - case 0xff57: /* End */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x69); - break; - case 0xff63: /* Ins */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x70); - break; - case 0xff8d: /* Keypad Enter */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x5a); - break; - case 0xffe1: /* Left shift */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x12); - break; - case 0xffe2: /* Right shift */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x59); - break; - case 0xffe3: /* Left control */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x14); - break; - case 0xffe4: /* Right control */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x14); - break; - case 0xffe7: /* Left meta */ - /* XXX */ - break; - case 0xffe8: /* Right meta */ - /* XXX */ - break; - case 0xffe9: /* Left alt */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x11); - break; - case 0xfe03: /* AltGr */ - case 0xffea: /* Right alt */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x11); - break; - case 0xffeb: /* Left Windows */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x1f); - break; - case 0xffec: /* Right Windows */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x27); - break; - case 0xffbe: /* F1 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x05); - break; - case 0xffbf: /* F2 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x06); - break; - case 0xffc0: /* F3 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x04); - break; - case 0xffc1: /* F4 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0C); - break; - case 0xffc2: /* F5 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x03); - break; - case 0xffc3: /* F6 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0B); - break; - case 0xffc4: /* F7 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x83); - break; - case 0xffc5: /* F8 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x0A); - break; - case 0xffc6: /* F9 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x01); - break; - case 0xffc7: /* F10 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x09); - break; - case 0xffc8: /* F11 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x78); - break; - case 0xffc9: /* F12 */ - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x07); - break; - case 0xffff: /* Del */ - fifo_put(sc, 0xe0); - if (!down) - fifo_put(sc, 0xf0); - fifo_put(sc, 0x71); - break; - default: - fprintf(stderr, "Unhandled ps2 keyboard keysym 0x%x\n", - keysym); - break; + found = 0; + if (keysym < 0x80) { + code = ascii_translations[keysym]; + e0_prefix = 0; + found = 1; + } else { + for (trans = &(extended_translations[0]); trans->keysym != 0; + trans++) { + if (keysym == trans->keysym) { + code = trans->scancode; + e0_prefix = trans->flags & SCANCODE_E0_PREFIX; + found = 1; + break; + } + } } + + if (!found) { + fprintf(stderr, "Unhandled ps2 keyboard keysym 0x%x\n", keysym); + return; + } + + if (e0_prefix) + fifo_put(sc, 0xe0); + if (!down) + fifo_put(sc, 0xf0); + fifo_put(sc, code); } static void From owner-svn-src-all@freebsd.org Sun Dec 9 06:46:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8686B130F7C4; Sun, 9 Dec 2018 06:46:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 271097CD5F; Sun, 9 Dec 2018 06:46:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 082C05C8D; Sun, 9 Dec 2018 06:46:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96krTK066433; Sun, 9 Dec 2018 06:46:53 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96kriT066432; Sun, 9 Dec 2018 06:46:53 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812090646.wB96kriT066432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 9 Dec 2018 06:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341760 - stable/12/sys/arm/arm X-SVN-Group: stable-12 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/12/sys/arm/arm X-SVN-Commit-Revision: 341760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 271097CD5F X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:46:54 -0000 Author: mmel Date: Sun Dec 9 06:46:53 2018 New Revision: 341760 URL: https://svnweb.freebsd.org/changeset/base/341760 Log: MFC r341393: Return computed real memory size, not a value from similarly named global variable. Modified: stable/12/sys/arm/arm/physmem.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/arm/physmem.c ============================================================================== --- stable/12/sys/arm/arm/physmem.c Sun Dec 9 06:45:49 2018 (r341759) +++ stable/12/sys/arm/arm/physmem.c Sun Dec 9 06:46:53 2018 (r341760) @@ -265,7 +265,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, if (pavail != NULL) *pavail = availmem; if (prealmem != NULL) - *prealmem = realmem; + *prealmem = totalmem; return (acnt); } From owner-svn-src-all@freebsd.org Sun Dec 9 06:48:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C91E130F820; Sun, 9 Dec 2018 06:48:45 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F205C7CE49; Sun, 9 Dec 2018 06:48:44 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD3D85C8F; Sun, 9 Dec 2018 06:48:44 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96mi6T066561; Sun, 9 Dec 2018 06:48:44 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96miYo066560; Sun, 9 Dec 2018 06:48:44 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201812090648.wB96miYo066560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 9 Dec 2018 06:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341761 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 341761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F205C7CE49 X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:48:45 -0000 Author: araujo Date: Sun Dec 9 06:48:44 2018 New Revision: 341761 URL: https://svnweb.freebsd.org/changeset/base/341761 Log: MFC r340211: Comestic change to try to inline the memset with SSE/AVX instructions. Also switch from int to size_t to keep portability. Reviewed by: brooks Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D17795 Modified: stable/12/usr.sbin/bhyve/pci_nvme.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_nvme.c Sun Dec 9 06:46:53 2018 (r341760) +++ stable/12/usr.sbin/bhyve/pci_nvme.c Sun Dec 9 06:48:44 2018 (r341761) @@ -251,11 +251,13 @@ static void pci_nvme_io_partial(struct blockif_req *br (NVME_STATUS_SC_MASK << NVME_STATUS_SC_SHIFT)) static __inline void -cpywithpad(char *dst, int dst_size, const char *src, char pad) +cpywithpad(char *dst, size_t dst_size, const char *src, char pad) { - int len = strnlen(src, dst_size); + size_t len; + + len = strnlen(src, dst_size); + memset(dst, pad, dst_size); memcpy(dst, src, len); - memset(dst + len, pad, dst_size - len); } static __inline void From owner-svn-src-all@freebsd.org Sun Dec 9 06:52:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA456130FCCF; Sun, 9 Dec 2018 06:52:26 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DB937D39E; Sun, 9 Dec 2018 06:52:26 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 406835E18; Sun, 9 Dec 2018 06:52:26 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96qQkE071405; Sun, 9 Dec 2018 06:52:26 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96qQC1071404; Sun, 9 Dec 2018 06:52:26 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201812090652.wB96qQC1071404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 9 Dec 2018 06:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341762 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 341762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DB937D39E X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:52:26 -0000 Author: scottl Date: Sun Dec 9 06:52:25 2018 New Revision: 341762 URL: https://svnweb.freebsd.org/changeset/base/341762 Log: I missed powerpcspe in the previous commit for excluding mps and mpr. I also learned that 'mips' is overly broad and covers 64bit architectures too. However, it's not worth the fight right now, so any refinements will have to come another day. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Dec 9 06:48:44 2018 (r341761) +++ head/sys/modules/Makefile Sun Dec 9 06:52:25 2018 (r341762) @@ -524,7 +524,8 @@ _cxgbe= cxgbe .endif # These rely on 64bit atomics -.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "mips" +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspc" && \ + ${MACHINE_CPUARCH} != "mips" _mps= mps _mpr= mpr .endif From owner-svn-src-all@freebsd.org Sun Dec 9 07:08:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE09B1310773; Sun, 9 Dec 2018 07:08:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 04F6A7DF5A; Sun, 9 Dec 2018 07:08:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id VtCQgvc82ctraVtCRg79AW; Sun, 09 Dec 2018 00:08:23 -0700 X-Authority-Analysis: v=2.3 cv=Io3Pj43g c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=2ur7OfE09M0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=ADuDk7LhBdMUnsHi2f4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 0973E914; Sat, 8 Dec 2018 23:08:22 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id wB978L9R098151; Sat, 8 Dec 2018 23:08:21 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id wB978Li6098145; Sat, 8 Dec 2018 23:08:21 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201812090708.wB978Li6098145@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: Message from Cy Schubert of "Sun, 09 Dec 2018 06:45:49 +0000." <201812090645.wB96jnso066329@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 08 Dec 2018 23:08:21 -0800 X-CMAE-Envelope: MS4wfOq3Jg7m20a7eVMxSq3Eymh/AH+Upz6gX+pOwq4G/V/eRvqr4yQXTiRxUBvzc99k0GALOHU8286Pi4PfYy5YxkB62AmBFtGpAhuS5TGVFmntBvRhPBUH 4WvTh/NFCnoDClh9dAXymt34AxFk5GyaLXWr+4gnJsS/vyJyGKA3cs/FdlkRFaVQROxufsy4hnR3I+6/bCxRQM047R1RldWklog/RsK22YLqyLxYDnGhwhEv DVdY5xE60H8Aqy0BarErY5JqQfQfix1RChX+XOghNyO9A/YePorNL9GlDFdbvwMv X-Rspamd-Queue-Id: 04F6A7DF5A X-Spamd-Result: default: False [-2.36 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; LONG_SUBJ(1.52)[203]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; REPLYTO_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; NEURAL_HAM_SHORT(-0.09)[-0.095,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; IP_SCORE(-2.08)[ip: (-5.26), ipnet: 64.59.128.0/20(-2.82), asn: 6327(-2.25), country: CA(-0.09)]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 07:08:32 -0000 In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Sun Dec 9 06:45:49 2018 > New Revision: 341759 > URL: https://svnweb.freebsd.org/changeset/base/341759 > > Log: > MFV r341618: > > Update wpa 2.6 --> 2.7. In order to build this cleanly, artifacts from wpa 2.6 need to be removed first. Either build using a clean /usr/obj or if building using -DNO_CLEAN, rm -rf /usr/obj/opt/src/svn-current/*/usr.sbin/wpa first. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Dec 9 06:45:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DE8B130F76C; Sun, 9 Dec 2018 06:45:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16D907CC7A; Sun, 9 Dec 2018 06:45:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E637F5C8A; Sun, 9 Dec 2018 06:45:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB96joCY066336; Sun, 9 Dec 2018 06:45:50 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB96jnso066329; Sun, 9 Dec 2018 06:45:49 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812090645.wB96jnso066329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 9 Dec 2018 06:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_common contrib/wpa/src/eap... X-SVN-Commit-Revision: 341759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 16D907CC7A X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-0.99)[-0.993,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 06:45:52 -0000 Author: cy Date: Sun Dec 9 06:45:49 2018 New Revision: 341759 URL: https://svnweb.freebsd.org/changeset/base/341759 Log: MFV r341618: Update wpa 2.6 --> 2.7. Added: head/contrib/wpa/src/ap/dpp_hostapd.c - copied unchanged from r341619, vendor/wpa/dist/src/ap/dpp_hostapd.c head/contrib/wpa/src/ap/dpp_hostapd.h - copied unchanged from r341619, vendor/wpa/dist/src/ap/dpp_hostapd.h head/contrib/wpa/src/ap/eth_p_oui.c - copied unchanged from r341619, vendor/wpa/dist/src/ap/eth_p_oui.c head/contrib/wpa/src/ap/eth_p_oui.h - copied unchanged from r341619, vendor/wpa/dist/src/ap/eth_p_oui.h head/contrib/wpa/src/ap/fils_hlp.c - copied unchanged from r341619, vendor/wpa/dist/src/ap/fils_hlp.c head/contrib/wpa/src/ap/fils_hlp.h - copied unchanged from r341619, vendor/wpa/dist/src/ap/fils_hlp.h head/contrib/wpa/src/ap/gas_query_ap.c - copied unchanged from r341619, vendor/wpa/dist/src/ap/gas_query_ap.c head/contrib/wpa/src/ap/gas_query_ap.h - copied unchanged from r341619, vendor/wpa/dist/src/ap/gas_query_ap.h head/contrib/wpa/src/ap/ieee802_11_he.c - copied unchanged from r341619, vendor/wpa/dist/src/ap/ieee802_11_he.c head/contrib/wpa/src/common/dhcp.h - copied, changed from r341619, vendor/wpa/dist/src/common/dhcp.h head/contrib/wpa/src/common/dpp.c - copied unchanged from r341619, vendor/wpa/dist/src/common/dpp.c head/contrib/wpa/src/common/dpp.h - copied unchanged from r341619, vendor/wpa/dist/src/common/dpp.h head/contrib/wpa/src/common/gas_server.c - copied unchanged from r341619, vendor/wpa/dist/src/common/gas_server.c head/contrib/wpa/src/common/gas_server.h - copied unchanged from r341619, vendor/wpa/dist/src/common/gas_server.h head/contrib/wpa/src/crypto/crypto_linux.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/crypto_linux.c head/contrib/wpa/src/crypto/crypto_nettle.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/crypto_nettle.c head/contrib/wpa/src/crypto/crypto_wolfssl.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/crypto_wolfssl.c head/contrib/wpa/src/crypto/fips_prf_wolfssl.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/fips_prf_wolfssl.c head/contrib/wpa/src/crypto/sha384-kdf.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/sha384-kdf.c head/contrib/wpa/src/crypto/sha384.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/sha384.c head/contrib/wpa/src/crypto/sha512-kdf.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/sha512-kdf.c head/contrib/wpa/src/crypto/sha512-prf.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/sha512-prf.c head/contrib/wpa/src/crypto/sha512.h - copied unchanged from r341619, vendor/wpa/dist/src/crypto/sha512.h head/contrib/wpa/src/crypto/tls_wolfssl.c - copied unchanged from r341619, vendor/wpa/dist/src/crypto/tls_wolfssl.c head/contrib/wpa/src/drivers/driver_macsec_linux.c - copied unchanged from r341619, vendor/wpa/dist/src/drivers/driver_macsec_linux.c head/contrib/wpa/src/drivers/driver_wired_common.c - copied unchanged from r341619, vendor/wpa/dist/src/drivers/driver_wired_common.c head/contrib/wpa/src/drivers/driver_wired_common.h - copied unchanged from r341619, vendor/wpa/dist/src/drivers/driver_wired_common.h head/contrib/wpa/src/utils/crc32.c - copied unchanged from r341619, vendor/wpa/dist/src/utils/crc32.c head/contrib/wpa/src/utils/crc32.h - copied unchanged from r341619, vendor/wpa/dist/src/utils/crc32.h head/contrib/wpa/src/utils/json.c - copied unchanged from r341619, vendor/wpa/dist/src/utils/json.c head/contrib/wpa/src/utils/json.h - copied unchanged from r341619, vendor/wpa/dist/src/utils/json.h head/contrib/wpa/wpa_supplicant/dpp_supplicant.c - copied unchanged from r341619, vendor/wpa/dist/wpa_supplicant/dpp_supplicant.c head/contrib/wpa/wpa_supplicant/dpp_supplicant.h - copied unchanged from r341619, vendor/wpa/dist/wpa_supplicant/dpp_supplicant.h head/contrib/wpa/wpa_supplicant/examples/dpp-qrcode.py - copied unchanged from r341619, vendor/wpa/dist/wpa_supplicant/examples/dpp-qrcode.py head/contrib/wpa/wpa_supplicant/op_classes.c - copied unchanged from r341619, vendor/wpa/dist/wpa_supplicant/op_classes.c head/contrib/wpa/wpa_supplicant/rrm.c - copied unchanged from r341619, vendor/wpa/dist/wpa_supplicant/rrm.c Deleted: head/contrib/wpa/src/ap/peerkey_auth.c head/contrib/wpa/src/rsn_supp/peerkey.c head/contrib/wpa/src/rsn_supp/peerkey.h Modified: head/contrib/wpa/CONTRIBUTIONS head/contrib/wpa/COPYING head/contrib/wpa/README head/contrib/wpa/hostapd/ChangeLog head/contrib/wpa/hostapd/README head/contrib/wpa/hostapd/config_file.c head/contrib/wpa/hostapd/config_file.h head/contrib/wpa/hostapd/ctrl_iface.c head/contrib/wpa/hostapd/defconfig head/contrib/wpa/hostapd/hlr_auc_gw.c head/contrib/wpa/hostapd/hostapd.conf head/contrib/wpa/hostapd/hostapd.eap_user_sqlite head/contrib/wpa/hostapd/hostapd_cli.c head/contrib/wpa/hostapd/main.c head/contrib/wpa/hs20/client/est.c head/contrib/wpa/hs20/client/oma_dm_client.c head/contrib/wpa/hs20/client/osu_client.c head/contrib/wpa/hs20/client/osu_client.h head/contrib/wpa/src/ap/acs.c head/contrib/wpa/src/ap/acs.h head/contrib/wpa/src/ap/ap_config.c head/contrib/wpa/src/ap/ap_config.h head/contrib/wpa/src/ap/ap_drv_ops.c head/contrib/wpa/src/ap/ap_drv_ops.h head/contrib/wpa/src/ap/ap_mlme.c head/contrib/wpa/src/ap/authsrv.c head/contrib/wpa/src/ap/beacon.c head/contrib/wpa/src/ap/beacon.h head/contrib/wpa/src/ap/bss_load.c head/contrib/wpa/src/ap/ctrl_iface_ap.c head/contrib/wpa/src/ap/ctrl_iface_ap.h head/contrib/wpa/src/ap/dfs.c head/contrib/wpa/src/ap/dfs.h head/contrib/wpa/src/ap/dhcp_snoop.c head/contrib/wpa/src/ap/drv_callbacks.c head/contrib/wpa/src/ap/eap_user_db.c head/contrib/wpa/src/ap/gas_serv.c head/contrib/wpa/src/ap/gas_serv.h head/contrib/wpa/src/ap/hostapd.c head/contrib/wpa/src/ap/hostapd.h head/contrib/wpa/src/ap/hs20.c head/contrib/wpa/src/ap/hs20.h head/contrib/wpa/src/ap/hw_features.c head/contrib/wpa/src/ap/ieee802_11.c head/contrib/wpa/src/ap/ieee802_11.h head/contrib/wpa/src/ap/ieee802_11_auth.c head/contrib/wpa/src/ap/ieee802_11_auth.h head/contrib/wpa/src/ap/ieee802_11_ht.c head/contrib/wpa/src/ap/ieee802_11_shared.c head/contrib/wpa/src/ap/ieee802_11_vht.c head/contrib/wpa/src/ap/ieee802_1x.c head/contrib/wpa/src/ap/ieee802_1x.h head/contrib/wpa/src/ap/ndisc_snoop.c head/contrib/wpa/src/ap/neighbor_db.c head/contrib/wpa/src/ap/neighbor_db.h head/contrib/wpa/src/ap/pmksa_cache_auth.c head/contrib/wpa/src/ap/pmksa_cache_auth.h head/contrib/wpa/src/ap/rrm.c head/contrib/wpa/src/ap/rrm.h head/contrib/wpa/src/ap/sta_info.c head/contrib/wpa/src/ap/sta_info.h head/contrib/wpa/src/ap/taxonomy.c head/contrib/wpa/src/ap/tkip_countermeasures.c head/contrib/wpa/src/ap/vlan_init.c head/contrib/wpa/src/ap/wmm.c head/contrib/wpa/src/ap/wnm_ap.c head/contrib/wpa/src/ap/wnm_ap.h head/contrib/wpa/src/ap/wpa_auth.c head/contrib/wpa/src/ap/wpa_auth.h head/contrib/wpa/src/ap/wpa_auth_ft.c head/contrib/wpa/src/ap/wpa_auth_glue.c head/contrib/wpa/src/ap/wpa_auth_i.h head/contrib/wpa/src/ap/wpa_auth_ie.c head/contrib/wpa/src/ap/wpa_auth_ie.h head/contrib/wpa/src/ap/wps_hostapd.c head/contrib/wpa/src/common/common_module_tests.c head/contrib/wpa/src/common/ctrl_iface_common.c head/contrib/wpa/src/common/ctrl_iface_common.h head/contrib/wpa/src/common/defs.h head/contrib/wpa/src/common/gas.c head/contrib/wpa/src/common/gas.h head/contrib/wpa/src/common/hw_features_common.c head/contrib/wpa/src/common/hw_features_common.h head/contrib/wpa/src/common/ieee802_11_common.c head/contrib/wpa/src/common/ieee802_11_common.h head/contrib/wpa/src/common/ieee802_11_defs.h head/contrib/wpa/src/common/ieee802_1x_defs.h head/contrib/wpa/src/common/privsep_commands.h head/contrib/wpa/src/common/qca-vendor.h head/contrib/wpa/src/common/sae.c head/contrib/wpa/src/common/sae.h head/contrib/wpa/src/common/version.h head/contrib/wpa/src/common/wpa_common.c head/contrib/wpa/src/common/wpa_common.h head/contrib/wpa/src/common/wpa_ctrl.h head/contrib/wpa/src/common/wpa_helpers.c head/contrib/wpa/src/crypto/aes-ctr.c head/contrib/wpa/src/crypto/aes-internal-dec.c head/contrib/wpa/src/crypto/aes-internal-enc.c head/contrib/wpa/src/crypto/aes-siv.c head/contrib/wpa/src/crypto/aes.h head/contrib/wpa/src/crypto/aes_siv.h head/contrib/wpa/src/crypto/aes_wrap.h head/contrib/wpa/src/crypto/crypto.h head/contrib/wpa/src/crypto/crypto_gnutls.c head/contrib/wpa/src/crypto/crypto_internal-modexp.c head/contrib/wpa/src/crypto/crypto_libtomcrypt.c head/contrib/wpa/src/crypto/crypto_module_tests.c head/contrib/wpa/src/crypto/crypto_none.c head/contrib/wpa/src/crypto/crypto_openssl.c head/contrib/wpa/src/crypto/des-internal.c head/contrib/wpa/src/crypto/dh_groups.c head/contrib/wpa/src/crypto/ms_funcs.c head/contrib/wpa/src/crypto/ms_funcs.h head/contrib/wpa/src/crypto/random.c head/contrib/wpa/src/crypto/sha1-internal.c head/contrib/wpa/src/crypto/sha256-internal.c head/contrib/wpa/src/crypto/sha256-kdf.c head/contrib/wpa/src/crypto/sha384-prf.c head/contrib/wpa/src/crypto/sha384.h head/contrib/wpa/src/crypto/tls.h head/contrib/wpa/src/crypto/tls_gnutls.c head/contrib/wpa/src/crypto/tls_internal.c head/contrib/wpa/src/crypto/tls_none.c head/contrib/wpa/src/crypto/tls_openssl.c head/contrib/wpa/src/drivers/driver.h head/contrib/wpa/src/drivers/driver_common.c head/contrib/wpa/src/drivers/driver_macsec_qca.c head/contrib/wpa/src/drivers/driver_ndis.c head/contrib/wpa/src/drivers/driver_nl80211.h head/contrib/wpa/src/drivers/driver_nl80211_capa.c head/contrib/wpa/src/drivers/driver_nl80211_event.c head/contrib/wpa/src/drivers/driver_nl80211_monitor.c head/contrib/wpa/src/drivers/driver_nl80211_scan.c head/contrib/wpa/src/drivers/driver_privsep.c head/contrib/wpa/src/drivers/driver_wired.c head/contrib/wpa/src/drivers/drivers.c head/contrib/wpa/src/eap_common/eap_eke_common.c head/contrib/wpa/src/eap_common/eap_fast_common.c head/contrib/wpa/src/eap_common/eap_pwd_common.c head/contrib/wpa/src/eap_common/eap_pwd_common.h head/contrib/wpa/src/eap_common/eap_sim_common.c head/contrib/wpa/src/eap_peer/eap.c head/contrib/wpa/src/eap_peer/eap.h head/contrib/wpa/src/eap_peer/eap_aka.c head/contrib/wpa/src/eap_peer/eap_config.h head/contrib/wpa/src/eap_peer/eap_eke.c head/contrib/wpa/src/eap_peer/eap_fast.c head/contrib/wpa/src/eap_peer/eap_fast_pac.c head/contrib/wpa/src/eap_peer/eap_gpsk.c head/contrib/wpa/src/eap_peer/eap_i.h head/contrib/wpa/src/eap_peer/eap_ikev2.c head/contrib/wpa/src/eap_peer/eap_leap.c head/contrib/wpa/src/eap_peer/eap_mschapv2.c head/contrib/wpa/src/eap_peer/eap_pax.c head/contrib/wpa/src/eap_peer/eap_peap.c head/contrib/wpa/src/eap_peer/eap_proxy.h head/contrib/wpa/src/eap_peer/eap_proxy_dummy.c head/contrib/wpa/src/eap_peer/eap_psk.c head/contrib/wpa/src/eap_peer/eap_pwd.c head/contrib/wpa/src/eap_peer/eap_sake.c head/contrib/wpa/src/eap_peer/eap_sim.c head/contrib/wpa/src/eap_peer/eap_tls.c head/contrib/wpa/src/eap_peer/eap_tls_common.c head/contrib/wpa/src/eap_peer/eap_tls_common.h head/contrib/wpa/src/eap_peer/eap_ttls.c head/contrib/wpa/src/eap_peer/ikev2.c head/contrib/wpa/src/eap_peer/tncc.c head/contrib/wpa/src/eap_server/eap.h head/contrib/wpa/src/eap_server/eap_i.h head/contrib/wpa/src/eap_server/eap_server.c head/contrib/wpa/src/eap_server/eap_server_aka.c head/contrib/wpa/src/eap_server/eap_server_eke.c head/contrib/wpa/src/eap_server/eap_server_fast.c head/contrib/wpa/src/eap_server/eap_server_gpsk.c head/contrib/wpa/src/eap_server/eap_server_gtc.c head/contrib/wpa/src/eap_server/eap_server_ikev2.c head/contrib/wpa/src/eap_server/eap_server_mschapv2.c head/contrib/wpa/src/eap_server/eap_server_pax.c head/contrib/wpa/src/eap_server/eap_server_psk.c head/contrib/wpa/src/eap_server/eap_server_pwd.c head/contrib/wpa/src/eap_server/eap_server_sake.c head/contrib/wpa/src/eap_server/eap_server_sim.c head/contrib/wpa/src/eap_server/eap_server_tls.c head/contrib/wpa/src/eap_server/eap_server_tls_common.c head/contrib/wpa/src/eap_server/eap_server_ttls.c head/contrib/wpa/src/eap_server/eap_server_wsc.c head/contrib/wpa/src/eap_server/eap_tls_common.h head/contrib/wpa/src/eap_server/ikev2.c head/contrib/wpa/src/eap_server/tncs.c head/contrib/wpa/src/eapol_auth/eapol_auth_sm.c head/contrib/wpa/src/eapol_auth/eapol_auth_sm.h head/contrib/wpa/src/eapol_supp/eapol_supp_sm.c head/contrib/wpa/src/eapol_supp/eapol_supp_sm.h head/contrib/wpa/src/fst/fst_ctrl_aux.h head/contrib/wpa/src/fst/fst_ctrl_iface.c head/contrib/wpa/src/fst/fst_group.c head/contrib/wpa/src/fst/fst_iface.h head/contrib/wpa/src/fst/fst_session.c head/contrib/wpa/src/l2_packet/l2_packet.h head/contrib/wpa/src/l2_packet/l2_packet_privsep.c head/contrib/wpa/src/p2p/p2p.c head/contrib/wpa/src/p2p/p2p.h head/contrib/wpa/src/p2p/p2p_go_neg.c head/contrib/wpa/src/p2p/p2p_group.c head/contrib/wpa/src/p2p/p2p_i.h head/contrib/wpa/src/p2p/p2p_pd.c head/contrib/wpa/src/p2p/p2p_sd.c head/contrib/wpa/src/pae/ieee802_1x_cp.c head/contrib/wpa/src/pae/ieee802_1x_kay.c head/contrib/wpa/src/pae/ieee802_1x_kay.h head/contrib/wpa/src/pae/ieee802_1x_kay_i.h head/contrib/wpa/src/pae/ieee802_1x_secy_ops.c head/contrib/wpa/src/pae/ieee802_1x_secy_ops.h head/contrib/wpa/src/radius/radius.c head/contrib/wpa/src/radius/radius.h head/contrib/wpa/src/radius/radius_client.c head/contrib/wpa/src/radius/radius_das.c head/contrib/wpa/src/radius/radius_das.h head/contrib/wpa/src/radius/radius_server.c head/contrib/wpa/src/radius/radius_server.h head/contrib/wpa/src/rsn_supp/pmksa_cache.c head/contrib/wpa/src/rsn_supp/pmksa_cache.h head/contrib/wpa/src/rsn_supp/preauth.c head/contrib/wpa/src/rsn_supp/tdls.c head/contrib/wpa/src/rsn_supp/wpa.c head/contrib/wpa/src/rsn_supp/wpa.h head/contrib/wpa/src/rsn_supp/wpa_ft.c head/contrib/wpa/src/rsn_supp/wpa_i.h head/contrib/wpa/src/rsn_supp/wpa_ie.c head/contrib/wpa/src/rsn_supp/wpa_ie.h head/contrib/wpa/src/tls/libtommath.c head/contrib/wpa/src/tls/rsa.c head/contrib/wpa/src/tls/tlsv1_client.c head/contrib/wpa/src/tls/tlsv1_client_read.c head/contrib/wpa/src/tls/tlsv1_common.c head/contrib/wpa/src/tls/tlsv1_cred.c head/contrib/wpa/src/tls/tlsv1_server.c head/contrib/wpa/src/tls/x509v3.c head/contrib/wpa/src/utils/base64.c head/contrib/wpa/src/utils/base64.h head/contrib/wpa/src/utils/browser-wpadebug.c head/contrib/wpa/src/utils/common.c head/contrib/wpa/src/utils/common.h head/contrib/wpa/src/utils/eloop.h head/contrib/wpa/src/utils/http_curl.c head/contrib/wpa/src/utils/os.h head/contrib/wpa/src/utils/os_none.c head/contrib/wpa/src/utils/os_unix.c head/contrib/wpa/src/utils/os_win32.c head/contrib/wpa/src/utils/trace.c head/contrib/wpa/src/utils/utils_module_tests.c head/contrib/wpa/src/utils/uuid.c head/contrib/wpa/src/utils/uuid.h head/contrib/wpa/src/utils/wpa_debug.c head/contrib/wpa/src/utils/wpa_debug.h head/contrib/wpa/src/utils/wpabuf.c head/contrib/wpa/src/utils/xml-utils.c head/contrib/wpa/src/wps/wps.c head/contrib/wpa/src/wps/wps_common.c head/contrib/wpa/src/wps/wps_er.c head/contrib/wpa/src/wps/wps_registrar.c head/contrib/wpa/wpa_supplicant/Android.mk head/contrib/wpa/wpa_supplicant/ChangeLog head/contrib/wpa/wpa_supplicant/README head/contrib/wpa/wpa_supplicant/README-HS20 head/contrib/wpa/wpa_supplicant/android.config head/contrib/wpa/wpa_supplicant/ap.c head/contrib/wpa/wpa_supplicant/ap.h head/contrib/wpa/wpa_supplicant/autoscan.c head/contrib/wpa/wpa_supplicant/bgscan.c head/contrib/wpa/wpa_supplicant/bgscan_learn.c head/contrib/wpa/wpa_supplicant/bgscan_simple.c head/contrib/wpa/wpa_supplicant/bss.c head/contrib/wpa/wpa_supplicant/bss.h head/contrib/wpa/wpa_supplicant/config.c head/contrib/wpa/wpa_supplicant/config.h head/contrib/wpa/wpa_supplicant/config_file.c head/contrib/wpa/wpa_supplicant/config_ssid.h head/contrib/wpa/wpa_supplicant/ctrl_iface.c head/contrib/wpa/wpa_supplicant/ctrl_iface_named_pipe.c head/contrib/wpa/wpa_supplicant/ctrl_iface_udp.c head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_wps.c head/contrib/wpa/wpa_supplicant/defconfig head/contrib/wpa/wpa_supplicant/driver_i.h head/contrib/wpa/wpa_supplicant/events.c head/contrib/wpa/wpa_supplicant/examples/wps-ap-cli head/contrib/wpa/wpa_supplicant/gas_query.c head/contrib/wpa/wpa_supplicant/gas_query.h head/contrib/wpa/wpa_supplicant/hs20_supplicant.c head/contrib/wpa/wpa_supplicant/hs20_supplicant.h head/contrib/wpa/wpa_supplicant/ibss_rsn.c head/contrib/wpa/wpa_supplicant/interworking.c head/contrib/wpa/wpa_supplicant/interworking.h head/contrib/wpa/wpa_supplicant/mbo.c head/contrib/wpa/wpa_supplicant/mesh.c head/contrib/wpa/wpa_supplicant/mesh_mpm.c head/contrib/wpa/wpa_supplicant/mesh_rsn.c head/contrib/wpa/wpa_supplicant/notify.c head/contrib/wpa/wpa_supplicant/notify.h head/contrib/wpa/wpa_supplicant/offchannel.c head/contrib/wpa/wpa_supplicant/p2p_supplicant.c head/contrib/wpa/wpa_supplicant/preauth_test.c head/contrib/wpa/wpa_supplicant/scan.c head/contrib/wpa/wpa_supplicant/sme.c head/contrib/wpa/wpa_supplicant/sme.h head/contrib/wpa/wpa_supplicant/wifi_display.c head/contrib/wpa/wpa_supplicant/wmm_ac.c head/contrib/wpa/wpa_supplicant/wnm_sta.c head/contrib/wpa/wpa_supplicant/wnm_sta.h head/contrib/wpa/wpa_supplicant/wpa_cli.c head/contrib/wpa/wpa_supplicant/wpa_passphrase.c head/contrib/wpa/wpa_supplicant/wpa_priv.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf head/contrib/wpa/wpa_supplicant/wpa_supplicant_i.h head/contrib/wpa/wpa_supplicant/wpa_supplicant_template.conf head/contrib/wpa/wpa_supplicant/wpas_glue.c head/contrib/wpa/wpa_supplicant/wpas_kay.c head/contrib/wpa/wpa_supplicant/wpas_kay.h head/contrib/wpa/wpa_supplicant/wps_supplicant.c head/usr.sbin/wpa/Makefile.crypto head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/wpa_cli/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Directory Properties: head/contrib/wpa/ (props changed) Modified: head/contrib/wpa/CONTRIBUTIONS ============================================================================== --- head/contrib/wpa/CONTRIBUTIONS Sun Dec 9 06:42:06 2018 (r341758) +++ head/contrib/wpa/CONTRIBUTIONS Sun Dec 9 06:45:49 2018 (r341759) @@ -140,7 +140,7 @@ The license terms used for hostap.git files Modified BSD license (no advertisement clause): -Copyright (c) 2002-2016, Jouni Malinen and contributors +Copyright (c) 2002-2018, Jouni Malinen and contributors All Rights Reserved. Redistribution and use in source and binary forms, with or without Modified: head/contrib/wpa/COPYING ============================================================================== --- head/contrib/wpa/COPYING Sun Dec 9 06:42:06 2018 (r341758) +++ head/contrib/wpa/COPYING Sun Dec 9 06:45:49 2018 (r341759) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2016, Jouni Malinen and contributors +Copyright (c) 2002-2018, Jouni Malinen and contributors All Rights Reserved. Modified: head/contrib/wpa/README ============================================================================== --- head/contrib/wpa/README Sun Dec 9 06:42:06 2018 (r341758) +++ head/contrib/wpa/README Sun Dec 9 06:45:49 2018 (r341759) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2016, Jouni Malinen and contributors +Copyright (c) 2002-2018, Jouni Malinen and contributors All Rights Reserved. These programs are licensed under the BSD license (the one with Modified: head/contrib/wpa/hostapd/ChangeLog ============================================================================== --- head/contrib/wpa/hostapd/ChangeLog Sun Dec 9 06:42:06 2018 (r341758) +++ head/contrib/wpa/hostapd/ChangeLog Sun Dec 9 06:45:49 2018 (r341759) @@ -1,5 +1,60 @@ ChangeLog for hostapd +2018-12-02 - v2.7 + * fixed WPA packet number reuse with replayed messages and key + reinstallation + [http://w1.fi/security/2017-1/] (CVE-2017-13082) + * added support for FILS (IEEE 802.11ai) shared key authentication + * added support for OWE (Opportunistic Wireless Encryption, RFC 8110; + and transition mode defined by WFA) + * added support for DPP (Wi-Fi Device Provisioning Protocol) + * FT: + - added local generation of PMK-R0/PMK-R1 for FT-PSK + (ft_psk_generate_local=1) + - replaced inter-AP protocol with a cleaner design that is more + easily extensible; this breaks backward compatibility and requires + all APs in the ESS to be updated at the same time to maintain FT + functionality + - added support for wildcard R0KH/R1KH + - replaced r0_key_lifetime (minutes) parameter with + ft_r0_key_lifetime (seconds) + - fixed wpa_psk_file use for FT-PSK + - fixed FT-SAE PMKID matching + - added expiration to PMK-R0 and PMK-R1 cache + - added IEEE VLAN support (including tagged VLANs) + - added support for SHA384 based AKM + * SAE + - fixed some PMKSA caching cases with SAE + - added support for configuring SAE password separately of the + WPA2 PSK/passphrase + - added option to require MFP for SAE associations + (sae_require_pmf=1) + - fixed PTK and EAPOL-Key integrity and key-wrap algorithm selection + for SAE; + note: this is not backwards compatible, i.e., both the AP and + station side implementations will need to be update at the same + time to maintain interoperability + - added support for Password Identifier + * hostapd_cli: added support for command history and completion + * added support for requesting beacon report + * large number of other fixes, cleanup, and extensions + * added option to configure EAPOL-Key retry limits + (wpa_group_update_count and wpa_pairwise_update_count) + * removed all PeerKey functionality + * fixed nl80211 AP mode configuration regression with Linux 4.15 and + newer + * added support for using wolfSSL cryptographic library + * fixed some 20/40 MHz coexistence cases where the BSS could drop to + 20 MHz even when 40 MHz would be allowed + * Hotspot 2.0 + - added support for setting Venue URL ANQP-element (venue_url) + - added support for advertising Hotspot 2.0 operator icons + - added support for Roaming Consortium Selection element + - added support for Terms and Conditions + - added support for OSEN connection in a shared RSN BSS + * added support for using OpenSSL 1.1.1 + * added EAP-pwd server support for salted passwords + 2016-10-02 - v2.6 * fixed EAP-pwd last fragment validation [http://w1.fi/security/2015-7/] (CVE-2015-5314) Modified: head/contrib/wpa/hostapd/README ============================================================================== --- head/contrib/wpa/hostapd/README Sun Dec 9 06:42:06 2018 (r341758) +++ head/contrib/wpa/hostapd/README Sun Dec 9 06:45:49 2018 (r341759) @@ -2,7 +2,7 @@ hostapd - user space IEEE 802.11 AP and IEEE 802.1X/WP Authenticator and RADIUS authentication server ================================================================ -Copyright (c) 2002-2016, Jouni Malinen and contributors +Copyright (c) 2002-2018, Jouni Malinen and contributors All Rights Reserved. This program is licensed under the BSD license (the one with @@ -70,7 +70,7 @@ Requirements Current hardware/software requirements: - drivers: Host AP driver for Prism2/2.5/3. - (http://hostap.epitest.fi/) + (http://w1.fi/hostap-driver.html) Please note that station firmware version needs to be 1.7.0 or newer to work in WPA mode. @@ -81,8 +81,7 @@ Current hardware/software requirements: Any wired Ethernet driver for wired IEEE 802.1X authentication (experimental code) - FreeBSD -current (with some kernel mods that have not yet been - committed when hostapd v0.3.0 was released) + FreeBSD -current BSD net80211 layer (e.g., Atheros driver) @@ -186,24 +185,14 @@ Authenticator and RADIUS encapsulation between the Aut the Authentication Server. Other than this, the functionality is similar to the case with the co-located Authentication Server. -Authentication Server and Supplicant ------------------------------------- +Authentication Server +--------------------- Any RADIUS server supporting EAP should be usable as an IEEE 802.1X Authentication Server with hostapd Authenticator. FreeRADIUS (http://www.freeradius.org/) has been successfully tested with hostapd -Authenticator and both Xsupplicant (http://www.open1x.org) and Windows -XP Supplicants. EAP/TLS was used with Xsupplicant and -EAP/MD5-Challenge with Windows XP. +Authenticator. -http://www.missl.cs.umd.edu/wireless/eaptls/ has useful information -about using EAP/TLS with FreeRADIUS and Xsupplicant (just replace -Cisco access point with Host AP driver, hostapd daemon, and a Prism2 -card ;-). http://www.freeradius.org/doc/EAP-MD5.html has information -about using EAP/MD5 with FreeRADIUS, including instructions for WinXP -configuration. http://www.denobula.com/EAPTLS.pdf has a HOWTO on -EAP/TLS use with WinXP Supplicant. - Automatic WEP key configuration ------------------------------- @@ -243,16 +232,15 @@ networks that require some kind of security. Task grou of IEEE 802.11 working group (http://www.ieee802.org/11/) has worked to address the flaws of the base standard and has in practice completed its work in May 2004. The IEEE 802.11i amendment to the IEEE -802.11 standard was approved in June 2004 and this amendment is likely -to be published in July 2004. +802.11 standard was approved in June 2004 and this amendment was +published in July 2004. Wi-Fi Alliance (http://www.wi-fi.org/) used a draft version of the IEEE 802.11i work (draft 3.0) to define a subset of the security enhancements that can be implemented with existing wlan hardware. This is called Wi-Fi Protected Access (WPA). This has now become a mandatory component of interoperability testing and certification done -by Wi-Fi Alliance. Wi-Fi provides information about WPA at its web -site (http://www.wi-fi.org/OpenSection/protected_access.asp). +by Wi-Fi Alliance. IEEE 802.11 standard defined wired equivalent privacy (WEP) algorithm for protecting wireless networks. WEP uses RC4 with 40-bit keys, Modified: head/contrib/wpa/hostapd/config_file.c ============================================================================== --- head/contrib/wpa/hostapd/config_file.c Sun Dec 9 06:42:06 2018 (r341758) +++ head/contrib/wpa/hostapd/config_file.c Sun Dec 9 06:45:49 2018 (r341759) @@ -1,6 +1,6 @@ /* * hostapd / Configuration file parser - * Copyright (c) 2003-2015, Jouni Malinen + * Copyright (c) 2003-2018, Jouni Malinen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -14,6 +14,8 @@ #include "utils/common.h" #include "utils/uuid.h" #include "common/ieee802_11_defs.h" +#include "crypto/sha256.h" +#include "crypto/tls.h" #include "drivers/driver.h" #include "eap_server/eap.h" #include "radius/radius_client.h" @@ -111,7 +113,7 @@ static int hostapd_config_read_vlan_file(struct hostap #endif /* CONFIG_NO_VLAN */ -static int hostapd_acl_comp(const void *a, const void *b) +int hostapd_acl_comp(const void *a, const void *b) { const struct mac_acl_entry *aa = a; const struct mac_acl_entry *bb = b; @@ -119,6 +121,44 @@ static int hostapd_acl_comp(const void *a, const void } +int hostapd_add_acl_maclist(struct mac_acl_entry **acl, int *num, + int vlan_id, const u8 *addr) +{ + struct mac_acl_entry *newacl; + + newacl = os_realloc_array(*acl, *num + 1, sizeof(**acl)); + if (!newacl) { + wpa_printf(MSG_ERROR, "MAC list reallocation failed"); + return -1; + } + + *acl = newacl; + os_memcpy((*acl)[*num].addr, addr, ETH_ALEN); + os_memset(&(*acl)[*num].vlan_id, 0, sizeof((*acl)[*num].vlan_id)); + (*acl)[*num].vlan_id.untagged = vlan_id; + (*acl)[*num].vlan_id.notempty = !!vlan_id; + (*num)++; + + return 0; +} + + +void hostapd_remove_acl_mac(struct mac_acl_entry **acl, int *num, + const u8 *addr) +{ + int i = 0; + + while (i < *num) { + if (os_memcmp((*acl)[i].addr, addr, ETH_ALEN) == 0) { + os_remove_in_array(*acl, *num, sizeof(**acl), i); + (*num)--; + } else { + i++; + } + } +} + + static int hostapd_config_read_maclist(const char *fname, struct mac_acl_entry **acl, int *num) { @@ -126,12 +166,8 @@ static int hostapd_config_read_maclist(const char *fna char buf[128], *pos; int line = 0; u8 addr[ETH_ALEN]; - struct mac_acl_entry *newacl; int vlan_id; - if (!fname) - return 0; - f = fopen(fname, "r"); if (!f) { wpa_printf(MSG_ERROR, "MAC list file '%s' not found.", fname); @@ -139,7 +175,7 @@ static int hostapd_config_read_maclist(const char *fna } while (fgets(buf, sizeof(buf), f)) { - int i, rem = 0; + int rem = 0; line++; @@ -169,16 +205,7 @@ static int hostapd_config_read_maclist(const char *fna } if (rem) { - i = 0; - while (i < *num) { - if (os_memcmp((*acl)[i].addr, addr, ETH_ALEN) == - 0) { - os_remove_in_array(*acl, *num, - sizeof(**acl), i); - (*num)--; - } else - i++; - } + hostapd_remove_acl_mac(acl, num, addr); continue; } vlan_id = 0; @@ -190,31 +217,78 @@ static int hostapd_config_read_maclist(const char *fna if (*pos != '\0') vlan_id = atoi(pos); - newacl = os_realloc_array(*acl, *num + 1, sizeof(**acl)); - if (newacl == NULL) { - wpa_printf(MSG_ERROR, "MAC list reallocation failed"); + if (hostapd_add_acl_maclist(acl, num, vlan_id, addr) < 0) { fclose(f); return -1; } - - *acl = newacl; - os_memcpy((*acl)[*num].addr, addr, ETH_ALEN); - os_memset(&(*acl)[*num].vlan_id, 0, - sizeof((*acl)[*num].vlan_id)); - (*acl)[*num].vlan_id.untagged = vlan_id; - (*acl)[*num].vlan_id.notempty = !!vlan_id; - (*num)++; } fclose(f); - qsort(*acl, *num, sizeof(**acl), hostapd_acl_comp); + if (*acl) + qsort(*acl, *num, sizeof(**acl), hostapd_acl_comp); return 0; } #ifdef EAP_SERVER + +static int hostapd_config_eap_user_salted(struct hostapd_eap_user *user, + const char *hash, size_t len, + char **pos, int line, + const char *fname) +{ + char *pos2 = *pos; + + while (*pos2 != '\0' && *pos2 != ' ' && *pos2 != '\t' && *pos2 != '#') + pos2++; + + if (pos2 - *pos < (int) (2 * (len + 1))) { /* at least 1 byte of salt */ + wpa_printf(MSG_ERROR, + "Invalid salted %s hash on line %d in '%s'", + hash, line, fname); + return -1; + } + + user->password = os_malloc(len); + if (!user->password) { + wpa_printf(MSG_ERROR, + "Failed to allocate memory for salted %s hash", + hash); + return -1; + } + + if (hexstr2bin(*pos, user->password, len) < 0) { + wpa_printf(MSG_ERROR, + "Invalid salted password on line %d in '%s'", + line, fname); + return -1; + } + user->password_len = len; + *pos += 2 * len; + + user->salt_len = (pos2 - *pos) / 2; + user->salt = os_malloc(user->salt_len); + if (!user->salt) { + wpa_printf(MSG_ERROR, + "Failed to allocate memory for salted %s hash", + hash); + return -1; + } + + if (hexstr2bin(*pos, user->salt, user->salt_len) < 0) { + wpa_printf(MSG_ERROR, + "Invalid salt for password on line %d in '%s'", + line, fname); + return -1; + } + + *pos = pos2; + return 0; +} + + static int hostapd_config_read_eap_user(const char *fname, struct hostapd_bss_config *conf) { @@ -223,9 +297,6 @@ static int hostapd_config_read_eap_user(const char *fn int line = 0, ret = 0, num_methods; struct hostapd_eap_user *user = NULL, *tail = NULL, *new_user = NULL; - if (!fname) - return 0; - if (os_strncmp(fname, "sqlite:", 7) == 0) { #ifdef CONFIG_SQLITE os_free(conf->eap_user_sqlite); @@ -312,13 +383,12 @@ static int hostapd_config_read_eap_user(const char *fn goto failed; } - user->identity = os_malloc(pos - start); + user->identity = os_memdup(start, pos - start); if (user->identity == NULL) { wpa_printf(MSG_ERROR, "Failed to allocate " "memory for EAP identity"); goto failed; } - os_memcpy(user->identity, start, pos - start); user->identity_len = pos - start; if (pos[0] == '"' && pos[1] == '*') { @@ -436,13 +506,12 @@ static int hostapd_config_read_eap_user(const char *fn goto failed; } - user->password = os_malloc(pos - start); + user->password = os_memdup(start, pos - start); if (user->password == NULL) { wpa_printf(MSG_ERROR, "Failed to allocate " "memory for EAP password"); goto failed; } - os_memcpy(user->password, start, pos - start); user->password_len = pos - start; pos++; @@ -471,6 +540,24 @@ static int hostapd_config_read_eap_user(const char *fn user->password_len = 16; user->password_hash = 1; pos = pos2; + } else if (os_strncmp(pos, "ssha1:", 6) == 0) { + pos += 6; + if (hostapd_config_eap_user_salted(user, "sha1", 20, + &pos, + line, fname) < 0) + goto failed; + } else if (os_strncmp(pos, "ssha256:", 8) == 0) { + pos += 8; + if (hostapd_config_eap_user_salted(user, "sha256", 32, + &pos, + line, fname) < 0) + goto failed; + } else if (os_strncmp(pos, "ssha512:", 8) == 0) { + pos += 8; + if (hostapd_config_eap_user_salted(user, "sha512", 64, + &pos, + line, fname) < 0) + goto failed; } else { pos2 = pos; while (*pos2 != '\0' && *pos2 != ' ' && @@ -522,19 +609,15 @@ static int hostapd_config_read_eap_user(const char *fn fclose(f); if (ret == 0) { - user = conf->eap_user; - while (user) { - struct hostapd_eap_user *prev; - - prev = user; - user = user->next; - hostapd_config_free_eap_user(prev); - } + hostapd_config_free_eap_users(conf->eap_user); conf->eap_user = new_user; + } else { + hostapd_config_free_eap_users(new_user); } return ret; } + #endif /* EAP_SERVER */ @@ -684,12 +767,16 @@ static int hostapd_config_parse_key_mgmt(int line, con val |= WPA_KEY_MGMT_PSK; else if (os_strcmp(start, "WPA-EAP") == 0) val |= WPA_KEY_MGMT_IEEE8021X; -#ifdef CONFIG_IEEE80211R +#ifdef CONFIG_IEEE80211R_AP else if (os_strcmp(start, "FT-PSK") == 0) val |= WPA_KEY_MGMT_FT_PSK; else if (os_strcmp(start, "FT-EAP") == 0) val |= WPA_KEY_MGMT_FT_IEEE8021X; -#endif /* CONFIG_IEEE80211R */ +#ifdef CONFIG_SHA384 + else if (os_strcmp(start, "FT-EAP-SHA384") == 0) + val |= WPA_KEY_MGMT_FT_IEEE8021X_SHA384; +#endif /* CONFIG_SHA384 */ +#endif /* CONFIG_IEEE80211R_AP */ #ifdef CONFIG_IEEE80211W else if (os_strcmp(start, "WPA-PSK-SHA256") == 0) val |= WPA_KEY_MGMT_PSK_SHA256; @@ -710,6 +797,30 @@ static int hostapd_config_parse_key_mgmt(int line, con else if (os_strcmp(start, "WPA-EAP-SUITE-B-192") == 0) val |= WPA_KEY_MGMT_IEEE8021X_SUITE_B_192; #endif /* CONFIG_SUITEB192 */ +#ifdef CONFIG_FILS + else if (os_strcmp(start, "FILS-SHA256") == 0) + val |= WPA_KEY_MGMT_FILS_SHA256; + else if (os_strcmp(start, "FILS-SHA384") == 0) + val |= WPA_KEY_MGMT_FILS_SHA384; +#ifdef CONFIG_IEEE80211R_AP + else if (os_strcmp(start, "FT-FILS-SHA256") == 0) + val |= WPA_KEY_MGMT_FT_FILS_SHA256; + else if (os_strcmp(start, "FT-FILS-SHA384") == 0) + val |= WPA_KEY_MGMT_FT_FILS_SHA384; +#endif /* CONFIG_IEEE80211R_AP */ +#endif /* CONFIG_FILS */ +#ifdef CONFIG_OWE + else if (os_strcmp(start, "OWE") == 0) + val |= WPA_KEY_MGMT_OWE; +#endif /* CONFIG_OWE */ +#ifdef CONFIG_DPP + else if (os_strcmp(start, "DPP") == 0) + val |= WPA_KEY_MGMT_DPP; +#endif /* CONFIG_DPP */ +#ifdef CONFIG_HS20 + else if (os_strcmp(start, "OSEN") == 0) + val |= WPA_KEY_MGMT_OSEN; +#endif /* CONFIG_HS20 */ else { wpa_printf(MSG_ERROR, "Line %d: invalid key_mgmt '%s'", line, start); @@ -755,17 +866,34 @@ static int hostapd_config_read_wep(struct hostapd_wep_ { size_t len = os_strlen(val); - if (keyidx < 0 || keyidx > 3 || wep->key[keyidx] != NULL) + if (keyidx < 0 || keyidx > 3) return -1; + if (len == 0) { + int i, set = 0; + + bin_clear_free(wep->key[keyidx], wep->len[keyidx]); + wep->key[keyidx] = NULL; + wep->len[keyidx] = 0; + for (i = 0; i < NUM_WEP_KEYS; i++) { + if (wep->key[i]) + set++; + } + if (!set) + wep->keys_set = 0; + return 0; + } + + if (wep->key[keyidx] != NULL) + return -1; + if (val[0] == '"') { if (len < 2 || val[len - 1] != '"') return -1; len -= 2; - wep->key[keyidx] = os_malloc(len); + wep->key[keyidx] = os_memdup(val + 1, len); if (wep->key[keyidx] == NULL) return -1; - os_memcpy(wep->key[keyidx], val + 1, len); wep->len[keyidx] = len; } else { if (len & 1) @@ -978,7 +1106,27 @@ static int hostapd_config_tx_queue(struct hostapd_conf } -#ifdef CONFIG_IEEE80211R +#ifdef CONFIG_IEEE80211R_AP + +static int rkh_derive_key(const char *pos, u8 *key, size_t key_len) +{ + u8 oldkey[16]; + int ret; + + if (!hexstr2bin(pos, key, key_len)) + return 0; + + /* Try to use old short key for backwards compatibility */ + if (hexstr2bin(pos, oldkey, sizeof(oldkey))) + return -1; + + ret = hmac_sha256_kdf(oldkey, sizeof(oldkey), "FT OLDKEY", NULL, 0, + key, key_len); + os_memset(oldkey, 0, sizeof(oldkey)); + return ret; +} + + static int add_r0kh(struct hostapd_bss_config *bss, char *value) { struct ft_remote_r0kh *r0kh; @@ -1012,7 +1160,7 @@ static int add_r0kh(struct hostapd_bss_config *bss, ch os_memcpy(r0kh->id, pos, r0kh->id_len); pos = next; - if (hexstr2bin(pos, r0kh->key, sizeof(r0kh->key))) { + if (rkh_derive_key(pos, r0kh->key, sizeof(r0kh->key)) < 0) { wpa_printf(MSG_ERROR, "Invalid R0KH key: '%s'", pos); os_free(r0kh); return -1; @@ -1057,7 +1205,7 @@ static int add_r1kh(struct hostapd_bss_config *bss, ch } pos = next; - if (hexstr2bin(pos, r1kh->key, sizeof(r1kh->key))) { + if (rkh_derive_key(pos, r1kh->key, sizeof(r1kh->key)) < 0) { wpa_printf(MSG_ERROR, "Invalid R1KH key: '%s'", pos); os_free(r1kh); return -1; @@ -1068,7 +1216,7 @@ static int add_r1kh(struct hostapd_bss_config *bss, ch return 0; } -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R_AP */ #ifdef CONFIG_IEEE80211N @@ -1085,6 +1233,12 @@ static int hostapd_config_ht_capab(struct hostapd_conf conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET; conf->secondary_channel = 1; } + if (os_strstr(capab, "[HT40+]") && os_strstr(capab, "[HT40-]")) { + conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET; + conf->ht40_plus_minus_allowed = 1; + } + if (!os_strstr(capab, "[HT40+]") && !os_strstr(capab, "[HT40-]")) + conf->secondary_channel = 0; if (os_strstr(capab, "[SMPS-STATIC]")) { conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK; conf->ht_capab |= HT_CAP_INFO_SMPS_STATIC; @@ -1307,6 +1461,44 @@ static int parse_venue_name(struct hostapd_bss_config } +static int parse_venue_url(struct hostapd_bss_config *bss, char *pos, + int line) +{ + char *sep; + size_t nlen; + struct hostapd_venue_url *url; + int ret = -1; + + sep = os_strchr(pos, ':'); + if (!sep) + goto fail; + *sep++ = '\0'; + + nlen = os_strlen(sep); + if (nlen > 254) + goto fail; + + url = os_realloc_array(bss->venue_url, bss->venue_url_count + 1, + sizeof(struct hostapd_venue_url)); + if (!url) + goto fail; + + bss->venue_url = url; + url = &bss->venue_url[bss->venue_url_count++]; + + url->venue_number = atoi(pos); + url->url_len = nlen; + os_memcpy(url->url, sep, nlen); + + ret = 0; +fail: + if (ret) + wpa_printf(MSG_ERROR, "Line %d: Invalid venue_url '%s'", + line, pos); + return ret; +} + + static int parse_3gpp_cell_net(struct hostapd_bss_config *bss, char *buf, int line) { @@ -1857,6 +2049,24 @@ static int hs20_parse_osu_nai(struct hostapd_bss_confi } +static int hs20_parse_osu_nai2(struct hostapd_bss_config *bss, + char *pos, int line) +{ + if (bss->last_osu == NULL) { + wpa_printf(MSG_ERROR, "Line %d: Unexpected OSU field", line); + return -1; + } + + os_free(bss->last_osu->osu_nai2); + bss->last_osu->osu_nai2 = os_strdup(pos); + if (bss->last_osu->osu_nai2 == NULL) + return -1; + bss->hs20_osu_providers_nai_count++; + + return 0; +} + + static int hs20_parse_osu_method_list(struct hostapd_bss_config *bss, char *pos, int line) { @@ -1916,6 +2126,25 @@ static int hs20_parse_osu_service_desc(struct hostapd_ return 0; } + +static int hs20_parse_operator_icon(struct hostapd_bss_config *bss, char *pos, + int line) +{ + char **n; + + n = os_realloc_array(bss->hs20_operator_icon, + bss->hs20_operator_icon_count + 1, sizeof(char *)); + if (!n) + return -1; + bss->hs20_operator_icon = n; + bss->hs20_operator_icon[bss->hs20_operator_icon_count] = os_strdup(pos); + if (!bss->hs20_operator_icon[bss->hs20_operator_icon_count]) + return -1; + bss->hs20_operator_icon_count++; + + return 0; +} + #endif /* CONFIG_HS20 */ @@ -1986,6 +2215,118 @@ static int parse_wpabuf_hex(int line, const char *name } +#ifdef CONFIG_FILS +static int parse_fils_realm(struct hostapd_bss_config *bss, const char *val) +{ + struct fils_realm *realm; + size_t len; + + len = os_strlen(val); + realm = os_zalloc(sizeof(*realm) + len + 1); + if (!realm) + return -1; + + os_memcpy(realm->realm, val, len); + if (fils_domain_name_hash(val, realm->hash) < 0) { + os_free(realm); + return -1; + } + dl_list_add_tail(&bss->fils_realms, &realm->list); + + return 0; +} +#endif /* CONFIG_FILS */ + + +#ifdef EAP_SERVER +static unsigned int parse_tls_flags(const char *val) +{ + unsigned int flags = 0; + + /* Disable TLS v1.3 by default for now to avoid interoperability issue. + * This can be enabled by default once the implementation has been fully + * completed and tested with other implementations. */ + flags |= TLS_CONN_DISABLE_TLSv1_3; + + if (os_strstr(val, "[ALLOW-SIGN-RSA-MD5]")) + flags |= TLS_CONN_ALLOW_SIGN_RSA_MD5; + if (os_strstr(val, "[DISABLE-TIME-CHECKS]")) + flags |= TLS_CONN_DISABLE_TIME_CHECKS; + if (os_strstr(val, "[DISABLE-TLSv1.0]")) + flags |= TLS_CONN_DISABLE_TLSv1_0; + if (os_strstr(val, "[DISABLE-TLSv1.1]")) + flags |= TLS_CONN_DISABLE_TLSv1_1; + if (os_strstr(val, "[DISABLE-TLSv1.2]")) + flags |= TLS_CONN_DISABLE_TLSv1_2; + if (os_strstr(val, "[DISABLE-TLSv1.3]")) + flags |= TLS_CONN_DISABLE_TLSv1_3; + if (os_strstr(val, "[ENABLE-TLSv1.3]")) + flags &= ~TLS_CONN_DISABLE_TLSv1_3; + if (os_strstr(val, "[SUITEB]")) + flags |= TLS_CONN_SUITEB; + if (os_strstr(val, "[SUITEB-NO-ECDH]")) + flags |= TLS_CONN_SUITEB_NO_ECDH | TLS_CONN_SUITEB; + + return flags; +} +#endif /* EAP_SERVER */ + + +#ifdef CONFIG_SAE +static int parse_sae_password(struct hostapd_bss_config *bss, const char *val) +{ + struct sae_password_entry *pw; + const char *pos = val, *pos2, *end = NULL; + + pw = os_zalloc(sizeof(*pw)); + if (!pw) + return -1; + os_memset(pw->peer_addr, 0xff, ETH_ALEN); /* default to wildcard */ + + pos2 = os_strstr(pos, "|mac="); + if (pos2) { + end = pos2; + pos2 += 5; + if (hwaddr_aton(pos2, pw->peer_addr) < 0) + goto fail; + pos = pos2 + ETH_ALEN * 3 - 1; + } + + pos2 = os_strstr(pos, "|id="); + if (pos2) { + if (!end) + end = pos2; + pos2 += 4; + pw->identifier = os_strdup(pos2); + if (!pw->identifier) + goto fail; + } + + if (!end) { + pw->password = os_strdup(val); + if (!pw->password) + goto fail; + } else { + pw->password = os_malloc(end - val + 1); + if (!pw->password) + goto fail; + os_memcpy(pw->password, val, end - val); + pw->password[end - val] = '\0'; + } + + pw->next = bss->sae_passwords; + bss->sae_passwords = pw; + + return 0; +fail: + str_clear_free(pw->password); + os_free(pw->identifier); + os_free(pw); + return -1; +} +#endif /* CONFIG_SAE */ + + static int hostapd_config_fill(struct hostapd_config *conf, struct hostapd_bss_config *bss, const char *buf, char *pos, int line) @@ -2001,20 +2342,21 @@ static int hostapd_config_fill(struct hostapd_config * os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge)); } else if (os_strcmp(buf, "driver") == 0) { int j; - /* clear to get error below if setting is invalid */ - conf->driver = NULL; + const struct wpa_driver_ops *driver = NULL; + for (j = 0; wpa_drivers[j]; j++) { if (os_strcmp(pos, wpa_drivers[j]->name) == 0) { - conf->driver = wpa_drivers[j]; + driver = wpa_drivers[j]; break; } } - if (conf->driver == NULL) { + if (!driver) { wpa_printf(MSG_ERROR, "Line %d: invalid/unknown driver '%s'", line, pos); return 1; } + conf->driver = driver; } else if (os_strcmp(buf, "driver_params") == 0) { os_free(conf->driver_params); conf->driver_params = os_strdup(pos); @@ -2058,13 +2400,16 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "utf8_ssid") == 0) { bss->ssid.utf8_ssid = atoi(pos) > 0; } else if (os_strcmp(buf, "macaddr_acl") == 0) { - bss->macaddr_acl = atoi(pos); - if (bss->macaddr_acl != ACCEPT_UNLESS_DENIED && - bss->macaddr_acl != DENY_UNLESS_ACCEPTED && - bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH) { + enum macaddr_acl acl = atoi(pos); + + if (acl != ACCEPT_UNLESS_DENIED && + acl != DENY_UNLESS_ACCEPTED && + acl != USE_EXTERNAL_RADIUS_AUTH) { wpa_printf(MSG_ERROR, "Line %d: unknown macaddr_acl %d", - line, bss->macaddr_acl); + line, acl); + return 1; } + bss->macaddr_acl = acl; } else if (os_strcmp(buf, "accept_mac_file") == 0) { if (hostapd_config_read_maclist(pos, &bss->accept_mac, &bss->num_accept_mac)) { @@ -2091,8 +2436,8 @@ static int hostapd_config_fill(struct hostapd_config * bss->skip_inactivity_poll = atoi(pos); } else if (os_strcmp(buf, "country_code") == 0) { os_memcpy(conf->country, pos, 2); - /* FIX: make this configurable */ - conf->country[2] = ' '; + } else if (os_strcmp(buf, "country3") == 0) { + conf->country[2] = strtol(pos, NULL, 16); } else if (os_strcmp(buf, "ieee80211d") == 0) { conf->ieee80211d = atoi(pos); } else if (os_strcmp(buf, "ieee80211h") == 0) { @@ -2100,13 +2445,15 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "ieee8021x") == 0) { bss->ieee802_1x = atoi(pos); } else if (os_strcmp(buf, "eapol_version") == 0) { - bss->eapol_version = atoi(pos); - if (bss->eapol_version < 1 || bss->eapol_version > 2) { + int eapol_version = atoi(pos); + + if (eapol_version < 1 || eapol_version > 2) { wpa_printf(MSG_ERROR, "Line %d: invalid EAPOL version (%d): '%s'.", - line, bss->eapol_version, pos); + line, eapol_version, pos); return 1; } + bss->eapol_version = eapol_version; wpa_printf(MSG_DEBUG, "eapol_version=%d", bss->eapol_version); #ifdef EAP_SERVER } else if (os_strcmp(buf, "eap_authenticator") == 0) { @@ -2133,6 +2480,8 @@ static int hostapd_config_fill(struct hostapd_config * bss->check_crl = atoi(pos); } else if (os_strcmp(buf, "tls_session_lifetime") == 0) { bss->tls_session_lifetime = atoi(pos); + } else if (os_strcmp(buf, "tls_flags") == 0) { + bss->tls_flags = parse_tls_flags(pos); } else if (os_strcmp(buf, "ocsp_stapling_response") == 0) { os_free(bss->ocsp_stapling_response); bss->ocsp_stapling_response = os_strdup(pos); @@ -2207,8 +2556,10 @@ static int hostapd_config_fill(struct hostapd_config * } else if (os_strcmp(buf, "pwd_group") == 0) { bss->pwd_group = atoi(pos); #endif /* EAP_SERVER_PWD */ +#ifdef CONFIG_ERP } else if (os_strcmp(buf, "eap_server_erp") == 0) { bss->eap_server_erp = atoi(pos); +#endif /* CONFIG_ERP */ #endif /* EAP_SERVER */ } else if (os_strcmp(buf, "eap_message") == 0) { char *term; @@ -2234,24 +2585,25 @@ static int hostapd_config_fill(struct hostapd_config * os_free(bss->erp_domain); bss->erp_domain = os_strdup(pos); } else if (os_strcmp(buf, "wep_key_len_broadcast") == 0) { - bss->default_wep_key_len = atoi(pos); - if (bss->default_wep_key_len > 13) { - wpa_printf(MSG_ERROR, "Line %d: invalid WEP key len %lu (= %lu bits)", - line, - (unsigned long) bss->default_wep_key_len, - (unsigned long) - bss->default_wep_key_len * 8); + int val = atoi(pos); + + if (val < 0 || val > 13) { + wpa_printf(MSG_ERROR, + "Line %d: invalid WEP key len %d (= %d bits)", + line, val, val * 8); return 1; } + bss->default_wep_key_len = val; } else if (os_strcmp(buf, "wep_key_len_unicast") == 0) { - bss->individual_wep_key_len = atoi(pos); - if (bss->individual_wep_key_len < 0 || - bss->individual_wep_key_len > 13) { - wpa_printf(MSG_ERROR, "Line %d: invalid WEP key len %d (= %d bits)", - line, bss->individual_wep_key_len, - bss->individual_wep_key_len * 8); + int val = atoi(pos); + + if (val < 0 || val > 13) { + wpa_printf(MSG_ERROR, + "Line %d: invalid WEP key len %d (= %d bits)", + line, val, val * 8); return 1; } + bss->individual_wep_key_len = val; } else if (os_strcmp(buf, "wep_rekey_period") == 0) { bss->wep_rekeying_period = atoi(pos); if (bss->wep_rekeying_period < 0) { @@ -2433,12 +2785,37 @@ static int hostapd_config_fill(struct hostapd_config * bss->wpa = atoi(pos); } else if (os_strcmp(buf, "wpa_group_rekey") == 0) { bss->wpa_group_rekey = atoi(pos); + bss->wpa_group_rekey_set = 1; } else if (os_strcmp(buf, "wpa_strict_rekey") == 0) { bss->wpa_strict_rekey = atoi(pos); } else if (os_strcmp(buf, "wpa_gmk_rekey") == 0) { bss->wpa_gmk_rekey = atoi(pos); } else if (os_strcmp(buf, "wpa_ptk_rekey") == 0) { bss->wpa_ptk_rekey = atoi(pos); + } else if (os_strcmp(buf, "wpa_group_update_count") == 0) { + char *endp; + unsigned long val = strtoul(pos, &endp, 0); + + if (*endp || val < 1 || val > (u32) -1) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid wpa_group_update_count=%lu; allowed range 1..4294967295", + line, val); + return 1; + } + bss->wpa_group_update_count = (u32) val; + } else if (os_strcmp(buf, "wpa_pairwise_update_count") == 0) { + char *endp; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Dec 9 15:34:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8CA81325159; Sun, 9 Dec 2018 15:34:21 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496C16FA98; Sun, 9 Dec 2018 15:34:21 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 265E913301; Sun, 9 Dec 2018 15:34:21 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9FYLno039556; Sun, 9 Dec 2018 15:34:21 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9FYKqb039555; Sun, 9 Dec 2018 15:34:20 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201812091534.wB9FYKqb039555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 9 Dec 2018 15:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341765 - head/sys/dev/md X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/dev/md X-SVN-Commit-Revision: 341765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 496C16FA98 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 15:34:21 -0000 Author: bde Date: Sun Dec 9 15:34:20 2018 New Revision: 341765 URL: https://svnweb.freebsd.org/changeset/base/341765 Log: Fix devstat on md devices. devstat_end_transaction() was called before the i/o was actually ended (by delivering it to GEOM), so at least the i/o length was messed up. It was always recorded as 0, so the average transaction size and the average transfer rate was always displayed as 0. devstat_end_transaction() was not called at all for the error case, so there were sometimes multiple starts per end. I didn't observe this in practice and don't know if it did much damage. I think it extended the length of the i/o to the next transaction. Reviewed by: kib Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Sun Dec 9 11:39:45 2018 (r341764) +++ head/sys/dev/md/md.c Sun Dec 9 15:34:20 2018 (r341765) @@ -1241,10 +1241,10 @@ md_kthread(void *arg) if (error != -1) { bp->bio_completed = bp->bio_length; - if ((bp->bio_cmd == BIO_READ) || (bp->bio_cmd == BIO_WRITE)) - devstat_end_transaction_bio(sc->devstat, bp); g_io_deliver(bp, error); } + if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) + devstat_end_transaction_bio(sc->devstat, bp); } } From owner-svn-src-all@freebsd.org Sun Dec 9 17:55:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A61E13289D9; Sun, 9 Dec 2018 17:55:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1986A737AA; Sun, 9 Dec 2018 17:55:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E42EA149DE; Sun, 9 Dec 2018 17:55:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9HtA3s011681; Sun, 9 Dec 2018 17:55:10 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9HtAOq011680; Sun, 9 Dec 2018 17:55:10 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201812091755.wB9HtAOq011680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 9 Dec 2018 17:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341766 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 341766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1986A737AA X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.991,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 17:55:11 -0000 Author: alc Date: Sun Dec 9 17:55:10 2018 New Revision: 341766 URL: https://svnweb.freebsd.org/changeset/base/341766 Log: blst_leaf_alloc updates bighint for a leaf when an allocation is successful and includes the last block represented by the leaf. The reasoning is that, if the last block is included, then there must be no solution before that one in the leaf, so the leaf cannot provide an allocation that big again; indeed, the leaf cannot provide a solution bigger than range1. Which is all correct, except that if the value of blk passed in did not represent the first block of the leaf, because the cursor was pointing to the middle of the leaf, then a possible solution before the cursor may have been ignored, and bighint cannot be updated. Consider the sequence allocate 63 (returning address 0), free 0,63 (freeing that same block, and allocate 1 (returning 63). The result is that one block is allocated from the first leaf, and the value of bighint is 0, so that nothing can be allocated from that leaf until the only block allocated from that leaf is freed. This change detects that skipped-over solution, and when there is one it makes sure that the value of bighint is not changed when the last block is allocated. Submitted by: Doug Moore Tested by: pho X-MFC with: r340402 Differential Revision: https://reviews.freebsd.org/D18474 Modified: head/sys/kern/subr_blist.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Sun Dec 9 15:34:20 2018 (r341765) +++ head/sys/kern/subr_blist.c Sun Dec 9 17:55:10 2018 (r341766) @@ -644,14 +644,14 @@ blst_next_leaf_alloc(blmeta_t *scan, daddr_t blk, int /* * BLST_LEAF_ALLOC() - allocate at a leaf in the radix tree (a bitmap). * - * This is the core of the allocator and is optimized for the - * BLIST_BMAP_RADIX block allocation case. Otherwise, execution - * time is proportional to log2(count) + bitpos time. + * This function is the core of the allocator. Its execution time is + * proportional to log(count), plus height of the tree if the allocation + * crosses a leaf boundary. */ static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count) { - u_daddr_t mask; + u_daddr_t cursor_mask, mask; int count1, hi, lo, num_shifts, range1, range_ext; range1 = 0; @@ -661,14 +661,14 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count while ((-mask & ~mask) != 0 && num_shifts > 0) { /* * If bit i is set in mask, then bits in [i, i+range1] are set - * in scan->bm_bitmap. The value of range1 is equal to - * count1 >> num_shifts. Grow range and reduce num_shifts to 0, - * while preserving these invariants. The updates to mask leave - * fewer bits set, but each bit that remains set represents a - * longer string of consecutive bits set in scan->bm_bitmap. - * If more updates to mask cannot clear more bits, because mask - * is partitioned with all 0 bits preceding all 1 bits, the loop - * terminates immediately. + * in scan->bm_bitmap. The value of range1 is equal to count1 + * >> num_shifts. Grow range1 and reduce num_shifts to 0, + * while preserving these invariants. The updates to mask + * leave fewer bits set, but each bit that remains set + * represents a longer string of consecutive bits set in + * scan->bm_bitmap. If more updates to mask cannot clear more + * bits, because mask is partitioned with all 0 bits preceding + * all 1 bits, the loop terminates immediately. */ num_shifts--; range_ext = range1 + ((count1 >> num_shifts) & 1); @@ -691,10 +691,23 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count } /* Discard any candidates that appear before blk. */ - mask &= (u_daddr_t)-1 << (blk & BLIST_BMAP_MASK); - if (mask == 0) - return (SWAPBLK_NONE); + if ((blk & BLIST_BMAP_MASK) != 0) { + cursor_mask = mask & bitrange(0, blk & BLIST_BMAP_MASK); + if (cursor_mask != 0) { + mask ^= cursor_mask; + if (mask == 0) + return (SWAPBLK_NONE); + /* + * Bighint change for last block allocation cannot + * assume that any other blocks are allocated, so the + * bighint cannot be reduced much. + */ + range1 = BLIST_MAX_ALLOC - 1; + } + blk &= ~BLIST_BMAP_MASK; + } + /* * The least significant set bit in mask marks the start of the first * available range of sufficient size. Clear all the bits but that one, @@ -734,7 +747,7 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count } /* Clear the allocated bits from this leaf. */ scan->bm_bitmap &= ~mask; - return ((blk & ~BLIST_BMAP_MASK) + lo); + return (blk + lo); } /* From owner-svn-src-all@freebsd.org Sun Dec 9 19:14:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEC5C132BA28; Sun, 9 Dec 2018 19:14:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 652E2771CA; Sun, 9 Dec 2018 19:14:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46D5815707; Sun, 9 Dec 2018 19:14:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9JEMHH053537; Sun, 9 Dec 2018 19:14:22 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9JELTI053534; Sun, 9 Dec 2018 19:14:21 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201812091914.wB9JELTI053534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 9 Dec 2018 19:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341767 - in stable/12/bin/sh: . tests/expansion X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/12/bin/sh: . tests/expansion X-SVN-Commit-Revision: 341767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 652E2771CA X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 19:14:23 -0000 Author: jilles Date: Sun Dec 9 19:14:21 2018 New Revision: 341767 URL: https://svnweb.freebsd.org/changeset/base/341767 Log: MFC r341164: sh: Fix ${param?} default error message If word in ${param?word} is missing, the shell shall write a default error message. So expanding ${param?} when param is not set should write an error message like sh: param: parameter not set This was broken by r316417. PR: 233585 Added: stable/12/bin/sh/tests/expansion/question2.0 - copied unchanged from r341164, head/bin/sh/tests/expansion/question2.0 Modified: stable/12/bin/sh/expand.c stable/12/bin/sh/tests/expansion/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/expand.c ============================================================================== --- stable/12/bin/sh/expand.c Sun Dec 9 17:55:10 2018 (r341766) +++ stable/12/bin/sh/expand.c Sun Dec 9 19:14:21 2018 (r341767) @@ -623,10 +623,11 @@ static const char * subevalvar_misc(const char *p, struct nodelist **restrict argbackq, const char *var, int subtype, int startloc, int varflags) { + const char *end; char *startp; int amount; - p = argstr(p, argbackq, EXP_TILDE, NULL); + end = argstr(p, argbackq, EXP_TILDE, NULL); STACKSTRNUL(expdest); startp = stackblock() + startloc; @@ -635,7 +636,7 @@ subevalvar_misc(const char *p, struct nodelist **restr setvar(var, startp, 0); amount = startp - expdest; STADJUST(amount, expdest); - return p; + return end; case VSQUESTION: if (*p != CTLENDVAR) { Modified: stable/12/bin/sh/tests/expansion/Makefile ============================================================================== --- stable/12/bin/sh/tests/expansion/Makefile Sun Dec 9 17:55:10 2018 (r341766) +++ stable/12/bin/sh/tests/expansion/Makefile Sun Dec 9 19:14:21 2018 (r341767) @@ -86,6 +86,7 @@ ${PACKAGE}FILES+= plus-minus7.0 ${PACKAGE}FILES+= plus-minus8.0 ${PACKAGE}FILES+= plus-minus9.0 ${PACKAGE}FILES+= question1.0 +${PACKAGE}FILES+= question2.0 ${PACKAGE}FILES+= readonly1.0 ${PACKAGE}FILES+= redir1.0 ${PACKAGE}FILES+= set-u1.0 Copied: stable/12/bin/sh/tests/expansion/question2.0 (from r341164, head/bin/sh/tests/expansion/question2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/expansion/question2.0 Sun Dec 9 19:14:21 2018 (r341767, copy of r341164, head/bin/sh/tests/expansion/question2.0) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +unset dummyvar +msg=`(: ${dummyvar?}) 2>&1` +r=$? +[ "$r" != 0 ] && case $msg in +*dummyvar?* | *?dummyvar*) : ;; +*) + printf 'Bad message: [%s]\n' "$msg" + exit 1 +esac From owner-svn-src-all@freebsd.org Sun Dec 9 20:09:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B312B132D367; Sun, 9 Dec 2018 20:09:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 084C179288; Sun, 9 Dec 2018 20:09:39 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wB9JXOVM062965; Sun, 9 Dec 2018 11:33:24 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wB9JXOvW062964; Sun, 9 Dec 2018 11:33:24 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201812091933.wB9JXOvW062964@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: <201812090701.wB9711aN058754@slippy.cwsent.com> To: Cy Schubert Date: Sun, 9 Dec 2018 11:33:24 -0800 (PST) CC: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 084C179288 X-Spamd-Result: default: False [4.87 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.79)[0.788,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; LONG_SUBJ(1.52)[203]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_SPAM_LONG(0.73)[0.727,0]; NEURAL_SPAM_MEDIUM(0.96)[0.963,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.02)[country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 20:09:40 -0000 > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy Schubert > writes: > > Author: cy > > Date: Sun Dec 9 06:45:49 2018 > > New Revision: 341759 > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > > Log: > > MFV r341618: > > > > Update wpa 2.6 --> 2.7. > > Relnotes: yes As an FYI, or maybe a new procedure, doing a reply to a commit message adding relnotes: yes does very little to insure that this commit gets refered to in release notes. What about we add RELNOTES.missed to the tree next to UPDATING, and when someone forgets to tag the Relnotes:yes into a commit you just follow up with a commit to that file, stating the svn revision which was missing the note and then we have a nice documented and clean way to extract the missing release note items, rather than trying to cull it from a thread in a mail list archive. The file would get truncated to 0 at appropriate times on various branches. Thoughts? Rod Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 178C0132EB85 for ; Sun, 9 Dec 2018 20:37:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65BB47A99A for ; Sun, 9 Dec 2018 20:37:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id e5so10145366qtr.12 for ; Sun, 09 Dec 2018 12:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+WM9s9Lfm8ifValAHHuTBzcWuZYWFYu5YMpLErL0Mzg=; b=nWMn1jvI+SiAy66l/1Byjx3zrfR9gpCw0eYM8RpALIMt9jMxe1lkSGM+sKOHDYkz8A MgQuR1bQ641XsBM3IDTakxt5Lw3HV2cqLCY3NGvgyac1hxeugphWegxSmvvMV6D4JVSY oys7/D+jM+xGWWMnigJc6K3O7hDS4XHSnSDiOvjSaq82YhzoBkB+8DgbrBh4ShekjgUD XGmesU2s/JngCPt+PHU1n76Rq1IedixxcV86xvdy64EwReDcTCw8ySGLvabuB7LSYiCZ W5jRFpWiUCxFXhQw9dQjR+woSO71rNWkX9akhtPQmVwgNSA4avg+UV/siPEQp7ja7VjV UFDg== 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=+WM9s9Lfm8ifValAHHuTBzcWuZYWFYu5YMpLErL0Mzg=; b=M1rQqCgaqyqN/H7LMizN37uOsq68NSyw4+zATfAIy3hsq2fZeVQr6nsboNHBrW4pHl 3OZzXwQe87ITCUnrwfz9mZ6Y7UHlChhYk93FaJ3l1yLJJuaaWndtEtWrzaBmSTkFWS18 w5qYXxpWoqo7TTcpMpk2BGtTuopUdrozOl91baZoEN8Z77fGSUC/ntsiJsNyl4bePgMf qx/UkwSFbu/UfIvZ7m95z32/JU7d2YYjabQ0GzQyvTV2rrxgi2Il0q2GppptvwkvxKVK q19A+TLxQX4DJlSlGkChNP/jzCaHJN59hOd7fFEGVRmkkcBYAZGdGoOjOIKOz4rNVsD+ Jxnw== X-Gm-Message-State: AA+aEWb/mvoxGL2yhYsXxIxy25pX8+W0X1qAHcSSXZNn815CQ/Hx1sNI B5lBm0YszmU/qV0IZDQYhvZRpZFmFxMK4zCWN3TDGA== X-Google-Smtp-Source: AFSGD/VygZYI0hmEc8m+gu10UpW8ZZYbnokH7NdEZPU30XsBCazF7vZTqps9AQdPLuVEj899Ffsv0cNvpBI230aCCGk= X-Received: by 2002:ac8:3f2d:: with SMTP id c42mr9648537qtk.33.1544387848642; Sun, 09 Dec 2018 12:37:28 -0800 (PST) MIME-Version: 1.0 References: <201812090701.wB9711aN058754@slippy.cwsent.com> <201812091933.wB9JXOvW062964@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201812091933.wB9JXOvW062964@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Sun, 9 Dec 2018 13:37:17 -0700 Message-ID: Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: "Rodney W. Grimes" Cc: Cy Schubert , Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 65BB47A99A X-Spamd-Result: default: False [-4.67 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[6.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.73)[-0.733,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.93)[ip: (-6.79), ipnet: 2607:f8b0::/32(-1.50), asn: 15169(-1.30), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 20:37:30 -0000 On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy Schubert > > writes: > > > Author: cy > > > Date: Sun Dec 9 06:45:49 2018 > > > New Revision: 341759 > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > > > > Log: > > > MFV r341618: > > > > > > Update wpa 2.6 --> 2.7. > > > > Relnotes: yes > > As an FYI, or maybe a new procedure, doing a reply to > a commit message adding relnotes: yes does very little > to insure that this commit gets refered to in release > notes. > > What about we add RELNOTES.missed to the tree > next to UPDATING, and when someone forgets to tag > the Relnotes:yes into a commit you just follow up > with a commit to that file, stating the svn revision > which was missing the note and then we have a nice > documented and clean way to extract the missing > release note items, rather than trying to cull it > from a thread in a mail list archive. > > The file would get truncated to 0 at appropriate > times on various branches. > How about just RELNOTES. You put the revision that is relevant and a quick blurb. That way we don't have to look in two places. All release notes go in here, no exceptions. You can retroactively tag them, or you can commit this as part of commit. Have a blurb at the top that tells people what order to add them in, and you'd be set. We'd then retire "relnotes: yes" in the commit message. This would also allow 'helpers' to format the RELNOTES file as we go rather than having to play 2 years of catch-up at major branch times. Having it in the commit message just doesn't work, and this is one of many reasons: Cy forgot. Other times I'll do something and it's only a month later I realize it needs to be in the release notes after some issue has come up.... Other times I put relnotes: yes in only to realize that's my vanity talking, and nobody else cares. Warner From owner-svn-src-all@freebsd.org Sun Dec 9 21:03:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75CB9132FFDD for ; Sun, 9 Dec 2018 21:03:54 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7930A7C03F for ; Sun, 9 Dec 2018 21:03:53 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yb1-xb29.google.com with SMTP id 64so1791971ybe.3 for ; Sun, 09 Dec 2018 13:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Tbj9gnHHUHwg4olxDPmZQgspWoMcPZpo9ninD2Mm9H0=; b=dgo0wIw017SJNtFpQMPWArroIt5iOD1HUED8uETzgWyZv1GCaAl8EPG+D3LDEJWUKA GoReWco++lnpUmI9D3DEWovx0ApUdIC5Lz/1wbox2PbPI8lPNOTiJNrm/m09iXRXFDfD 3L+xsDwxkax6J+bdUgcaVxQSBqVjmvNmumXKPsJioFukJUufRC4R2uVIfp7K2HIYuDR/ YOxs1k5MaBGDEls0XRDEo0/ZWymRdoeRXzLZ5WaXdfdgezk7N0IsGaHplltagwnOCgCe C3PRUp4A2spkBenIWwVUfDq4X959YdhL6MrPuv5y8gniUewNedxDcYTEihc4yGLLzSgI hV8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Tbj9gnHHUHwg4olxDPmZQgspWoMcPZpo9ninD2Mm9H0=; b=jKSZQaOjNch51bAiQMB1Bgg76H4FbAA7HmCh1xnSyBRTYftDJjzfSHx2SSIavVyLmA JYoBCfg0ZxLt/n2O3EC95bvWLJmsJkdFUsOQ8PddlR1AbBFITNO9OxlAYJRrT3SJ43c3 zpxMUKs3YphV5KTF+LZP2tzKH/ml+rblXcDPRcOr3W4lCnHtfm8KLsnU4LZBJnFWWcsF 2MJ+FTfjKhVI1z/YGqo5G63Ckk75c2AdLFo2iodc8TXrRMWb2ZBvaCbDbNEWGiLC28EB OtCAzOURuXZ93vvyAT75cGt0C2l2yaeobfCkYaobKvhfGDOAdRjZ1P5l2wiVNv2qBljm AiXA== X-Gm-Message-State: AA+aEWaMFesOi78PpE2Kobto1VSqJwQZivhPaCHJWqZCuslOZcTV72Zc A+c0hRsivKey+jWNuHxHx92jO39mPshTPlUN3jwZ9A== X-Google-Smtp-Source: AFSGD/WRtqPIwDJT9SF9I4nPuOWaoYcVwwkkhtNAVaxamXloiH+ij9Z58aOAUMHc2QHmxW1pYVWaSLZg5fEGmqTliAQ= X-Received: by 2002:a25:4983:: with SMTP id w125-v6mr9746796yba.439.1544389432525; Sun, 09 Dec 2018 13:03:52 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:84d2:0:0:0:0:0 with HTTP; Sun, 9 Dec 2018 13:03:51 -0800 (PST) In-Reply-To: References: <201812090701.wB9711aN058754@slippy.cwsent.com> <201812091933.wB9JXOvW062964@pdx.rh.CN85.dnsmgr.net> From: Oliver Pinter Date: Sun, 9 Dec 2018 22:03:51 +0100 Message-ID: Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: Warner Losh Cc: "Rodney W. Grimes" , "svn-src-head@freebsd.org" , Cy Schubert , "svn-src-all@freebsd.org" , src-committers , Cy Schubert X-Rspamd-Queue-Id: 7930A7C03F X-Spamd-Result: default: False [-2.92 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.967,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; NEURAL_SPAM_SHORT(0.13)[0.130,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; MX_GOOD(-0.01)[alt1.aspmx.l.google.com,aspmx.l.google.com,aspmx2.googlemail.com,alt2.aspmx.l.google.com,aspmx3.googlemail.com]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[9.2.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-0.58)[ipnet: 2607:f8b0::/32(-1.49), asn: 15169(-1.30), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 21:03:54 -0000 On Sunday, December 9, 2018, Warner Losh wrote: > On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy Schubert > > > writes: > > > > Author: cy > > > > Date: Sun Dec 9 06:45:49 2018 > > > > New Revision: 341759 > > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > > > > > > Log: > > > > MFV r341618: > > > > > > > > Update wpa 2.6 --> 2.7. > > > > > > Relnotes: yes > > > > As an FYI, or maybe a new procedure, doing a reply to > > a commit message adding relnotes: yes does very little > > to insure that this commit gets refered to in release > > notes. > > > > What about we add RELNOTES.missed to the tree > > next to UPDATING, and when someone forgets to tag > > the Relnotes:yes into a commit you just follow up > > with a commit to that file, stating the svn revision > > which was missing the note and then we have a nice > > documented and clean way to extract the missing > > release note items, rather than trying to cull it > > from a thread in a mail list archive. > > > > The file would get truncated to 0 at appropriate > > times on various branches. > > > > How about just RELNOTES. You put the revision that is relevant and a quick > blurb. That way we don't have to look in two places. All release notes go > in here, no exceptions. You can retroactively tag them, or you can commit > this as part of commit. > I don't really know SVN, but there wouldn't be a chicken egg probem during commit time? I mean you would really know the SVN id. So you could only add a specific revision in a different commit to RELEASE file. > > Have a blurb at the top that tells people what > order to add them in, and you'd be set. We'd then retire "relnotes: yes" in > the commit message. This would also allow 'helpers' to format the RELNOTES > file as we go rather than having to play 2 years of catch-up at major > branch times. > > Having it in the commit message just doesn't work, and this is one of many > reasons: Cy forgot. Other times I'll do something and it's only a month > later I realize it needs to be in the release notes after some issue has > come up.... Other times I put relnotes: yes in only to realize that's my > vanity talking, and nobody else cares. > > Warner > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Sun Dec 9 21:11:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 394311330948; Sun, 9 Dec 2018 21:11:16 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D467B7C83D; Sun, 9 Dec 2018 21:11:15 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5C9816A3F; Sun, 9 Dec 2018 21:11:15 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9LBFXb011534; Sun, 9 Dec 2018 21:11:15 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9LBFec011533; Sun, 9 Dec 2018 21:11:15 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812092111.wB9LBFec011533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 9 Dec 2018 21:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341768 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 341768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D467B7C83D X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 21:11:16 -0000 Author: eugen Date: Sun Dec 9 21:11:15 2018 New Revision: 341768 URL: https://svnweb.freebsd.org/changeset/base/341768 Log: ping(8): remove needless comparision with LONG_MAX after unsigned long ultmp changed to long ltmp in r340245. MFC after: 1 week Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Sun Dec 9 19:14:21 2018 (r341767) +++ head/sbin/ping/ping.c Sun Dec 9 21:11:15 2018 (r341768) @@ -313,7 +313,7 @@ main(int argc, char *const *argv) break; case 'c': ltmp = strtol(optarg, &ep, 0); - if (*ep || ep == optarg || ltmp > LONG_MAX || ltmp <=0) + if (*ep || ep == optarg || ltmp <=0) errx(EX_USAGE, "invalid count of packets to transmit: `%s'", optarg); From owner-svn-src-all@freebsd.org Sun Dec 9 21:24:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2819513314B1 for ; Sun, 9 Dec 2018 21:24:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7098F7D229 for ; Sun, 9 Dec 2018 21:24:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id i7so10225612qtj.10 for ; Sun, 09 Dec 2018 13:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yWYE59L4pOsuKf8AY6yRLSCvVP9pGbicX6APbaO+DZc=; b=C04MHr1laa+U5d12K+STpdlzMj9dASnxox99Wh81sovE/JodxVKoTa+Hn9aKnfuNgJ 79eLV1mupWDgzrgDIzXFK/U0C4+0SbZRFY5C1WS04jBs2jBNrNqYSqC6ayw/9RozYOVj 0SnqpfydmEUpubBrRbGBnO1oScAc5P1AUCOxi4ZViwt0Jc46I3arFfldUWEBOcydLBEW jvkJqRwVyfIW3Y3Ko51kuAgEkmj0M67wecR8R7W3fSsym22zayh6N2EQ1ncwZ+B+v2jl SZgjxXcfYUUBZs2rk3XLT/7bl9P+2zExxHnLdxrZvgqt+DY6lKHmML1MGks6niQ704jf U3LQ== 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=yWYE59L4pOsuKf8AY6yRLSCvVP9pGbicX6APbaO+DZc=; b=qoqOIH6NKcAslJJySqhUr8EdEQ2lOv35F9ik5AllZKYZ/ZZ8P4eSJUhsQBNA/hev8H 6yFPGtHQZu+33nQRHPU8fbqflTPEgAiXOgwD6nH6g9wB8xqPhtRt48JSDg1S5n0hKMw3 FV41Be2OoDePBah9njiSG+4ABB7kNI1ADL9BLQp20ONLJwfHikb/B+2D/7m1weWxu/gy SplUrW1dizAhDr/rAZKN4GI9HJb2UDAJUHWKbB9ORuQLiD3l51/9p3uObY4Ceu1F68mZ X1I34BmVmpFvdJoOoCTvuEQFEnSV0W9yyWNRtibqQ8qM91h54Fuaz1SEUiodzrXPj+XX 3R4A== X-Gm-Message-State: AA+aEWYdj6gsgocKMdEfar/tc9ucLdKf2DANirGi//G79S5LgmW7YDuQ JYkW7+NsXQ/vNyFPhXoPLa9440nVvbuD8w9tfcvs+w== X-Google-Smtp-Source: AFSGD/V0NZPj19Y4GV7JyvYcPD/QgKtJhuaGIk30NqSrZ2mlEkKEhHlCF+x1n1uQgTIL91vb1icU2vJP+wRowuFUXb8= X-Received: by 2002:ac8:668c:: with SMTP id d12mr9378416qtp.242.1544390658931; Sun, 09 Dec 2018 13:24:18 -0800 (PST) MIME-Version: 1.0 References: <201812090701.wB9711aN058754@slippy.cwsent.com> <201812091933.wB9JXOvW062964@pdx.rh.CN85.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Sun, 9 Dec 2018 14:24:07 -0700 Message-ID: Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: Oliver Pinter Cc: "Rodney W. Grimes" , svn-src-head@freebsd.org, Cy Schubert , svn-src-all@freebsd.org, src-committers , Cy Schubert X-Rspamd-Queue-Id: 7098F7D229 X-Spamd-Result: default: False [-4.48 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.73)[-0.727,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[0.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.75)[ip: (-5.88), ipnet: 2607:f8b0::/32(-1.49), asn: 15169(-1.30), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 21:24:20 -0000 On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter wrote: > > > On Sunday, December 9, 2018, Warner Losh wrote: > >> On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: >> >> > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy >> Schubert >> > > writes: >> > > > Author: cy >> > > > Date: Sun Dec 9 06:45:49 2018 >> > > > New Revision: 341759 >> > > > URL: https://svnweb.freebsd.org/changeset/base/341759 >> > > > >> > > > Log: >> > > > MFV r341618: >> > > > >> > > > Update wpa 2.6 --> 2.7. >> > > >> > > Relnotes: yes >> > >> > As an FYI, or maybe a new procedure, doing a reply to >> > a commit message adding relnotes: yes does very little >> > to insure that this commit gets refered to in release >> > notes. >> > >> > What about we add RELNOTES.missed to the tree >> > next to UPDATING, and when someone forgets to tag >> > the Relnotes:yes into a commit you just follow up >> > with a commit to that file, stating the svn revision >> > which was missing the note and then we have a nice >> > documented and clean way to extract the missing >> > release note items, rather than trying to cull it >> > from a thread in a mail list archive. >> > >> > The file would get truncated to 0 at appropriate >> > times on various branches. >> > >> >> How about just RELNOTES. You put the revision that is relevant and a quick >> blurb. That way we don't have to look in two places. All release notes go >> in here, no exceptions. You can retroactively tag them, or you can commit >> this as part of commit. > > >> > I don't really know SVN, but there wouldn't be a chicken egg probem during > commit time? I mean you would really know the SVN id. So you could only add > a specific revision in a different commit to RELEASE file. > Generally, you can guess really well, and fix it in the case of a lost race easily. You'd add the release notes text in full to the file, with a pointer to the revision(s) for the feature. Warner > >> Have a blurb at the top that tells people what >> order to add them in, and you'd be set. We'd then retire "relnotes: yes" >> in >> the commit message. This would also allow 'helpers' to format the RELNOTES >> file as we go rather than having to play 2 years of catch-up at major >> branch times. >> >> Having it in the commit message just doesn't work, and this is one of many >> reasons: Cy forgot. Other times I'll do something and it's only a month >> later I realize it needs to be in the release notes after some issue has >> come up.... Other times I put relnotes: yes in only to realize that's my >> vanity talking, and nobody else cares. >> >> Warner >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >> > From owner-svn-src-all@freebsd.org Sun Dec 9 21:37:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9215F1331B67; Sun, 9 Dec 2018 21:37:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3109F7DCDD; Sun, 9 Dec 2018 21:37:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1317E16E08; Sun, 9 Dec 2018 21:37:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9LbYsd027331; Sun, 9 Dec 2018 21:37:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9LbYp8027330; Sun, 9 Dec 2018 21:37:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812092137.wB9LbYp8027330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 9 Dec 2018 21:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341769 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 341769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3109F7DCDD X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 21:37:35 -0000 Author: imp Date: Sun Dec 9 21:37:34 2018 New Revision: 341769 URL: https://svnweb.freebsd.org/changeset/base/341769 Log: Send a START UNIT command when a disk responds with an ASC of 04/1C. This will hopefully spin up a disk that's in low-power mode. Sponsored by: Netflix Submitted by: scottl@ Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Sun Dec 9 21:11:15 2018 (r341768) +++ head/sys/cam/scsi/scsi_all.c Sun Dec 9 21:37:34 2018 (r341769) @@ -1165,7 +1165,7 @@ static struct asc_table_entry asc_table[] = { { SST(0x04, 0x1B, SS_RDEF, /* XXX TBD */ "Logical unit not ready, sanitize in progress") }, /* DT MAEB */ - { SST(0x04, 0x1C, SS_RDEF, /* XXX TBD */ + { SST(0x04, 0x1C, SS_START | SSQ_DECREMENT_COUNT | ENXIO, "Logical unit not ready, additional power use not yet granted") }, /* D */ { SST(0x04, 0x1D, SS_RDEF, /* XXX TBD */ From owner-svn-src-all@freebsd.org Sun Dec 9 21:53:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D0931332AD3; Sun, 9 Dec 2018 21:53:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2C187EA2E; Sun, 9 Dec 2018 21:53:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2BDD1713D; Sun, 9 Dec 2018 21:53:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9Lrj17037375; Sun, 9 Dec 2018 21:53:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9LrjUv037374; Sun, 9 Dec 2018 21:53:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812092153.wB9LrjUv037374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 9 Dec 2018 21:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341770 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 341770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F2C187EA2E X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 21:53:46 -0000 Author: imp Date: Sun Dec 9 21:53:45 2018 New Revision: 341770 URL: https://svnweb.freebsd.org/changeset/base/341770 Log: Fix typo in powerpcspe name. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Dec 9 21:37:34 2018 (r341769) +++ head/sys/modules/Makefile Sun Dec 9 21:53:45 2018 (r341770) @@ -524,7 +524,7 @@ _cxgbe= cxgbe .endif # These rely on 64bit atomics -.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspc" && \ +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ ${MACHINE_CPUARCH} != "mips" _mps= mps _mpr= mpr From owner-svn-src-all@freebsd.org Sun Dec 9 22:42:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67C9113341F8; Sun, 9 Dec 2018 22:42:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 085C480E80; Sun, 9 Dec 2018 22:42:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD6971793D; Sun, 9 Dec 2018 22:42:23 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB9MgN5l061391; Sun, 9 Dec 2018 22:42:23 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB9MgN3t061387; Sun, 9 Dec 2018 22:42:23 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201812092242.wB9MgN3t061387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sun, 9 Dec 2018 22:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r341771 - in vendor/libarchive/dist: . libarchive libarchive/test X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/dist: . libarchive libarchive/test X-SVN-Commit-Revision: 341771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 085C480E80 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.992,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2018 22:42:24 -0000 Author: mm Date: Sun Dec 9 22:42:22 2018 New Revision: 341771 URL: https://svnweb.freebsd.org/changeset/base/341771 Log: Update vendor/libarchive/dist to git 851adb9602f1acdb090067bb4f297cd609dfa28c Relevant vendor changes: PR #1102: RAR5 reader - fix big-endian problems Modified: vendor/libarchive/dist/.travis.yml vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c Modified: vendor/libarchive/dist/.travis.yml ============================================================================== --- vendor/libarchive/dist/.travis.yml Sun Dec 9 21:53:45 2018 (r341770) +++ vendor/libarchive/dist/.travis.yml Sun Dec 9 22:42:22 2018 (r341771) @@ -1,6 +1,6 @@ language: C sudo: false -dist: trusty +dist: xenial addons: apt: packages: Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Sun Dec 9 21:53:45 2018 (r341770) +++ vendor/libarchive/dist/CMakeLists.txt Sun Dec 9 22:42:22 2018 (r341771) @@ -1602,6 +1602,11 @@ IF(ENABLE_XATTR) CHECK_LIBRARY_EXISTS(attr "setxattr" "" HAVE_LIBATTR) IF(HAVE_LIBATTR) SET(CMAKE_REQUIRED_LIBRARIES "attr") + ELSE() + CHECK_LIBRARY_EXISTS(gnu "setxattr" "" HAVE_LIBATTR_GNU) + IF(HAVE_LIBATTR_GNU) + SET(CMAKE_REQUIRED_LIBRARIES "gnu") + ENDIF() ENDIF(HAVE_LIBATTR) CHECK_SYMBOL_EXISTS(EXTATTR_NAMESPACE_USER "sys/types.h;sys/extattr.h" HAVE_DECL_EXTATTR_NAMESPACE_USER) CHECK_SYMBOL_EXISTS(XATTR_NOFOLLOW "sys/xattr.h" HAVE_DECL_XATTR_NOFOLLOW) Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Sun Dec 9 21:53:45 2018 (r341770) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Sun Dec 9 22:42:22 2018 (r341771) @@ -24,6 +24,7 @@ */ #include "archive_platform.h" +#include "archive_endian.h" #ifdef HAVE_ERRNO_H #include @@ -225,18 +226,10 @@ struct bit_reader { int in_addr; /* Current byte pointer. */ }; -/* RARv5 block header structure. */ +/* RARv5 block header structure. Use bf_* functions to get values from + * block_flags_u8 field. I.e. bf_byte_count, etc. */ struct compressed_block_header { - union { - struct { - uint8_t bit_size : 3; - uint8_t byte_count : 3; - uint8_t is_last_block : 1; - uint8_t is_table_present : 1; - } block_flags; - uint8_t block_flags_u8; - }; - + uint8_t block_flags_u8; /* Fields encoded in little-endian bitfield */ uint8_t block_cksum; }; @@ -429,26 +422,40 @@ static void cdeque_free(struct cdeque* d) { d->cap_mask = 0; } +static inline +uint8_t bf_bit_size(const struct compressed_block_header* hdr) { + return hdr->block_flags_u8 & 7; +} + +static inline +uint8_t bf_byte_count(const struct compressed_block_header* hdr) { + return (hdr->block_flags_u8 >> 3) & 7; +} + +static inline +uint8_t bf_is_last_block(const struct compressed_block_header* hdr) { + return (hdr->block_flags_u8 >> 6) & 1; +} + +static inline +uint8_t bf_is_table_present(const struct compressed_block_header* hdr) { + return (hdr->block_flags_u8 >> 7) & 1; +} + static inline struct rar5* get_context(struct archive_read* a) { return (struct rar5*) a->format->data; } -// TODO: make sure these functions return a little endian number - /* Convenience functions used by filter implementations. */ static uint32_t read_filter_data(struct rar5* rar, uint32_t offset) { - uint32_t* dptr = (uint32_t*) &rar->cstate.window_buf[offset]; - // TODO: bswap if big endian - return *dptr; + return archive_le32dec(&rar->cstate.window_buf[offset]); } static void write_filter_data(struct rar5* rar, uint32_t offset, uint32_t value) { - uint32_t* dptr = (uint32_t*) &rar->cstate.filtered_buf[offset]; - // TODO: bswap if big endian - *dptr = value; + archive_le32enc(&rar->cstate.filtered_buf[offset], value); } static void circular_memcpy(uint8_t* dst, uint8_t* window, const int mask, @@ -995,8 +1002,7 @@ static int read_u32(struct archive_read* a, uint32_t* if(!read_ahead(a, 4, &p)) return 0; - *pvalue = *(const uint32_t*)p; - + *pvalue = archive_le32dec(p); return ARCHIVE_OK == consume(a, 4) ? 1 : 0; } @@ -1005,8 +1011,7 @@ static int read_u64(struct archive_read* a, uint64_t* if(!read_ahead(a, 8, &p)) return 0; - *pvalue = *(const uint64_t*)p; - + *pvalue = archive_le64dec(p); return ARCHIVE_OK == consume(a, 8) ? 1 : 0; } @@ -1936,7 +1941,7 @@ static int create_decode_tables(uint8_t* bit_length, dist = bit_field - table->decode_len[cur_len - 1]; dist >>= (16 - cur_len); - pos = table->decode_pos[cur_len] + dist; + pos = table->decode_pos[cur_len & 15] + dist; if(cur_len < rar5_countof(table->decode_pos) && pos < size) { table->quick_num[code] = table->decode_num[pos]; } else { @@ -2159,17 +2164,17 @@ static int parse_block_header(struct archive_read* a, { memcpy(hdr, p, sizeof(struct compressed_block_header)); - if(hdr->block_flags.byte_count > 2) { + if(bf_byte_count(hdr) > 2) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Unsupported block header size (was %d, max is 2)", - hdr->block_flags.byte_count); + bf_byte_count(hdr)); return ARCHIVE_FATAL; } /* This should probably use bit reader interface in order to be more * future-proof. */ *block_size = 0; - switch(hdr->block_flags.byte_count) { + switch(bf_byte_count(hdr)) { /* 1-byte block size */ case 0: *block_size = *(const uint8_t*) &p[2]; @@ -2177,12 +2182,12 @@ static int parse_block_header(struct archive_read* a, /* 2-byte block size */ case 1: - *block_size = *(const uint16_t*) &p[2]; + *block_size = archive_le16dec(&p[2]); break; /* 3-byte block size */ case 2: - *block_size = *(const uint32_t*) &p[2]; + *block_size = archive_le32dec(&p[2]); *block_size &= 0x00FFFFFF; break; @@ -2379,7 +2384,7 @@ static int do_uncompress_block(struct archive_read* a, const int cmask = rar->cstate.window_mask; const struct compressed_block_header* hdr = &rar->last_block_hdr; - const uint8_t bit_size = 1 + hdr->block_flags.bit_size; + const uint8_t bit_size = 1 + bf_bit_size(hdr); while(1) { if(rar->cstate.write_ptr - rar->cstate.last_write_ptr > @@ -2777,7 +2782,7 @@ static int process_block(struct archive_read* a) { /* Skip block header. Next data is huffman tables, if present. */ ssize_t to_skip = sizeof(struct compressed_block_header) + - rar->last_block_hdr.block_flags.byte_count + 1; + bf_byte_count(&rar->last_block_hdr) + 1; if(ARCHIVE_OK != consume(a, to_skip)) return ARCHIVE_EOF; @@ -2833,7 +2838,7 @@ static int process_block(struct archive_read* a) { rar->bits.in_addr = 0; rar->bits.bit_addr = 0; - if(rar->last_block_hdr.block_flags.is_table_present) { + if(bf_is_table_present(&rar->last_block_hdr)) { /* Load Huffman tables. */ ret = parse_tables(a, rar, p); if(ret != ARCHIVE_OK) { Modified: vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c Sun Dec 9 21:53:45 2018 (r341770) +++ vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c Sun Dec 9 22:42:22 2018 (r341771) @@ -28,6 +28,7 @@ * help. */ #define __LIBARCHIVE_BUILD #include +#include #define PROLOGUE(reffile) \ struct archive_entry *ae; \ @@ -81,7 +82,7 @@ int verify_data(const uint8_t* data_ptr, int magic, in /* *lptr is a value inside unpacked test file, val is the * value that should be in the unpacked test file. */ - if(*lptr != val) + if(archive_le32dec(lptr) != (uint32_t) val) return 0; } From owner-svn-src-all@freebsd.org Mon Dec 10 00:54:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82250130C26A; Mon, 10 Dec 2018 00:54:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21489862BF; Mon, 10 Dec 2018 00:54:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D82C318E53; Mon, 10 Dec 2018 00:54:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA0sIf0032228; Mon, 10 Dec 2018 00:54:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA0sI59032226; Mon, 10 Dec 2018 00:54:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100054.wBA0sI59032226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 00:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341772 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 341772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 21489862BF X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 00:54:19 -0000 Author: kib Date: Mon Dec 10 00:54:18 2018 New Revision: 341772 URL: https://svnweb.freebsd.org/changeset/base/341772 Log: MFC r341441: Some fixes for LD_BIND_NOW + ifuncs. Modified: stable/12/libexec/rtld-elf/rtld.c stable/12/libexec/rtld-elf/rtld.h Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Sun Dec 9 22:42:22 2018 (r341771) +++ stable/12/libexec/rtld-elf/rtld.c Mon Dec 10 00:54:18 2018 (r341772) @@ -103,6 +103,7 @@ static void init_pagesizes(Elf_Auxinfo **aux_info); static void init_rtld(caddr_t, Elf_Auxinfo **); static void initlist_add_neededs(Needed_Entry *, Objlist *); static void initlist_add_objects(Obj_Entry *, Obj_Entry *, Objlist *); +static int initlist_objects_ifunc(Objlist *, bool, int, RtldLockState *); static void linkmap_add(Obj_Entry *); static void linkmap_delete(Obj_Entry *); static void load_filtees(Obj_Entry *, int flags, RtldLockState *); @@ -111,6 +112,7 @@ static int load_needed_objects(Obj_Entry *, int); static int load_preload_objects(void); static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); static void map_stacks_exec(RtldLockState *); +static int obj_disable_relro(Obj_Entry *); static int obj_enforce_relro(Obj_Entry *); static Obj_Entry *obj_from_addr(const void *); static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *); @@ -135,8 +137,6 @@ static int relocate_object(Obj_Entry *obj, bool bind_n static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, int, RtldLockState *); static int resolve_object_ifunc(Obj_Entry *, bool, int, RtldLockState *); -static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now, - int flags, RtldLockState *lockstate); static int rtld_dirname(const char *, char *); static int rtld_dirname_abs(const char *, char *); static void *rtld_dlopen(const char *name, int fd, int mode); @@ -713,16 +713,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr map_stacks_exec(NULL); - dbg("resolving ifuncs"); - if (resolve_objects_ifunc(obj_main, - ld_bind_now != NULL && *ld_bind_now != '\0', SYMLOOK_EARLY, - NULL) == -1) - rtld_die(); - - dbg("enforcing main obj relro"); - if (obj_enforce_relro(obj_main) == -1) - rtld_die(); - if (!obj_main->crt_no_init) { /* * Make sure we don't call the main program's init and fini @@ -741,6 +731,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr pre_init(); wlock_acquire(rtld_bind_lock, &lockstate); + + dbg("resolving ifuncs"); + if (initlist_objects_ifunc(&initlist, ld_bind_now != NULL && + *ld_bind_now != '\0', SYMLOOK_EARLY, &lockstate) == -1) + rtld_die(); + if (obj_main->crt_no_init) preinit_main(); objlist_call_init(&initlist, &lockstate); @@ -753,6 +749,11 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr if (ld_loadfltr || obj->z_loadfltr) load_filtees(obj, 0, &lockstate); } + + dbg("enforcing main obj relro"); + if (obj_enforce_relro(obj_main) == -1) + rtld_die(); + lock_release(rtld_bind_lock, &lockstate); dbg("transferring control to program entry point = %p", obj_main->entry); @@ -2217,9 +2218,7 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, initlist_add_neededs(obj->needed_aux_filtees, list); /* Add the object to the init list. */ - if (obj->preinit_array != (Elf_Addr)NULL || obj->init != (Elf_Addr)NULL || - obj->init_array != (Elf_Addr)NULL) - objlist_push_tail(list, obj); + objlist_push_tail(list, obj); /* Add the object to the global fini list in the reverse order. */ if ((obj->fini != (Elf_Addr)NULL || obj->fini_array != (Elf_Addr)NULL) @@ -2868,11 +2867,9 @@ relocate_object(Obj_Entry *obj, bool bind_now, Obj_Ent if (reloc_plt(obj) == -1) return (-1); /* Relocate the jump slots if we are doing immediate binding. */ - if (obj->bind_now || bind_now) { - if (reloc_jmpslots(obj, flags, lockstate) == -1 || - resolve_object_ifunc(obj, true, flags, lockstate) == -1) - return (-1); - } + if ((obj->bind_now || bind_now) && reloc_jmpslots(obj, flags, + lockstate) == -1) + return (-1); /* * Process the non-PLT IFUNC relocations. The relocations are @@ -2938,24 +2935,16 @@ static int resolve_object_ifunc(Obj_Entry *obj, bool bind_now, int flags, RtldLockState *lockstate) { + + if (obj->ifuncs_resolved) + return (0); + obj->ifuncs_resolved = true; if (obj->irelative && reloc_iresolve(obj, lockstate) == -1) return (-1); - if ((obj->bind_now || bind_now) && obj->gnu_ifunc && - reloc_gnu_ifunc(obj, flags, lockstate) == -1) - return (-1); - return (0); -} - -static int -resolve_objects_ifunc(Obj_Entry *first, bool bind_now, int flags, - RtldLockState *lockstate) -{ - Obj_Entry *obj; - - for (obj = first; obj != NULL; obj = TAILQ_NEXT(obj, next)) { - if (obj->marker) - continue; - if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1) + if ((obj->bind_now || bind_now) && obj->gnu_ifunc) { + if (obj_disable_relro(obj) || + reloc_gnu_ifunc(obj, flags, lockstate) == -1 || + obj_enforce_relro(obj)) return (-1); } return (0); @@ -2966,9 +2955,13 @@ initlist_objects_ifunc(Objlist *list, bool bind_now, i RtldLockState *lockstate) { Objlist_Entry *elm; + Obj_Entry *obj; STAILQ_FOREACH(elm, list, link) { - if (resolve_object_ifunc(elm->obj, bind_now, flags, + obj = elm->obj; + if (obj->marker) + continue; + if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1) return (-1); } @@ -5328,17 +5321,31 @@ _rtld_is_dlopened(void *arg) return (res); } -int -obj_enforce_relro(Obj_Entry *obj) +static int +obj_remap_relro(Obj_Entry *obj, int prot) { if (obj->relro_size > 0 && mprotect(obj->relro_page, obj->relro_size, - PROT_READ) == -1) { - _rtld_error("%s: Cannot enforce relro protection: %s", - obj->path, rtld_strerror(errno)); + prot) == -1) { + _rtld_error("%s: Cannot set relro protection to %#x: %s", + obj->path, prot, rtld_strerror(errno)); return (-1); } return (0); +} + +static int +obj_disable_relro(Obj_Entry *obj) +{ + + return (obj_remap_relro(obj, PROT_READ | PROT_WRITE)); +} + +static int +obj_enforce_relro(Obj_Entry *obj) +{ + + return (obj_remap_relro(obj, PROT_READ)); } static void Modified: stable/12/libexec/rtld-elf/rtld.h ============================================================================== --- stable/12/libexec/rtld-elf/rtld.h Sun Dec 9 22:42:22 2018 (r341771) +++ stable/12/libexec/rtld-elf/rtld.h Mon Dec 10 00:54:18 2018 (r341772) @@ -265,6 +265,7 @@ typedef struct Struct_Obj_Entry { bool irelative : 1; /* Object has R_MACHDEP_IRELATIVE relocs */ bool gnu_ifunc : 1; /* Object has references to STT_GNU_IFUNC */ bool non_plt_gnu_ifunc : 1; /* Object has non-plt IFUNC references */ + bool ifuncs_resolved : 1; /* Object ifuncs were already resolved */ bool crt_no_init : 1; /* Object' crt does not call _init/_fini */ bool valid_hash_sysv : 1; /* A valid System V hash hash tag is available */ bool valid_hash_gnu : 1; /* A valid GNU hash tag is available */ From owner-svn-src-all@freebsd.org Mon Dec 10 00:56:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84AA4130C365; Mon, 10 Dec 2018 00:56:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 297A386435; Mon, 10 Dec 2018 00:56:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0904F18E56; Mon, 10 Dec 2018 00:56:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA0u74R032388; Mon, 10 Dec 2018 00:56:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA0u76I032387; Mon, 10 Dec 2018 00:56:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100056.wBA0u76I032387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 00:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341773 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 341773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 297A386435 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 00:56:08 -0000 Author: kib Date: Mon Dec 10 00:56:07 2018 New Revision: 341773 URL: https://svnweb.freebsd.org/changeset/base/341773 Log: MFC r341439: Provide naive but self-contained implementations of memset(3) and bzero(3) for rtld. Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Mon Dec 10 00:54:18 2018 (r341772) +++ stable/12/libexec/rtld-elf/rtld.c Mon Dec 10 00:56:07 2018 (r341773) @@ -5599,3 +5599,25 @@ rtld_strerror(int errnum) return ("Unknown error"); return (sys_errlist[errnum]); } + +/* + * No ifunc relocations. + */ +void * +memset(void *dest, int c, size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) + ((char *)dest)[i] = c; + return (dest); +} + +void +bzero(void *dest, size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) + ((char *)dest)[i] = 0; +} From owner-svn-src-all@freebsd.org Mon Dec 10 00:57:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6172D130C3F7; Mon, 10 Dec 2018 00:57:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 019A486587; Mon, 10 Dec 2018 00:57:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B87C018E57; Mon, 10 Dec 2018 00:57:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA0vunm032530; Mon, 10 Dec 2018 00:57:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA0vuCR032527; Mon, 10 Dec 2018 00:57:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100057.wBA0vuCR032527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 00:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341774 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 341774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 019A486587 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 00:57:57 -0000 Author: kib Date: Mon Dec 10 00:57:56 2018 New Revision: 341774 URL: https://svnweb.freebsd.org/changeset/base/341774 Log: MFC r341441: Some fixes for LD_BIND_NOW + ifuncs. Modified: stable/11/libexec/rtld-elf/rtld.c stable/11/libexec/rtld-elf/rtld.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Mon Dec 10 00:56:07 2018 (r341773) +++ stable/11/libexec/rtld-elf/rtld.c Mon Dec 10 00:57:56 2018 (r341774) @@ -101,6 +101,7 @@ static void init_pagesizes(Elf_Auxinfo **aux_info); static void init_rtld(caddr_t, Elf_Auxinfo **); static void initlist_add_neededs(Needed_Entry *, Objlist *); static void initlist_add_objects(Obj_Entry *, Obj_Entry *, Objlist *); +static int initlist_objects_ifunc(Objlist *, bool, int, RtldLockState *); static void linkmap_add(Obj_Entry *); static void linkmap_delete(Obj_Entry *); static void load_filtees(Obj_Entry *, int flags, RtldLockState *); @@ -109,6 +110,7 @@ static int load_needed_objects(Obj_Entry *, int); static int load_preload_objects(void); static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); static void map_stacks_exec(RtldLockState *); +static int obj_disable_relro(Obj_Entry *); static int obj_enforce_relro(Obj_Entry *); static Obj_Entry *obj_from_addr(const void *); static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *); @@ -133,8 +135,6 @@ static int relocate_object(Obj_Entry *obj, bool bind_n static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, int, RtldLockState *); static int resolve_object_ifunc(Obj_Entry *, bool, int, RtldLockState *); -static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now, - int flags, RtldLockState *lockstate); static int rtld_dirname(const char *, char *); static int rtld_dirname_abs(const char *, char *); static void *rtld_dlopen(const char *name, int fd, int mode); @@ -735,16 +735,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr map_stacks_exec(NULL); - dbg("resolving ifuncs"); - if (resolve_objects_ifunc(obj_main, - ld_bind_now != NULL && *ld_bind_now != '\0', SYMLOOK_EARLY, - NULL) == -1) - rtld_die(); - - dbg("enforcing main obj relro"); - if (obj_enforce_relro(obj_main) == -1) - rtld_die(); - if (!obj_main->crt_no_init) { /* * Make sure we don't call the main program's init and fini @@ -763,6 +753,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr pre_init(); wlock_acquire(rtld_bind_lock, &lockstate); + + dbg("resolving ifuncs"); + if (initlist_objects_ifunc(&initlist, ld_bind_now != NULL && + *ld_bind_now != '\0', SYMLOOK_EARLY, &lockstate) == -1) + rtld_die(); + if (obj_main->crt_no_init) preinit_main(); objlist_call_init(&initlist, &lockstate); @@ -775,6 +771,11 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr if (ld_loadfltr || obj->z_loadfltr) load_filtees(obj, 0, &lockstate); } + + dbg("enforcing main obj relro"); + if (obj_enforce_relro(obj_main) == -1) + rtld_die(); + lock_release(rtld_bind_lock, &lockstate); dbg("transferring control to program entry point = %p", obj_main->entry); @@ -2223,9 +2224,7 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, initlist_add_neededs(obj->needed_aux_filtees, list); /* Add the object to the init list. */ - if (obj->preinit_array != (Elf_Addr)NULL || obj->init != (Elf_Addr)NULL || - obj->init_array != (Elf_Addr)NULL) - objlist_push_tail(list, obj); + objlist_push_tail(list, obj); /* Add the object to the global fini list in the reverse order. */ if ((obj->fini != (Elf_Addr)NULL || obj->fini_array != (Elf_Addr)NULL) @@ -2874,11 +2873,9 @@ relocate_object(Obj_Entry *obj, bool bind_now, Obj_Ent if (reloc_plt(obj) == -1) return (-1); /* Relocate the jump slots if we are doing immediate binding. */ - if (obj->bind_now || bind_now) { - if (reloc_jmpslots(obj, flags, lockstate) == -1 || - resolve_object_ifunc(obj, true, flags, lockstate) == -1) - return (-1); - } + if ((obj->bind_now || bind_now) && reloc_jmpslots(obj, flags, + lockstate) == -1) + return (-1); /* * Process the non-PLT IFUNC relocations. The relocations are @@ -2944,24 +2941,16 @@ static int resolve_object_ifunc(Obj_Entry *obj, bool bind_now, int flags, RtldLockState *lockstate) { + + if (obj->ifuncs_resolved) + return (0); + obj->ifuncs_resolved = true; if (obj->irelative && reloc_iresolve(obj, lockstate) == -1) return (-1); - if ((obj->bind_now || bind_now) && obj->gnu_ifunc && - reloc_gnu_ifunc(obj, flags, lockstate) == -1) - return (-1); - return (0); -} - -static int -resolve_objects_ifunc(Obj_Entry *first, bool bind_now, int flags, - RtldLockState *lockstate) -{ - Obj_Entry *obj; - - for (obj = first; obj != NULL; obj = TAILQ_NEXT(obj, next)) { - if (obj->marker) - continue; - if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1) + if ((obj->bind_now || bind_now) && obj->gnu_ifunc) { + if (obj_disable_relro(obj) || + reloc_gnu_ifunc(obj, flags, lockstate) == -1 || + obj_enforce_relro(obj)) return (-1); } return (0); @@ -2972,9 +2961,13 @@ initlist_objects_ifunc(Objlist *list, bool bind_now, i RtldLockState *lockstate) { Objlist_Entry *elm; + Obj_Entry *obj; STAILQ_FOREACH(elm, list, link) { - if (resolve_object_ifunc(elm->obj, bind_now, flags, + obj = elm->obj; + if (obj->marker) + continue; + if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1) return (-1); } @@ -5289,17 +5282,31 @@ _rtld_is_dlopened(void *arg) return (res); } -int -obj_enforce_relro(Obj_Entry *obj) +static int +obj_remap_relro(Obj_Entry *obj, int prot) { if (obj->relro_size > 0 && mprotect(obj->relro_page, obj->relro_size, - PROT_READ) == -1) { - _rtld_error("%s: Cannot enforce relro protection: %s", - obj->path, rtld_strerror(errno)); + prot) == -1) { + _rtld_error("%s: Cannot set relro protection to %#x: %s", + obj->path, prot, rtld_strerror(errno)); return (-1); } return (0); +} + +static int +obj_disable_relro(Obj_Entry *obj) +{ + + return (obj_remap_relro(obj, PROT_READ | PROT_WRITE)); +} + +static int +obj_enforce_relro(Obj_Entry *obj) +{ + + return (obj_remap_relro(obj, PROT_READ)); } static void Modified: stable/11/libexec/rtld-elf/rtld.h ============================================================================== --- stable/11/libexec/rtld-elf/rtld.h Mon Dec 10 00:56:07 2018 (r341773) +++ stable/11/libexec/rtld-elf/rtld.h Mon Dec 10 00:57:56 2018 (r341774) @@ -261,6 +261,7 @@ typedef struct Struct_Obj_Entry { bool irelative : 1; /* Object has R_MACHDEP_IRELATIVE relocs */ bool gnu_ifunc : 1; /* Object has references to STT_GNU_IFUNC */ bool non_plt_gnu_ifunc : 1; /* Object has non-plt IFUNC references */ + bool ifuncs_resolved : 1; /* Object ifuncs were already resolved */ bool crt_no_init : 1; /* Object' crt does not call _init/_fini */ bool valid_hash_sysv : 1; /* A valid System V hash hash tag is available */ bool valid_hash_gnu : 1; /* A valid GNU hash tag is available */ From owner-svn-src-all@freebsd.org Mon Dec 10 00:59:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BE50130C498; Mon, 10 Dec 2018 00:59:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E569A866D6; Mon, 10 Dec 2018 00:59:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C67D918E59; Mon, 10 Dec 2018 00:59:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA0xAhj032635; Mon, 10 Dec 2018 00:59:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA0xAY1032634; Mon, 10 Dec 2018 00:59:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100059.wBA0xAY1032634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 00:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341775 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 341775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E569A866D6 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 00:59:11 -0000 Author: kib Date: Mon Dec 10 00:59:10 2018 New Revision: 341775 URL: https://svnweb.freebsd.org/changeset/base/341775 Log: MFC r341439: Provide naive but self-contained implementations of memset(3) and bzero(3) for rtld. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Mon Dec 10 00:57:56 2018 (r341774) +++ stable/11/libexec/rtld-elf/rtld.c Mon Dec 10 00:59:10 2018 (r341775) @@ -5578,3 +5578,25 @@ rtld_strerror(int errnum) return ("Unknown error"); return (sys_errlist[errnum]); } + +/* + * No ifunc relocations. + */ +void * +memset(void *dest, int c, size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) + ((char *)dest)[i] = c; + return (dest); +} + +void +bzero(void *dest, size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) + ((char *)dest)[i] = 0; +} From owner-svn-src-all@freebsd.org Mon Dec 10 01:01:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 960F6130C6C6; Mon, 10 Dec 2018 01:01:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 399F186A11; Mon, 10 Dec 2018 01:01:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BD4718ECA; Mon, 10 Dec 2018 01:01:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA11h2h036494; Mon, 10 Dec 2018 01:01:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA11hfn036492; Mon, 10 Dec 2018 01:01:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100101.wBA11hfn036492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 01:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341776 - in stable/12/sys: compat/linuxkpi/common/src sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/src sys X-SVN-Commit-Revision: 341776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 399F186A11 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 01:01:44 -0000 Author: kib Date: Mon Dec 10 01:01:43 2018 New Revision: 341776 URL: https://svnweb.freebsd.org/changeset/base/341776 Log: MFC r341447: Improve procstat reporting for the linux cdev file descriptors. Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c stable/12/sys/sys/user.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Dec 10 00:59:10 2018 (r341775) +++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Dec 10 01:01:43 2018 (r341776) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1546,8 +1547,24 @@ static int linux_file_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) { + struct linux_file *filp; + struct vnode *vp; + int error; - return (0); + filp = fp->f_data; + vp = filp->f_vnode; + if (vp == NULL) { + error = 0; + kif->kf_type = KF_TYPE_DEV; + } else { + vref(vp); + FILEDESC_SUNLOCK(fdp); + error = vn_fill_kinfo_vnode(vp, kif); + vrele(vp); + kif->kf_type = KF_TYPE_VNODE; + FILEDESC_SLOCK(fdp); + } + return (error); } unsigned int Modified: stable/12/sys/sys/user.h ============================================================================== --- stable/12/sys/sys/user.h Mon Dec 10 00:59:10 2018 (r341775) +++ stable/12/sys/sys/user.h Mon Dec 10 01:01:43 2018 (r341776) @@ -262,6 +262,7 @@ struct user { #define KF_TYPE_SEM 9 #define KF_TYPE_PTS 10 #define KF_TYPE_PROCDESC 11 +#define KF_TYPE_DEV 12 #define KF_TYPE_UNKNOWN 255 #define KF_VTYPE_VNON 0 From owner-svn-src-all@freebsd.org Mon Dec 10 01:03:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09AED130C78D; Mon, 10 Dec 2018 01:03:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EF5B86C06; Mon, 10 Dec 2018 01:03:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FE4D19019; Mon, 10 Dec 2018 01:03:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA13HJV037408; Mon, 10 Dec 2018 01:03:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA13GQN037405; Mon, 10 Dec 2018 01:03:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100103.wBA13GQN037405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 01:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341777 - in stable/12: lib/libprocstat usr.bin/fstat usr.bin/procstat X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: lib/libprocstat usr.bin/fstat usr.bin/procstat X-SVN-Commit-Revision: 341777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9EF5B86C06 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 01:03:18 -0000 Author: kib Date: Mon Dec 10 01:03:16 2018 New Revision: 341777 URL: https://svnweb.freebsd.org/changeset/base/341777 Log: MFC r341448: Print type designator 'D' for the KF_TYPE_DEV files. Modified: stable/12/lib/libprocstat/libprocstat.c stable/12/lib/libprocstat/libprocstat.h stable/12/usr.bin/fstat/fstat.c stable/12/usr.bin/procstat/procstat_files.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libprocstat/libprocstat.c ============================================================================== --- stable/12/lib/libprocstat/libprocstat.c Mon Dec 10 01:01:43 2018 (r341776) +++ stable/12/lib/libprocstat/libprocstat.c Mon Dec 10 01:03:16 2018 (r341777) @@ -588,6 +588,10 @@ procstat_getfiles_kvm(struct procstat *procstat, struc type = PS_FST_TYPE_PROCDESC; data = file.f_data; break; + case DTYPE_DEV: + type = PS_FST_TYPE_DEV; + data = file.f_data; + break; default: continue; } @@ -673,6 +677,7 @@ kinfo_type2fst(int kftype) } kftypes2fst[] = { { KF_TYPE_PROCDESC, PS_FST_TYPE_PROCDESC }, { KF_TYPE_CRYPTO, PS_FST_TYPE_CRYPTO }, + { KF_TYPE_DEV, PS_FST_TYPE_DEV }, { KF_TYPE_FIFO, PS_FST_TYPE_FIFO }, { KF_TYPE_KQUEUE, PS_FST_TYPE_KQUEUE }, { KF_TYPE_MQUEUE, PS_FST_TYPE_MQUEUE }, Modified: stable/12/lib/libprocstat/libprocstat.h ============================================================================== --- stable/12/lib/libprocstat/libprocstat.h Mon Dec 10 01:01:43 2018 (r341776) +++ stable/12/lib/libprocstat/libprocstat.h Mon Dec 10 01:03:16 2018 (r341777) @@ -71,6 +71,7 @@ #define PS_FST_TYPE_UNKNOWN 11 #define PS_FST_TYPE_NONE 12 #define PS_FST_TYPE_PROCDESC 13 +#define PS_FST_TYPE_DEV 14 /* * Special descriptor numbers. Modified: stable/12/usr.bin/fstat/fstat.c ============================================================================== --- stable/12/usr.bin/fstat/fstat.c Mon Dec 10 01:01:43 2018 (r341776) +++ stable/12/usr.bin/fstat/fstat.c Mon Dec 10 01:03:16 2018 (r341777) @@ -301,6 +301,8 @@ print_file_info(struct procstat *procstat, struct file case PS_FST_TYPE_SEM: print_sem_info(procstat, fst); break; + case PS_FST_TYPE_DEV: + break; default: if (vflg) fprintf(stderr, Modified: stable/12/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_files.c Mon Dec 10 01:01:43 2018 (r341776) +++ stable/12/usr.bin/procstat/procstat_files.c Mon Dec 10 01:03:16 2018 (r341777) @@ -408,6 +408,11 @@ procstat_files(struct procstat *procstat, struct kinfo xo_emit("{eq:fd_type/procdesc}"); break; + case PS_FST_TYPE_DEV: + str = "D"; + xo_emit("{eq:fd_type/dev}"); + break; + case PS_FST_TYPE_NONE: str = "?"; xo_emit("{eq:fd_type/none}"); From owner-svn-src-all@freebsd.org Mon Dec 10 01:38:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB597130D1FB; Mon, 10 Dec 2018 01:38:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90A1C88205; Mon, 10 Dec 2018 01:38:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71901194D7; Mon, 10 Dec 2018 01:38:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA1cnV7053302; Mon, 10 Dec 2018 01:38:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA1cnNg053301; Mon, 10 Dec 2018 01:38:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100138.wBA1cnNg053301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 01:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341778 - in stable/11/sys: compat/linuxkpi/common/src sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: compat/linuxkpi/common/src sys X-SVN-Commit-Revision: 341778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 90A1C88205 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 01:38:50 -0000 Author: kib Date: Mon Dec 10 01:38:48 2018 New Revision: 341778 URL: https://svnweb.freebsd.org/changeset/base/341778 Log: MFC r341447: Improve procstat reporting for the linux cdev file descriptors. Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c stable/11/sys/sys/user.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Mon Dec 10 01:03:16 2018 (r341777) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Mon Dec 10 01:38:48 2018 (r341778) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1546,8 +1547,24 @@ static int linux_file_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) { + struct linux_file *filp; + struct vnode *vp; + int error; - return (0); + filp = fp->f_data; + vp = filp->f_vnode; + if (vp == NULL) { + error = 0; + kif->kf_type = KF_TYPE_DEV; + } else { + vref(vp); + FILEDESC_SUNLOCK(fdp); + error = vn_fill_kinfo_vnode(vp, kif); + vrele(vp); + kif->kf_type = KF_TYPE_VNODE; + FILEDESC_SLOCK(fdp); + } + return (error); } unsigned int Modified: stable/11/sys/sys/user.h ============================================================================== --- stable/11/sys/sys/user.h Mon Dec 10 01:03:16 2018 (r341777) +++ stable/11/sys/sys/user.h Mon Dec 10 01:38:48 2018 (r341778) @@ -259,6 +259,7 @@ struct user { #define KF_TYPE_SEM 9 #define KF_TYPE_PTS 10 #define KF_TYPE_PROCDESC 11 +#define KF_TYPE_DEV 12 #define KF_TYPE_UNKNOWN 255 #define KF_VTYPE_VNON 0 From owner-svn-src-all@freebsd.org Mon Dec 10 01:39:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 834D7130D293; Mon, 10 Dec 2018 01:39:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 292D28834D; Mon, 10 Dec 2018 01:39:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E579A194D9; Mon, 10 Dec 2018 01:39:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA1dfBx053395; Mon, 10 Dec 2018 01:39:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA1dfTM053391; Mon, 10 Dec 2018 01:39:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812100139.wBA1dfTM053391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Dec 2018 01:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341779 - in stable/11: lib/libprocstat usr.bin/fstat usr.bin/procstat X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: lib/libprocstat usr.bin/fstat usr.bin/procstat X-SVN-Commit-Revision: 341779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 292D28834D X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 01:39:42 -0000 Author: kib Date: Mon Dec 10 01:39:40 2018 New Revision: 341779 URL: https://svnweb.freebsd.org/changeset/base/341779 Log: MFC r341448: Print type designator 'D' for the KF_TYPE_DEV files. Modified: stable/11/lib/libprocstat/libprocstat.c stable/11/lib/libprocstat/libprocstat.h stable/11/usr.bin/fstat/fstat.c stable/11/usr.bin/procstat/procstat_files.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libprocstat/libprocstat.c ============================================================================== --- stable/11/lib/libprocstat/libprocstat.c Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/lib/libprocstat/libprocstat.c Mon Dec 10 01:39:40 2018 (r341779) @@ -583,6 +583,10 @@ procstat_getfiles_kvm(struct procstat *procstat, struc type = PS_FST_TYPE_PROCDESC; data = file.f_data; break; + case DTYPE_DEV: + type = PS_FST_TYPE_DEV; + data = file.f_data; + break; default: continue; } @@ -668,6 +672,7 @@ kinfo_type2fst(int kftype) } kftypes2fst[] = { { KF_TYPE_PROCDESC, PS_FST_TYPE_PROCDESC }, { KF_TYPE_CRYPTO, PS_FST_TYPE_CRYPTO }, + { KF_TYPE_DEV, PS_FST_TYPE_DEV }, { KF_TYPE_FIFO, PS_FST_TYPE_FIFO }, { KF_TYPE_KQUEUE, PS_FST_TYPE_KQUEUE }, { KF_TYPE_MQUEUE, PS_FST_TYPE_MQUEUE }, Modified: stable/11/lib/libprocstat/libprocstat.h ============================================================================== --- stable/11/lib/libprocstat/libprocstat.h Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/lib/libprocstat/libprocstat.h Mon Dec 10 01:39:40 2018 (r341779) @@ -69,6 +69,7 @@ #define PS_FST_TYPE_UNKNOWN 11 #define PS_FST_TYPE_NONE 12 #define PS_FST_TYPE_PROCDESC 13 +#define PS_FST_TYPE_DEV 14 /* * Special descriptor numbers. Modified: stable/11/usr.bin/fstat/fstat.c ============================================================================== --- stable/11/usr.bin/fstat/fstat.c Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/usr.bin/fstat/fstat.c Mon Dec 10 01:39:40 2018 (r341779) @@ -299,6 +299,8 @@ print_file_info(struct procstat *procstat, struct file case PS_FST_TYPE_SEM: print_sem_info(procstat, fst); break; + case PS_FST_TYPE_DEV: + break; default: if (vflg) fprintf(stderr, Modified: stable/11/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/11/usr.bin/procstat/procstat_files.c Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/usr.bin/procstat/procstat_files.c Mon Dec 10 01:39:40 2018 (r341779) @@ -407,6 +407,11 @@ procstat_files(struct procstat *procstat, struct kinfo xo_emit("{eq:fd_type/procdesc}"); break; + case PS_FST_TYPE_DEV: + str = "D"; + xo_emit("{eq:fd_type/dev}"); + break; + case PS_FST_TYPE_NONE: str = "?"; xo_emit("{eq:fd_type/none}"); From owner-svn-src-all@freebsd.org Mon Dec 10 01:52:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08246130D799; Mon, 10 Dec 2018 01:52:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C55388A5E; Mon, 10 Dec 2018 01:52:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D3281980E; Mon, 10 Dec 2018 01:52:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA1qejC063523; Mon, 10 Dec 2018 01:52:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA1qdWR063520; Mon, 10 Dec 2018 01:52:39 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812100152.wBA1qdWR063520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 10 Dec 2018 01:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341780 - head/stand/powerpc/uboot X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/stand/powerpc/uboot X-SVN-Commit-Revision: 341780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C55388A5E X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.991,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 01:52:41 -0000 Author: jhibbits Date: Mon Dec 10 01:52:39 2018 New Revision: 341780 URL: https://svnweb.freebsd.org/changeset/base/341780 Log: powerpc/ubldr: Teach powerpc's ubldr to boot 64-bit kernels This is just a copy of powerpc/ofw's ppc64_elf_freebsd.c modified to fit ubldr's boot format. MFC after: 1 week Added: head/stand/powerpc/uboot/ppc64_elf_freebsd.c (contents, props changed) Modified: head/stand/powerpc/uboot/Makefile head/stand/powerpc/uboot/conf.c Modified: head/stand/powerpc/uboot/Makefile ============================================================================== --- head/stand/powerpc/uboot/Makefile Mon Dec 10 01:39:40 2018 (r341779) +++ head/stand/powerpc/uboot/Makefile Mon Dec 10 01:52:39 2018 (r341780) @@ -16,7 +16,7 @@ NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} INSTALLFLAGS= -b # Architecture-specific loader code -SRCS= start.S conf.c vers.c +SRCS= start.S conf.c vers.c ppc64_elf_freebsd.c SRCS+= ucmpdi2.c # Always add MI sources Modified: head/stand/powerpc/uboot/conf.c ============================================================================== --- head/stand/powerpc/uboot/conf.c Mon Dec 10 01:39:40 2018 (r341779) +++ head/stand/powerpc/uboot/conf.c Mon Dec 10 01:52:39 2018 (r341780) @@ -95,9 +95,11 @@ struct netif_driver *netif_drivers[] = { * Sort formats so that those that can detect based on arguments * rather than reading the file go first. */ +extern struct file_format uboot_elf64; struct file_format *file_formats[] = { &uboot_elf, + &uboot_elf64, NULL }; Added: head/stand/powerpc/uboot/ppc64_elf_freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/powerpc/uboot/ppc64_elf_freebsd.c Mon Dec 10 01:52:39 2018 (r341780) @@ -0,0 +1,101 @@ +/*- + * Copyright (c) 2001 Benno Rice + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#define __ELF_WORD_SIZE 64 + +#include +#include + +#include +#include +#include + +#include + +#include "bootstrap.h" +#include "libuboot.h" + +vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb); +extern char end[]; +extern vm_offset_t reloc; /* From /conf.c */ + +int +ppc64_uboot_elf_loadfile(char *filename, uint64_t dest, + struct preloaded_file **result) +{ + int r; + + r = __elfN(loadfile)(filename, dest, result); + if (r != 0) + return (r); + + /* + * No need to sync the icache for modules: this will + * be done by the kernel after relocation. + */ + if (!strcmp((*result)->f_type, "elf kernel")) + __syncicache((void *) (*result)->f_addr, (*result)->f_size); + return (0); +} + +int +ppc64_uboot_elf_exec(struct preloaded_file *fp) +{ + struct file_metadata *fmp; + vm_offset_t mdp, dtbp; + Elf_Ehdr *e; + int error; + void (*entry)(void *); + + if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { + return(EFTYPE); + } + e = (Elf_Ehdr *)&fmp->md_data; + + /* Handle function descriptor for ELFv1 kernels */ + if ((e->e_flags & 3) == 2) + entry = (void (*)(void*))(intptr_t)e->e_entry; + else + entry = *(void (*)(void*))(uint64_t *)(intptr_t)e->e_entry; + + if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) + return (error); + + dev_cleanup(); + printf("Kernel args: %s\n", fp->f_args); + + (*entry)((void *)mdp); + panic("exec returned"); +} + +struct file_format uboot_elf64 = +{ + ppc64_uboot_elf_loadfile, + ppc64_uboot_elf_exec +}; From owner-svn-src-all@freebsd.org Mon Dec 10 04:16:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AE6D1310898; Mon, 10 Dec 2018 04:16:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 027808CA65; Mon, 10 Dec 2018 04:16:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB9211AF0A; Mon, 10 Dec 2018 04:16:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA4GeeD036410; Mon, 10 Dec 2018 04:16:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA4Geah036409; Mon, 10 Dec 2018 04:16:40 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812100416.wBA4Geah036409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 10 Dec 2018 04:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341781 - head/sys/powerpc/mpc85xx X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/mpc85xx X-SVN-Commit-Revision: 341781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 027808CA65 X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 04:16:41 -0000 Author: jhibbits Date: Mon Dec 10 04:16:40 2018 New Revision: 341781 URL: https://svnweb.freebsd.org/changeset/base/341781 Log: powerpc/booke: Replace a logical equivalent of pmap_kextract() with a real call No sense in reinventing the wheel here. AP bringup is not a time-critical point. Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/platform_mpc85xx.c Mon Dec 10 01:52:39 2018 (r341780) +++ head/sys/powerpc/mpc85xx/platform_mpc85xx.c Mon Dec 10 04:16:40 2018 (r341781) @@ -347,7 +347,7 @@ mpc85xx_smp_start_cpu_epapr(platform_t plat, struct pc rel_va = rel_page + (rel_pa & PAGE_MASK); pmap_kenter(rel_page, rel_pa & ~PAGE_MASK); rel = (struct cpu_release *)rel_va; - bptr = ((vm_paddr_t)(uintptr_t)__boot_page - __startkernel) + kernload; + bptr = pmap_kextract((uintptr_t)__boot_page); cpu_flush_dcache(__DEVOLATILE(struct cpu_release *,rel), sizeof(*rel)); rel->pir = pc->pc_cpuid; __asm __volatile("sync"); rel->entry_h = (bptr >> 32); @@ -416,7 +416,7 @@ mpc85xx_smp_start_cpu(platform_t plat, struct pcpu *pc /* Flush caches to have our changes hit DRAM. */ cpu_flush_dcache(__boot_page, 4096); - bptr = ((vm_paddr_t)(uintptr_t)__boot_page - __startkernel) + kernload; + bptr = pmap_kextract((uintptr_t)__boot_page); KASSERT((bptr & 0xfff) == 0, ("%s: boot page is not aligned (%#jx)", __func__, (uintmax_t)bptr)); if (mpc85xx_is_qoriq()) { From owner-svn-src-all@freebsd.org Mon Dec 10 05:22:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 000F61312100; Mon, 10 Dec 2018 05:22:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 09AE58EB4A; Mon, 10 Dec 2018 05:22:55 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id WDzKgpqkkyqMYWDzMgfaCc; Sun, 09 Dec 2018 22:20:18 -0700 X-Authority-Analysis: v=2.3 cv=CvFujUwD c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=2ur7OfE09M0A:10 a=xfDLHkLGAAAA:8 a=ypVJL4-jAAAA:8 a=7Qk2ozbKAAAA:8 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=oR3WUjlfROKjby8XLScA:9 a=CjuIK1q_8ugA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=khIbc0fXALFIcTpOSxgJ:22 a=1lyxoWkJIXJV6VJUPhuM:22 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 8EC681E56; Sun, 9 Dec 2018 21:20:14 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id wBA5KE8E036425; Sun, 9 Dec 2018 21:20:14 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id wBA5KD8o036422; Sun, 9 Dec 2018 21:20:13 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201812100520.wBA5KD8o036422@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Oliver Pinter , "Rodney W. Grimes" , svn-src-head@freebsd.org, Cy Schubert , svn-src-all@freebsd.org, src-committers , Cy Schubert Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: Message from Warner Losh of "Sun, 09 Dec 2018 14:24:07 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 09 Dec 2018 21:20:13 -0800 X-CMAE-Envelope: MS4wfDkNsKEla0MnVP2J6z8SZOMiz1bhND8jsNOlS2WZXqlpqbi6DxaOhBYKV2JA+T4yFSuW/hCVCq6s/9tZ/bmfiL6jRpHGL/OpZprxqTScu7aTT1gVU5zq rSQ5Q6XoL1WJV+e5qkt9hGwPt+WZLFylJPwdkMs+cZlUvgFS8LtfjU65smL+FKX/aZIbk7pXSi1GHpSafLeh/frg7wxrwC89rPYVPVaruDChiTVVPgB4+n04 n0cvozMmhKkXWI+sBoTW0w8DW3hszQoOR1IpKZRnfCvojRvyCRajA5E0iyPHPejZEfbFU3qqJMaFDfwHArdEA807O7gnq7+QgCrwD+h8GMgUWpWdN5NI0wH7 jCUjuaOOes7KgyuiB9f3FJQiWo+DpA== X-Rspamd-Queue-Id: 09AE58EB4A X-Spamd-Result: default: False [-2.88 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; LONG_SUBJ(1.52)[203]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; REPLYTO_EQ_FROM(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; NEURAL_HAM_SHORT(-0.77)[-0.767,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; IP_SCORE(-1.93)[ip: (-4.36), ipnet: 64.59.128.0/20(-2.88), asn: 6327(-2.30), country: CA(-0.09)]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 05:22:57 -0000 In message , Warner Losh writes: > --0000000000009ed486057c9d7878 > Content-Type: text/plain; charset="UTF-8" > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter > wrote: > > > > > > > On Sunday, December 9, 2018, Warner Losh wrote: > > > >> On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> > >> > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy > >> Schubert > >> > > writes: > >> > > > Author: cy > >> > > > Date: Sun Dec 9 06:45:49 2018 > >> > > > New Revision: 341759 > >> > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > >> > > > > >> > > > Log: > >> > > > MFV r341618: > >> > > > > >> > > > Update wpa 2.6 --> 2.7. > >> > > > >> > > Relnotes: yes > >> > > >> > As an FYI, or maybe a new procedure, doing a reply to > >> > a commit message adding relnotes: yes does very little > >> > to insure that this commit gets refered to in release > >> > notes. > >> > > >> > What about we add RELNOTES.missed to the tree > >> > next to UPDATING, and when someone forgets to tag > >> > the Relnotes:yes into a commit you just follow up > >> > with a commit to that file, stating the svn revision > >> > which was missing the note and then we have a nice > >> > documented and clean way to extract the missing > >> > release note items, rather than trying to cull it > >> > from a thread in a mail list archive. > >> > > >> > The file would get truncated to 0 at appropriate > >> > times on various branches. > >> > > >> > >> How about just RELNOTES. You put the revision that is relevant and a quick > >> blurb. That way we don't have to look in two places. All release notes go > >> in here, no exceptions. You can retroactively tag them, or you can commit > >> this as part of commit. > > > > > >> > > I don't really know SVN, but there wouldn't be a chicken egg probem during > > commit time? I mean you would really know the SVN id. So you could only add > > a specific revision in a different commit to RELEASE file. > > > > Generally, you can guess really well, and fix it in the case of a lost race > easily. > > You'd add the release notes text in full to the file, with a pointer to the > revision(s) for the feature. How about a couple of other alternatives? Hmmm. Rather than bloat the repo, can we put this onto wiki.freebsd.org? Downside, people tend to forget or it's too much of a hassle. Upside, no repo bloat. OTOH, if it is to be a file, IMO it should live in the doc repo. If people write up good notes they can be included directly from doc/. Personally, I prefer "put it in the doc repo" better. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Dec 10 06:19:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 675D7131317E; Mon, 10 Dec 2018 06:19:18 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A838FEA7; Mon, 10 Dec 2018 06:19:17 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wBA6JB7m064610; Sun, 9 Dec 2018 22:19:11 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wBA6JB0c064609; Sun, 9 Dec 2018 22:19:11 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: To: Warner Losh Date: Sun, 9 Dec 2018 22:19:11 -0800 (PST) CC: Oliver Pinter , "Rodney W. Grimes" , svn-src-head@freebsd.org, Cy Schubert , svn-src-all@freebsd.org, src-committers , Cy Schubert Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 66A838FEA7 X-Spamd-Result: default: False [2.15 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.38)[0.381,0]; NEURAL_HAM_LONG(-0.00)[-0.004,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.91)[0.913,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; RCPT_COUNT_SEVEN(0.00)[8]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.03)[asn: 13868(-0.05), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 06:19:18 -0000 > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter > wrote: > > > > > > > On Sunday, December 9, 2018, Warner Losh wrote: > > > >> On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> > >> > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy > >> Schubert > >> > > writes: > >> > > > Author: cy > >> > > > Date: Sun Dec 9 06:45:49 2018 > >> > > > New Revision: 341759 > >> > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > >> > > > > >> > > > Log: > >> > > > MFV r341618: > >> > > > > >> > > > Update wpa 2.6 --> 2.7. > >> > > > >> > > Relnotes: yes > >> > > >> > As an FYI, or maybe a new procedure, doing a reply to > >> > a commit message adding relnotes: yes does very little > >> > to insure that this commit gets refered to in release > >> > notes. > >> > > >> > What about we add RELNOTES.missed to the tree > >> > next to UPDATING, and when someone forgets to tag > >> > the Relnotes:yes into a commit you just follow up > >> > with a commit to that file, stating the svn revision > >> > which was missing the note and then we have a nice > >> > documented and clean way to extract the missing > >> > release note items, rather than trying to cull it > >> > from a thread in a mail list archive. > >> > > >> > The file would get truncated to 0 at appropriate > >> > times on various branches. > >> > > >> > >> How about just RELNOTES. You put the revision that is relevant and a quick > >> blurb. That way we don't have to look in two places. All release notes go > >> in here, no exceptions. You can retroactively tag them, or you can commit > >> this as part of commit. My one concern is that if we remove the Relnotes: yes line from the commits then we may end up totally ignoring the need to put entries in RELNOTES, which unlike UPDATING do not have consequences if ignored. > > > > > >> > > I don't really know SVN, but there wouldn't be a chicken egg probem during > > commit time? I mean you would really know the SVN id. So you could only add > > a specific revision in a different commit to RELEASE file. > > > > Generally, you can guess really well, and fix it in the case of a lost race > easily. No reason to guess, if you add the RELNOTES change with the commit then it is the revision that added the RELNOTES entry, so a log view of RELNOTES would show you the revision. If you do it after words or edit an existing entry in the RELNOTES file that is also fairly clear as that commit has no other files touched. > > You'd add the release notes text in full to the file, with a pointer to the > revision(s) for the feature. If you modify RELNOTES with the commit adding the feature we could easily use a pointer of "this commit", the svn version number of that added entry is self referencing to the actual change, which I actually rather like the idea of. > > Warner > > > > >> Have a blurb at the top that tells people what > >> order to add them in, and you'd be set. We'd then retire "relnotes: yes" > >> in > >> the commit message. This would also allow 'helpers' to format the RELNOTES > >> file as we go rather than having to play 2 years of catch-up at major > >> branch times. Yes. You could actually "delete" an entry from RELNOTES once a proper entry in the actual release notes had been created, such that RELNOTES is really a list of pending items. > >> > >> Having it in the commit message just doesn't work, and this is one of many > >> reasons: Cy forgot. Other times I'll do something and it's only a month > >> later I realize it needs to be in the release notes after some issue has > >> come up.... Other times I put relnotes: yes in only to realize that's my > >> vanity talking, and nobody else cares. I agree, what we have now works poorly. > >> Warner -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 10 06:34:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31F7613136CC; Mon, 10 Dec 2018 06:34:34 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8815F69FD2; Mon, 10 Dec 2018 06:34:33 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wBA6YSdJ064670; Sun, 9 Dec 2018 22:34:28 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wBA6YRcM064669; Sun, 9 Dec 2018 22:34:27 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201812100634.wBA6YRcM064669@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: <201812100520.wBA5KD8o036422@slippy.cwsent.com> To: Cy Schubert Date: Sun, 9 Dec 2018 22:34:27 -0800 (PST) CC: Warner Losh , Oliver Pinter , "Rodney W. Grimes" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Cy Schubert Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 8815F69FD2 X-Spamd-Result: default: False [4.59 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.44)[0.439,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.97)[0.973,0]; LONG_SUBJ(1.52)[203]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_SPAM_LONG(0.80)[0.796,0]; RCPT_COUNT_SEVEN(0.00)[8]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.03)[asn: 13868(-0.05), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 06:34:34 -0000 > In message il.com> > , Warner Losh writes: > > --0000000000009ed486057c9d7878 > > Content-Type: text/plain; charset="UTF-8" > > > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter > > wrote: > > > > > > > > > > > On Sunday, December 9, 2018, Warner Losh wrote: > > > > > >> On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > >> > > >> > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy > > >> Schubert > > >> > > writes: > > >> > > > Author: cy > > >> > > > Date: Sun Dec 9 06:45:49 2018 > > >> > > > New Revision: 341759 > > >> > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > >> > > > > > >> > > > Log: > > >> > > > MFV r341618: > > >> > > > > > >> > > > Update wpa 2.6 --> 2.7. > > >> > > > > >> > > Relnotes: yes > > >> > > > >> > As an FYI, or maybe a new procedure, doing a reply to > > >> > a commit message adding relnotes: yes does very little > > >> > to insure that this commit gets refered to in release > > >> > notes. > > >> > > > >> > What about we add RELNOTES.missed to the tree > > >> > next to UPDATING, and when someone forgets to tag > > >> > the Relnotes:yes into a commit you just follow up > > >> > with a commit to that file, stating the svn revision > > >> > which was missing the note and then we have a nice > > >> > documented and clean way to extract the missing > > >> > release note items, rather than trying to cull it > > >> > from a thread in a mail list archive. > > >> > > > >> > The file would get truncated to 0 at appropriate > > >> > times on various branches. > > >> > > > >> > > >> How about just RELNOTES. You put the revision that is relevant and a quick > > >> blurb. That way we don't have to look in two places. All release notes go > > >> in here, no exceptions. You can retroactively tag them, or you can commit > > >> this as part of commit. > > > > > > > > >> > > > I don't really know SVN, but there wouldn't be a chicken egg probem during > > > commit time? I mean you would really know the SVN id. So you could only add > > > a specific revision in a different commit to RELEASE file. > > > > > > > Generally, you can guess really well, and fix it in the case of a lost race > > easily. > > > > You'd add the release notes text in full to the file, with a pointer to the > > revision(s) for the feature. > > How about a couple of other alternatives? > > Hmmm. Rather than bloat the repo, I do not think this is going to create any sizeable amount of repo bloat. > can we put this onto > wiki.freebsd.org? Downside, people tend to forget or it's too much of a > hassle. Upside, no repo bloat. wiki.freebsd.org is out of the question, to far away from the commit button to ever be used by most developers. > > otoh, is it is to be a file, IMO it should live in the doc repo. If > people write up good notes they can be included directly from doc/. Again, doc repo is too far away for most developers to ever both with a commit to the doc repository, however we have move the release notes to the doc repository, but that is mostly release engineering doing work on that. > > Personally, I prefer "put it in the doc repo" better. Release notes are already there, but putting this file there would ensure that no developer ever adds anything to it. That would also mean 2 commits for any relnotes type thing, one to the base repository and another to the docs repository, and that would lose the self referential svn version that I mentioned in my reply to imp@ -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 10 06:40:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C68613137ED; Mon, 10 Dec 2018 06:40:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 155076A1D2; Mon, 10 Dec 2018 06:40:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id WFF8g0a23ctraWFF9g9qv2; Sun, 09 Dec 2018 23:40:41 -0700 X-Authority-Analysis: v=2.3 cv=Io3Pj43g c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=2ur7OfE09M0A:10 a=iKhvJSA4AAAA:8 a=ypVJL4-jAAAA:8 a=7Qk2ozbKAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=PGztigdreN4GuxPxX5EA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=khIbc0fXALFIcTpOSxgJ:22 a=1lyxoWkJIXJV6VJUPhuM:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 20B771F6B; Sun, 9 Dec 2018 22:40:37 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id wBA6eabO052007; Sun, 9 Dec 2018 22:40:36 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id wBA6eaMA052004; Sun, 9 Dec 2018 22:40:36 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201812100640.wBA6eaMA052004@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Warner Losh , Oliver Pinter , svn-src-head@freebsd.org, Cy Schubert , svn-src-all@freebsd.org, src-committers , Cy Schubert Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: Message from "Rodney W. Grimes" of "Sun, 09 Dec 2018 22:19:11 -0800." <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 09 Dec 2018 22:40:36 -0800 X-CMAE-Envelope: MS4wfHZK4qAssYBM9PgRRI+w13DiwpGEPnffBBWp8oslN0nMtIedU8dAi0/mN60j8KBXBR0HII0Eld7Xsuw4VDO09NbhBnkkP/ifUU86s3xeyFB4foy7nX2L BB5pXEOKFyDv800JyTddAJZEfJqq3z5XnbwpfcasGFFCYkrayp+UdPg74yyZlWxYaNl7J1Pn0BeMIxTQOvDBwv/fbTy6WSyDJk+8XxXB5DDrLwPMCadrLqU4 +9FqECUK9LkUfxFSd/LKB/C+PSK5T7ofq77Jjk0I0LczBOcWC3JuDRD9X0uR2Yv7oTtipRzPr+vbQ82Yl3z1jADtgcNDhx/VbctkRn7Pv3l2a7K8imwoHxGM xUXjwJHl6VT2vIVaH3wxEbvHpoC/+w== X-Rspamd-Queue-Id: 155076A1D2 X-Spamd-Result: default: False [-2.97 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; LONG_SUBJ(1.52)[203]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; REPLYTO_EQ_FROM(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; NEURAL_HAM_SHORT(-0.91)[-0.915,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; IP_SCORE(-1.87)[ip: (-4.12), ipnet: 64.59.128.0/20(-2.85), asn: 6327(-2.28), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 06:40:44 -0000 In message <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net>, "Rodney W. Gri mes" writes: > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter > > > wrote: > > > > > > > > > > > On Sunday, December 9, 2018, Warner Losh wrote: > > > > > >> On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > >> > > >> > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy > > >> Schubert > > >> > > writes: > > >> > > > Author: cy > > >> > > > Date: Sun Dec 9 06:45:49 2018 > > >> > > > New Revision: 341759 > > >> > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > >> > > > > > >> > > > Log: > > >> > > > MFV r341618: > > >> > > > > > >> > > > Update wpa 2.6 --> 2.7. > > >> > > > > >> > > Relnotes: yes > > >> > > > >> > As an FYI, or maybe a new procedure, doing a reply to > > >> > a commit message adding relnotes: yes does very little > > >> > to insure that this commit gets refered to in release > > >> > notes. > > >> > > > >> > What about we add RELNOTES.missed to the tree > > >> > next to UPDATING, and when someone forgets to tag > > >> > the Relnotes:yes into a commit you just follow up > > >> > with a commit to that file, stating the svn revision > > >> > which was missing the note and then we have a nice > > >> > documented and clean way to extract the missing > > >> > release note items, rather than trying to cull it > > >> > from a thread in a mail list archive. > > >> > > > >> > The file would get truncated to 0 at appropriate > > >> > times on various branches. > > >> > > > >> > > >> How about just RELNOTES. You put the revision that is relevant and a qui > ck > > >> blurb. That way we don't have to look in two places. All release notes g > o > > >> in here, no exceptions. You can retroactively tag them, or you can commi > t > > >> this as part of commit. > > My one concern is that if we remove the Relnotes: yes line > from the commits then we may end up totally ignoring the > need to put entries in RELNOTES, which unlike UPDATING > do not have consequences if ignored. > > > > > > > > > >> > > > I don't really know SVN, but there wouldn't be a chicken egg probem durin > g > > > commit time? I mean you would really know the SVN id. So you could only a > dd > > > a specific revision in a different commit to RELEASE file. > > > > > > > Generally, you can guess really well, and fix it in the case of a lost race > > easily. > > No reason to guess, if you add the RELNOTES change with the commit > then it is the revision that added the RELNOTES entry, so a log view > of RELNOTES would show you the revision. If you do it after words > or edit an existing entry in the RELNOTES file that is also fairly > clear as that commit has no other files touched. > > > > > You'd add the release notes text in full to the file, with a pointer to the > > revision(s) for the feature. > > If you modify RELNOTES with the commit adding the feature we > could easily use a pointer of "this commit", the svn version number > of that added entry is self referencing to the actual change, > which I actually rather like the idea of. > > > > > Warner > > > > > > > >> Have a blurb at the top that tells people what > > >> order to add them in, and you'd be set. We'd then retire "relnotes: yes" > > >> in > > >> the commit message. This would also allow 'helpers' to format the RELNOT > ES > > >> file as we go rather than having to play 2 years of catch-up at major > > >> branch times. > > Yes. You could actually "delete" an entry from RELNOTES once a > proper entry in the actual release notes had been created, such > that RELNOTES is really a list of pending items. > > > >> > > >> Having it in the commit message just doesn't work, and this is one of ma > ny > > >> reasons: Cy forgot. Other times I'll do something and it's only a month > > >> later I realize it needs to be in the release notes after some issue has > > >> come up.... Other times I put relnotes: yes in only to realize that's my > > >> vanity talking, and nobody else cares. > > I agree, what we have now works poorly. Forgetting, yes, but also a hmmm moment. Initially my thinking was a file in doc/. Or maybe something like the vuxml port where we fill in the blanks and make validate to make sure all the i's are dotted and t's crossed. It's a little extra work for committers but would help re@ immensely, and get the details in from the get-go. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Dec 10 06:48:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EC121313A94 for ; Mon, 10 Dec 2018 06:48:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C04BB6A66B for ; Mon, 10 Dec 2018 06:47:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82b.google.com with SMTP id e5so11118523qtr.12 for ; Sun, 09 Dec 2018 22:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fdGytl9RZPT2rkMfoFn60rdAiDVMG0vo6BC35lmbaas=; b=GYM3r5y1iIR19SzVZh939ytg8LB/n/rIum/qgpjORnjwMBWxwhopPDq8HMcLIwEK2q +Hut9RikB+WyOjG7d/j/0EGkHakGCqsVMj8a8bP3BM/PkGMywFUSHHHE9ZjTufXNTMwG mJ4GOcQybrxNpWRrB4PcMWHNeBJAmsASvyuBo/ixHHi3WrTUlztJE8AJJuo4IqKof6Ty pGSxMsnBer5w+ayoUXUgP2tSn7Q7mOA0GJ42ggcsA8c78FX1Z7oUPmCKqnmozEGUS6MB sqxBA+BfqOX31JZMP8kIb/pbsVBVtUdJGItgXU381zb9SnwxtpYDzIsFbsVHUzpCWdoP tZzg== 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=fdGytl9RZPT2rkMfoFn60rdAiDVMG0vo6BC35lmbaas=; b=BIg46m62swZhO+b14Po7YmxIeh9q54Y5RvWovFM9keoWe7miun+VrnOFbzCJfQnHLH 2Sg+GFoRlIz9l/3RWekmsYhJwNk6BU69rzpgxrKkR30buX2UobMspIMiQ0AM9aVmTHl4 0ss80ernk0CI4Pg5UNRnYqnkt7lJINJrcSZ59I0nT9CeMU/qv5hHPkJ8i9U/5GX3dzDY fxoSdngQT4TRYMLCgaeO/SCxZ6QfLHyt4SDMBFN+apci91j+3N7aJ6+djCJP2Wd1dvMn 1r+4cKCXMMo4pDHI4ERvGq1AhmqhBNfaTaXiIeuqeH/vLTBp/hmC3T6/EIiVxruYEnTH U2aw== X-Gm-Message-State: AA+aEWbZIgRhwvYFDuRQhZ1XfNAOZ6wSaduRHIi9QVPmOAlX+oEMkoz6 u5z/X9BGAL54z9CV3n5gotcCZ6R+sARYh13s6oGIag== X-Google-Smtp-Source: AFSGD/UsIp1VrAn2jpFDg/WBHFw54IT4PxgN7DOSOBSNWw3rTN9WrVDD+uUd/DzuDcG1WORb5H1Nt+kXErp4LZ86ePE= X-Received: by 2002:ac8:4294:: with SMTP id o20mr11092152qtl.118.1544424477874; Sun, 09 Dec 2018 22:47:57 -0800 (PST) MIME-Version: 1.0 References: <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net> <201812100640.wBA6eaMA052004@slippy.cwsent.com> In-Reply-To: <201812100640.wBA6eaMA052004@slippy.cwsent.com> From: Warner Losh Date: Sun, 9 Dec 2018 23:47:46 -0700 Message-ID: Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: Cy Schubert Cc: "Rodney W. Grimes" , Oliver Pinter , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Cy Schubert X-Rspamd-Queue-Id: C04BB6A66B X-Spamd-Result: default: False [-4.70 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[ALT1.aspmx.l.google.com,aspmx.l.google.com,ALT2.aspmx.l.google.com]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[b.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.75)[ip: (-5.85), ipnet: 2607:f8b0::/32(-1.50), asn: 15169(-1.30), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 06:48:00 -0000 On Sun, Dec 9, 2018, 11:40 PM Cy Schubert In message <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net>, > "Rodney W. Gri > mes" writes: > > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter < > oliver.pinter@hardenedbsd.org > > > > > > wrote: > > > > > > > > > > > > > > > On Sunday, December 9, 2018, Warner Losh wrote: > > > > > > > >> On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > > > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > >> > > > >> > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy > > > >> Schubert > > > >> > > writes: > > > >> > > > Author: cy > > > >> > > > Date: Sun Dec 9 06:45:49 2018 > > > >> > > > New Revision: 341759 > > > >> > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > >> > > > > > > >> > > > Log: > > > >> > > > MFV r341618: > > > >> > > > > > > >> > > > Update wpa 2.6 --> 2.7. > > > >> > > > > > >> > > Relnotes: yes > > > >> > > > > >> > As an FYI, or maybe a new procedure, doing a reply to > > > >> > a commit message adding relnotes: yes does very little > > > >> > to insure that this commit gets refered to in release > > > >> > notes. > > > >> > > > > >> > What about we add RELNOTES.missed to the tree > > > >> > next to UPDATING, and when someone forgets to tag > > > >> > the Relnotes:yes into a commit you just follow up > > > >> > with a commit to that file, stating the svn revision > > > >> > which was missing the note and then we have a nice > > > >> > documented and clean way to extract the missing > > > >> > release note items, rather than trying to cull it > > > >> > from a thread in a mail list archive. > > > >> > > > > >> > The file would get truncated to 0 at appropriate > > > >> > times on various branches. > > > >> > > > > >> > > > >> How about just RELNOTES. You put the revision that is relevant and > a qui > > ck > > > >> blurb. That way we don't have to look in two places. All release > notes g > > o > > > >> in here, no exceptions. You can retroactively tag them, or you can > commi > > t > > > >> this as part of commit. > > > > My one concern is that if we remove the Relnotes: yes line > > from the commits then we may end up totally ignoring the > > need to put entries in RELNOTES, which unlike UPDATING > > do not have consequences if ignored. > > > > > > > > > > > > > >> > > > > I don't really know SVN, but there wouldn't be a chicken egg probem > durin > > g > > > > commit time? I mean you would really know the SVN id. So you could > only a > > dd > > > > a specific revision in a different commit to RELEASE file. > > > > > > > > > > Generally, you can guess really well, and fix it in the case of a lost > race > > > easily. > > > > No reason to guess, if you add the RELNOTES change with the commit > > then it is the revision that added the RELNOTES entry, so a log view > > of RELNOTES would show you the revision. If you do it after words > > or edit an existing entry in the RELNOTES file that is also fairly > > clear as that commit has no other files touched. > > > > > > > > You'd add the release notes text in full to the file, with a pointer > to the > > > revision(s) for the feature. > > > > If you modify RELNOTES with the commit adding the feature we > > could easily use a pointer of "this commit", the svn version number > > of that added entry is self referencing to the actual change, > > which I actually rather like the idea of. > > > > > > > > Warner > > > > > > > > > > >> Have a blurb at the top that tells people what > > > >> order to add them in, and you'd be set. We'd then retire "relnotes: > yes" > > > >> in > > > >> the commit message. This would also allow 'helpers' to format the > RELNOT > > ES > > > >> file as we go rather than having to play 2 years of catch-up at > major > > > >> branch times. > > > > Yes. You could actually "delete" an entry from RELNOTES once a > > proper entry in the actual release notes had been created, such > > that RELNOTES is really a list of pending items. > > > > > >> > > > >> Having it in the commit message just doesn't work, and this is one > of ma > > ny > > > >> reasons: Cy forgot. Other times I'll do something and it's only a > month > > > >> later I realize it needs to be in the release notes after some > issue has > > > >> come up.... Other times I put relnotes: yes in only to realize > that's my > > > >> vanity talking, and nobody else cares. > > > > I agree, what we have now works poorly. > > Forgetting, yes, but also a hmmm moment. > > Initially my thinking was a file in doc/. Or maybe something like the > vuxml port where we fill in the blanks and make validate to make sure > all the i's are dotted and t's crossed. It's a little extra work for > committers but would help re@ immensely, and get the details in from > the get-go. > My thought was a low friction, proximate way to do a ticker of important changes. Doc repo is too hard. Too much friction. A simple extra file puts it all in one, easy to find and edit place... it can cause other things to happen, further away. But it needs to be close by. Warner > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > > From owner-svn-src-all@freebsd.org Mon Dec 10 09:17:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B87C513177E0; Mon, 10 Dec 2018 09:17:17 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout03.t-online.de (mailout03.t-online.de [194.25.134.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7B8C6F14A; Mon, 10 Dec 2018 09:17:16 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd26.aul.t-online.de (fwd26.aul.t-online.de [172.20.26.131]) by mailout03.t-online.de (Postfix) with SMTP id 2FCB3427F354; Mon, 10 Dec 2018 10:17:09 +0100 (CET) Received: from Stefans-MBP-LAN.fritz.box (rPaYTvZGYhzcZGO3uuulOTU9PgBXwg6AztbZHLN68uBZVQkbOA6c1jHZHd7vlzxgFQ@[93.200.55.147]) by fwd26.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1gWHgW-3Ukf9U0; Mon, 10 Dec 2018 10:17:04 +0100 Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: Warner Losh , Cy Schubert , "Rodney W. Grimes" , Oliver Pinter , Cy Schubert Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net> <201812100640.wBA6eaMA052004@slippy.cwsent.com> From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAHNKVN0ZWZhbiBFw59lciAoWWFob28hKSA8c3QuZXNzZXJAeWFob28uZGU+wsCWBBMBCgBA AhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AWIQSjceplnAvsyCtxUxNH67XvWv31RAUC WvLvqwUJCyUBEwAKCRBH67XvWv31REySCACc6vqcSFQCRyBRc2CV5ZBjbbnTy7VBoXbUS3/c 4Hn8I0YQ39q7//2z8vYsgLeM1mMXL4PUIU/0f0dBAFBLpxV7bntGzyCJls6SeGS/qcQKhqaI 6I7NcWg8OkIJIhUL6q238cS1ql9pU65fyHe0PP8JS08m81PDpX2/4wTE6h2jgYUy55eXRzoF MEjr1S8SSnidsBem27o7iWu9ltJsUtE86071iZlLzbuHv2nvucrjAV9cK9tHrxYT/YiY8QhT L48iWj2xIjLjg1ebmgIFZ2k881we/KTIoUugqOOR1gDSc4qwM8CA388cN3frjtl98CwhAT5T UV8tIDqri+/Z1AKwzsBNBFVxiRIBCACxI/aglzGVbnI6XHd0MTP05VK/fJub4hHdc+LQpz1M kVnCAhFbY9oecTB/togdKtfiloavjbFrb0nJhJnx57K+3SdSuu+znaQ4SlWiZOtXnkbpRWNU eMm+gtTDMSvloGAfr76RtFHskdDOLgXsHD70bKuMhlBxUCrSwGzHaD00q8iQPhJZ5itb3WPq z3B4IjiDAWTO2obD1wtAvSuHuUj/XJRsiKDKW3x13cfavkad81bZW4cpNwUv8XHLv/vaZPSA ly+hkY7NrDZydMMXVNQ7AJQufWuTJ0q7sImRcEZ5EIa98esJPey4O7C0vY405wjeyxpVZkpq ThDMurqtQFn1ABEBAAHCwHwEGAEKACYCGwwWIQSjceplnAvsyCtxUxNH67XvWv31RAUCWvLv qwUJCyUBGQAKCRBH67XvWv31RLnrB/9gzcRlpx71sDMosoZULWn7wysBJ/8AIEfIByRaHQe3 pn/KwE57pB+zFbbQqB7YzeZb7/UUgR4zU2ZbOcEfwDZcHUbj0B3fGRsS3t0uiLlAd8w0sBZb SxrqzjdpDjIbOZkxssqUmvrsN67UG1AFWH9aD24keBS7YjPBS8hLxPeYV+Xz6vUL8fRZje/Z JgiBMIwyj6g2lH/zkdnxBdC0iG1xxJOLTaghMMeQyCdH6ef8+VMyAlAJsMckbOTvx63tY8z7 DFcrnTJfbe1EziRilVsEaK8tTzJzhcTfos+f3eBYWEilxe5HzIhYKJeC7lmsSUcGwa6+9VRg a0ctmi9Z8OgX Message-ID: <2b0c3d91-54b6-37d9-e934-a87629b399fd@freebsd.org> Date: Mon, 10 Dec 2018 10:17:03 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ID: rPaYTvZGYhzcZGO3uuulOTU9PgBXwg6AztbZHLN68uBZVQkbOA6c1jHZHd7vlzxgFQ X-TOI-MSGID: b74ff86d-fa7c-405d-91a8-97bb96455f23 X-Rspamd-Queue-Id: C7B8C6F14A X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; NEURAL_HAM_LONG(-0.95)[-0.950,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:3320, ipnet:194.25.0.0/16, country:DE] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 09:17:18 -0000 Am 10.12.18 um 07:47 schrieb Warner Losh: > > > On Sun, Dec 9, 2018, 11:40 PM Cy Schubert wrote: > > In message <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net > >, > "Rodney W. Gri > mes" writes: > > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter > > > > > > > wrote: > > > > > > > > > > > > > > > On Sunday, December 9, 2018, Warner Losh > wrote: > > > > > > > >> On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > > > >> freebsd@pdx.rh.cn85.dnsmgr.net > > wrote: > > > >> > > > >> > > In message <201812090645.wB96jnso066329@repo.freebsd.org > >, Cy > > > >> Schubert > > > >> > > writes: > > > >> > > > Author: cy > > > >> > > > Date: Sun Dec  9 06:45:49 2018 > > > >> > > > New Revision: 341759 > > > >> > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > >> > > > > > > >> > > > Log: > > > >> > > >   MFV r341618: > > > >> > > > > > > >> > > >   Update wpa 2.6 --> 2.7. > > > >> > > > > > >> > > Relnotes: yes > > > >> > > > > >> > As an FYI, or maybe a new procedure, doing a reply to > > > >> > a commit message adding relnotes: yes does very little > > > >> > to insure that this commit gets refered to in release > > > >> > notes. > > > >> > > > > >> > What about we add RELNOTES.missed to the tree > > > >> > next to UPDATING, and when someone forgets to tag > > > >> > the Relnotes:yes into a commit you just follow up > > > >> > with a commit to that file, stating the svn revision > > > >> > which was missing the note and then we have a nice > > > >> > documented and clean way to extract the missing > > > >> > release note items, rather than trying to cull it > > > >> > from a thread in a mail list archive. > > > >> > > > > >> > The file would get truncated to 0 at appropriate > > > >> > times on various branches. > > > >> > > > > >> > > > >> How about just RELNOTES. You put the revision that is relevant and > a qui > > ck > > > >> blurb. That way we don't have to look in two places. All release > notes g > > o > > > >> in here, no exceptions. You can retroactively tag them, or you can > commi > > t > > > >> this as part of commit. > > > > My one concern is that if we remove the Relnotes: yes line > > from the commits then we may end up totally ignoring the > > need to put entries in RELNOTES, which unlike UPDATING > > do not have consequences if ignored. > > > > > > > > > > > > > >> > > > > I don't really know SVN, but there wouldn't be a chicken egg probem > durin > > g > > > > commit time? I mean you would really know the SVN id. So you could > only a > > dd > > > > a specific revision in a different commit to RELEASE file. > > > > > > > > > > Generally, you can guess really well, and fix it in the case of a lost > race > > > easily. > > > > No reason to guess, if you add the RELNOTES change with the commit > > then it is the revision that added the RELNOTES entry, so a log view > > of RELNOTES would show you the revision.  If you do it after words > > or edit an existing entry in the RELNOTES file that is also fairly > > clear as that commit has no other files touched. > > > > > > > > You'd add the release notes text in full to the file, with a pointer > to the > > > revision(s) for the feature. > > > > If you modify RELNOTES with the commit adding the feature we > > could easily use a pointer of "this commit", the svn version number > > of that added entry is self referencing to the actual change, > > which I actually rather like the idea of. > > > > > > > > Warner > > > > > > > > > > >> Have a blurb at the top that tells people what > > > >> order to add them in, and you'd be set. We'd then retire "relnotes: > yes" > > > >> in > > > >> the commit message. This would also allow 'helpers' to format the > RELNOT > > ES > > > >> file as we go rather than having to play 2 years of catch-up at major > > > >> branch times. > > > > Yes.  You could actually "delete" an entry from RELNOTES once a > > proper entry in the actual release notes had been created, such > > that RELNOTES is really a list of pending items. > > > > > >> > > > >> Having it in the commit message just doesn't work, and this is one > of ma > > ny > > > >> reasons: Cy forgot. Other times I'll do something and it's only a month > > > >> later I realize it needs to be in the release notes after some > issue has > > > >> come up.... Other times I put relnotes: yes in only to realize > that's my > > > >> vanity talking, and nobody else cares. > > > > I agree, what we have now works poorly. > > Forgetting, yes, but also a hmmm moment. > > Initially my thinking was a file in doc/. Or maybe something like the > vuxml port where we fill in the blanks and make validate to make sure > all the i's are dotted and t's crossed. It's a little extra work for > committers but would help re@ immensely, and get the details in from > the get-go. > > My thought was a low friction,  proximate way to do a ticker of important > changes. Doc repo is too hard. Too much friction. A simple extra file puts it > all in one, easy to find and edit place... it can cause other things to > happen, further away. But it needs to be close by. IMHO it would be easiest to use and to remember to just perform a forced commit to any of the files affected by the change and to set RELNOTES in that commit. The commit message could further contain a SVN revision number of the relevant change (mandatory, if it has not been the previous commit to that file) and optionally an explanatory text for the RE. This could be automated by allowing the revision affected (or a few words of explanation) to be put on the RELNOTES line - assume there already is a script that scans the repository for such entries and that script could be enhanced to automatically retrieve the commit message from a referenced earlier commit, for example. Regards, STefan From owner-svn-src-all@freebsd.org Mon Dec 10 09:35:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C23BB1317F4A; Mon, 10 Dec 2018 09:35:34 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 694AE6FBD2; Mon, 10 Dec 2018 09:35:34 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EEE81E260; Mon, 10 Dec 2018 09:35:34 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA9ZYXf002340; Mon, 10 Dec 2018 09:35:34 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA9ZXa6002338; Mon, 10 Dec 2018 09:35:33 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201812100935.wBA9ZXa6002338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 10 Dec 2018 09:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341782 - head/sys/dev/sfxge X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: head/sys/dev/sfxge X-SVN-Commit-Revision: 341782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 694AE6FBD2 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.991,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 09:35:35 -0000 Author: arybchik Date: Mon Dec 10 09:35:33 2018 New Revision: 341782 URL: https://svnweb.freebsd.org/changeset/base/341782 Log: sfxge(4): populate per-event queue stats in sysctl In order to find out why the first event queue and corresponding interrupt is triggered more frequent, it is useful to know which events go to each event queue. Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18418 Modified: head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_ev.c Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Mon Dec 10 04:16:40 2018 (r341781) +++ head/sys/dev/sfxge/sfxge.h Mon Dec 10 09:35:33 2018 (r341782) @@ -184,6 +184,10 @@ struct sfxge_evq { unsigned int buf_base_id; unsigned int entries; char lock_name[SFXGE_LOCK_NAME_MAX]; +#if EFSYS_OPT_QSTATS + clock_t stats_update_time; + uint64_t stats[EV_NQSTATS]; +#endif } __aligned(CACHE_LINE_SIZE); #define SFXGE_NDESCS 1024 @@ -275,6 +279,9 @@ struct sfxge_softc { struct ifnet *ifnet; unsigned int if_flags; struct sysctl_oid *stats_node; +#if EFSYS_OPT_QSTATS + struct sysctl_oid *evqs_stats_node; +#endif struct sysctl_oid *txqs_node; struct task task_reset; Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Mon Dec 10 04:16:40 2018 (r341781) +++ head/sys/dev/sfxge/sfxge_ev.c Mon Dec 10 09:35:33 2018 (r341782) @@ -443,29 +443,94 @@ sfxge_ev_wake_up(void *arg, uint32_t index) #if EFSYS_OPT_QSTATS static void +sfxge_evq_stat_update(struct sfxge_evq *evq) +{ + clock_t now; + + SFXGE_EVQ_LOCK(evq); + + if (__predict_false(evq->init_state != SFXGE_EVQ_STARTED)) + goto out; + + now = ticks; + if ((unsigned int)(now - evq->stats_update_time) < (unsigned int)hz) + goto out; + + evq->stats_update_time = now; + efx_ev_qstats_update(evq->common, evq->stats); + +out: + SFXGE_EVQ_UNLOCK(evq); +} + +static int +sfxge_evq_stat_handler(SYSCTL_HANDLER_ARGS) +{ + struct sfxge_evq *evq = arg1; + struct sfxge_softc *sc = evq->sc; + unsigned int id = arg2; + + SFXGE_ADAPTER_LOCK(sc); + + sfxge_evq_stat_update(evq); + + SFXGE_ADAPTER_UNLOCK(sc); + + return (SYSCTL_OUT(req, &evq->stats[id], sizeof(evq->stats[id]))); +} + +static int +sfxge_evq_stat_init(struct sfxge_evq *evq) +{ + struct sfxge_softc *sc = evq->sc; + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->dev); + char name[16]; + struct sysctl_oid *evq_stats_node; + unsigned int id; + + snprintf(name, sizeof(name), "%u", evq->index); + evq_stats_node = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(sc->evqs_stats_node), + OID_AUTO, name, CTLFLAG_RD, NULL, ""); + if (evq_stats_node == NULL) + return (ENOMEM); + + for (id = 0; id < EV_NQSTATS; id++) { + SYSCTL_ADD_PROC( + ctx, SYSCTL_CHILDREN(evq_stats_node), + OID_AUTO, efx_ev_qstat_name(sc->enp, id), + CTLTYPE_U64|CTLFLAG_RD, + evq, id, sfxge_evq_stat_handler, "Q", + ""); + } + + return (0); +} + +static void sfxge_ev_stat_update(struct sfxge_softc *sc) { struct sfxge_evq *evq; unsigned int index; clock_t now; + unsigned int id; SFXGE_ADAPTER_LOCK(sc); - if (__predict_false(sc->evq[0]->init_state != SFXGE_EVQ_STARTED)) - goto out; - now = ticks; if ((unsigned int)(now - sc->ev_stats_update_time) < (unsigned int)hz) goto out; sc->ev_stats_update_time = now; - /* Add event counts from each event queue in turn */ + memset(sc->ev_stats, 0, sizeof(sc->ev_stats)); + + /* Update and add event counts from each event queue in turn */ for (index = 0; index < sc->evq_count; index++) { evq = sc->evq[index]; - SFXGE_EVQ_LOCK(evq); - efx_ev_qstats_update(evq->common, sc->ev_stats); - SFXGE_EVQ_UNLOCK(evq); + sfxge_evq_stat_update(evq); + for (id = 0; id < EV_NQSTATS; id++) + sc->ev_stats[id] += evq->stats[id]; } out: SFXGE_ADAPTER_UNLOCK(sc); @@ -672,7 +737,7 @@ sfxge_ev_qstop(struct sfxge_softc *sc, unsigned int in #if EFSYS_OPT_QSTATS /* Add event counts before discarding the common evq state */ - efx_ev_qstats_update(evq->common, sc->ev_stats); + efx_ev_qstats_update(evq->common, evq->stats); #endif efx_ev_qdestroy(evq->common); @@ -873,7 +938,24 @@ sfxge_ev_qinit(struct sfxge_softc *sc, unsigned int in evq->init_state = SFXGE_EVQ_INITIALIZED; +#if EFSYS_OPT_QSTATS + rc = sfxge_evq_stat_init(evq); + if (rc != 0) + goto fail_evq_stat_init; +#endif + return (0); + +#if EFSYS_OPT_QSTATS +fail_evq_stat_init: + evq->init_state = SFXGE_EVQ_UNINITIALIZED; + SFXGE_EVQ_LOCK_DESTROY(evq); + sfxge_dma_free(esmp); + sc->evq[index] = NULL; + free(evq, M_SFXGE); + + return (rc); +#endif } void @@ -922,6 +1004,16 @@ sfxge_ev_init(struct sfxge_softc *sc) sc, 0, sfxge_int_mod_handler, "IU", "sfxge interrupt moderation (us)"); +#if EFSYS_OPT_QSTATS + sc->evqs_stats_node = SYSCTL_ADD_NODE( + device_get_sysctl_ctx(sc->dev), SYSCTL_CHILDREN(sc->stats_node), + OID_AUTO, "evq", CTLFLAG_RD, NULL, "Event queues stats"); + if (sc->evqs_stats_node == NULL) { + rc = ENOMEM; + goto fail_evqs_stats_node; + } +#endif + /* * Initialize the event queue(s) - one per interrupt. */ @@ -940,6 +1032,9 @@ fail: while (--index >= 0) sfxge_ev_qfini(sc, index); +#if EFSYS_OPT_QSTATS +fail_evqs_stats_node: +#endif sc->evq_count = 0; return (rc); } From owner-svn-src-all@freebsd.org Mon Dec 10 09:35:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14CF61317F7B; Mon, 10 Dec 2018 09:35:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id A006A6FC84; Mon, 10 Dec 2018 09:35:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 579CD3D1EB8; Mon, 10 Dec 2018 20:35:40 +1100 (AEDT) Date: Mon, 10 Dec 2018 20:35:39 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eugene Grosbein cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r341768 - head/sbin/ping In-Reply-To: <201812092111.wB9LBFec011533@repo.freebsd.org> Message-ID: <20181210184329.A1122@besplex.bde.org> References: <201812092111.wB9LBFec011533@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=xAMMRBIkV0rQtsxeVqYA:9 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: A006A6FC84 X-Spamd-Result: default: False [-6.66 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:211.29.132.0/23]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[optusnet.com.au]; DMARC_NA(0.00)[optusnet.com.au]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-3.39)[ip: (-9.37), ipnet: 211.28.0.0/14(-4.19), asn: 4804(-3.35), country: AU(-0.04)]; MX_GOOD(-0.01)[cached: extmail.optusnet.com.au]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[optusnet.com.au]; ASN(0.00)[asn:4804, ipnet:211.28.0.0/14, country:AU]; RCVD_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_LOW(-0.10)[42.132.29.211.list.dnswl.org : 127.0.5.1] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 09:35:46 -0000 On Sun, 9 Dec 2018, Eugene Grosbein wrote: > Log: > ping(8): remove needless comparision with LONG_MAX > after unsigned long ultmp changed to long ltmp in r340245. > > MFC after: 1 week A range check is needed, and is now not even attempted for large positive values. The logic for the range check was broken in r340245. The LONG_MAX was a vestige of the correct logic. Several other vestiges remain. > Modified: head/sbin/ping/ping.c > ============================================================================== > --- head/sbin/ping/ping.c Sun Dec 9 19:14:21 2018 (r341767) > +++ head/sbin/ping/ping.c Sun Dec 9 21:11:15 2018 (r341768) > @@ -313,7 +313,7 @@ main(int argc, char *const *argv) > break; > case 'c': > ltmp = strtol(optarg, &ep, 0); > - if (*ep || ep == optarg || ltmp > LONG_MAX || ltmp <=0) > + if (*ep || ep == optarg || ltmp <=0) > errx(EX_USAGE, > "invalid count of packets to transmit: `%s'", > optarg); The bugs in r340245 visible in this patch are: - lost range checking for large positive values. Before r340245, this was done hackishly by using strtoul() so that the in-bound error value ULONG_MAX was out of bounds for the range check against LONG_MAX. This range check also checked for large values which don't overflow u_long. Changing to use strtol() broke this. LONG_MAX is in-band for strtol(), any check of it alone is buggy; the inherited check of it was nonsense. - style bug: nonsense use of a temporary variable. ultmp exists and has type u_long to hold the result of of strtoul(), mainly so that the results that don't need to be larger than LONG_MAX can be checked before clobbering them by assignment to a non-temporary variable of type long. Now going through ltmp makes no difference since ltmp's type is the same as the type of the final variable and there is no reason to preserve the current value of the final variable; clobbering has already occurred in strtol() (clamp overflowing values to LONG_MAX and set errno to ERANGE to indicate the error). - style bug: no space after '<=' The main bug near here before r340245 and visible in the patch for it and fixed in r340245 is: - the hackish range checking doesn't work for negative values unless they are large enough to cause overflow as u_longs. strtoul() converts -n by evaluating n as a u_long and negating the result. So small negative values were detected as errors after becoming > LONG_MAX, but values between about -(double)ULONG_MAX and LONG_MIN wee not detected as errors after becoming <= LONG_MAX. The main bugs not near here that are not similar and are not fixed in any version are: - in all of the "packet size too large" error messages the converted value is printed (in decimal) instead of the arg (quoted). Simpler messages like the one visible in the above patch just print the arg, and they even quote the arg consistently. The arg may have leading whitespace or signs, or a non-decimal base, and then printing its converted value in decimal obfuscates it. This is the main bug used to justify r340245. After not detecting some negative values, they were misprinted as large positive values (near ULONG_MAX). Related style/quality bugs: - the simpler error message mostly just say "invalid" without distinguishing between invalid formats and invalid due to overflow or invalid due to being negative or invalid due to failing another range check. Sometimes, often just due to implementation details of the range check, some range check failures cause a differently encrypted undocumented exit code (EX_NOPERM instead of EX_USAGE) and a different error message with more details. - the "invalid" messages give no hint of the the valid range together no hint of range errors in either the message or the exit code - the man page gives no hint of the valid range for most or all numeric args, even for the "packet size too large" case where the error messages give the top end of the range (this is a fairly arbitrary limit for non-root only; most other cases have a less arbitrary limit of LONG_MAX or INT_MAX). - the special error handling for "packet size too large" is too fussy unless most error handling is done almost perfectly. The error handling is messy enough without it. The important thing about this case is that it is special for non-root, but neither the message nor the man page mentions special cases for non-root. The man page doesn't even mention valid ranges for this. Only the exit code distinguishes this case. Perfect error handling would first distingish sub-cases of EINVAL errors (signs and purer gargage), ERANGE errors, and other range check errors with more resricted ranges for non-root. Then print specific messages including specific ranges for range check errors and something about privilege for restricted cases. This would be too fussy. Unrelated style/quality bugs: - the man page also doesn't mention the better-known restriction of ping -f to root - many of these restrictions to root are bogus. E.g., for ping -f and ping -i, unprivileged users can spam the network much faster than with these options, by using plain ping in a shell loop, unless the fork() or exec() rate is severely restricted, but that would break normal use. These 2 restrictions worked better in 1980 when shell loops and fork() and exec() might have taken longer for each iteration than the ping latency of a slow network. - to fix this security hole, ping could wait for 10 msec before doing anything (in the non-root case) - ping -f doesn't actually flood. It is limited to 100 pps unless the ping is echoed faster than that. 100 pps might have been a lot in 1980. If clock interrupt latency is 10 msec or lower, then ping -f has the 100 pps limit for root too. Plain ping in a shell loop can go much faster than 100 pps, except possibly in 1980 (the case where the shell loop might not be faster enough is with a fairly low ping latency of 100 usec or smaller. That is about as long as old versions of FreeBSD take to fork()+exec() /bin/cat on 1 4GHz CPU, but current versions are several times slower). - the granularity for the wait in ping -i is undocumented (the man page says "fractional"). The code attempts to implement only milliseconds resolution but gets the kernel timeout granularity. Root can use an interval of 0. The ultmp method was the result of wollman rewriting much worse arg parsing that used atoi(). Bruce From owner-svn-src-all@freebsd.org Mon Dec 10 09:35:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C4A31317F84; Mon, 10 Dec 2018 09:35:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 339446FCD0; Mon, 10 Dec 2018 09:35:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 150EF1E266; Mon, 10 Dec 2018 09:35:46 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA9ZjvK002398; Mon, 10 Dec 2018 09:35:45 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA9Zjhf002396; Mon, 10 Dec 2018 09:35:45 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201812100935.wBA9Zjhf002396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 10 Dec 2018 09:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341783 - head/sys/dev/sfxge/common X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: head/sys/dev/sfxge/common X-SVN-Commit-Revision: 341783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 339446FCD0 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.991,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 09:35:47 -0000 Author: arybchik Date: Mon Dec 10 09:35:45 2018 New Revision: 341783 URL: https://svnweb.freebsd.org/changeset/base/341783 Log: sfxge(4): report support for Tx checksum op descriptors FreeBSD driver needs a patch to provide a means for packets which do not need checksum offload but have flow ID set to avoid hitting only the first Tx queue (which has been used for packets not needing checksum offload). This should be possible on Huntington, Medford or Medford2 chips since these support toggling checksum offload on any given queue dynamically by means of pushing option descriptors. The patch for FreeBSD driver will then need a means to figure out whether the feature can be used, and testing adapter family might not be a good solution. This patch adds a feature bit specifically to indicate support for checksum option descriptors. The new feature bits may have more users in future, apart from the mentioned FreeBSD patch. Submitted by: Ivan Malov Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18388 Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_nic.c Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Mon Dec 10 09:35:33 2018 (r341782) +++ head/sys/dev/sfxge/common/efx.h Mon Dec 10 09:35:45 2018 (r341783) @@ -1261,6 +1261,7 @@ efx_bist_stop( #define EFX_FEATURE_FW_ASSISTED_TSO 0x00001000 #define EFX_FEATURE_FW_ASSISTED_TSO_V2 0x00002000 #define EFX_FEATURE_PACKED_STREAM 0x00004000 +#define EFX_FEATURE_TXQ_CKSUM_OP_DESC 0x00008000 typedef enum efx_tunnel_protocol_e { EFX_TUNNEL_PROTOCOL_NONE = 0, Modified: head/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nic.c Mon Dec 10 09:35:33 2018 (r341782) +++ head/sys/dev/sfxge/common/efx_nic.c Mon Dec 10 09:35:45 2018 (r341783) @@ -257,7 +257,8 @@ efx_nic_create( EFX_FEATURE_PIO_BUFFERS | EFX_FEATURE_FW_ASSISTED_TSO | EFX_FEATURE_FW_ASSISTED_TSO_V2 | - EFX_FEATURE_PACKED_STREAM; + EFX_FEATURE_PACKED_STREAM | + EFX_FEATURE_TXQ_CKSUM_OP_DESC; break; #endif /* EFSYS_OPT_HUNTINGTON */ @@ -277,7 +278,8 @@ efx_nic_create( EFX_FEATURE_MCDI_DMA | EFX_FEATURE_PIO_BUFFERS | EFX_FEATURE_FW_ASSISTED_TSO_V2 | - EFX_FEATURE_PACKED_STREAM; + EFX_FEATURE_PACKED_STREAM | + EFX_FEATURE_TXQ_CKSUM_OP_DESC; break; #endif /* EFSYS_OPT_MEDFORD */ @@ -293,7 +295,8 @@ efx_nic_create( EFX_FEATURE_MCDI_DMA | EFX_FEATURE_PIO_BUFFERS | EFX_FEATURE_FW_ASSISTED_TSO_V2 | - EFX_FEATURE_PACKED_STREAM; + EFX_FEATURE_PACKED_STREAM | + EFX_FEATURE_TXQ_CKSUM_OP_DESC; break; #endif /* EFSYS_OPT_MEDFORD2 */ From owner-svn-src-all@freebsd.org Mon Dec 10 09:35:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1DF21317FD7; Mon, 10 Dec 2018 09:35:57 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 568086FDB5; Mon, 10 Dec 2018 09:35:57 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6C5B1E267; Mon, 10 Dec 2018 09:35:54 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA9ZsdN002466; Mon, 10 Dec 2018 09:35:54 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA9Zr63002463; Mon, 10 Dec 2018 09:35:53 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201812100935.wBA9Zr63002463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 10 Dec 2018 09:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341784 - head/sys/dev/sfxge X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: head/sys/dev/sfxge X-SVN-Commit-Revision: 341784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 568086FDB5 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.991,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 09:35:57 -0000 Author: arybchik Date: Mon Dec 10 09:35:53 2018 New Revision: 341784 URL: https://svnweb.freebsd.org/changeset/base/341784 Log: sfxge(4): prepare the number of Tx queues on event queue 0 to become variable The number of Tx queues on event queue 0 can depend on the NIC family type, and this property will be leveraged by future patches. This patch prepares the code for this change. Submitted by: Ivan Malov Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18389 Modified: head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge_ev.c head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Mon Dec 10 09:35:45 2018 (r341783) +++ head/sys/dev/sfxge/sfxge.c Mon Dec 10 09:35:53 2018 (r341784) @@ -151,8 +151,8 @@ sfxge_estimate_rsrc_limits(struct sfxge_softc *sc) limits.edl_min_evq_count = 1; limits.edl_max_evq_count = evq_max; - limits.edl_min_txq_count = SFXGE_TXQ_NTYPES; - limits.edl_max_txq_count = evq_max + SFXGE_TXQ_NTYPES - 1; + limits.edl_min_txq_count = SFXGE_EVQ0_N_TXQ(sc); + limits.edl_max_txq_count = evq_max + SFXGE_EVQ0_N_TXQ(sc) - 1; limits.edl_min_rxq_count = 1; limits.edl_max_rxq_count = evq_max; @@ -168,12 +168,12 @@ sfxge_estimate_rsrc_limits(struct sfxge_softc *sc) return (rc); } - KASSERT(txq_allocated >= SFXGE_TXQ_NTYPES, - ("txq_allocated < SFXGE_TXQ_NTYPES")); + KASSERT(txq_allocated >= SFXGE_EVQ0_N_TXQ(sc), + ("txq_allocated < %u", SFXGE_EVQ0_N_TXQ(sc))); sc->evq_max = MIN(evq_allocated, evq_max); sc->evq_max = MIN(rxq_allocated, sc->evq_max); - sc->evq_max = MIN(txq_allocated - (SFXGE_TXQ_NTYPES - 1), + sc->evq_max = MIN(txq_allocated - (SFXGE_EVQ0_N_TXQ(sc) - 1), sc->evq_max); KASSERT(sc->evq_max <= evq_max, @@ -205,7 +205,7 @@ sfxge_set_drv_limits(struct sfxge_softc *sc) limits.edl_min_evq_count = limits.edl_max_evq_count = sc->intr.n_alloc; limits.edl_min_txq_count = limits.edl_max_txq_count = - sc->intr.n_alloc + SFXGE_TXQ_NTYPES - 1; + sc->intr.n_alloc + SFXGE_EVQ0_N_TXQ(sc) - 1; limits.edl_min_rxq_count = limits.edl_max_rxq_count = sc->intr.n_alloc; Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Mon Dec 10 09:35:45 2018 (r341783) +++ head/sys/dev/sfxge/sfxge_ev.c Mon Dec 10 09:35:53 2018 (r341784) @@ -269,9 +269,10 @@ sfxge_get_txq_by_label(struct sfxge_evq *evq, enum sfx { unsigned int index; - KASSERT((evq->index == 0 && label < SFXGE_TXQ_NTYPES) || + KASSERT((evq->index == 0 && label < SFXGE_EVQ0_N_TXQ(evq->sc)) || (label == SFXGE_TXQ_IP_TCP_UDP_CKSUM), ("unexpected txq label")); - index = (evq->index == 0) ? label : (evq->index - 1 + SFXGE_TXQ_NTYPES); + index = (evq->index == 0) ? + label : (evq->index - 1 + SFXGE_EVQ0_N_TXQ(evq->sc)); return (evq->sc->txq[index]); } Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Mon Dec 10 09:35:45 2018 (r341783) +++ head/sys/dev/sfxge/sfxge_tx.c Mon Dec 10 09:35:53 2018 (r341784) @@ -1973,7 +1973,7 @@ sfxge_tx_init(struct sfxge_softc *sc) goto fail_tx_dpl_put_max; } - sc->txq_count = SFXGE_TXQ_NTYPES - 1 + sc->intr.n_alloc; + sc->txq_count = SFXGE_EVQ0_N_TXQ(sc) - 1 + sc->intr.n_alloc; sc->tso_fw_assisted = sfxge_tso_fw_assisted; if ((~encp->enc_features & EFX_FEATURE_FW_ASSISTED_TSO) || @@ -2002,9 +2002,9 @@ sfxge_tx_init(struct sfxge_softc *sc) goto fail2; for (index = 0; - index < sc->txq_count - SFXGE_TXQ_NTYPES + 1; + index < sc->txq_count - SFXGE_EVQ0_N_TXQ(sc) + 1; index++) { - if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_NTYPES - 1 + index, + if ((rc = sfxge_tx_qinit(sc, SFXGE_EVQ0_N_TXQ(sc) - 1 + index, SFXGE_TXQ_IP_TCP_UDP_CKSUM, index)) != 0) goto fail3; } Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Mon Dec 10 09:35:45 2018 (r341783) +++ head/sys/dev/sfxge/sfxge_tx.h Mon Dec 10 09:35:53 2018 (r341784) @@ -139,6 +139,8 @@ enum sfxge_txq_type { SFXGE_TXQ_NTYPES }; +#define SFXGE_EVQ0_N_TXQ(_sc) SFXGE_TXQ_NTYPES + #define SFXGE_TXQ_UNBLOCK_LEVEL(_entries) (EFX_TXQ_LIMIT(_entries) / 4) #define SFXGE_TX_BATCH 64 From owner-svn-src-all@freebsd.org Mon Dec 10 09:36:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85F881318023; Mon, 10 Dec 2018 09:36:10 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 291CE6FF0E; Mon, 10 Dec 2018 09:36:10 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D9A81E26D; Mon, 10 Dec 2018 09:36:06 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA9a6lH002531; Mon, 10 Dec 2018 09:36:06 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA9a59D002523; Mon, 10 Dec 2018 09:36:05 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201812100936.wBA9a59D002523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 10 Dec 2018 09:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341785 - head/sys/dev/sfxge X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: head/sys/dev/sfxge X-SVN-Commit-Revision: 341785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 291CE6FF0E X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.992,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 09:36:10 -0000 Author: arybchik Date: Mon Dec 10 09:36:05 2018 New Revision: 341785 URL: https://svnweb.freebsd.org/changeset/base/341785 Log: sfxge(4): use n Tx queues instead of n + 2 on EF10 HW On EF10 HW we can avoid sending packets without checksum offload or with IP-only checksum offload to dedicated queues. Instead, we can use option descriptors to change offload policy on any queue during runtime. Thus, we don't need to create two dedicated queues. Submitted by: Ivan Malov Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18390 Modified: head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_ev.c head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Mon Dec 10 09:35:53 2018 (r341784) +++ head/sys/dev/sfxge/sfxge.c Mon Dec 10 09:36:05 2018 (r341785) @@ -762,6 +762,11 @@ sfxge_create(struct sfxge_softc *sc) } sc->rxq_entries = sfxge_rx_ring_entries; + if (efx_nic_cfg_get(enp)->enc_features & EFX_FEATURE_TXQ_CKSUM_OP_DESC) + sc->txq_dynamic_cksum_toggle_supported = B_TRUE; + else + sc->txq_dynamic_cksum_toggle_supported = B_FALSE; + if (!ISP2(sfxge_tx_ring_entries) || (sfxge_tx_ring_entries < EFX_TXQ_MINNDESCS) || (sfxge_tx_ring_entries > efx_nic_cfg_get(enp)->enc_txq_max_ndescs)) { Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Mon Dec 10 09:35:53 2018 (r341784) +++ head/sys/dev/sfxge/sfxge.h Mon Dec 10 09:36:05 2018 (r341785) @@ -294,6 +294,8 @@ struct sfxge_softc { efx_nic_t *enp; efsys_lock_t enp_lock; + boolean_t txq_dynamic_cksum_toggle_supported; + unsigned int rxq_entries; unsigned int txq_entries; Modified: head/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- head/sys/dev/sfxge/sfxge_ev.c Mon Dec 10 09:35:53 2018 (r341784) +++ head/sys/dev/sfxge/sfxge_ev.c Mon Dec 10 09:36:05 2018 (r341785) @@ -269,8 +269,11 @@ sfxge_get_txq_by_label(struct sfxge_evq *evq, enum sfx { unsigned int index; - KASSERT((evq->index == 0 && label < SFXGE_EVQ0_N_TXQ(evq->sc)) || - (label == SFXGE_TXQ_IP_TCP_UDP_CKSUM), ("unexpected txq label")); + KASSERT((evq->sc->txq_dynamic_cksum_toggle_supported) ? (label == 0) : + ((evq->index == 0 && label < SFXGE_TXQ_NTYPES) || + (label == SFXGE_TXQ_IP_TCP_UDP_CKSUM)), + ("unexpected txq label")); + index = (evq->index == 0) ? label : (evq->index - 1 + SFXGE_EVQ0_N_TXQ(evq->sc)); return (evq->sc->txq[index]); Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Mon Dec 10 09:35:53 2018 (r341784) +++ head/sys/dev/sfxge/sfxge_tx.c Mon Dec 10 09:36:05 2018 (r341785) @@ -35,7 +35,7 @@ /* Theory of operation: * - * Tx queues allocation and mapping + * Tx queues allocation and mapping on Siena * * One Tx queue with enabled checksum offload is allocated per Rx channel * (event queue). Also 2 Tx queues (one without checksum offload and one @@ -46,6 +46,17 @@ * if event queue index is 0, TxQ-index = TxQ-label * [0..SFXGE_TXQ_NTYPES) * else TxQ-index = SFXGE_TXQ_NTYPES + EvQ-index - 1 * See sfxge_get_txq_by_label() sfxge_ev.c + * + * Tx queue allocation and mapping on EF10 + * + * One Tx queue with enabled checksum offload is allocated per Rx + * channel (event queue). Checksum offload on all Tx queues is enabled or + * disabled dynamically by inserting option descriptors, so the additional + * queues used on Siena are not required. + * + * TxQ label is always set to zero on EF10 hardware. + * So, event queue to Tx queue mapping is simple: + * TxQ-index = EvQ-index */ #include @@ -139,38 +150,75 @@ static void sfxge_tx_qlist_post(struct sfxge_txq *txq) static void sfxge_tx_qunblock(struct sfxge_txq *txq); static int sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf *mbuf, const bus_dma_segment_t *dma_seg, int n_dma_seg, - int vlan_tagged); + int n_extra_descs); +static inline void +sfxge_next_stmp(struct sfxge_txq *txq, struct sfxge_tx_mapping **pstmp) +{ + KASSERT((*pstmp)->flags == 0, ("stmp flags are not 0")); + if (__predict_false(*pstmp == + &txq->stmp[txq->ptr_mask])) + *pstmp = &txq->stmp[0]; + else + (*pstmp)++; +} + static int -sfxge_tx_maybe_insert_tag(struct sfxge_txq *txq, struct mbuf *mbuf) +sfxge_tx_maybe_toggle_cksum_offload(struct sfxge_txq *txq, struct mbuf *mbuf, + struct sfxge_tx_mapping **pstmp) { + uint16_t new_hw_cksum_flags; + efx_desc_t *desc; + + if (mbuf->m_pkthdr.csum_flags & + (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6 | CSUM_TSO)) { + /* + * We always set EFX_TXQ_CKSUM_IPV4 here because this + * configuration is the most useful, and this won't + * cause any trouble in case of IPv6 traffic anyway. + */ + new_hw_cksum_flags = EFX_TXQ_CKSUM_IPV4 | EFX_TXQ_CKSUM_TCPUDP; + } else if (mbuf->m_pkthdr.csum_flags & CSUM_DELAY_IP) { + new_hw_cksum_flags = EFX_TXQ_CKSUM_IPV4; + } else { + new_hw_cksum_flags = 0; + } + + if (new_hw_cksum_flags == txq->hw_cksum_flags) + return (0); + + desc = &txq->pend_desc[txq->n_pend_desc]; + efx_tx_qdesc_checksum_create(txq->common, new_hw_cksum_flags, desc); + txq->hw_cksum_flags = new_hw_cksum_flags; + txq->n_pend_desc++; + + sfxge_next_stmp(txq, pstmp); + + return (1); +} + +static int +sfxge_tx_maybe_insert_tag(struct sfxge_txq *txq, struct mbuf *mbuf, + struct sfxge_tx_mapping **pstmp) +{ uint16_t this_tag = ((mbuf->m_flags & M_VLANTAG) ? mbuf->m_pkthdr.ether_vtag : 0); + efx_desc_t *desc; if (this_tag == txq->hw_vlan_tci) return (0); - efx_tx_qdesc_vlantci_create(txq->common, - bswap16(this_tag), - &txq->pend_desc[0]); - txq->n_pend_desc = 1; + desc = &txq->pend_desc[txq->n_pend_desc]; + efx_tx_qdesc_vlantci_create(txq->common, bswap16(this_tag), desc); txq->hw_vlan_tci = this_tag; + txq->n_pend_desc++; + + sfxge_next_stmp(txq, pstmp); + return (1); } -static inline void -sfxge_next_stmp(struct sfxge_txq *txq, struct sfxge_tx_mapping **pstmp) -{ - KASSERT((*pstmp)->flags == 0, ("stmp flags are not 0")); - if (__predict_false(*pstmp == - &txq->stmp[txq->ptr_mask])) - *pstmp = &txq->stmp[0]; - else - (*pstmp)++; -} - - void sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq) { @@ -361,8 +409,9 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq, int rc; int i; int eop; + uint16_t hw_cksum_flags_prev; uint16_t hw_vlan_tci_prev; - int vlan_tagged; + int n_extra_descs; KASSERT(!txq->blocked, ("txq->blocked")); @@ -413,14 +462,20 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq, used_map = &stmp->map; + hw_cksum_flags_prev = txq->hw_cksum_flags; hw_vlan_tci_prev = txq->hw_vlan_tci; - vlan_tagged = sfxge_tx_maybe_insert_tag(txq, mbuf); - if (vlan_tagged) { - sfxge_next_stmp(txq, &stmp); - } + /* + * The order of option descriptors, which are used to leverage VLAN tag + * and checksum offloads, might be important. Changing checksum offload + * between VLAN option and packet descriptors probably does not work. + */ + n_extra_descs = sfxge_tx_maybe_toggle_cksum_offload(txq, mbuf, &stmp); + n_extra_descs += sfxge_tx_maybe_insert_tag(txq, mbuf, &stmp); + if (mbuf->m_pkthdr.csum_flags & CSUM_TSO) { - rc = sfxge_tx_queue_tso(txq, mbuf, dma_seg, n_dma_seg, vlan_tagged); + rc = sfxge_tx_queue_tso(txq, mbuf, dma_seg, n_dma_seg, + n_extra_descs); if (rc < 0) goto reject_mapped; stmp = &txq->stmp[(rc - 1) & txq->ptr_mask]; @@ -431,7 +486,7 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq, i = 0; for (;;) { - desc = &txq->pend_desc[i + vlan_tagged]; + desc = &txq->pend_desc[i + n_extra_descs]; eop = (i == n_dma_seg - 1); efx_tx_qdesc_dma_create(txq->common, dma_seg[i].ds_addr, @@ -443,7 +498,7 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq, i++; sfxge_next_stmp(txq, &stmp); } - txq->n_pend_desc = n_dma_seg + vlan_tagged; + txq->n_pend_desc = n_dma_seg + n_extra_descs; } /* @@ -467,6 +522,7 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq, reject_mapped: txq->hw_vlan_tci = hw_vlan_tci_prev; + txq->hw_cksum_flags = hw_cksum_flags_prev; bus_dmamap_unload(txq->packet_dma_tag, *used_map); reject: /* Drop the packet on the floor. */ @@ -840,8 +896,9 @@ sfxge_if_transmit(struct ifnet *ifp, struct mbuf *m) ("interface not up")); /* Pick the desired transmit queue. */ - if (m->m_pkthdr.csum_flags & - (CSUM_DELAY_DATA | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO)) { + if (sc->txq_dynamic_cksum_toggle_supported | + (m->m_pkthdr.csum_flags & + (CSUM_DELAY_DATA | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO))) { int index = 0; #ifdef RSS @@ -867,7 +924,9 @@ sfxge_if_transmit(struct ifnet *ifp, struct mbuf *m) if (m->m_pkthdr.csum_flags & CSUM_TSO) sfxge_parse_tx_packet(m); #endif - txq = sc->txq[SFXGE_TXQ_IP_TCP_UDP_CKSUM + index]; + index += (sc->txq_dynamic_cksum_toggle_supported == B_FALSE) ? + SFXGE_TXQ_IP_TCP_UDP_CKSUM : 0; + txq = sc->txq[index]; } else if (m->m_pkthdr.csum_flags & CSUM_DELAY_IP) { txq = sc->txq[SFXGE_TXQ_IP_CKSUM]; } else { @@ -1311,7 +1370,7 @@ static int tso_start_new_packet(struct sfxge_txq *txq, static int sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf *mbuf, const bus_dma_segment_t *dma_seg, int n_dma_seg, - int vlan_tagged) + int n_extra_descs) { struct sfxge_tso_state tso; unsigned int id; @@ -1328,7 +1387,7 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf tso.in_len = dma_seg->ds_len - (tso.header_len - skipped); tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped); - id = (txq->added + vlan_tagged) & txq->ptr_mask; + id = (txq->added + n_extra_descs) & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, &id))) return (-1); @@ -1492,6 +1551,8 @@ sfxge_tx_qstop(struct sfxge_softc *sc, unsigned int in efx_sram_buf_tbl_clear(sc->enp, txq->buf_base_id, EFX_TXQ_NBUFS(sc->txq_entries)); + txq->hw_cksum_flags = 0; + SFXGE_EVQ_UNLOCK(evq); SFXGE_TXQ_UNLOCK(txq); } @@ -1513,6 +1574,10 @@ sfxge_tx_max_pkt_desc(const struct sfxge_softc *sc, en unsigned int fa_tso_v1_max_descs = 0; unsigned int fa_tso_v2_max_descs = 0; + /* Checksum offload Tx option descriptor may be required */ + if (sc->txq_dynamic_cksum_toggle_supported) + max_descs++; + /* VLAN tagging Tx option descriptor may be required */ if (efx_nic_cfg_get(sc->enp)->enc_hw_tx_insert_vlan_enabled) max_descs++; @@ -1557,6 +1622,7 @@ sfxge_tx_qstart(struct sfxge_softc *sc, unsigned int i efsys_mem_t *esmp; uint16_t flags; unsigned int tso_fw_assisted; + unsigned int label; struct sfxge_evq *evq; unsigned int desc_index; int rc; @@ -1598,8 +1664,10 @@ sfxge_tx_qstart(struct sfxge_softc *sc, unsigned int i break; } + label = (sc->txq_dynamic_cksum_toggle_supported) ? 0 : txq->type; + /* Create the common code transmit queue. */ - if ((rc = efx_tx_qcreate(sc->enp, index, txq->type, esmp, + if ((rc = efx_tx_qcreate(sc->enp, index, label, esmp, sc->txq_entries, txq->buf_base_id, flags, evq->common, &txq->common, &desc_index)) != 0) { /* Retry if no FATSOv2 resources, otherwise fail */ @@ -1609,7 +1677,7 @@ sfxge_tx_qstart(struct sfxge_softc *sc, unsigned int i /* Looks like all FATSOv2 contexts are used */ flags &= ~EFX_TXQ_FATSOV2; tso_fw_assisted &= ~SFXGE_FATSOV2; - if ((rc = efx_tx_qcreate(sc->enp, index, txq->type, esmp, + if ((rc = efx_tx_qcreate(sc->enp, index, label, esmp, sc->txq_entries, txq->buf_base_id, flags, evq->common, &txq->common, &desc_index)) != 0) goto fail; @@ -1632,6 +1700,9 @@ sfxge_tx_qstart(struct sfxge_softc *sc, unsigned int i txq->hw_vlan_tci = 0; + txq->hw_cksum_flags = flags & + (EFX_TXQ_CKSUM_IPV4 | EFX_TXQ_CKSUM_TCPUDP); + SFXGE_TXQ_UNLOCK(txq); return (0); @@ -1993,13 +2064,15 @@ sfxge_tx_init(struct sfxge_softc *sc) } /* Initialize the transmit queues */ - if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_NON_CKSUM, - SFXGE_TXQ_NON_CKSUM, 0)) != 0) - goto fail; + if (sc->txq_dynamic_cksum_toggle_supported == B_FALSE) { + if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_NON_CKSUM, + SFXGE_TXQ_NON_CKSUM, 0)) != 0) + goto fail; - if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_IP_CKSUM, - SFXGE_TXQ_IP_CKSUM, 0)) != 0) - goto fail2; + if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_IP_CKSUM, + SFXGE_TXQ_IP_CKSUM, 0)) != 0) + goto fail2; + } for (index = 0; index < sc->txq_count - SFXGE_EVQ0_N_TXQ(sc) + 1; Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Mon Dec 10 09:35:53 2018 (r341784) +++ head/sys/dev/sfxge/sfxge_tx.h Mon Dec 10 09:36:05 2018 (r341785) @@ -139,7 +139,9 @@ enum sfxge_txq_type { SFXGE_TXQ_NTYPES }; -#define SFXGE_EVQ0_N_TXQ(_sc) SFXGE_TXQ_NTYPES +#define SFXGE_EVQ0_N_TXQ(_sc) \ + ((_sc)->txq_dynamic_cksum_toggle_supported ? \ + 1 : SFXGE_TXQ_NTYPES) #define SFXGE_TXQ_UNBLOCK_LEVEL(_entries) (EFX_TXQ_LIMIT(_entries) / 4) @@ -205,6 +207,9 @@ struct sfxge_txq { unsigned int n_pend_desc; unsigned int added; unsigned int reaped; + + /* The last (or constant) set of HW offloads requested on the queue */ + uint16_t hw_cksum_flags; /* The last VLAN TCI seen on the queue if FW-assisted tagging is used */ From owner-svn-src-all@freebsd.org Mon Dec 10 09:45:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C63713184BD; Mon, 10 Dec 2018 09:45:59 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02203707B4; Mon, 10 Dec 2018 09:45:59 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D235A1E40E; Mon, 10 Dec 2018 09:45:58 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBA9jwhU007409; Mon, 10 Dec 2018 09:45:58 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBA9jwO5007406; Mon, 10 Dec 2018 09:45:58 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201812100945.wBA9jwO5007406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 10 Dec 2018 09:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341786 - in head/sys/dev: rtwn/usb usb usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev: rtwn/usb usb usb/wlan X-SVN-Commit-Revision: 341786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 02203707B4 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 09:45:59 -0000 Author: avos Date: Mon Dec 10 09:45:57 2018 New Revision: 341786 URL: https://svnweb.freebsd.org/changeset/base/341786 Log: rtwn, rsu: add more USB ids. PR: 233638 Submitted by: cezary.sliwa@gmail.com MFC after: 3 days Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Mon Dec 10 09:36:05 2018 (r341785) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Mon Dec 10 09:45:57 2018 (r341786) @@ -118,6 +118,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8188EU_DEV(DLINK, DWA123D1), RTWN_RTL8188EU_DEV(DLINK, DWA125D1), RTWN_RTL8188EU_DEV(ELECOM, WDC150SU2M), + RTWN_RTL8188EU_DEV(TPLINK, WN722N), RTWN_RTL8188EU_DEV(REALTEK, RTL8188ETV), RTWN_RTL8188EU_DEV(REALTEK, RTL8188EU), #undef RTWN_RTL8188EU_DEV Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Dec 10 09:36:05 2018 (r341785) +++ head/sys/dev/usb/usbdevs Mon Dec 10 09:45:57 2018 (r341786) @@ -4346,6 +4346,7 @@ product SITECOMEU RT3072_4 0x0048 RT3072 product SITECOMEU RT3072_5 0x004a RT3072 product SITECOMEU WL349V1 0x004b WL-349 v1 product SITECOMEU RT3072_6 0x004d RT3072 +product SITECOMEU WLA1000 0x005b WLA-1000 product SITECOMEU RTL8188CU_1 0x0052 RTL8188CU product SITECOMEU RTL8188CU_2 0x005c RTL8188CU product SITECOMEU RTL8192CU 0x0061 RTL8192CU @@ -4611,6 +4612,7 @@ product TOSHIBA TRANSMEMORY 0x6545 USB ThumbDrive product TPLINK T4U 0x0101 Archer T4U product TPLINK WN822NV4 0x0108 TL-WN822N v4 product TPLINK WN823NV2 0x0109 TL-WN823N v2 +product TPLINK WN722N 0x010c TL-WN722N product TPLINK T4UV2 0x010d Archer T4U ver 2 product TPLINK T4UHV2 0x010e Archer T4UH ver 2 product TPLINK RTL8153 0x0601 RTL8153 USB 10/100/1000 LAN Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Dec 10 09:36:05 2018 (r341785) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Dec 10 09:45:57 2018 (r341786) @@ -114,6 +114,7 @@ static const STRUCT_USB_HOST_ID rsu_devs[] = { RSU_HT_NOT_SUPPORTED) } RSU_DEV(ASUS, RTL8192SU), RSU_DEV(AZUREWAVE, RTL8192SU_4), + RSU_DEV(SITECOMEU, WLA1000), RSU_DEV_HT(ACCTON, RTL8192SU), RSU_DEV_HT(ASUS, USBN10), RSU_DEV_HT(AZUREWAVE, RTL8192SU_1), From owner-svn-src-all@freebsd.org Mon Dec 10 13:38:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 864F113263F7; Mon, 10 Dec 2018 13:38:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2753C78608; Mon, 10 Dec 2018 13:38:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3E53208E1; Mon, 10 Dec 2018 13:38:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBADcEhi026486; Mon, 10 Dec 2018 13:38:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBADcE5A026483; Mon, 10 Dec 2018 13:38:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812101338.wBADcE5A026483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Dec 2018 13:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341787 - in head/sys: arm/include mips/include powerpc/include X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: arm/include mips/include powerpc/include X-SVN-Commit-Revision: 341787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2753C78608 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-0.99)[-0.991,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 13:38:15 -0000 Author: hselasky Date: Mon Dec 10 13:38:13 2018 New Revision: 341787 URL: https://svnweb.freebsd.org/changeset/base/341787 Log: Implement atomic_swap_xxx() for all platforms. Differential Revision: https://reviews.freebsd.org/D18450 Reviewed by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/arm/include/atomic.h head/sys/mips/include/atomic.h head/sys/powerpc/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Mon Dec 10 09:45:57 2018 (r341786) +++ head/sys/arm/include/atomic.h Mon Dec 10 13:38:13 2018 (r341787) @@ -55,6 +55,13 @@ #include #endif /* Arch >= v6 */ +static __inline u_long +atomic_swap_long(volatile u_long *p, u_long v) +{ + + return (atomic_swap_32((volatile uint32_t *)p, v)); +} + #define atomic_clear_ptr atomic_clear_32 #define atomic_clear_acq_ptr atomic_clear_acq_32 #define atomic_clear_rel_ptr atomic_clear_rel_32 Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Mon Dec 10 09:45:57 2018 (r341786) +++ head/sys/mips/include/atomic.h Mon Dec 10 13:38:13 2018 (r341787) @@ -755,4 +755,68 @@ atomic_thread_fence_seq_cst(void) #define atomic_store_rel_ptr atomic_store_rel_long #define atomic_readandclear_ptr atomic_readandclear_long +static __inline unsigned int +atomic_swap_int(volatile unsigned int *ptr, const unsigned int value) +{ + unsigned int retval; + + retval = *ptr; + + while (!atomic_fcmpset_int(ptr, &retval, value)) + ; + return (retval); +} + +static __inline uint32_t +atomic_swap_32(volatile uint32_t *ptr, const uint32_t value) +{ + uint32_t retval; + + retval = *ptr; + + while (!atomic_fcmpset_32(ptr, &retval, value)) + ; + return (retval); +} + +#if defined(__mips_n64) || defined(__mips_n32) +static __inline uint64_t +atomic_swap_64(volatile uint64_t *ptr, const uint64_t value) +{ + uint64_t retval; + + retval = *ptr; + + while (!atomic_fcmpset_64(ptr, &retval, value)) + ; + return (retval); +} +#endif + +static __inline unsigned long +atomic_swap_long(volatile unsigned long *ptr, const unsigned long value) +{ + unsigned long retval; + + retval = *ptr; + + while (!atomic_fcmpset_32((volatile uint32_t *)ptr, + (uint32_t *)&retval, value)) + ; + return (retval); +} + +static __inline uintptr_t +atomic_swap_ptr(volatile uintptr_t *ptr, const uintptr_t value) +{ + uintptr_t retval; + + retval = *ptr; + + while (!atomic_fcmpset_32((volatile uint32_t *)ptr, + (uint32_t *)&retval, value)) + ; + return (retval); +} + #endif /* ! _MACHINE_ATOMIC_H_ */ Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Mon Dec 10 09:45:57 2018 (r341786) +++ head/sys/powerpc/include/atomic.h Mon Dec 10 13:38:13 2018 (r341787) @@ -852,6 +852,9 @@ atomic_swap_64(volatile u_long *p, u_long v) #define atomic_fetchadd_64 atomic_fetchadd_long #define atomic_swap_long atomic_swap_64 #define atomic_swap_ptr atomic_swap_64 +#else +#define atomic_swap_long(p,v) atomic_swap_32((volatile u_int *)(p), v) +#define atomic_swap_ptr(p,v) atomic_swap_32((volatile u_int *)(p), v) #endif #undef __ATOMIC_REL From owner-svn-src-all@freebsd.org Mon Dec 10 13:41:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C13813266C1; Mon, 10 Dec 2018 13:41:29 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42A1A79046; Mon, 10 Dec 2018 13:41:29 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2467A2093F; Mon, 10 Dec 2018 13:41:29 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBADfTr7031497; Mon, 10 Dec 2018 13:41:29 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBADfSGn031494; Mon, 10 Dec 2018 13:41:28 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812101341.wBADfSGn031494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 10 Dec 2018 13:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341788 - stable/12/usr.sbin/jail X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/usr.sbin/jail X-SVN-Commit-Revision: 341788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 42A1A79046 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 13:41:29 -0000 Author: eugen Date: Mon Dec 10 13:41:28 2018 New Revision: 341788 URL: https://svnweb.freebsd.org/changeset/base/341788 Log: MFC r340319: jail(8): introduce new command option -e to exhibit a list of configured non-wildcard jails with their parameters, no matter running or not. The option -e takes separator argument that is used to separate printed parameters. It will be used with following additions to system periodic scripts to differentiate parts of directory tree belonging jails as opposed to host's. Modified: stable/12/usr.sbin/jail/jail.8 stable/12/usr.sbin/jail/jail.c stable/12/usr.sbin/jail/jailp.h Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/jail/jail.8 ============================================================================== --- stable/12/usr.sbin/jail/jail.8 Mon Dec 10 13:38:13 2018 (r341787) +++ stable/12/usr.sbin/jail/jail.8 Mon Dec 10 13:41:28 2018 (r341788) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2018 +.Dd November 10, 2018 .Dt JAIL 8 .Os .Sh NAME @@ -49,6 +49,7 @@ .Nm .Op Fl qv .Op Fl f Ar conf_file +.Op Fl e Ar separator .Op Fl rR .Op Cm * | Ar jail ... .Nm @@ -63,6 +64,7 @@ The .Nm utility creates new jails, or modifies or removes existing jails. +It can also print a list of configured jails and their parameters. A jail .Pq or Dq prison is specified via parameters on the command line, or in the @@ -71,6 +73,7 @@ file. .Pp At least one of the options .Fl c , +.Fl e , .Fl m or .Fl r @@ -86,6 +89,15 @@ and .Va name parameters (if specified on the command line) must not refer to an existing jail. +.It Fl e Ar separator +Exhibit a list of all configured non-wildcard jails and their parameters. +No jail creation, modification or removal performed if this option is used. +The +.Ar separator +string is used to separate parameters. +Use +.Xr jls 8 +utility to list running jails. .It Fl m Modify an existing jail. One of the Modified: stable/12/usr.sbin/jail/jail.c ============================================================================== --- stable/12/usr.sbin/jail/jail.c Mon Dec 10 13:38:13 2018 (r341787) +++ stable/12/usr.sbin/jail/jail.c Mon Dec 10 13:41:28 2018 (r341788) @@ -60,6 +60,7 @@ const char *cfname; int iflag; int note_remove; int verbose; +const char *separator = "\t"; static void clear_persist(struct cfjail *j); static int update_jail(struct cfjail *j); @@ -69,8 +70,9 @@ static void jail_quoted_warnx(const struct cfjail *j, const char *noname_msg); static int jailparam_set_note(const struct cfjail *j, struct jailparam *jp, unsigned njp, int flags); -static void print_jail(FILE *fp, struct cfjail *j, int oldcl); +static void print_jail(FILE *fp, struct cfjail *j, int oldcl, int running); static void print_param(FILE *fp, const struct cfparam *p, int sep, int doname); +static void show_jails(void); static void quoted_print(FILE *fp, char *str); static void usage(void); @@ -151,7 +153,7 @@ main(int argc, char **argv) cfname = CONF_FILE; JidFile = NULL; - while ((ch = getopt(argc, argv, "cdf:hiJ:lmn:p:qrRs:u:U:v")) != -1) { + while ((ch = getopt(argc, argv, "cde:f:hiJ:lmn:p:qrRs:u:U:v")) != -1) { switch (ch) { case 'c': op |= JF_START; @@ -159,6 +161,10 @@ main(int argc, char **argv) case 'd': dflag = 1; break; + case 'e': + op |= JF_SHOW; + separator = optarg; + break; case 'f': cfname = optarg; break; @@ -276,7 +282,13 @@ main(int argc, char **argv) ? NULL : "false"); } } - } else if (op == JF_STOP) { + } else if (op == JF_STOP || op == JF_SHOW) { + /* Just print list of all configured non-wildcard jails */ + if (op == JF_SHOW) { + load_config(); + show_jails(); + exit(0); + } /* Jail remove, perhaps using the config file */ if (!docf || argc == 0) usage(); @@ -439,7 +451,7 @@ main(int argc, char **argv) jail_create_done: clear_persist(j); if (jfp != NULL) - print_jail(jfp, j, oldcl); + print_jail(jfp, j, oldcl, 1); dep_done(j, 0); break; @@ -918,16 +930,18 @@ jailparam_set_note(const struct cfjail *j, struct jail * Print a jail record. */ static void -print_jail(FILE *fp, struct cfjail *j, int oldcl) +print_jail(FILE *fp, struct cfjail *j, int oldcl, int running) { struct cfparam *p; + int printsep; if (oldcl) { - fprintf(fp, "%d\t", j->jid); + if (running) + fprintf(fp, "%d%s", j->jid, separator); print_param(fp, j->intparams[KP_PATH], ',', 0); - putc('\t', fp); + fputs(separator, fp); print_param(fp, j->intparams[KP_HOST_HOSTNAME], ',', 0); - putc('\t', fp); + fputs(separator, fp); #ifdef INET print_param(fp, j->intparams[KP_IP4_ADDR], ',', 0); #ifdef INET6 @@ -941,13 +955,20 @@ print_jail(FILE *fp, struct cfjail *j, int oldcl) #ifdef INET6 print_param(fp, j->intparams[KP_IP6_ADDR], ',', 0); #endif - putc('\t', fp); + fputs(separator, fp); print_param(fp, j->intparams[IP_COMMAND], ' ', 0); } else { - fprintf(fp, "jid=%d", j->jid); + printsep = 0; + if (running) { + fprintf(fp, "jid=%d", j->jid); + printsep = 1; + } TAILQ_FOREACH(p, &j->params, tq) if (strcmp(p->name, "jid")) { - putc(' ', fp); + if (printsep) + fputs(separator, fp); + else + printsep = 1; print_param(fp, p, ',', 1); } } @@ -955,6 +976,18 @@ print_jail(FILE *fp, struct cfjail *j, int oldcl) } /* + * Exhibit list of all configured non-wildcard jails + */ +static void +show_jails(void) +{ + struct cfjail *j; + + TAILQ_FOREACH(j, &cfjails, tq) + print_jail(stdout, j, 0, 0); +} + +/* * Print a parameter value, or a name=value pair. */ static void @@ -1007,7 +1040,7 @@ usage(void) (void)fprintf(stderr, "usage: jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " -[cmr] param=value ... [command=command ...]\n" - " jail [-dqv] [-f file] -[cmr] [jail]\n" + " jail [-dqv] [-f file] [-e separator] -[cmr] [jail]\n" " jail [-qv] [-f file] -[rR] ['*' | jail ...]\n" " jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " [-n jailname] [-s securelevel]\n" Modified: stable/12/usr.sbin/jail/jailp.h ============================================================================== --- stable/12/usr.sbin/jail/jailp.h Mon Dec 10 13:38:13 2018 (r341787) +++ stable/12/usr.sbin/jail/jailp.h Mon Dec 10 13:41:28 2018 (r341788) @@ -67,6 +67,7 @@ #define JF_TIMEOUT 0x0200 /* A command (or process kill) timed out */ #define JF_SLEEPQ 0x0400 /* Waiting on a command and/or timeout */ #define JF_FROM_RUNQ 0x0800 /* Has already been on the run queue */ +#define JF_SHOW 0x1000 /* -e Exhibit list of configured jails */ #define JF_OP_MASK (JF_START | JF_SET | JF_STOP) #define JF_RESTART (JF_START | JF_STOP) From owner-svn-src-all@freebsd.org Mon Dec 10 13:41:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C86F213266FA; Mon, 10 Dec 2018 13:41:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BCDF79082; Mon, 10 Dec 2018 13:41:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D874120945; Mon, 10 Dec 2018 13:41:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBADfXY4031546; Mon, 10 Dec 2018 13:41:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBADfXVC031544; Mon, 10 Dec 2018 13:41:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812101341.wBADfXVC031544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Dec 2018 13:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341789 - head/sys/compat/linuxkpi/common/include/asm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 341789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6BCDF79082 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 13:41:35 -0000 Author: hselasky Date: Mon Dec 10 13:41:33 2018 New Revision: 341789 URL: https://svnweb.freebsd.org/changeset/base/341789 Log: Remove no longer needed ifdefs in the LinuxKPI, after r341787. Differential Revision: https://reviews.freebsd.org/D18450 Reviewed by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h head/sys/compat/linuxkpi/common/include/asm/atomic.h Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic-long.h Mon Dec 10 13:41:28 2018 (r341788) +++ head/sys/compat/linuxkpi/common/include/asm/atomic-long.h Mon Dec 10 13:41:33 2018 (r341789) @@ -78,15 +78,7 @@ atomic_long_dec(atomic_long_t *v) static inline long atomic_long_xchg(atomic_long_t *v, long val) { -#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) return atomic_swap_long(&v->counter, val); -#else - long ret = atomic_long_read(v); - - while (!atomic_fcmpset_long(&v->counter, &ret, val)) - ; - return (ret); -#endif } static inline long Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic.h Mon Dec 10 13:41:28 2018 (r341788) +++ head/sys/compat/linuxkpi/common/include/asm/atomic.h Mon Dec 10 13:41:33 2018 (r341789) @@ -128,15 +128,7 @@ atomic_clear_mask(unsigned int mask, atomic_t *v) static inline int atomic_xchg(atomic_t *v, int i) { -#if !defined(__mips__) return (atomic_swap_int(&v->counter, i)); -#else - int ret = atomic_read(v); - - while (!atomic_fcmpset_int(&v->counter, &ret, i)) - ; - return (ret); -#endif } static inline int From owner-svn-src-all@freebsd.org Mon Dec 10 13:47:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E168613268A3; Mon, 10 Dec 2018 13:47:06 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 880007954D; Mon, 10 Dec 2018 13:47:06 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6508D20A93; Mon, 10 Dec 2018 13:47:06 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBADl6qo031986; Mon, 10 Dec 2018 13:47:06 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBADl5Pa031983; Mon, 10 Dec 2018 13:47:05 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812101347.wBADl5Pa031983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 10 Dec 2018 13:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341790 - stable/11/usr.sbin/jail X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/usr.sbin/jail X-SVN-Commit-Revision: 341790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 880007954D X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 13:47:07 -0000 Author: eugen Date: Mon Dec 10 13:47:05 2018 New Revision: 341790 URL: https://svnweb.freebsd.org/changeset/base/341790 Log: MFC r340319: jail(8): introduce new command option -e to exhibit a list of configured non-wildcard jails with their parameters, no matter running or not. The option -e takes separator argument that is used to separate printed parameters. It will be used with following additions to system periodic scripts to differentiate parts of directory tree belonging jails as opposed to host's. Modified: stable/11/usr.sbin/jail/jail.8 stable/11/usr.sbin/jail/jail.c stable/11/usr.sbin/jail/jailp.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/jail/jail.8 ============================================================================== --- stable/11/usr.sbin/jail/jail.8 Mon Dec 10 13:41:33 2018 (r341789) +++ stable/11/usr.sbin/jail/jail.8 Mon Dec 10 13:47:05 2018 (r341790) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2018 +.Dd November 10, 2018 .Dt JAIL 8 .Os .Sh NAME @@ -49,6 +49,7 @@ .Nm .Op Fl qv .Op Fl f Ar conf_file +.Op Fl e Ar separator .Op Fl rR .Op Cm * | Ar jail ... .Nm @@ -63,6 +64,7 @@ The .Nm utility creates new jails, or modifies or removes existing jails. +It can also print a list of configured jails and their parameters. A jail .Pq or Dq prison is specified via parameters on the command line, or in the @@ -71,6 +73,7 @@ file. .Pp At least one of the options .Fl c , +.Fl e , .Fl m or .Fl r @@ -86,6 +89,15 @@ and .Va name parameters (if specified on the command line) must not refer to an existing jail. +.It Fl e Ar separator +Exhibit a list of all configured non-wildcard jails and their parameters. +No jail creation, modification or removal performed if this option is used. +The +.Ar separator +string is used to separate parameters. +Use +.Xr jls 8 +utility to list running jails. .It Fl m Modify an existing jail. One of the Modified: stable/11/usr.sbin/jail/jail.c ============================================================================== --- stable/11/usr.sbin/jail/jail.c Mon Dec 10 13:41:33 2018 (r341789) +++ stable/11/usr.sbin/jail/jail.c Mon Dec 10 13:47:05 2018 (r341790) @@ -60,6 +60,7 @@ const char *cfname; int iflag; int note_remove; int verbose; +const char *separator = "\t"; static void clear_persist(struct cfjail *j); static int update_jail(struct cfjail *j); @@ -69,8 +70,9 @@ static void jail_quoted_warnx(const struct cfjail *j, const char *noname_msg); static int jailparam_set_note(const struct cfjail *j, struct jailparam *jp, unsigned njp, int flags); -static void print_jail(FILE *fp, struct cfjail *j, int oldcl); +static void print_jail(FILE *fp, struct cfjail *j, int oldcl, int running); static void print_param(FILE *fp, const struct cfparam *p, int sep, int doname); +static void show_jails(void); static void quoted_print(FILE *fp, char *str); static void usage(void); @@ -151,7 +153,7 @@ main(int argc, char **argv) cfname = CONF_FILE; JidFile = NULL; - while ((ch = getopt(argc, argv, "cdf:hiJ:lmn:p:qrRs:u:U:v")) != -1) { + while ((ch = getopt(argc, argv, "cde:f:hiJ:lmn:p:qrRs:u:U:v")) != -1) { switch (ch) { case 'c': op |= JF_START; @@ -159,6 +161,10 @@ main(int argc, char **argv) case 'd': dflag = 1; break; + case 'e': + op |= JF_SHOW; + separator = optarg; + break; case 'f': cfname = optarg; break; @@ -284,7 +290,13 @@ main(int argc, char **argv) enforce_statfs); } } - } else if (op == JF_STOP) { + } else if (op == JF_STOP || op == JF_SHOW) { + /* Just print list of all configured non-wildcard jails */ + if (op == JF_SHOW) { + load_config(); + show_jails(); + exit(0); + } /* Jail remove, perhaps using the config file */ if (!docf || argc == 0) usage(); @@ -447,7 +459,7 @@ main(int argc, char **argv) jail_create_done: clear_persist(j); if (jfp != NULL) - print_jail(jfp, j, oldcl); + print_jail(jfp, j, oldcl, 1); dep_done(j, 0); break; @@ -926,16 +938,18 @@ jailparam_set_note(const struct cfjail *j, struct jail * Print a jail record. */ static void -print_jail(FILE *fp, struct cfjail *j, int oldcl) +print_jail(FILE *fp, struct cfjail *j, int oldcl, int running) { struct cfparam *p; + int printsep; if (oldcl) { - fprintf(fp, "%d\t", j->jid); + if (running) + fprintf(fp, "%d%s", j->jid, separator); print_param(fp, j->intparams[KP_PATH], ',', 0); - putc('\t', fp); + fputs(separator, fp); print_param(fp, j->intparams[KP_HOST_HOSTNAME], ',', 0); - putc('\t', fp); + fputs(separator, fp); #ifdef INET print_param(fp, j->intparams[KP_IP4_ADDR], ',', 0); #ifdef INET6 @@ -949,13 +963,20 @@ print_jail(FILE *fp, struct cfjail *j, int oldcl) #ifdef INET6 print_param(fp, j->intparams[KP_IP6_ADDR], ',', 0); #endif - putc('\t', fp); + fputs(separator, fp); print_param(fp, j->intparams[IP_COMMAND], ' ', 0); } else { - fprintf(fp, "jid=%d", j->jid); + printsep = 0; + if (running) { + fprintf(fp, "jid=%d", j->jid); + printsep = 1; + } TAILQ_FOREACH(p, &j->params, tq) if (strcmp(p->name, "jid")) { - putc(' ', fp); + if (printsep) + fputs(separator, fp); + else + printsep = 1; print_param(fp, p, ',', 1); } } @@ -963,6 +984,18 @@ print_jail(FILE *fp, struct cfjail *j, int oldcl) } /* + * Exhibit list of all configured non-wildcard jails + */ +static void +show_jails(void) +{ + struct cfjail *j; + + TAILQ_FOREACH(j, &cfjails, tq) + print_jail(stdout, j, 0, 0); +} + +/* * Print a parameter value, or a name=value pair. */ static void @@ -1015,7 +1048,7 @@ usage(void) (void)fprintf(stderr, "usage: jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " -[cmr] param=value ... [command=command ...]\n" - " jail [-dqv] [-f file] -[cmr] [jail]\n" + " jail [-dqv] [-f file] [-e separator] -[cmr] [jail]\n" " jail [-qv] [-f file] -[rR] ['*' | jail ...]\n" " jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " [-n jailname] [-s securelevel]\n" Modified: stable/11/usr.sbin/jail/jailp.h ============================================================================== --- stable/11/usr.sbin/jail/jailp.h Mon Dec 10 13:41:33 2018 (r341789) +++ stable/11/usr.sbin/jail/jailp.h Mon Dec 10 13:47:05 2018 (r341790) @@ -67,6 +67,7 @@ #define JF_TIMEOUT 0x0200 /* A command (or process kill) timed out */ #define JF_SLEEPQ 0x0400 /* Waiting on a command and/or timeout */ #define JF_FROM_RUNQ 0x0800 /* Has already been on the run queue */ +#define JF_SHOW 0x1000 /* -e Exhibit list of configured jails */ #define JF_OP_MASK (JF_START | JF_SET | JF_STOP) #define JF_RESTART (JF_START | JF_STOP) From owner-svn-src-all@freebsd.org Mon Dec 10 14:09:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2F5813270F7; Mon, 10 Dec 2018 14:09:16 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 567DC7A21E; Mon, 10 Dec 2018 14:09:16 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 333D120DB3; Mon, 10 Dec 2018 14:09:16 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAE9GRk042574; Mon, 10 Dec 2018 14:09:16 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAE9Fms042572; Mon, 10 Dec 2018 14:09:15 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812101409.wBAE9Fms042572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 10 Dec 2018 14:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341791 - in stable/12/libexec/rc: . rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/12/libexec/rc: . rc.d X-SVN-Commit-Revision: 341791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 567DC7A21E X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:09:16 -0000 Author: eugen Date: Mon Dec 10 14:09:15 2018 New Revision: 341791 URL: https://svnweb.freebsd.org/changeset/base/341791 Log: MFC r340321: Move definition of $jail_conf variable to /etc/defaults/rc.conf from jail startup script so it can be successfully queried with the command "sysrc jail_conf". Modified: stable/12/libexec/rc/rc.conf stable/12/libexec/rc/rc.d/jail Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.conf ============================================================================== --- stable/12/libexec/rc/rc.conf Mon Dec 10 13:47:05 2018 (r341790) +++ stable/12/libexec/rc/rc.conf Mon Dec 10 14:09:15 2018 (r341791) @@ -703,6 +703,7 @@ iovctl_files="" # Config files for iovctl(8) ### Jail Configuration (see rc.conf(5) manual page) ########## ############################################################## jail_enable="NO" # Set to NO to disable starting of any jails +jail_conf="/etc/jail.conf" # Configuration file for jail(8) jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails Modified: stable/12/libexec/rc/rc.d/jail ============================================================================== --- stable/12/libexec/rc/rc.d/jail Mon Dec 10 13:47:05 2018 (r341790) +++ stable/12/libexec/rc/rc.d/jail Mon Dec 10 14:09:15 2018 (r341791) @@ -21,7 +21,6 @@ config_cmd="jail_config" console_cmd="jail_console" status_cmd="jail_status" extra_commands="config console status" -: ${jail_conf:=/etc/jail.conf} : ${jail_program:=/usr/sbin/jail} : ${jail_consolecmd:=/usr/bin/login -f root} : ${jail_jexec:=/usr/sbin/jexec} From owner-svn-src-all@freebsd.org Mon Dec 10 14:12:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FD3C13273A3; Mon, 10 Dec 2018 14:12:05 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 442667A6AA; Mon, 10 Dec 2018 14:12:05 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2603E20E33; Mon, 10 Dec 2018 14:12:05 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAEC5iT047395; Mon, 10 Dec 2018 14:12:05 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAEC4Cs047393; Mon, 10 Dec 2018 14:12:04 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812101412.wBAEC4Cs047393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 10 Dec 2018 14:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341792 - in stable/11/etc: defaults rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/11/etc: defaults rc.d X-SVN-Commit-Revision: 341792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 442667A6AA X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:12:05 -0000 Author: eugen Date: Mon Dec 10 14:12:04 2018 New Revision: 341792 URL: https://svnweb.freebsd.org/changeset/base/341792 Log: MFC r340321: Move definition of $jail_conf variable to /etc/defaults/rc.conf from jail startup script so it can be successfully queried with the command "sysrc jail_conf". Modified: stable/11/etc/defaults/rc.conf stable/11/etc/rc.d/jail Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/defaults/rc.conf ============================================================================== --- stable/11/etc/defaults/rc.conf Mon Dec 10 14:09:15 2018 (r341791) +++ stable/11/etc/defaults/rc.conf Mon Dec 10 14:12:04 2018 (r341792) @@ -705,6 +705,7 @@ iovctl_files="" # Config files for iovctl(8) ### Jail Configuration (see rc.conf(5) manual page) ########## ############################################################## jail_enable="NO" # Set to NO to disable starting of any jails +jail_conf="/etc/jail.conf" # Configuration file for jail(8) jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails Modified: stable/11/etc/rc.d/jail ============================================================================== --- stable/11/etc/rc.d/jail Mon Dec 10 14:09:15 2018 (r341791) +++ stable/11/etc/rc.d/jail Mon Dec 10 14:12:04 2018 (r341792) @@ -21,7 +21,6 @@ config_cmd="jail_config" console_cmd="jail_console" status_cmd="jail_status" extra_commands="config console status" -: ${jail_conf:=/etc/jail.conf} : ${jail_program:=/usr/sbin/jail} : ${jail_consolecmd:=/usr/bin/login -f root} : ${jail_jexec:=/usr/sbin/jexec} From owner-svn-src-all@freebsd.org Mon Dec 10 14:19:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D89321327788; Mon, 10 Dec 2018 14:19:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D9357AC1A; Mon, 10 Dec 2018 14:19:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E8C620F62; Mon, 10 Dec 2018 14:19:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAEJwIn048189; Mon, 10 Dec 2018 14:19:58 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAEJwdU048188; Mon, 10 Dec 2018 14:19:58 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812101419.wBAEJwdU048188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 10 Dec 2018 14:19:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341793 - stable/12/usr.sbin/periodic/etc/weekly X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/usr.sbin/periodic/etc/weekly X-SVN-Commit-Revision: 341793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7D9357AC1A X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.997,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:19:59 -0000 Author: eugen Date: Mon Dec 10 14:19:57 2018 New Revision: 341793 URL: https://svnweb.freebsd.org/changeset/base/341793 Log: MFC r340322-r340324,r340327: periodic/etc/weekly/340.noid Prevent periodic/etc/weekly/340.noid from descending into root directories of jails. Jails have their own user/group databases and this script can produce multiple false warnings, not to mention significant extra load in case of large jailed subtrees. Leave this check for jailed invocations of the same script. Modified: stable/12/usr.sbin/periodic/etc/weekly/340.noid Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/periodic/etc/weekly/340.noid ============================================================================== --- stable/12/usr.sbin/periodic/etc/weekly/340.noid Mon Dec 10 14:12:04 2018 (r341792) +++ stable/12/usr.sbin/periodic/etc/weekly/340.noid Mon Dec 10 14:19:57 2018 (r341793) @@ -16,8 +16,26 @@ case "$weekly_noid_enable" in echo "" echo "Check for files with an unknown user or group:" + # Host should not test jailed subtrees as jails have their own + # databases of users and groups. Leave them for jailed invocations + # of this script. + + exclude='' + if [ $(sysctl -n security.jail.jailed) = 0 ]; then + sep=: + OIFS="$IFS" + IFS="$sep" + for param in $(jail -f "`sysrc -n jail_conf`" -e "$sep" 2>/dev/null) + do + case "$param" in + path=*) exclude="$exclude -path ${param#path=} -prune -or" + esac + done + IFS="$OIFS" + fi + rc=$(find -H ${weekly_noid_dirs:-/} \ - \( ! -fstype local -prune -or -name \* \) -and \ + \( $exclude ! -fstype local -prune -or -name \* \) -and \ \( -nogroup -o -nouser \) -print | sed 's/^/ /' | tee /dev/stderr | wc -l) [ $rc -gt 1 ] && rc=1 From owner-svn-src-all@freebsd.org Mon Dec 10 14:24:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8D421327BA0; Mon, 10 Dec 2018 14:24:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EC9D7B328; Mon, 10 Dec 2018 14:24:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F815210F1; Mon, 10 Dec 2018 14:24:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAEOg4P053583; Mon, 10 Dec 2018 14:24:42 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAEOgbC053582; Mon, 10 Dec 2018 14:24:42 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812101424.wBAEOgbC053582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 10 Dec 2018 14:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341794 - stable/11/etc/periodic/weekly X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/etc/periodic/weekly X-SVN-Commit-Revision: 341794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5EC9D7B328 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:24:42 -0000 Author: eugen Date: Mon Dec 10 14:24:41 2018 New Revision: 341794 URL: https://svnweb.freebsd.org/changeset/base/341794 Log: MFC r340322-r340324,r340327: periodic/etc/weekly/340.noid Prevent periodic/etc/weekly/340.noid from descending into root directories of jails. Jails have their own user/group databases and this script can produce multiple false warnings, not to mention significant extra load in case of large jailed subtrees. Leave this check for jailed invocations of the same script. Modified: stable/11/etc/periodic/weekly/340.noid Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/periodic/weekly/340.noid ============================================================================== --- stable/11/etc/periodic/weekly/340.noid Mon Dec 10 14:19:57 2018 (r341793) +++ stable/11/etc/periodic/weekly/340.noid Mon Dec 10 14:24:41 2018 (r341794) @@ -16,8 +16,26 @@ case "$weekly_noid_enable" in echo "" echo "Check for files with an unknown user or group:" + # Host should not test jailed subtrees as jails have their own + # databases of users and groups. Leave them for jailed invocations + # of this script. + + exclude='' + if [ $(sysctl -n security.jail.jailed) = 0 ]; then + sep=: + OIFS="$IFS" + IFS="$sep" + for param in $(jail -f "`sysrc -n jail_conf`" -e "$sep" 2>/dev/null) + do + case "$param" in + path=*) exclude="$exclude -path ${param#path=} -prune -or" + esac + done + IFS="$OIFS" + fi + rc=$(find -H ${weekly_noid_dirs:-/} \ - \( ! -fstype local -prune -or -name \* \) -and \ + \( $exclude ! -fstype local -prune -or -name \* \) -and \ \( -nogroup -o -nouser \) -print | sed 's/^/ /' | tee /dev/stderr | wc -l) [ $rc -gt 1 ] && rc=1 From owner-svn-src-all@freebsd.org Mon Dec 10 14:39:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 161351328014; Mon, 10 Dec 2018 14:39:22 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABEED7B993; Mon, 10 Dec 2018 14:39:21 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CE4021290; Mon, 10 Dec 2018 14:39:21 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAEdLmX058734; Mon, 10 Dec 2018 14:39:21 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAEdLLv058733; Mon, 10 Dec 2018 14:39:21 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812101439.wBAEdLLv058733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 10 Dec 2018 14:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341795 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 341795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ABEED7B993 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:39:22 -0000 Author: eugen Date: Mon Dec 10 14:39:21 2018 New Revision: 341795 URL: https://svnweb.freebsd.org/changeset/base/341795 Log: ping(8): add space after "<=" as per style(9). MFC after: 1 week X-MFC-with: r341768 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Mon Dec 10 14:24:41 2018 (r341794) +++ head/sbin/ping/ping.c Mon Dec 10 14:39:21 2018 (r341795) @@ -313,7 +313,7 @@ main(int argc, char *const *argv) break; case 'c': ltmp = strtol(optarg, &ep, 0); - if (*ep || ep == optarg || ltmp <=0) + if (*ep || ep == optarg || ltmp <= 0) errx(EX_USAGE, "invalid count of packets to transmit: `%s'", optarg); From owner-svn-src-all@freebsd.org Mon Dec 10 14:50:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D0761328C86; Mon, 10 Dec 2018 14:50:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22A247C37F; Mon, 10 Dec 2018 14:50:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0B9721423; Mon, 10 Dec 2018 14:50:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAEoBIu063660; Mon, 10 Dec 2018 14:50:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAEoBvM063659; Mon, 10 Dec 2018 14:50:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201812101450.wBAEoBvM063659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 10 Dec 2018 14:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341796 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 341796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 22A247C37F X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:50:12 -0000 Author: emaste Date: Mon Dec 10 14:50:11 2018 New Revision: 341796 URL: https://svnweb.freebsd.org/changeset/base/341796 Log: Clean stale wpa dependencies and objects after r341759 The wpa update added some source files with the same name as a file in another directory (found via .PATH in the previous version). Having a stale entry in a .depend file means the new file won't be built, so test for this case and if found remove all of wpa's dependency files. MFC with: r341759 Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Dec 10 14:39:21 2018 (r341795) +++ head/Makefile.inc1 Mon Dec 10 14:50:11 2018 (r341796) @@ -977,6 +977,14 @@ _cleanobj_fast_depend_hack: .PHONY rm -f ${OBJTOP}/usr.sbin/ntp/libntpevent/.depend.*; \ fi +# 20181209 r341759 track migration across wpa update + @if [ -e "${OBJTOP}/usr.sbin/wpa/wpa_supplicant/.depend.rrm.o" ] && \ + egrep -q 'src/ap/rrm.c' \ + ${OBJTOP}/usr.sbin/wpa/wpa_supplicant/.depend.rrm.o; then \ + echo "Removing stale wpa dependencies and objects"; \ + rm -f ${OBJTOP}/usr.sbin/wpa/*/.depend*; \ + fi + _worldtmp: .PHONY @echo @echo "--------------------------------------------------------------" From owner-svn-src-all@freebsd.org Mon Dec 10 14:54:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49D511328FF6; Mon, 10 Dec 2018 14:54:30 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3FBB7CA2D; Mon, 10 Dec 2018 14:54:29 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5B86215C8; Mon, 10 Dec 2018 14:54:29 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAEsTUT068891; Mon, 10 Dec 2018 14:54:29 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAEsSvh068887; Mon, 10 Dec 2018 14:54:28 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201812101454.wBAEsSvh068887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 10 Dec 2018 14:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341797 - in head/sys/powerpc: aim include powerpc X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: in head/sys/powerpc: aim include powerpc X-SVN-Commit-Revision: 341797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E3FBB7CA2D X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:54:30 -0000 Author: luporl Date: Mon Dec 10 14:54:28 2018 New Revision: 341797 URL: https://svnweb.freebsd.org/changeset/base/341797 Log: ppc64: handle exception 0x1500 (soft patch) This change adds a hypervisor trap handler for exception 0x1500 (soft patch), normalizing all VSX registers and returning. This avoids a kernel panic due to unknown exception. Change made with the collaboration of leonardo.bianconi_eldorado.org.br, that found out that this is a hypervisor exception and not a supervisor one, and fixed this in the code. Reviewed by: jhibbits, sbruno Differential Revision: https://reviews.freebsd.org/D17806 Modified: head/sys/powerpc/aim/aim_machdep.c head/sys/powerpc/include/trap.h head/sys/powerpc/powerpc/db_trace.c head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Mon Dec 10 14:50:11 2018 (r341796) +++ head/sys/powerpc/aim/aim_machdep.c Mon Dec 10 14:54:28 2018 (r341797) @@ -366,6 +366,7 @@ aim_cpu_init(vm_offset_t toc) bcopy(&hypertrapcode, (void *)(EXC_HEA + trap_offset), trapsize); bcopy(&hypertrapcode, (void *)(EXC_HMI + trap_offset), trapsize); bcopy(&hypertrapcode, (void *)(EXC_HVI + trap_offset), trapsize); + bcopy(&hypertrapcode, (void *)(EXC_SOFT_PATCH + trap_offset), trapsize); #endif bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstcodeend - Modified: head/sys/powerpc/include/trap.h ============================================================================== --- head/sys/powerpc/include/trap.h Mon Dec 10 14:50:11 2018 (r341796) +++ head/sys/powerpc/include/trap.h Mon Dec 10 14:54:28 2018 (r341797) @@ -103,6 +103,9 @@ #define EXC_SPFPD 0x2f30 /* SPE Floating-point Data */ #define EXC_SPFPR 0x2f40 /* SPE Floating-point Round */ +/* POWER8 */ +#define EXC_SOFT_PATCH 0x1500 /* POWER8 Soft Patch Exception */ + #define EXC_LAST 0x2f00 /* Last possible exception vector */ #define EXC_AST 0x3000 /* Fake AST vector */ Modified: head/sys/powerpc/powerpc/db_trace.c ============================================================================== --- head/sys/powerpc/powerpc/db_trace.c Mon Dec 10 14:50:11 2018 (r341796) +++ head/sys/powerpc/powerpc/db_trace.c Mon Dec 10 14:54:28 2018 (r341797) @@ -255,6 +255,7 @@ db_backtrace(struct thread *td, db_addr_t fp, int coun case EXC_DECR: trapstr = "DECR"; break; case EXC_PERF: trapstr = "PERF"; break; case EXC_VSX: trapstr = "VSX"; break; + case EXC_SOFT_PATCH: trapstr = "SOFT_PATCH"; break; default: trapstr = NULL; break; } if (trapstr != NULL) { Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Mon Dec 10 14:50:11 2018 (r341796) +++ head/sys/powerpc/powerpc/trap.c Mon Dec 10 14:54:28 2018 (r341797) @@ -95,6 +95,7 @@ static void syscall(struct trapframe *frame); void handle_kernel_slb_spill(int, register_t, register_t); static int handle_user_slb_spill(pmap_t pm, vm_offset_t addr); extern int n_slbs; +static void normalize_inputs(void); #endif extern vm_offset_t __startkernel; @@ -147,6 +148,7 @@ static struct powerpc_exception powerpc_exceptions[] = { EXC_VECAST_G4, "altivec assist" }, { EXC_THRM, "thermal management" }, { EXC_RUNMODETRC, "run mode/trace" }, + { EXC_SOFT_PATCH, "soft patch exception" }, { EXC_LAST, NULL } }; @@ -382,6 +384,17 @@ trap(struct trapframe *frame) ucode = BUS_OBJERR; break; +#if defined(__powerpc64__) && defined(AIM) + case EXC_SOFT_PATCH: + /* + * Point to the instruction that generated the exception to execute it again, + * and normalize the register values. + */ + frame->srr0 -= 4; + normalize_inputs(); + break; +#endif + default: trap_fatal(frame); } @@ -908,6 +921,49 @@ fix_unaligned(struct thread *td, struct trapframe *fra return (-1); } + +#if defined(__powerpc64__) && defined(AIM) +#define MSKNSHL(x, m, n) "(((" #x ") & " #m ") << " #n ")" +#define MSKNSHR(x, m, n) "(((" #x ") & " #m ") >> " #n ")" + +/* xvcpsgndp instruction, built in opcode format. + * This can be changed to use mnemonic after a toolchain update. + */ +#define XVCPSGNDP(xt, xa, xb) \ + __asm __volatile(".long (" \ + MSKNSHL(60, 0x3f, 26) " | " \ + MSKNSHL(xt, 0x1f, 21) " | " \ + MSKNSHL(xa, 0x1f, 16) " | " \ + MSKNSHL(xb, 0x1f, 11) " | " \ + MSKNSHL(240, 0xff, 3) " | " \ + MSKNSHR(xa, 0x20, 3) " | " \ + MSKNSHR(xa, 0x20, 4) " | " \ + MSKNSHR(xa, 0x20, 5) ")") + +/* Macros to normalize 1 or 10 VSX registers */ +#define NORM(x) XVCPSGNDP(x, x, x) +#define NORM10(x) \ + NORM(x ## 0); NORM(x ## 1); NORM(x ## 2); NORM(x ## 3); NORM(x ## 4); \ + NORM(x ## 5); NORM(x ## 6); NORM(x ## 7); NORM(x ## 8); NORM(x ## 9) + +static void +normalize_inputs(void) +{ + unsigned long msr; + + /* enable VSX */ + msr = mfmsr(); + mtmsr(msr | PSL_VSX); + + NORM(0); NORM(1); NORM(2); NORM(3); NORM(4); + NORM(5); NORM(6); NORM(7); NORM(8); NORM(9); + NORM10(1); NORM10(2); NORM10(3); NORM10(4); NORM10(5); + NORM(60); NORM(61); NORM(62); NORM(63); + + /* restore MSR */ + mtmsr(msr); +} +#endif #ifdef KDB int From owner-svn-src-all@freebsd.org Mon Dec 10 14:55:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64FF313290FA; Mon, 10 Dec 2018 14:55:47 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2AA87CD90; Mon, 10 Dec 2018 14:55:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f174.google.com with SMTP id i145so17701910ita.4; Mon, 10 Dec 2018 06:55:46 -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=4TvsPrDu6uOBb27T8WKccqa9/FC7t8jbL7LL6dy//6M=; b=JW3XHGBJfxRS/DoVifgjf2CJkWVkUgPlU/Oby7MRAa4l9JWKlo1bJnTCM7Mb59ehO5 4gGdl1OWOjc1K/RQMZbUNCkU1/lDlabkjhyWeQNltLM7Ttm62f5a2FDYKKkpInc2sacz 2L/0n3Dge+Vbm9PCVbJ0Ky/hfuITT/OOXaWpxu0n97/kER/OH9pz9BjGVl3OSZkZXZ6T BCNsqnLEyHw4VwCZzpD4wAAt8zL247EYPIa0P5y9V+RYgZYXkPJGQ3DmWfR4DKoFPnas cR3zLIm1FZ2zdlytmmtDtUD4aggLe36QOLBTzGpvGTr9jpPU+3WBkqOqOKSxVwcpC3Ho LOGg== X-Gm-Message-State: AA+aEWbNMAopij+qCPPi3CEwp8CWPW+c09vIjjBoAvynAkeecty3CjFT FIYVbgTFOqIpwWk+1gVjqwzRSB6N4cR0M8e2g6PH5g== X-Google-Smtp-Source: AFSGD/X3t8BCmE8FStZzdwZaGG2FZr/OmUWl1AN033xQx+ZAtqY3kCH1C6lxWMXOzSEpGjBaA19THt6Razk6bRb8OpM= X-Received: by 2002:a02:5618:: with SMTP id o24mr12319650jab.111.1544453745910; Mon, 10 Dec 2018 06:55:45 -0800 (PST) MIME-Version: 1.0 References: <201812090645.wB96jnso066329@repo.freebsd.org> <201812090708.wB978Li6098145@slippy.cwsent.com> In-Reply-To: <201812090708.wB978Li6098145@slippy.cwsent.com> From: Ed Maste Date: Mon, 10 Dec 2018 09:55:33 -0500 Message-ID: Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: Cy Schubert Cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: C2AA87CD90 X-Spamd-Result: default: False [-5.83 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; RCVD_IN_DNSWL_NONE(0.00)[174.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.87)[ip: (-9.44), ipnet: 209.85.128.0/17(-3.55), asn: 15169(-1.29), country: US(-0.09)]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[174.166.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 14:55:47 -0000 On Sun, 9 Dec 2018 at 02:08, Cy Schubert wrote: > > In message <201812090645.wB96jnso066329@repo.freebsd.org>, Cy Schubert > writes: > > Author: cy > > Date: Sun Dec 9 06:45:49 2018 > > New Revision: 341759 > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > > Log: > > MFV r341618: > > > > Update wpa 2.6 --> 2.7. > > In order to build this cleanly, artifacts from wpa 2.6 need to be > removed first. Either build using a clean /usr/obj or if building using > -DNO_CLEAN, rm -rf /usr/obj/opt/src/svn-current/*/usr.sbin/wpa first. We've been able to build with -DNO_CLEAN for about a year and a half; I added automatic cleanup of old dependencies for this wpa update in r341796. From owner-svn-src-all@freebsd.org Mon Dec 10 15:42:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A23A132A62C; Mon, 10 Dec 2018 15:42:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 120F87E9D1; Mon, 10 Dec 2018 15:42:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D531421DDA; Mon, 10 Dec 2018 15:42:13 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAFgDRh093542; Mon, 10 Dec 2018 15:42:13 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAFgDWZ093541; Mon, 10 Dec 2018 15:42:13 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201812101542.wBAFgDWZ093541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 10 Dec 2018 15:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341798 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 341798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 120F87E9D1 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 15:42:14 -0000 Author: ae Date: Mon Dec 10 15:42:13 2018 New Revision: 341798 URL: https://svnweb.freebsd.org/changeset/base/341798 Log: Use correct size for IPv4 address in gethostbyaddr(). When u_long is 8 bytes, it returns EINVAL and 'ipfw -N show' doesn't work. Reported by: Claudio Eichenberger MFC after: 1 week Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Dec 10 14:54:28 2018 (r341797) +++ head/sbin/ipfw/ipfw2.c Mon Dec 10 15:42:13 2018 (r341798) @@ -1256,7 +1256,8 @@ print_ip(struct buf_pr *bp, const struct format_opts * (cmd->o.opcode == O_IP_SRC || cmd->o.opcode == O_IP_DST) ? 32 : contigmask((uint8_t *)&(a[1]), 32); if (mb == 32 && co.do_resolv) - he = gethostbyaddr((char *)&(a[0]), sizeof(u_long), AF_INET); + he = gethostbyaddr((char *)&(a[0]), sizeof(in_addr_t), + AF_INET); if (he != NULL) /* resolved to name */ bprintf(bp, "%s", he->h_name); else if (mb == 0) /* any */ From owner-svn-src-all@freebsd.org Mon Dec 10 16:22:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDFD4132B8F7 for ; Mon, 10 Dec 2018 16:22:20 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E85B809F0 for ; Mon, 10 Dec 2018 16:22:20 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1544458912; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Ef72Y+R0NMmw3rU7+tzhUzWevclCqVTMV9361uwzO0axj7GTlq1EanWkZW0Z49tDIobTAxHpO0X3F TyzW1GnsXQplNfmpsby4V8tXC8tJMxpuLo2DtcvgxoA3tNK+l/M14mY4GtxFCLuAMrWGql3K9pHCT7 zl7HnjTGoUHEMwYvHn798HzEKvqiWKdoHqYPG/qkcswiTg6jXKuV++9DDTgv3WFJaZv0QmM43Z6K3y 0AWcbzUeGqqKg5tmz9I5xpAeyPb9YgtNefYp60A89EhcEeYvB2vag4F9EKxcMvDpszTUYwDtIS6ir9 u2To1ku+i7uFkwUd4jCDeK6j6QbRvxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=Nw9cSnc0KrCcz0FEnKaEhgxuygnwHLASXVNbdRQDN5A=; b=dh9L9Jbo/bT79A8PbGbr0eFRF4n3BiGDQNSvJprhg1Y+uaclhvBl6hNXju8iJEkHW31PceO/Vr+fx kH2YHhCdOMV71sdMnruoCbTxSZeebkjqRUOfCiLcYDdY0zg5VDwgaTCh71qHDYQpGqyyu73SxaMyHF iJMuk+hJstKoglqTKKT+piBEFRptBHZSHmz9hVQTGuOF6w9iV4JRywi1H39T7EG/eWvSPwcu9GYYlp 8lWL53qqCO/ELDnNCaNytEoXfJiYK+gcA9yP889JBNrUTjyVIdNofFjUP6VLKEIkHJoNGfG+DGkQMk B/OOMt3FADEs35f1R+hwuJysBDAsfbg== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=Nw9cSnc0KrCcz0FEnKaEhgxuygnwHLASXVNbdRQDN5A=; b=Qy5ROZPE3JQjHnAIUnOGnnKwBJXKJ4QyVI8nKCigINV6j+zo+4+ZqHtSen+O6GKhYCM7H6asOvQnj J6uMKZnxiF90pmLqawVrvYInEU1Zirfxdr/GYRsM0wMvGwrWMWiLg7GRKny5L1bwPvu13wx5Aji50R 0OYMd8+aJXl99Q65j+LbEZzYq5NNvmWdbnxNwyyNBo5dTFzE9p2gptBC0StHgtOS/ILEg17UtGyJyY B4xYUtGdAMWE0k+RBH7WyM6MuFK6WNbbKD8wcWCEFAAt2Uh+XzLVq3KWwdfXIO9rfc9yuMe8q/Ykl/ C63QDBU0/pyR2D4WzfHMVmeVumEUpuw== X-MHO-RoutePath: aGlwcGll X-MHO-User: b1f1ca5f-fc97-11e8-a59a-7b143e15dabc X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id b1f1ca5f-fc97-11e8-a59a-7b143e15dabc; Mon, 10 Dec 2018 16:21:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id wBAGM95p072416; Mon, 10 Dec 2018 09:22:09 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1544458929.1860.329.camel@freebsd.org> Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... From: Ian Lepore To: Warner Losh , Cy Schubert Cc: "Rodney W. Grimes" , Oliver Pinter , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Cy Schubert Date: Mon, 10 Dec 2018 09:22:09 -0700 In-Reply-To: References: <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net> <201812100640.wBA6eaMA052004@slippy.cwsent.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E85B809F0 X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 16:22:21 -0000 On Sun, 2018-12-09 at 23:47 -0700, Warner Losh wrote: > On Sun, Dec 9, 2018, 11:40 PM Cy Schubert wrote: > > > > > In message <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net>, > > "Rodney W. Gri > > mes" writes: > > > > > > > > > > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter < > > oliver.pinter@hardenedbsd.org > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > On Sunday, December 9, 2018, Warner Losh > > > > > wrote: > > > > > > > > > > > > > > > > > On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > > > > > > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > In message <201812090645.wB96jnso066329@repo.freebsd.or > > > > > > > > g>, Cy > > > > > > Schubert > > > > > > > > > > > > > > > > > > > > > > > writes: > > > > > > > > > > > > > > > > > > Author: cy > > > > > > > > > Date: Sun Dec  9 06:45:49 2018 > > > > > > > > > New Revision: 341759 > > > > > > > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > > > > > > > > > > > > > > > > Log: > > > > > > > > >   MFV r341618: > > > > > > > > > > > > > > > > > >   Update wpa 2.6 --> 2.7. > > > > > > > > Relnotes: yes > > > > > > > As an FYI, or maybe a new procedure, doing a reply to > > > > > > > a commit message adding relnotes: yes does very little > > > > > > > to insure that this commit gets refered to in release > > > > > > > notes. > > > > > > > > > > > > > > What about we add RELNOTES.missed to the tree > > > > > > > next to UPDATING, and when someone forgets to tag > > > > > > > the Relnotes:yes into a commit you just follow up > > > > > > > with a commit to that file, stating the svn revision > > > > > > > which was missing the note and then we have a nice > > > > > > > documented and clean way to extract the missing > > > > > > > release note items, rather than trying to cull it > > > > > > > from a thread in a mail list archive. > > > > > > > > > > > > > > The file would get truncated to 0 at appropriate > > > > > > > times on various branches. > > > > > > > > > > > > > How about just RELNOTES. You put the revision that is > > > > > > relevant and > > a qui > > > > > > ck > > > > > > > > > > > > > > > > > > > > > blurb. That way we don't have to look in two places. All > > > > > > release > > notes g > > > > > > o > > > > > > > > > > > > > > > > > > > > > in here, no exceptions. You can retroactively tag them, or > > > > > > you can > > commi > > > > > > t > > > > > > > > > > > > > > > > > > > > > this as part of commit. > > > My one concern is that if we remove the Relnotes: yes line > > > from the commits then we may end up totally ignoring the > > > need to put entries in RELNOTES, which unlike UPDATING > > > do not have consequences if ignored. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I don't really know SVN, but there wouldn't be a chicken egg > > > > > probem > > durin > > > > > > g > > > > > > > > > > > > > > commit time? I mean you would really know the SVN id. So you > > > > > could > > only a > > > > > > dd > > > > > > > > > > > > > > a specific revision in a different commit to RELEASE file. > > > > > > > > > Generally, you can guess really well, and fix it in the case of > > > > a lost > > race > > > > > > > > > > > easily. > > > No reason to guess, if you add the RELNOTES change with the > > > commit > > > then it is the revision that added the RELNOTES entry, so a log > > > view > > > of RELNOTES would show you the revision.  If you do it after > > > words > > > or edit an existing entry in the RELNOTES file that is also > > > fairly > > > clear as that commit has no other files touched. > > > > > > > > > > > > > > > You'd add the release notes text in full to the file, with a > > > > pointer > > to the > > > > > > > > > > > revision(s) for the feature. > > > If you modify RELNOTES with the commit adding the feature we > > > could easily use a pointer of "this commit", the svn version > > > number > > > of that added entry is self referencing to the actual change, > > > which I actually rather like the idea of. > > > > > > > > > > > > > > > Warner > > > > > > > > > > > > > > > > > > > > > > > > > > Have a blurb at the top that tells people what > > > > > > order to add them in, and you'd be set. We'd then retire > > > > > > "relnotes: > > yes" > > > > > > > > > > > > > > > > > > > > > > > > in > > > > > > the commit message. This would also allow 'helpers' to > > > > > > format the > > RELNOT > > > > > > ES > > > > > > > > > > > > > > > > > > > > > file as we go rather than having to play 2 years of catch- > > > > > > up at > > major > > > > > > > > > > > > > > > > > > > > > > > > branch times. > > > Yes.  You could actually "delete" an entry from RELNOTES once a > > > proper entry in the actual release notes had been created, such > > > that RELNOTES is really a list of pending items. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Having it in the commit message just doesn't work, and this > > > > > > is one > > of ma > > > > > > ny > > > > > > > > > > > > > > > > > > > > > reasons: Cy forgot. Other times I'll do something and it's > > > > > > only a > > month > > > > > > > > > > > > > > > > > > > > > > > > later I realize it needs to be in the release notes after > > > > > > some > > issue has > > > > > > > > > > > > > > > > > > > > > > > > come up.... Other times I put relnotes: yes in only to > > > > > > realize > > that's my > > > > > > > > > > > > > > > > > > > > > > > > vanity talking, and nobody else cares. > > > I agree, what we have now works poorly. > > Forgetting, yes, but also a hmmm moment. > > > > Initially my thinking was a file in doc/. Or maybe something like > > the > > vuxml port where we fill in the blanks and make validate to make > > sure > > all the i's are dotted and t's crossed. It's a little extra work > > for > > committers but would help re@ immensely, and get the details in > > from > > the get-go. > > > > My thought was a low friction,  proximate way to do a ticker of important > changes. Doc repo is too hard. Too much friction. A simple extra file puts > it all in one, easy to find and edit place... it can cause other things to > happen, further away. But it needs to be close by. > I agree that a RELNOTES file as plain ascii text will be the easiest thing for src committers to work with, and being easy will definitely improve the odds of being updated. We have empirical data on src committers updating an xml file in the docs repo, based on documenting version number bumps, and it all too often doesn't happen, I think laregely because it's a big hassle and it's out of sight in another repo. -- Ian From owner-svn-src-all@freebsd.org Mon Dec 10 16:23:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8591B132B967; Mon, 10 Dec 2018 16:23:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FED680C77; Mon, 10 Dec 2018 16:23:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00DC822495; Mon, 10 Dec 2018 16:23:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAGNBO5015810; Mon, 10 Dec 2018 16:23:11 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAGNBUd015809; Mon, 10 Dec 2018 16:23:11 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201812101623.wBAGNBUd015809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 10 Dec 2018 16:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341799 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 341799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1FED680C77 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 16:23:12 -0000 Author: ae Date: Mon Dec 10 16:23:11 2018 New Revision: 341799 URL: https://svnweb.freebsd.org/changeset/base/341799 Log: Rework how protocol number is tracked in rule. Save it when O_PROTO opcode will be printed. This should solve the problem, when protocol name is not printed in `ipfw -N show`. Reported by: Claudio Eichenberger MFC after: 1 week Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Dec 10 15:42:13 2018 (r341798) +++ head/sbin/ipfw/ipfw2.c Mon Dec 10 16:23:11 2018 (r341799) @@ -1511,6 +1511,7 @@ print_instruction(struct buf_pr *bp, const struct form bprintf(bp, " %s", pe->p_name); else bprintf(bp, " %u", cmd->arg1); + state->proto = cmd->arg1; break; case O_MACADDR2: print_mac(bp, insntod(cmd, mac)); @@ -1992,10 +1993,10 @@ print_proto(struct buf_pr *bp, struct format_opts *fo, struct show_state *state) { ipfw_insn *cmd; - int l, proto, ip4, ip6, tmp; + int l, proto, ip4, ip6; /* Count all O_PROTO, O_IP4, O_IP6 instructions. */ - proto = tmp = ip4 = ip6 = 0; + proto = ip4 = ip6 = 0; for (l = state->rule->act_ofs, cmd = state->rule->cmd; l > 0; l -= F_LEN(cmd), cmd += F_LEN(cmd)) { switch (cmd->opcode) { @@ -2031,18 +2032,13 @@ print_proto(struct buf_pr *bp, struct format_opts *fo, if (cmd == NULL || (cmd->len & F_OR)) for (l = proto; l > 0; l--) { cmd = print_opcode(bp, fo, state, O_PROTO); - if (cmd != NULL && (cmd->len & F_OR) == 0) + if (cmd == NULL || (cmd->len & F_OR) == 0) break; - tmp = cmd->arg1; } /* Initialize proto, it is used by print_newports() */ - if (tmp != 0) - state->proto = tmp; - else if (ip6 != 0) - state->proto = IPPROTO_IPV6; - else - state->proto = IPPROTO_IP; state->flags |= HAVE_PROTO; + if (state->proto == 0 && ip6 != 0) + state->proto = IPPROTO_IPV6; } static int From owner-svn-src-all@freebsd.org Mon Dec 10 17:14:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D082E132D5F9; Mon, 10 Dec 2018 17:14:39 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25F4A83D28; Mon, 10 Dec 2018 17:14:38 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wBAHEXmW066678; Mon, 10 Dec 2018 09:14:33 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wBAHEX7G066677; Mon, 10 Dec 2018 09:14:33 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201812101714.wBAHEX7G066677@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: <1544458929.1860.329.camel@freebsd.org> To: Ian Lepore Date: Mon, 10 Dec 2018 09:14:33 -0800 (PST) CC: Warner Losh , Cy Schubert , "Rodney W. Grimes" , Oliver Pinter , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Cy Schubert Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 25F4A83D28 X-Spamd-Result: default: False [1.99 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.91)[0.907,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_SPAM_LONG(0.69)[0.695,0]; RCPT_COUNT_SEVEN(0.00)[9]; NEURAL_HAM_SHORT(-0.48)[-0.476,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.03)[asn: 13868(-0.04), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 17:14:40 -0000 > On Sun, 2018-12-09 at 23:47 -0700, Warner Losh wrote: > > On Sun, Dec 9, 2018, 11:40 PM Cy Schubert > wrote: > > > > > > > > In message <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net>, > > > "Rodney W. Gri > > > mes" writes: > > > > > > > > > > > > > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter < > > > oliver.pinter@hardenedbsd.org > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sunday, December 9, 2018, Warner Losh > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > > > > > > > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > In message <201812090645.wB96jnso066329@repo.freebsd.or > > > > > > > > > g>, Cy > > > > > > > Schubert > > > > > > > > > > > > > > > > > > > > > > > > > > writes: > > > > > > > > > > > > > > > > > > > > Author: cy > > > > > > > > > > Date: Sun Dec??9 06:45:49 2018 > > > > > > > > > > New Revision: 341759 > > > > > > > > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > > > > > > > > > > > > > > > > > > Log: > > > > > > > > > > ? MFV r341618: > > > > > > > > > > > > > > > > > > > > ? Update wpa 2.6 --> 2.7. > > > > > > > > > Relnotes: yes > > > > > > > > As an FYI, or maybe a new procedure, doing a reply to > > > > > > > > a commit message adding relnotes: yes does very little > > > > > > > > to insure that this commit gets refered to in release > > > > > > > > notes. > > > > > > > > > > > > > > > > What about we add RELNOTES.missed to the tree > > > > > > > > next to UPDATING, and when someone forgets to tag > > > > > > > > the Relnotes:yes into a commit you just follow up > > > > > > > > with a commit to that file, stating the svn revision > > > > > > > > which was missing the note and then we have a nice > > > > > > > > documented and clean way to extract the missing > > > > > > > > release note items, rather than trying to cull it > > > > > > > > from a thread in a mail list archive. > > > > > > > > > > > > > > > > The file would get truncated to 0 at appropriate > > > > > > > > times on various branches. > > > > > > > > > > > > > > > How about just RELNOTES. You put the revision that is > > > > > > > relevant and > > > a qui > > > > > > > > ck > > > > > > > > > > > > > > > > > > > > > > > > > blurb. That way we don't have to look in two places. All > > > > > > > release > > > notes g > > > > > > > > o > > > > > > > > > > > > > > > > > > > > > > > > > in here, no exceptions. You can retroactively tag them, or > > > > > > > you can > > > commi > > > > > > > > t > > > > > > > > > > > > > > > > > > > > > > > > > this as part of commit. > > > > My one concern is that if we remove the Relnotes: yes line > > > > from the commits then we may end up totally ignoring the > > > > need to put entries in RELNOTES, which unlike UPDATING > > > > do not have consequences if ignored. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I don't really know SVN, but there wouldn't be a chicken egg > > > > > > probem > > > durin > > > > > > > > g > > > > > > > > > > > > > > > > > commit time? I mean you would really know the SVN id. So you > > > > > > could > > > only a > > > > > > > > dd > > > > > > > > > > > > > > > > > a specific revision in a different commit to RELEASE file. > > > > > > > > > > > Generally, you can guess really well, and fix it in the case of > > > > > a lost > > > race > > > > > > > > > > > > > > easily. > > > > No reason to guess, if you add the RELNOTES change with the > > > > commit > > > > then it is the revision that added the RELNOTES entry, so a log > > > > view > > > > of RELNOTES would show you the revision.??If you do it after > > > > words > > > > or edit an existing entry in the RELNOTES file that is also > > > > fairly > > > > clear as that commit has no other files touched. > > > > > > > > > > > > > > > > > > > You'd add the release notes text in full to the file, with a > > > > > pointer > > > to the > > > > > > > > > > > > > > revision(s) for the feature. > > > > If you modify RELNOTES with the commit adding the feature we > > > > could easily use a pointer of "this commit", the svn version > > > > number > > > > of that added entry is self referencing to the actual change, > > > > which I actually rather like the idea of. > > > > > > > > > > > > > > > > > > > Warner > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Have a blurb at the top that tells people what > > > > > > > order to add them in, and you'd be set. We'd then retire > > > > > > > "relnotes: > > > yes" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > in > > > > > > > the commit message. This would also allow 'helpers' to > > > > > > > format the > > > RELNOT > > > > > > > > ES > > > > > > > > > > > > > > > > > > > > > > > > > file as we go rather than having to play 2 years of catch- > > > > > > > up at > > > major > > > > > > > > > > > > > > > > > > > > > > > > > > > > > branch times. > > > > Yes.??You could actually "delete" an entry from RELNOTES once a > > > > proper entry in the actual release notes had been created, such > > > > that RELNOTES is really a list of pending items. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Having it in the commit message just doesn't work, and this > > > > > > > is one > > > of ma > > > > > > > > ny > > > > > > > > > > > > > > > > > > > > > > > > > reasons: Cy forgot. Other times I'll do something and it's > > > > > > > only a > > > month > > > > > > > > > > > > > > > > > > > > > > > > > > > > > later I realize it needs to be in the release notes after > > > > > > > some > > > issue has > > > > > > > > > > > > > > > > > > > > > > > > > > > > > come up.... Other times I put relnotes: yes in only to > > > > > > > realize > > > that's my > > > > > > > > > > > > > > > > > > > > > > > > > > > > > vanity talking, and nobody else cares. > > > > I agree, what we have now works poorly. > > > Forgetting, yes, but also a hmmm moment. > > > > > > Initially my thinking was a file in doc/. Or maybe something like > > > the > > > vuxml port where we fill in the blanks and make validate to make > > > sure > > > all the i's are dotted and t's crossed. It's a little extra work > > > for > > > committers but would help re@ immensely, and get the details in > > > from > > > the get-go. > > > > > > > My thought was a low friction,??proximate way to do a ticker of important > > changes. Doc repo is too hard. Too much friction. A simple extra file puts > > it all in one, easy to find and edit place... it can cause other things to > > happen, further away. But it needs to be close by. > > > > I agree that a RELNOTES file as plain ascii text will be the easiest > thing for src committers to work with, and being easy will definitely > improve the odds of being updated. > > We have empirical data on src committers updating an xml file in the > docs repo, based on documenting version number bumps, and it all too > often doesn't happen, I think laregely because it's a big hassle and > it's out of sight in another repo. On this position I agree fully with Warner and Ian, simple and easy is very important here, and IMHO this RELNOTES file is a simple fix for the missing RelNotes: yes issue. It also allows the committer to actually say more than just "yes". Also note I do not think we would be requireing more than a simple "this should be mentioned in release notes", defanitly are not asking for publication ready notes, though those would be gladly accepted! Can I ask that the community now allows the RE@ team to discuss this internally and come back with a proposal? Feel free to continue discussing on this thread, I'll try to incorporate any items brought up into our discussion. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Dec 10 18:18:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24773132F426 for ; Mon, 10 Dec 2018 18:18:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5F80864E2 for ; Mon, 10 Dec 2018 18:18:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72a.google.com with SMTP id n12so7028012qkh.11 for ; Mon, 10 Dec 2018 10:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ptmy7aHQ3bHxuYQEeQ/tVXprBkrsRM5YZeLeXG0VTEQ=; b=12/CKoNyfEuUVsjavziGGn4MCy3lVn3F3cKVwr83iWG4yCPrQ6fwtZ2hFAqFUDecZc Jt/vMU4xWg76yiDjVnHKXCDCAZLS193eRESFiqAMe/OGnmBqLIZeoriH1AzG5MKSum69 iloen/ZmYdWIeQ42JbeGju4FkLj4M6FW/RhOqW6LfMcJapyHOS5A/h/f+nTvhgS3NmJp Z3kPaA2UkS5/S/0O0COBg27qkVuIpav10UkTddKHGu7hTsGPhdK2db0kyxNMAy80blcc 5H4y8EBOqXF3RWx0yLJk/S0CwfeUsYr/43Iqw1r8OmQain5r1Cz0IbWqLClV1iciwJa3 vd1g== 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=ptmy7aHQ3bHxuYQEeQ/tVXprBkrsRM5YZeLeXG0VTEQ=; b=GYfoxHGAhtAYo0r8UlGz/c5SaZ0W6z3o5PjlrHv4DkxkxEoWx1gNNDMy2IB04m4CnI zIccFVHAl8GgnKzirU8dDCgOGdXDVLIFgfQHy6s28jHT/u+D034Od2Xz1NMaSfIDe8Ex cEs66F9FeRuL/xkCmV7sLx1qrK6p3ivKZ5J6hatyIBYSY2K04LOGfui8TqYGV4ErlRJL eP1XUp9rFM0V1Oshf/29eDEwcfWHPZUETZbrOoso0w0vLEi+++/+gWixfbN/VxhPRrE/ HXBcjARsTn7VTz7oZ3ii3ReYq316x+oprw7q+y4mqA+ldW2eB5jNpjgWCdkicc8PDIs6 qM3A== X-Gm-Message-State: AA+aEWa+S7FA+wGxL5jeSuKDQpEbcymuQugqE7809f+po72YIRncT2O1 LFeKb6Mp3/ysz68MRlI/OxuziOfupFzbfLYgO7jQGw== X-Google-Smtp-Source: AFSGD/XesTZdatDMwPfJhihVIkdOnROIVjtvXQXq2X8E2Yh1gsij7KcXBZcoUBVcobVGMZCYWtaOWu/qge+NwwH4ark= X-Received: by 2002:a37:9201:: with SMTP id u1mr12312395qkd.258.1544465888029; Mon, 10 Dec 2018 10:18:08 -0800 (PST) MIME-Version: 1.0 References: <1544458929.1860.329.camel@freebsd.org> <201812101714.wBAHEX7G066677@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201812101714.wBAHEX7G066677@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Mon, 10 Dec 2018 11:17:56 -0700 Message-ID: Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: "Rodney W. Grimes" Cc: Ian Lepore , Cy Schubert , Oliver Pinter , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Cy Schubert X-Rspamd-Queue-Id: A5F80864E2 X-Spamd-Result: default: False [-5.42 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_IN_DNSWL_NONE(0.00)[a.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.44)[ip: (-9.31), ipnet: 2607:f8b0::/32(-1.50), asn: 15169(-1.28), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 18:18:10 -0000 On Mon, Dec 10, 2018 at 10:14 AM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Sun, 2018-12-09 at 23:47 -0700, Warner Losh wrote: > > > On Sun, Dec 9, 2018, 11:40 PM Cy Schubert > > wrote: > > > > > > > > > > > In message <201812100619.wBA6JB0c064609@pdx.rh.CN85.dnsmgr.net>, > > > > "Rodney W. Gri > > > > mes" writes: > > > > > > > > > > > > > > > > > On Sun, Dec 9, 2018 at 2:03 PM Oliver Pinter < > > > > oliver.pinter@hardenedbsd.org > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sunday, December 9, 2018, Warner Losh > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > On Sun, Dec 9, 2018 at 1:09 PM Rodney W. Grimes < > > > > > > > > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > In message <201812090645.wB96jnso066329@repo.freebsd.or > > > > > > > > > > g>, Cy > > > > > > > > Schubert > > > > > > > > > > > > > > > > > > > > > > > > > > > > > writes: > > > > > > > > > > > > > > > > > > > > > > Author: cy > > > > > > > > > > > Date: Sun Dec??9 06:45:49 2018 > > > > > > > > > > > New Revision: 341759 > > > > > > > > > > > URL: https://svnweb.freebsd.org/changeset/base/341759 > > > > > > > > > > > > > > > > > > > > > > Log: > > > > > > > > > > > ? MFV r341618: > > > > > > > > > > > > > > > > > > > > > > ? Update wpa 2.6 --> 2.7. > > > > > > > > > > Relnotes: yes > > > > > > > > > As an FYI, or maybe a new procedure, doing a reply to > > > > > > > > > a commit message adding relnotes: yes does very little > > > > > > > > > to insure that this commit gets refered to in release > > > > > > > > > notes. > > > > > > > > > > > > > > > > > > What about we add RELNOTES.missed to the tree > > > > > > > > > next to UPDATING, and when someone forgets to tag > > > > > > > > > the Relnotes:yes into a commit you just follow up > > > > > > > > > with a commit to that file, stating the svn revision > > > > > > > > > which was missing the note and then we have a nice > > > > > > > > > documented and clean way to extract the missing > > > > > > > > > release note items, rather than trying to cull it > > > > > > > > > from a thread in a mail list archive. > > > > > > > > > > > > > > > > > > The file would get truncated to 0 at appropriate > > > > > > > > > times on various branches. > > > > > > > > > > > > > > > > > How about just RELNOTES. You put the revision that is > > > > > > > > relevant and > > > > a qui > > > > > > > > > > ck > > > > > > > > > > > > > > > > > > > > > > > > > > > > > blurb. That way we don't have to look in two places. All > > > > > > > > release > > > > notes g > > > > > > > > > > o > > > > > > > > > > > > > > > > > > > > > > > > > > > > > in here, no exceptions. You can retroactively tag them, or > > > > > > > > you can > > > > commi > > > > > > > > > > t > > > > > > > > > > > > > > > > > > > > > > > > > > > > > this as part of commit. > > > > > My one concern is that if we remove the Relnotes: yes line > > > > > from the commits then we may end up totally ignoring the > > > > > need to put entries in RELNOTES, which unlike UPDATING > > > > > do not have consequences if ignored. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I don't really know SVN, but there wouldn't be a chicken egg > > > > > > > probem > > > > durin > > > > > > > > > > g > > > > > > > > > > > > > > > > > > > > commit time? I mean you would really know the SVN id. So you > > > > > > > could > > > > only a > > > > > > > > > > dd > > > > > > > > > > > > > > > > > > > > a specific revision in a different commit to RELEASE file. > > > > > > > > > > > > > Generally, you can guess really well, and fix it in the case of > > > > > > a lost > > > > race > > > > > > > > > > > > > > > > > easily. > > > > > No reason to guess, if you add the RELNOTES change with the > > > > > commit > > > > > then it is the revision that added the RELNOTES entry, so a log > > > > > view > > > > > of RELNOTES would show you the revision.??If you do it after > > > > > words > > > > > or edit an existing entry in the RELNOTES file that is also > > > > > fairly > > > > > clear as that commit has no other files touched. > > > > > > > > > > > > > > > > > > > > > > > You'd add the release notes text in full to the file, with a > > > > > > pointer > > > > to the > > > > > > > > > > > > > > > > > revision(s) for the feature. > > > > > If you modify RELNOTES with the commit adding the feature we > > > > > could easily use a pointer of "this commit", the svn version > > > > > number > > > > > of that added entry is self referencing to the actual change, > > > > > which I actually rather like the idea of. > > > > > > > > > > > > > > > > > > > > > > > Warner > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Have a blurb at the top that tells people what > > > > > > > > order to add them in, and you'd be set. We'd then retire > > > > > > > > "relnotes: > > > > yes" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > in > > > > > > > > the commit message. This would also allow 'helpers' to > > > > > > > > format the > > > > RELNOT > > > > > > > > > > ES > > > > > > > > > > > > > > > > > > > > > > > > > > > > > file as we go rather than having to play 2 years of catch- > > > > > > > > up at > > > > major > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > branch times. > > > > > Yes.??You could actually "delete" an entry from RELNOTES once a > > > > > proper entry in the actual release notes had been created, such > > > > > that RELNOTES is really a list of pending items. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Having it in the commit message just doesn't work, and this > > > > > > > > is one > > > > of ma > > > > > > > > > > ny > > > > > > > > > > > > > > > > > > > > > > > > > > > > > reasons: Cy forgot. Other times I'll do something and it's > > > > > > > > only a > > > > month > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > later I realize it needs to be in the release notes after > > > > > > > > some > > > > issue has > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > come up.... Other times I put relnotes: yes in only to > > > > > > > > realize > > > > that's my > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > vanity talking, and nobody else cares. > > > > > I agree, what we have now works poorly. > > > > Forgetting, yes, but also a hmmm moment. > > > > > > > > Initially my thinking was a file in doc/. Or maybe something like > > > > the > > > > vuxml port where we fill in the blanks and make validate to make > > > > sure > > > > all the i's are dotted and t's crossed. It's a little extra work > > > > for > > > > committers but would help re@ immensely, and get the details in > > > > from > > > > the get-go. > > > > > > > > > > My thought was a low friction,??proximate way to do a ticker of > important > > > changes. Doc repo is too hard. Too much friction. A simple extra file > puts > > > it all in one, easy to find and edit place... it can cause other > things to > > > happen, further away. But it needs to be close by. > > > > > > > I agree that a RELNOTES file as plain ascii text will be the easiest > > thing for src committers to work with, and being easy will definitely > > improve the odds of being updated. > > > > We have empirical data on src committers updating an xml file in the > > docs repo, based on documenting version number bumps, and it all too > > often doesn't happen, I think laregely because it's a big hassle and > > it's out of sight in another repo. > > On this position I agree fully with Warner and Ian, simple and easy > is very important here, and IMHO this RELNOTES file is a simple fix > for the missing RelNotes: yes issue. It also allows the committer > to actually say more than just "yes". > > Also note I do not think we would be requireing more than a simple > "this should be mentioned in release notes", defanitly are not asking > for publication ready notes, though those would be gladly accepted! > > Can I ask that the community now allows the RE@ team to discuss > this internally and come back with a proposal? Feel free to continue > discussing on this thread, I'll try to incorporate any items brought > up into our discussion. > I proposed a simple thing to make it easier to cope with oopses and other times developers want to help out. Having two methods to do this seems wrong to me, but if there's a reasonable workflow that has them in it that keeps the release note load current, I'd defer to that. Please include in your discussions who does what when with them after the developer tags a release note worthy item, and how the different worker bees know that an item has been dealt with (this piece is why I think Relnotes: yes in commits is doomed to fail: we'd need a parallel structure to track the ones that have been written up, while a single text file with the protocol developers add, doc/re removes when the release notes are moved into marked-up form seems to doom any tagging directly in the SVN commit log). Let's get SOMETHING where developers habitually tag things contemporaneously (or nearly so), then once we have the worry about ways to make it easier. It's all about reducing friction and producing better result (the project producing good release notes) than having some policy that's ideologically pure, but that doesn't fit our needs. Warner From owner-svn-src-all@freebsd.org Mon Dec 10 19:39:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 598ED13314CB; Mon, 10 Dec 2018 19:39:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F19836B9A9; Mon, 10 Dec 2018 19:39:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D215924436; Mon, 10 Dec 2018 19:39:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBAJdOU1016039; Mon, 10 Dec 2018 19:39:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBAJdOnm016038; Mon, 10 Dec 2018 19:39:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201812101939.wBAJdOnm016038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 10 Dec 2018 19:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341800 - in head: sys/kern tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: sys/kern tests/sys/kern X-SVN-Commit-Revision: 341800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F19836B9A9 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 19:39:25 -0000 Author: jhb Date: Mon Dec 10 19:39:24 2018 New Revision: 341800 URL: https://svnweb.freebsd.org/changeset/base/341800 Log: Don't report stale signal information for non-signal events in ptrace_lwpinfo. Once a signal's siginfo was copied to 'td_si' as part of the signal exchange in issignal(), it was never cleared. This caused future thread events that are reported as SIGTRAP events without signal information to report the stale siginfo in 'td_si'. For example, if a debugger created a new process and used SIGSTOP to stop it after PT_ATTACH, future system call entry / exit events would set PL_FLAG_SI with the SIGSTOP siginfo in pl_siginfo. This broke 'catch syscall' in current versions of gdb as it assumed PL_FLAG_SI with SIGTRAP indicates a breakpoint or single step trap. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18487 Modified: head/sys/kern/kern_sig.c head/tests/sys/kern/ptrace_test.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Dec 10 16:23:11 2018 (r341799) +++ head/sys/kern/kern_sig.c Mon Dec 10 19:39:24 2018 (r341800) @@ -2847,6 +2847,8 @@ issignal(struct thread *td) sig = ptracestop(td, sig, &ksi); mtx_lock(&ps->ps_mtx); + td->td_si.si_signo = 0; + /* * Keep looking if the debugger discarded or * replaced the signal. Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Mon Dec 10 16:23:11 2018 (r341799) +++ head/tests/sys/kern/ptrace_test.c Mon Dec 10 19:39:24 2018 (r341800) @@ -3772,6 +3772,78 @@ ATF_TC_BODY(ptrace__PT_CONTINUE_different_thread, tc) } #endif +/* + * Verify that PT_LWPINFO doesn't return stale siginfo. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_LWPINFO_stale_siginfo); +ATF_TC_BODY(ptrace__PT_LWPINFO_stale_siginfo, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + int events, status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + raise(SIGABRT); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The next stop should report the SIGABRT in the child body. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGABRT); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SI); + ATF_REQUIRE(pl.pl_siginfo.si_signo == SIGABRT); + + /* + * Continue the process ignoring the signal, but enabling + * syscall traps. + */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* + * The next stop should report a system call entry from + * exit(). PL_FLAGS_SI should not be set. + */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + ATF_REQUIRE((pl.pl_flags & PL_FLAG_SI) == 0); + + /* Disable syscall tracing and continue the child to let it exit. */ + ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, fpid, (caddr_t)&events, + sizeof(events)) == 0); + events &= ~PTRACE_SYSCALL; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, fpid, (caddr_t)&events, + sizeof(events)) == 0); + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The last event should be for the child process's exit. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + ATF_TP_ADD_TCS(tp) { @@ -3831,6 +3903,7 @@ ATF_TP_ADD_TCS(tp) #if defined(HAVE_BREAKPOINT) && defined(SKIP_BREAK) ATF_TP_ADD_TC(tp, ptrace__PT_CONTINUE_different_thread); #endif + ATF_TP_ADD_TC(tp, ptrace__PT_LWPINFO_stale_siginfo); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Mon Dec 10 21:33:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 229EC1334228; Mon, 10 Dec 2018 21:33:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD9C06FD39; Mon, 10 Dec 2018 21:33:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84AB225846; Mon, 10 Dec 2018 21:33:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBALX1jx079353; Mon, 10 Dec 2018 21:33:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBALX1So079352; Mon, 10 Dec 2018 21:33:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812102133.wBALX1So079352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Dec 2018 21:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341801 - head/sys/mips/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/mips/conf X-SVN-Commit-Revision: 341801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD9C06FD39 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 21:33:02 -0000 Author: imp Date: Mon Dec 10 21:33:01 2018 New Revision: 341801 URL: https://svnweb.freebsd.org/changeset/base/341801 Log: Remove stray hints files. Deleted: head/sys/mips/conf/ADM5120.hints head/sys/mips/conf/IDT.hints From owner-svn-src-all@freebsd.org Mon Dec 10 21:47:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FFF91334980; Mon, 10 Dec 2018 21:47:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFA46706BD; Mon, 10 Dec 2018 21:47:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90BC8259FB; Mon, 10 Dec 2018 21:47:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBALlJPw085284; Mon, 10 Dec 2018 21:47:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBALlJHg085283; Mon, 10 Dec 2018 21:47:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201812102147.wBALlJHg085283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 10 Dec 2018 21:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341802 - head/usr.bin/truss X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.bin/truss X-SVN-Commit-Revision: 341802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AFA46706BD X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 21:47:20 -0000 Author: jhb Date: Mon Dec 10 21:47:19 2018 New Revision: 341802 URL: https://svnweb.freebsd.org/changeset/base/341802 Log: Validate the string size parameter passed to -s. Use strtonum() to reject negative sizes instead of core dumping. PR: 232206 Submitted by: David Carlier MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D17537 Modified: head/usr.bin/truss/main.c Modified: head/usr.bin/truss/main.c ============================================================================== --- head/usr.bin/truss/main.c Mon Dec 10 21:33:01 2018 (r341801) +++ head/usr.bin/truss/main.c Mon Dec 10 21:47:19 2018 (r341802) @@ -71,6 +71,7 @@ main(int ac, char **av) struct trussinfo *trussinfo; char *fname; char **command; + const char *errstr; pid_t pid; int c; @@ -118,7 +119,9 @@ main(int ac, char **av) fname = optarg; break; case 's': /* Specified string size */ - trussinfo->strsize = atoi(optarg); + trussinfo->strsize = strtonum(optarg, 0, INT_MAX, &errstr); + if (errstr) + errx(1, "maximum string size is %s: %s", errstr, optarg); break; case 'S': /* Don't trace signals */ trussinfo->flags |= NOSIGS; From owner-svn-src-all@freebsd.org Mon Dec 10 22:15:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6672A13352DE; Mon, 10 Dec 2018 22:15:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1A0471625; Mon, 10 Dec 2018 22:15:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1B2CC10B754; Mon, 10 Dec 2018 17:15:21 -0500 (EST) Subject: Re: svn commit: r341682 - head/sys/sys To: Warner Losh , Kevin Bowling References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> Cc: Mateusz Guzik , Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= xsDiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg80eSm9obiBCYWxk d2luIDxqb2huQGJhbGR3aW4uY3g+wmMEExECACMCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX gAUCRND5wwIZAQAKCRBy3lIGd+N/BNLXAJ9KIb6teuDL1W+FkCgvv+y8PxKTkACeIUfbn3sl cueBzqTcf09idwa8YTbOwU0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Ds gnr31AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh +GojXlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cM SOrHYUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOF QVHOEVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq 1tqzhltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZ TwtXsNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m 7Z164yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioI AjjHaIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbU KWwxQ4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjH uW/CSQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZN wwCfafMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> Date: Mon, 10 Dec 2018 14:15:20 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 10 Dec 2018 17:15:21 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-Rspamd-Queue-Id: E1A0471625 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 22:15:23 -0000 On 12/8/18 7:43 PM, Warner Losh wrote: > > > On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling wrote: > > On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > wrote: > > > > > Fully satisfying solution would be that all architectures get 64-bit > > ops, even if in the worst case they end up taking a lock. Then > > subsystems would not have to ifdef on anything. However, there > > was some opposition to this proposal and I don't think this is > > important enough to push. > > Mateusz, > > Who is opposing this particular polyfill solution?  Scott Long brought > up a situation in driver development where this would be useful as > well.  The polyfills lower the cognitive load and #ifdef soup which > are the right call here regardless of performance on toy ports. > > > I don't recall seeing the opposition either. It would have to be a global lock for all 64bit atomics.... but I think it would only be 2 atomics on those architectures. It would have to be a spin lock, so in the case of unrl you would be trading an operation on one of N regular mutexes for a single spin lock that was also contested by other things. This would be pretty crappy. For drivers that aren't actually used on platforms without 32-bit atomics we can simply not build them in sys/modules/Makefile or not put them in GENERIC. For something in the core kernel like unrl I think we will have to do what Mateusz has done here. -- John Baldwin                                                                              From owner-svn-src-all@freebsd.org Mon Dec 10 23:48:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C07E51336A43; Mon, 10 Dec 2018 23:48:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4CEC74101; Mon, 10 Dec 2018 23:48:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wBANlsvg071368 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 11 Dec 2018 01:47:57 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wBANlsvg071368 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wBANlsrX071367; Tue, 11 Dec 2018 01:47:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 11 Dec 2018 01:47:54 +0200 From: Konstantin Belousov To: John Baldwin Cc: Warner Losh , Kevin Bowling , Mateusz Guzik , Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org Subject: Re: svn commit: r341682 - head/sys/sys Message-ID: <20181210234754.GD60291@kib.kiev.ua> References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> User-Agent: Mutt/1.11.1 (2018-12-01) X-Spam-Status: No, score=0.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM,FREEMAIL_REPLY, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: C4CEC74101 X-Spamd-Result: default: False [-4.92 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.78)[-0.781,0]; RCPT_COUNT_SEVEN(0.00)[9]; IP_SCORE(-2.13)[ip: (-2.65), ipnet: 2001:470::/32(-4.48), asn: 6939(-3.42), country: US(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 23:48:07 -0000 On Mon, Dec 10, 2018 at 02:15:20PM -0800, John Baldwin wrote: > On 12/8/18 7:43 PM, Warner Losh wrote: > > > > > > On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling wrote: > > > > On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > wrote: > > > > > > > > Fully satisfying solution would be that all architectures get 64-bit > > > ops, even if in the worst case they end up taking a lock. Then > > > subsystems would not have to ifdef on anything. However, there > > > was some opposition to this proposal and I don't think this is > > > important enough to push. > > > > Mateusz, > > > > Who is opposing this particular polyfill solution?  Scott Long brought > > up a situation in driver development where this would be useful as > > well.  The polyfills lower the cognitive load and #ifdef soup which > > are the right call here regardless of performance on toy ports. > > > > > > I don't recall seeing the opposition either. It would have to be a global lock for all 64bit atomics.... but I think it would only be 2 atomics on those architectures. > > It would have to be a spin lock, so in the case of unrl you would be trading > an operation on one of N regular mutexes for a single spin lock that was > also contested by other things. This would be pretty crappy. For drivers > that aren't actually used on platforms without 32-bit atomics we can simply > not build them in sys/modules/Makefile or not put them in GENERIC. For > something in the core kernel like unrl I think we will have to do what > Mateusz has done here. It is worse. All atomics that acess the same location must use the same lock. Otherwise, you could observe torn writes and out of thin air values. Since you cannot know in advance which locations are acceses by the locked variant, all freebsd atomics ops have to be switched to locked variant on the architecture. From owner-svn-src-all@freebsd.org Mon Dec 10 23:57:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C7C71336ECF for ; Mon, 10 Dec 2018 23:57:19 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5209B7479C for ; Mon, 10 Dec 2018 23:57:18 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1544486216; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=FMO3ce245ndXUueL0rdDBGQyBCnhZ3h9PjUfz+QdGddsFgmWwKAaDD/e0NDxNfvmh5nqcZJeR9oM3 xbBn0ceI8NH3254Beypg91MSvtARlCDhemoXnvoYHOXLH81+Fn/v7bTB7pTyl/FsxM9xDSGcGh3/3+ SwcLz4M78QMsCKZVfst1x7daJEETFZ+ExCljelsH02MvV4nPPsYumkdWrWCf32ugVQwkMiPK8wb9CY Cq0qwyCk8RNcIP6Q8tTWtVa8SUqjdWprud8Xa2ItwDJJ0kqwt9z4Wa6oNi2mZKvWYPGtyiAzVilwKo UgGCnfamC3a83n7wRZytg6snpzzXcvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=A2KBRWeNKlGo6BKsf/U4OL1ixl56MVn0A+CyT2Qcjn8=; b=mykP0CuNBqvYAuEkQMD2fzVHdG1gKOM0xCicpWxDs+1CeYmSujd3jfX73rKyoZxQx1jZEQ3/ZtJHb Iz/hbhJiXGv0XJwQ5EeUw+UG6FfI8ExZUzzqnb+xmu0S2H9FLaHuziOVlZGYxpCXgrGEfs0K5g30D4 kcKv3QTNRfjTF+cXRmE/Rmr8Lw4VipJsy98FQtIzO9sVNjRLEbUYbjbB+OsDR17GBnfX4DJVd/fWJW +IuITYrGVjNMSUHVyt+Ikq/3f1i0WvZ0owZx7JyJjwkA5v+WrWAXYp1cVjdymczbw06AfC1E2Ik+2j wSx90wpu6115AmXYupigiwC8yA+Lm1w== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=A2KBRWeNKlGo6BKsf/U4OL1ixl56MVn0A+CyT2Qcjn8=; b=PQJ45U5TEn4XbJODoPcBpf8rZoCqUbM0GS8Od6FSrBPR0b3t/oWCQ7nxohTy4TK+XlLwrnp/tnNuP mps11qRjFvAWZ2MUApAwvM5taP62tqSNdTlWFdlcBjSE7ioh1+atVvnm3o8/vuiC96WMT9t3mjY4Yp MDYO8NQp8vxZs4w2LYrYPz8lLPf+6qUy5fKHrnsXnbnSW72V5TEZGNVbqZLdna9qwP3yE1jBl8hrTQ sh8scH5/sWxDvc91HsmIKuVMwjf69B5SyYS1JbIYZip+mavoVb5j/w+1TQPVIo94vBOUKJXvMs0tO+ oqO4uyBaeXfxpNpQ6DsNSGgEzaxuW8g== X-MHO-RoutePath: aGlwcGll X-MHO-User: 44bae117-fcd7-11e8-a59a-7b143e15dabc X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 44bae117-fcd7-11e8-a59a-7b143e15dabc; Mon, 10 Dec 2018 23:56:54 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id wBANvDEK073321; Mon, 10 Dec 2018 16:57:13 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1544486233.1860.343.camel@freebsd.org> Subject: Re: svn commit: r341682 - head/sys/sys From: Ian Lepore To: John Baldwin , Warner Losh , Kevin Bowling Cc: Mateusz Guzik , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org Date: Mon, 10 Dec 2018 16:57:13 -0700 In-Reply-To: <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5209B7479C X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 23:57:19 -0000 On Mon, 2018-12-10 at 14:15 -0800, John Baldwin wrote: > On 12/8/18 7:43 PM, Warner Losh wrote: > > > > > > > > On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling > m wrote: > > > >     On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > m > wrote: > > > >     > > >     > Fully satisfying solution would be that all architectures get > > 64-bit > >     > ops, even if in the worst case they end up taking a lock. > > Then > >     > subsystems would not have to ifdef on anything. However, > > there > >     > was some opposition to this proposal and I don't think this > > is > >     > important enough to push. > > > >     Mateusz, > > > >     Who is opposing this particular polyfill solution?  Scott Long > > brought > >     up a situation in driver development where this would be useful > > as > >     well.  The polyfills lower the cognitive load and #ifdef soup > > which > >     are the right call here regardless of performance on toy ports. > > > > > > I don't recall seeing the opposition either. It would have to be a > > global lock for all 64bit atomics.... but I think it would only be > > 2 atomics on those architectures.  > It would have to be a spin lock, so in the case of unrl you would be > trading > an operation on one of N regular mutexes for a single spin lock that > was > also contested by other things.  This would be pretty crappy.  For > drivers > that aren't actually used on platforms without 32-bit atomics we can > simply > not build them in sys/modules/Makefile or not put them in > GENERIC.  For > something in the core kernel like unrl I think we will have to do > what > Mateusz has done here. > On a single-core system all you need to implement 64-bit atomics in the kernel is to disable interrupts around using normal load/store operations on the values. Do we have any platforms that are SMP but don't have hardware primitives for 64-bit atomics? -- Ian From owner-svn-src-all@freebsd.org Tue Dec 11 00:14:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF5151337681 for ; Tue, 11 Dec 2018 00:14:08 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-it1-x143.google.com (mail-it1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E721752FF for ; Tue, 11 Dec 2018 00:14:07 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-it1-x143.google.com with SMTP id x19so880858itl.1 for ; Mon, 10 Dec 2018 16:14:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wb0RP5ZsF2sDXJ0YfirrjzHS7A44BgChCT5qwoJsveA=; b=DmVN5NauGZ+jvqQraokql6PWxSnfw+wABn65ffl6MjB8mBe8+zFmpBtTasaMl6VA23 MKiBqNSRlFdbA3vDQoNGqJap7TlmpG9sC8pUvmGrHxraW5VCoB1JRW/qeSEK+fhEjqJo s5uV80nm2VxNPfL+cZp0BFm6O0l2TTT5bJPvg= 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=wb0RP5ZsF2sDXJ0YfirrjzHS7A44BgChCT5qwoJsveA=; b=tJNFAmANw/u5UZEatChlJ4+l3D1dZNjP/bRi0rrRTudY/HL6H0apEoqhuVPTUthU4g a1tsL90Ef2YpLMZKo1nCrfm/qs0E6EWND3isl22NqvSoKIvnIdAkoL2fkXStIdsAuO67 SvVNs8kqhEyy1CKmS/OEyKd/X0z+MsZ6CaLg0nIgFVZg4T0zAMSCqVzwyJyf+9rcbevs d7+ltRZ3FcecJ2RXto/ix+zhzD/viFqrNF8e0veRx0fo5ESF3IbRatSstuvCsc/ogbIm 9muJfXEE15tBh5VPt3fHxsABJ3qfVrYZVRjy7kMRYVJ0pnfdW+8bhYUd+GCq3PjI9CGe N2XQ== X-Gm-Message-State: AA+aEWa4QYfsqHDz+TVniOdkUxOHmi1Hwb49rNxjLGxMkWo78Jr26zW6 pM09vp7RZx5/ETKHmqmrktNirLNv6viBEA4Lh4Gbfg== X-Google-Smtp-Source: AFSGD/XGKZkwq7AB9MLWIJ7OpsScyZFhV1zdh3KI+gtCEKJfDeOXX12llskZ+NOreaoo52qkrajtQ3lNNPF8OGnRshE= X-Received: by 2002:a24:1152:: with SMTP id 79mr465294itf.167.1544487246869; Mon, 10 Dec 2018 16:14:06 -0800 (PST) MIME-Version: 1.0 References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <1544486233.1860.343.camel@freebsd.org> In-Reply-To: <1544486233.1860.343.camel@freebsd.org> From: Kevin Bowling Date: Mon, 10 Dec 2018 17:13:55 -0700 Message-ID: Subject: Re: svn commit: r341682 - head/sys/sys To: ian@freebsd.org Cc: John Baldwin , Warner Losh , mjguzik@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9E721752FF X-Spamd-Result: default: False [1.36 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_SPAM_SHORT(0.48)[0.478,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[kev009.com]; NEURAL_SPAM_MEDIUM(0.69)[0.688,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kev009.com:~]; MX_GOOD(-0.01)[alt1.aspmx.l.google.com,aspmx.l.google.com,aspmx2.googlemail.com,alt2.aspmx.l.google.com,aspmx3.googlemail.com]; RCVD_IN_DNSWL_NONE(0.00)[3.4.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCPT_COUNT_SEVEN(0.00)[8]; R_DKIM_PERMFAIL(0.00)[kev009.com]; NEURAL_SPAM_LONG(0.25)[0.252,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(0.25)[ip: (4.14), ipnet: 2607:f8b0::/32(-1.52), asn: 15169(-1.28), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 00:14:08 -0000 Right we are talking about a polyfill for systems that have 1-2 cores in practice. You're not going to crank high parallelism on these global locks in practice and the common lock may help performance due to cache residence for all we know. This is a lot of ballyhoo for a decision that should favor the reduction of complexity, clean KPIs, and overwhelming majority of machines that have 64b atomics, not scattering ifdefs in the code for niche performance. Regards, Kevin On Mon, Dec 10, 2018 at 4:57 PM Ian Lepore wrote: > > On Mon, 2018-12-10 at 14:15 -0800, John Baldwin wrote: > > On 12/8/18 7:43 PM, Warner Losh wrote: > > > > > > > > > > > > On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling > > m wrote: > > > > > > On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > > m > wrote: > > > > > > > > > > > Fully satisfying solution would be that all architectures get > > > 64-bit > > > > ops, even if in the worst case they end up taking a lock. > > > Then > > > > subsystems would not have to ifdef on anything. However, > > > there > > > > was some opposition to this proposal and I don't think this > > > is > > > > important enough to push. > > > > > > Mateusz, > > > > > > Who is opposing this particular polyfill solution? Scott Long > > > brought > > > up a situation in driver development where this would be useful > > > as > > > well. The polyfills lower the cognitive load and #ifdef soup > > > which > > > are the right call here regardless of performance on toy ports. > > > > > > > > > I don't recall seeing the opposition either. It would have to be a > > > global lock for all 64bit atomics.... but I think it would only be > > > 2 atomics on those architectures. > > It would have to be a spin lock, so in the case of unrl you would be > > trading > > an operation on one of N regular mutexes for a single spin lock that > > was > > also contested by other things. This would be pretty crappy. For > > drivers > > that aren't actually used on platforms without 32-bit atomics we can > > simply > > not build them in sys/modules/Makefile or not put them in > > GENERIC. For > > something in the core kernel like unrl I think we will have to do > > what > > Mateusz has done here. > > > > On a single-core system all you need to implement 64-bit atomics in the > kernel is to disable interrupts around using normal load/store > operations on the values. Do we have any platforms that are SMP but > don't have hardware primitives for 64-bit atomics? > > -- Ian From owner-svn-src-all@freebsd.org Tue Dec 11 00:27:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CED95130A262; Tue, 11 Dec 2018 00:27:10 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07A6E76171; Tue, 11 Dec 2018 00:27:10 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lj1-x232.google.com with SMTP id x85-v6so11385498ljb.2; Mon, 10 Dec 2018 16:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5RVQvlYek3anWZT3VhVLCbc/NTrPmPCDFQ4/2bWGbqk=; b=YkJRveHKWzX//juenbvzEJgPmCron7Z3i7GV30bV6bTibz98bxzgAC0DEHOe6f4xvD LZCvap7spjbI6VcizNz8ulqclxkkgWXscCZvMPLe7iOW3jkS/iiqsvfWvIiYdW3PcQNH BDuqRmZY3GQdqwQutbslOmKOV5DtjrNMWCSlJkO867VckFOvDe48JaQRRKHt3YRCZvxD j+jMwAsH3F9uIezD4UM73i4t6kB7bm9Yy9xsQgj2boaxUqgu8WBVUhCbEUh6z/UmOQon zQSI3HatvE/YUMjKLpjGGSTSf4tfVqqJOfoiE4XT2TRmXEzPdzchVfsPEpB4+jNxznr9 /ueg== 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=5RVQvlYek3anWZT3VhVLCbc/NTrPmPCDFQ4/2bWGbqk=; b=BtZEG2BSg/nAS9KbuaPQEF50e1fUAKul44gJVUMlf/mZwcb2KvAVratefXa3t8sKax OeH2f90HFOYnUVzD+Nw/J/faBMPacrHthXaWIS8mcB2rJawwpGRuR3lCDtuXNk2fe4Ai US007l84eZCf9QHNZUG+teCscyMtXJ4psSpZr4wliURYi6pJ6zf5exI5vAJDt62ruCN3 KUX3ltxs+Rl4dBn+qSTlcFEnx5RmRZX6uYOUlmVAb9fkIylv9HYSb6drADQg/wbbYNXz XLlQgtiQXoI+SxLb+Pny8FFeVW7uO9vJwy5yXC14ZZ3ivy5LKBum+g8zNoCY8KmcToc7 Csiw== X-Gm-Message-State: AA+aEWZzcyLfXMjDGoG33mOeBoIjvXaDh431TgJfU0VWeZ8sAi7CZhUl 4VkTfPuW/FdtAVo6wT6CqVqZmh0MBXS0nPNxjv0r5Q== X-Google-Smtp-Source: AFSGD/VGq3s1+YoPo7tqOfGtQ1MMdW/XxOsGMLlFc8xUHfSOtIGRPC8SGYwR4kpqBJhaPOlIkOMZp6ZicljZwHeJnEc= X-Received: by 2002:a2e:7d15:: with SMTP id y21-v6mr7161857ljc.77.1544488028244; Mon, 10 Dec 2018 16:27:08 -0800 (PST) MIME-Version: 1.0 References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <1544486233.1860.343.camel@freebsd.org> In-Reply-To: <1544486233.1860.343.camel@freebsd.org> From: Justin Hibbits Date: Mon, 10 Dec 2018 18:26:57 -0600 Message-ID: Subject: Re: svn commit: r341682 - head/sys/sys To: Ian Lepore Cc: John Baldwin , Warner Losh , Kevin Bowling , Mateusz Guzik , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org X-Rspamd-Queue-Id: 07A6E76171 X-Spamd-Result: default: False [-4.02 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; R_DKIM_ALLOW(-0.20)[gmail.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(-0.57)[ipnet: 2a00:1450::/32(-1.47), asn: 15169(-1.27), country: US(-0.09)]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCPT_COUNT_SEVEN(0.00)[9]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[2.3.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.46)[-0.455,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 00:27:11 -0000 On Mon, Dec 10, 2018, 17:57 Ian Lepore On Mon, 2018-12-10 at 14:15 -0800, John Baldwin wrote: > > On 12/8/18 7:43 PM, Warner Losh wrote: > > > > > > > > > > > > On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling > > m wrote: > > > > > > On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > > m > wrote: > > > > > > > > > > > Fully satisfying solution would be that all architectures get > > > 64-bit > > > > ops, even if in the worst case they end up taking a lock. > > > Then > > > > subsystems would not have to ifdef on anything. However, > > > there > > > > was some opposition to this proposal and I don't think this > > > is > > > > important enough to push. > > > > > > Mateusz, > > > > > > Who is opposing this particular polyfill solution? Scott Long > > > brought > > > up a situation in driver development where this would be useful > > > as > > > well. The polyfills lower the cognitive load and #ifdef soup > > > which > > > are the right call here regardless of performance on toy ports. > > > > > > > > > I don't recall seeing the opposition either. It would have to be a > > > global lock for all 64bit atomics.... but I think it would only be > > > 2 atomics on those architectures. > > It would have to be a spin lock, so in the case of unrl you would be > > trading > > an operation on one of N regular mutexes for a single spin lock that > > was > > also contested by other things. This would be pretty crappy. For > > drivers > > that aren't actually used on platforms without 32-bit atomics we can > > simply > > not build them in sys/modules/Makefile or not put them in > > GENERIC. For > > something in the core kernel like unrl I think we will have to do > > what > > Mateusz has done here. > > > > On a single-core system all you need to implement 64-bit atomics in the > kernel is to disable interrupts around using normal load/store > operations on the values. Do we have any platforms that are SMP but > don't have hardware primitives for 64-bit atomics? > > -- Ian > There were some dual processor G4 machines. I have one. It doesn't have 64 bit atomics. - Justin > From owner-svn-src-all@freebsd.org Tue Dec 11 00:55:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFC29130B220 for ; Tue, 11 Dec 2018 00:55:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C43877569 for ; Tue, 11 Dec 2018 00:55:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id r71so7665227qkr.10 for ; Mon, 10 Dec 2018 16:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z5GhONhV94FT63PmsOX4BMTG6qfiDfYxKLXvRQzNy2U=; b=yTluxTzEt/uloPOPV4Iw0Kvz6E4c2ZOIJCV63yGSdXcwUzrg8BdA0z9gElChHE3gp0 2YWOKJB4euE4qYP58YeryNTkzksLjxDqarshzDfbfNGNuqQohzE5ojSd6v2e/JkDkg+D sYl/ZPI3otcEHNc3/7+mkBqnY8QazKHL+wpos0poWWZ89er5X1DFg62Ojllk4W29UWtm vEXZZWZVg9MfFtCVLytEiz7NF/S6aCG6LZHVSUj6klVECeihn1meh8IaVBMRzXgm5jkv mFEvNVilRPV40hyRSg6nbmywSYigf12bn98U2RxQ18Yn5VDr8ULkCubgeizrTMXUp/Wc aObw== 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=Z5GhONhV94FT63PmsOX4BMTG6qfiDfYxKLXvRQzNy2U=; b=jPB1H4VqkE7BcpIbyfoywTZjxP95DMLynPdN3NM5JPh7cqYxKf2BLKWBZvx5nDz9Xd vtTbQ0o6OIt+TmHNOZGOT4WzhGOMLdWbugfaP9P/TuX9NpKX0wkQpIhWtUfC3fHckaYc uUJfJ6R6ZJPRC5aN/ZSWdD6hrKXZN9px9NRcnxIuwlJzj179kMD4/B5E+wRCc0VkdIAq u1INJ8ceESBbGpCSkQVXgILhYbCwhEw7eTm7O9ubCHoACfIvhKm4s4NUB48O7qtW4Zrd drBYySGJmN2i0aMF+cbHxlDm3twO8LdeNWgKb/k8UgDMvnTGy4RmFrXnpW46ATiI7W2A zOBQ== X-Gm-Message-State: AA+aEWa+3AZZsFxazwIjjasPIuigrMMEx+hbXP+//uMqbRKUmWiqkx2A odAh1NqNJNwWWkaRYWc30AlRqUezgOAOw23X86eJ7w== X-Google-Smtp-Source: AFSGD/X26JGPQTSvbaemE9VlLpCtO98WUwnky4GKxUMDKzDxz73/ny3BPbljfD4qEfo4++Y9wxFnAnPHd3PmkXLrC8k= X-Received: by 2002:a37:6c05:: with SMTP id h5mr13028212qkc.175.1544489715378; Mon, 10 Dec 2018 16:55:15 -0800 (PST) MIME-Version: 1.0 References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <1544486233.1860.343.camel@freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 10 Dec 2018 17:55:01 -0700 Message-ID: Subject: Re: svn commit: r341682 - head/sys/sys To: Justin Hibbits Cc: Ian Lepore , John Baldwin , Kevin Bowling , Mateusz Guzik , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org X-Rspamd-Queue-Id: 1C43877569 X-Spamd-Result: default: False [-4.73 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.91)[-0.906,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_IN_DNSWL_NONE(0.00)[1.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.81)[ip: (-6.18), ipnet: 2607:f8b0::/32(-1.52), asn: 15169(-1.27), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 00:55:17 -0000 On Mon, Dec 10, 2018, 5:27 PM Justin Hibbits > > On Mon, Dec 10, 2018, 17:57 Ian Lepore >> On Mon, 2018-12-10 at 14:15 -0800, John Baldwin wrote: >> > On 12/8/18 7:43 PM, Warner Losh wrote: >> > > >> > > >> > > >> > > On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling > > > m wrote: >> > > >> > > On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > > > m > wrote: >> > > >> > > > >> > > > Fully satisfying solution would be that all architectures get >> > > 64-bit >> > > > ops, even if in the worst case they end up taking a lock. >> > > Then >> > > > subsystems would not have to ifdef on anything. However, >> > > there >> > > > was some opposition to this proposal and I don't think this >> > > is >> > > > important enough to push. >> > > >> > > Mateusz, >> > > >> > > Who is opposing this particular polyfill solution? Scott Long >> > > brought >> > > up a situation in driver development where this would be useful >> > > as >> > > well. The polyfills lower the cognitive load and #ifdef soup >> > > which >> > > are the right call here regardless of performance on toy ports. >> > > >> > > >> > > I don't recall seeing the opposition either. It would have to be a >> > > global lock for all 64bit atomics.... but I think it would only be >> > > 2 atomics on those architectures. >> > It would have to be a spin lock, so in the case of unrl you would be >> > trading >> > an operation on one of N regular mutexes for a single spin lock that >> > was >> > also contested by other things. This would be pretty crappy. For >> > drivers >> > that aren't actually used on platforms without 32-bit atomics we can >> > simply >> > not build them in sys/modules/Makefile or not put them in >> > GENERIC. For >> > something in the core kernel like unrl I think we will have to do >> > what >> > Mateusz has done here. >> > >> >> On a single-core system all you need to implement 64-bit atomics in the >> kernel is to disable interrupts around using normal load/store >> operations on the values. Do we have any platforms that are SMP but >> don't have hardware primitives for 64-bit atomics? >> >> -- Ian >> > > There were some dual processor G4 machines. I have one. It doesn't have > 64 bit atomics. > There is a 32 bit mips machine like this as well. For drivers it's not too bad, but for core functions in the MI part of the kernel, all known implementations super duper suck. Warner > From owner-svn-src-all@freebsd.org Tue Dec 11 00:58:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 789CD130B3F4 for ; Tue, 11 Dec 2018 00:58:23 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4B6577902 for ; Tue, 11 Dec 2018 00:58:22 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-io1-xd41.google.com with SMTP id k7so10419630iob.6 for ; Mon, 10 Dec 2018 16:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8RPg+MrYZVuBBbyFjwSZ9Y2OH8NP5U0j4CpG9ScyM7o=; b=iGQH1QJrAGY/W2W7VKkEO9C280MHu9k6MnX6Z1nJduvSWYCpSFEOEoPDUCZ8s0dEnV 7P+gOmdBHCyPEOLI/p919cHoy1cqZ9/jaFu47WHhyEPqFRh6f+y2TvbGv72pzfYw4jfb 51K6U2fzJeCCIrTxhNqHm7QL1fYith+5ujags= 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=8RPg+MrYZVuBBbyFjwSZ9Y2OH8NP5U0j4CpG9ScyM7o=; b=PLKdWGB3JN1kYFnfgdG6Ngw8lztrG6agIR9d5bmd3UirX877k/vxVpeZq6xPCp8Kwe 0Z+sEg6dF1n7Bl9ROVygsSv7OareTajUEEhInNoaRNdng1q+FcHzpjAXisaLh0HVDF91 pe5M6s76m0jvX2cw+nOCOfQ71TqTdSmcl2+6T4Qpm7DJBc9hWcX/13n1DbEAZf8THpv+ IryNrhje2hQYGhgKJ3Go3ERkHdr/qpLKQqLFEOi6Uv5QtBr7V+5pN/hwGgHEkZH92GbI 9qclvRu02uIqyF4ZUEfBJE+ruAl3Nm94FzmPjtQS4lFx3+BpJajxXECvQLUXnaG5szoh hL0g== X-Gm-Message-State: AA+aEWZs7ABn6i7/qkTth2vhAC3woIAmzBzD2AVREnnaMMTzltU24qQ6 8xwQuD//th8e8LdZnE5y9n7VXGytCjMXRqHsvYsoFg== X-Google-Smtp-Source: AFSGD/WWC8UKjaEjmPZUq+bsxIEObABl3PF4lK/6IZ2gMwKzaa8vhtECpe/1bVF0sFFOVFoVjLQroLW1+5GI/4GjKDY= X-Received: by 2002:a5d:9654:: with SMTP id d20mr11691159ios.257.1544489902143; Mon, 10 Dec 2018 16:58:22 -0800 (PST) MIME-Version: 1.0 References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <1544486233.1860.343.camel@freebsd.org> In-Reply-To: From: Kevin Bowling Date: Mon, 10 Dec 2018 17:58:10 -0700 Message-ID: Subject: Re: svn commit: r341682 - head/sys/sys To: Justin Hibbits Cc: ian@freebsd.org, John Baldwin , Warner Losh , mjguzik@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: C4B6577902 X-Spamd-Result: default: False [0.95 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-0.05)[-0.054,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[kev009.com]; NEURAL_SPAM_MEDIUM(0.52)[0.515,0]; NEURAL_SPAM_SHORT(0.62)[0.615,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kev009.com:~]; MX_GOOD(-0.01)[cached: alt1.aspmx.l.google.com]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_IN_DNSWL_NONE(0.00)[1.4.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_DKIM_PERMFAIL(0.00)[kev009.com]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(0.18)[ip: (3.78), ipnet: 2607:f8b0::/32(-1.52), asn: 15169(-1.27), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 00:58:23 -0000 Humor me with a kernel feature that will sue 64b atomics while both instruction streams are ping ponging on the hypothetical lock because this thread is getting pretty far out there.. On Mon, Dec 10, 2018 at 5:27 PM Justin Hibbits wrote: > > > > On Mon, Dec 10, 2018, 17:57 Ian Lepore > >> On Mon, 2018-12-10 at 14:15 -0800, John Baldwin wrote: >> > On 12/8/18 7:43 PM, Warner Losh wrote: >> > > >> > > >> > > >> > > On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling > > > m wrote: >> > > >> > > On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > > > m > wrote: >> > > >> > > > >> > > > Fully satisfying solution would be that all architectures get >> > > 64-bit >> > > > ops, even if in the worst case they end up taking a lock. >> > > Then >> > > > subsystems would not have to ifdef on anything. However, >> > > there >> > > > was some opposition to this proposal and I don't think this >> > > is >> > > > important enough to push. >> > > >> > > Mateusz, >> > > >> > > Who is opposing this particular polyfill solution? Scott Long >> > > brought >> > > up a situation in driver development where this would be useful >> > > as >> > > well. The polyfills lower the cognitive load and #ifdef soup >> > > which >> > > are the right call here regardless of performance on toy ports. >> > > >> > > >> > > I don't recall seeing the opposition either. It would have to be a >> > > global lock for all 64bit atomics.... but I think it would only be >> > > 2 atomics on those architectures. >> > It would have to be a spin lock, so in the case of unrl you would be >> > trading >> > an operation on one of N regular mutexes for a single spin lock that >> > was >> > also contested by other things. This would be pretty crappy. For >> > drivers >> > that aren't actually used on platforms without 32-bit atomics we can >> > simply >> > not build them in sys/modules/Makefile or not put them in >> > GENERIC. For >> > something in the core kernel like unrl I think we will have to do >> > what >> > Mateusz has done here. >> > >> >> On a single-core system all you need to implement 64-bit atomics in the >> kernel is to disable interrupts around using normal load/store >> operations on the values. Do we have any platforms that are SMP but >> don't have hardware primitives for 64-bit atomics? >> >> -- Ian > > > There were some dual processor G4 machines. I have one. It doesn't have 64 bit atomics. > > - Justin From owner-svn-src-all@freebsd.org Tue Dec 11 01:38:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5ABA130FC32; Tue, 11 Dec 2018 01:38:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDB17A88C; Tue, 11 Dec 2018 01:38:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A791282AA; Tue, 11 Dec 2018 01:38:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB1cpfE006661; Tue, 11 Dec 2018 01:38:51 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB1cp1p006660; Tue, 11 Dec 2018 01:38:51 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201812110138.wBB1cp1p006660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 11 Dec 2018 01:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341803 - head/libexec/rc X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/libexec/rc X-SVN-Commit-Revision: 341803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5CDB17A88C X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 01:38:51 -0000 Author: cem Date: Tue Dec 11 01:38:50 2018 New Revision: 341803 URL: https://svnweb.freebsd.org/changeset/base/341803 Log: rc.subr: Implement list_vars without using 'read' 'read' pessimistically read(2)s one byte at a time, which can be quite silly for large environments in slow emulators. In my boring user environment, truss shows that the number of read() syscalls to source rc.subr and invoke list_vars is reduced by something like 3400 to 60. ministat(1) shows a significant time difference of about -71% for my environment. Suggested by: jilles Discussed with: dteske, jhb, jilles Differential Revision: https://reviews.freebsd.org/D18481 Modified: head/libexec/rc/rc.subr Modified: head/libexec/rc/rc.subr ============================================================================== --- head/libexec/rc/rc.subr Mon Dec 10 21:47:19 2018 (r341802) +++ head/libexec/rc/rc.subr Tue Dec 11 01:38:50 2018 (r341803) @@ -58,17 +58,29 @@ JID=0 # --------- # list_vars pattern -# List vars matching pattern. +# List variables matching glob pattern. # list_vars() { - set | { while read LINE; do - var="${LINE%%=*}" - case "$var" in - "$LINE"|*[!a-zA-Z0-9_]*) continue ;; - $1) echo $var + # Localize 'set' option below. + local - + local IFS=$'\n' line varname + + # Disable path expansion in unquoted 'for' parameters below. + set -o noglob + + for line in $(set); do + varname="${line%%=*}" + + case "$varname" in + "$line"|*[!a-zA-Z0-9_]*) + continue + ;; + $1) + echo $varname + ;; esac - done; } + done } # set_rcvar [var] [defval] [desc] From owner-svn-src-all@freebsd.org Tue Dec 11 01:49:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF45113104B2; Tue, 11 Dec 2018 01:49:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FC167AE96; Tue, 11 Dec 2018 01:49:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 605E62846E; Tue, 11 Dec 2018 01:49:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB1n7x6012086; Tue, 11 Dec 2018 01:49:07 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB1n7uu012085; Tue, 11 Dec 2018 01:49:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812110149.wBB1n7uu012085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 11 Dec 2018 01:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341804 - in stable: 10/contrib/ipfilter 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Commit-Revision: 341804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7FC167AE96 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 01:49:08 -0000 Author: cy Date: Tue Dec 11 01:49:06 2018 New Revision: 341804 URL: https://svnweb.freebsd.org/changeset/base/341804 Log: As part of the general cleanup of the ipfilter code, special cases are committed separately to document fixing them separately from the general cleanup. In this case we don't want to hide the utter brokenness of what is being fixed. Clean up a discombobulated block of #if's, with one block unreachable. ip_fil.c is used in ipftest which is used to dry-run test ipfilter rules in userspace without loading them in the kernel. The call to (*ifp->if_output) matches that in the FreeBSD kernel. Further testing and work will be required to make ipftest fully functional. Modified: stable/11/contrib/ipfilter/ip_fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/ip_fil.c stable/12/contrib/ipfilter/ip_fil.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/contrib/ipfilter/ip_fil.c ============================================================================== --- stable/11/contrib/ipfilter/ip_fil.c Tue Dec 11 01:38:50 2018 (r341803) +++ stable/11/contrib/ipfilter/ip_fil.c Tue Dec 11 01:49:06 2018 (r341804) @@ -482,14 +482,7 @@ ipf_fastroute(m, mpp, fin, fdp) m->mb_ifp = ifp; printpacket(fin->fin_out, m); -#if defined(__sgi) && (IRIX < 60500) - (*ifp->if_output)(ifp, (void *)ip, NULL); -# if TRU64 >= 1885 - (*ifp->if_output)(ifp, (void *)m, NULL, 0, 0); -# else (*ifp->if_output)(ifp, (void *)m, NULL, 0); -# endif -#endif done: fin->fin_ifp = sifp; fin->fin_out = sout; From owner-svn-src-all@freebsd.org Tue Dec 11 01:49:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AA5C13104B7; Tue, 11 Dec 2018 01:49:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D455E7AE97; Tue, 11 Dec 2018 01:49:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4D502846F; Tue, 11 Dec 2018 01:49:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB1n7qQ012092; Tue, 11 Dec 2018 01:49:07 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB1n7BU012091; Tue, 11 Dec 2018 01:49:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812110149.wBB1n7BU012091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 11 Dec 2018 01:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341804 - in stable: 10/contrib/ipfilter 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Commit-Revision: 341804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D455E7AE97 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.997,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 01:49:08 -0000 Author: cy Date: Tue Dec 11 01:49:06 2018 New Revision: 341804 URL: https://svnweb.freebsd.org/changeset/base/341804 Log: As part of the general cleanup of the ipfilter code, special cases are committed separately to document fixing them separately from the general cleanup. In this case we don't want to hide the utter brokenness of what is being fixed. Clean up a discombobulated block of #if's, with one block unreachable. ip_fil.c is used in ipftest which is used to dry-run test ipfilter rules in userspace without loading them in the kernel. The call to (*ifp->if_output) matches that in the FreeBSD kernel. Further testing and work will be required to make ipftest fully functional. Modified: stable/12/contrib/ipfilter/ip_fil.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/ip_fil.c stable/11/contrib/ipfilter/ip_fil.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/contrib/ipfilter/ip_fil.c ============================================================================== --- stable/12/contrib/ipfilter/ip_fil.c Tue Dec 11 01:38:50 2018 (r341803) +++ stable/12/contrib/ipfilter/ip_fil.c Tue Dec 11 01:49:06 2018 (r341804) @@ -482,14 +482,7 @@ ipf_fastroute(m, mpp, fin, fdp) m->mb_ifp = ifp; printpacket(fin->fin_out, m); -#if defined(__sgi) && (IRIX < 60500) - (*ifp->if_output)(ifp, (void *)ip, NULL); -# if TRU64 >= 1885 - (*ifp->if_output)(ifp, (void *)m, NULL, 0, 0); -# else (*ifp->if_output)(ifp, (void *)m, NULL, 0); -# endif -#endif done: fin->fin_ifp = sifp; fin->fin_out = sout; From owner-svn-src-all@freebsd.org Tue Dec 11 01:49:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E80C13104C0; Tue, 11 Dec 2018 01:49:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 332B37AE98; Tue, 11 Dec 2018 01:49:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1403A28470; Tue, 11 Dec 2018 01:49:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB1n76g012098; Tue, 11 Dec 2018 01:49:07 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB1n7QD012097; Tue, 11 Dec 2018 01:49:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812110149.wBB1n7QD012097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 11 Dec 2018 01:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r341804 - in stable: 10/contrib/ipfilter 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Commit-Revision: 341804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 332B37AE98 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.997,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 01:49:08 -0000 Author: cy Date: Tue Dec 11 01:49:06 2018 New Revision: 341804 URL: https://svnweb.freebsd.org/changeset/base/341804 Log: As part of the general cleanup of the ipfilter code, special cases are committed separately to document fixing them separately from the general cleanup. In this case we don't want to hide the utter brokenness of what is being fixed. Clean up a discombobulated block of #if's, with one block unreachable. ip_fil.c is used in ipftest which is used to dry-run test ipfilter rules in userspace without loading them in the kernel. The call to (*ifp->if_output) matches that in the FreeBSD kernel. Further testing and work will be required to make ipftest fully functional. Modified: stable/10/contrib/ipfilter/ip_fil.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/ip_fil.c stable/12/contrib/ipfilter/ip_fil.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/contrib/ipfilter/ip_fil.c ============================================================================== --- stable/10/contrib/ipfilter/ip_fil.c Tue Dec 11 01:38:50 2018 (r341803) +++ stable/10/contrib/ipfilter/ip_fil.c Tue Dec 11 01:49:06 2018 (r341804) @@ -479,14 +479,7 @@ ipf_fastroute(m, mpp, fin, fdp) m->mb_ifp = ifp; printpacket(fin->fin_out, m); -#if defined(__sgi) && (IRIX < 60500) - (*ifp->if_output)(ifp, (void *)ip, NULL); -# if TRU64 >= 1885 - (*ifp->if_output)(ifp, (void *)m, NULL, 0, 0); -# else (*ifp->if_output)(ifp, (void *)m, NULL, 0); -# endif -#endif done: fin->fin_ifp = sifp; fin->fin_out = sout; From owner-svn-src-all@freebsd.org Tue Dec 11 02:03:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AA2E1311304; Tue, 11 Dec 2018 02:03:01 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F18687BBB3; Tue, 11 Dec 2018 02:03:00 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D269528818; Tue, 11 Dec 2018 02:03:00 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB230hB021828; Tue, 11 Dec 2018 02:03:00 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB230Mo021827; Tue, 11 Dec 2018 02:03:00 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812110203.wBB230Mo021827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 11 Dec 2018 02:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341805 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 341805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F18687BBB3 X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 02:03:01 -0000 Author: jhibbits Date: Tue Dec 11 02:03:00 2018 New Revision: 341805 URL: https://svnweb.freebsd.org/changeset/base/341805 Log: powerpc/booke: Don't get and use the load offset for TOC on APs The code was a near exact copy of the code in startup, but it doesn't need the complexity since the kernel is already relocated. With VM_MIN_KERNEL_ADDRESS as currently set to KERNBASE, this doesn't cause a problem, because it's a zero offset. However, when KERNBASE is changed to a physical load address, it then has a non-zero offset, and ends up with an invalid stack pointer, causing the AP to hang. Modified: head/sys/powerpc/booke/locore.S Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Tue Dec 11 01:49:06 2018 (r341804) +++ head/sys/powerpc/booke/locore.S Tue Dec 11 02:03:00 2018 (r341805) @@ -549,14 +549,9 @@ bp_kernload: add %r2,%r1,%r2 mtspr SPR_SPRG8, %r2 - /* Get load offset */ - ld %r31,-0x8000(%r2) /* First TOC entry is TOC base */ - subf %r31,%r31,%r2 /* Subtract from real TOC base to get base */ - /* Set up the stack pointer */ ld %r1,TOC_REF(tmpstack)(%r2) addi %r1,%r1,TMPSTACKSZ-96 - add %r1,%r1,%r31 #else /* * Setup a temporary stack From owner-svn-src-all@freebsd.org Tue Dec 11 02:14:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB95A1311F3D; Tue, 11 Dec 2018 02:14:41 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5101B7C40C; Tue, 11 Dec 2018 02:14:41 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32CF428A13; Tue, 11 Dec 2018 02:14:41 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB2EfvC027073; Tue, 11 Dec 2018 02:14:41 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB2EeYl027070; Tue, 11 Dec 2018 02:14:40 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201812110214.wBB2EeYl027070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Tue, 11 Dec 2018 02:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341806 - head/share/vt/keymaps X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/share/vt/keymaps X-SVN-Commit-Revision: 341806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5101B7C40C X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 02:14:41 -0000 Author: dab Date: Tue Dec 11 02:14:40 2018 New Revision: 341806 URL: https://svnweb.freebsd.org/changeset/base/341806 Log: Add uk.macbook.kbd keymap (vt) PR: 215185 Submitted by: James Wright Reported by: James Wright Reviewed by: emaste (earlier version) MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D18395 Added: head/share/vt/keymaps/uk.macbook.kbd (contents, props changed) Modified: head/share/vt/keymaps/INDEX.keymaps head/share/vt/keymaps/Makefile Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Tue Dec 11 02:03:00 2018 (r341805) +++ head/share/vt/keymaps/INDEX.keymaps Tue Dec 11 02:14:40 2018 (r341806) @@ -520,6 +520,12 @@ uk.dvorak.kbd:fr:Royaume Uni Dvorak uk.dvorak.kbd:pt:Reino Unido Dvorak uk.dvorak.kbd:es:Británico Dvorak +uk.macbook.kbd:en:United Kingdom Macbook +uk.macbook.kbd:de:Vereinigtes Königreich Macbook +uk.macbook.kbd:fr:Royaume Uni Macbook +uk.macbook.kbd:pt:Reino Unido Macbook +uk.macbook.kbd:es:Británico Macbook + us.kbd:en:United States of America us.kbd:de:US-amerikanisch us.kbd:fr:États Unis d'Amérique Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Tue Dec 11 02:03:00 2018 (r341805) +++ head/share/vt/keymaps/Makefile Tue Dec 11 02:14:40 2018 (r341806) @@ -74,6 +74,7 @@ FILES= INDEX.keymaps \ uk.capsctrl.kbd \ uk.dvorak.kbd \ uk.kbd \ + uk.macbook.kbd \ us.acc.kbd \ us.ctrl.kbd \ us.dvorak.kbd \ Added: head/share/vt/keymaps/uk.macbook.kbd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/uk.macbook.kbd Tue Dec 11 02:14:40 2018 (r341806) @@ -0,0 +1,115 @@ +# $FreeBSD$ +# by James Wright +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '1' '!' nop nop O + 003 '2' '@' nul nul 0x20ac '@' nul nul O + 004 '3' 0xa3 nop nop '#' 0xa3 nop nop O + 005 '4' '$' nop nop '4' '$' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '^' rs rs '6' '^' rs rs O + 008 '7' '&' nop nop '7' '&' nop nop O + 009 '8' '*' nop nop '8' '*' nop nop O + 010 '9' '(' nop nop '9' '(' nop nop O + 011 '0' ')' nop nop '0' ')' nop nop O + 012 '-' '_' us us '-' '_' us us O + 013 '=' '+' nop nop '=' '+' nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'e' 'E' enq enq 'e' 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 'y' 'Y' em em C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 '[' '{' esc esc '[' '{' esc esc O + 027 ']' '}' gs gs ']' '}' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 ';' ':' nop nop ';' ':' nop nop O + 040 ''' '"' nop nop ''' '"' nop nop O + 041 0xa7 0xb1 nop nop 0xa7 0xb1 nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '\' '|' fs fs '\' '|' fs fs O + 044 'z' 'Z' sub sub 'z' 'Z' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 ',' '<' nop nop ',' '<' nop nop O + 052 '.' '>' nop nop '.' '>' nop nop O + 053 '/' '?' nop nop '/' '?' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '`' '~' nop nop '`' '~' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O From owner-svn-src-all@freebsd.org Tue Dec 11 02:15:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26EB2131210E; Tue, 11 Dec 2018 02:15:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF417C61B; Tue, 11 Dec 2018 02:15:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 712EA28A2D; Tue, 11 Dec 2018 02:15:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB2Fu3C027186; Tue, 11 Dec 2018 02:15:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB2FuLP027185; Tue, 11 Dec 2018 02:15:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812110215.wBB2FuLP027185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Dec 2018 02:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341807 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 341807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8EF417C61B X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 02:15:57 -0000 Author: markj Date: Tue Dec 11 02:15:56 2018 New Revision: 341807 URL: https://svnweb.freebsd.org/changeset/base/341807 Log: Use inline tests for individual PTE bits in the RISC-V pmap. Inline tests for PTE_* bits are easy to read and don't really require a predicate function, and predicates which operate on a pt_entry_t are inconvenient when working with L1 and L2 page table entries. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18461 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Tue Dec 11 02:14:40 2018 (r341806) +++ head/sys/riscv/riscv/pmap.c Tue Dec 11 02:15:56 2018 (r341807) @@ -356,36 +356,6 @@ pmap_l3(pmap_t pmap, vm_offset_t va) return (pmap_l2_to_l3(l2, va)); } - -static __inline int -pmap_is_write(pt_entry_t entry) -{ - - return (entry & PTE_W); -} - -static __inline int -pmap_l3_valid(pt_entry_t l3) -{ - - return (l3 & PTE_V); -} - -static inline int -pmap_page_accessed(pt_entry_t pte) -{ - - return (pte & PTE_A); -} - -/* Checks if the page is dirty. */ -static inline int -pmap_page_dirty(pt_entry_t pte) -{ - - return (pte & PTE_D); -} - static __inline void pmap_resident_count_inc(pmap_t pmap, int count) { @@ -898,7 +868,7 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ retry: l3p = pmap_l3(pmap, va); if (l3p != NULL && (l3 = pmap_load(l3p)) != 0) { - if ((pmap_is_write(l3)) || ((prot & VM_PROT_WRITE) == 0)) { + if ((l3 & PTE_W) != 0 || (prot & VM_PROT_WRITE) == 0) { phys = PTE_TO_PHYS(l3); if (vm_page_pa_tryrelock(pmap, phys, &pa)) goto retry; @@ -1777,7 +1747,7 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_ if (old_l3 & PTE_SW_MANAGED) { phys = PTE_TO_PHYS(old_l3); m = PHYS_TO_VM_PAGE(phys); - if (pmap_page_dirty(old_l3)) + if ((old_l3 & PTE_D) != 0) vm_page_dirty(m); if (old_l3 & PTE_A) vm_page_aflag_set(m, PGA_REFERENCED); @@ -1935,7 +1905,7 @@ pmap_remove_all(vm_page_t m) /* * Update the vm_page_t clean and reference bits. */ - if (pmap_page_dirty(tl3)) + if ((tl3 & PTE_D) != 0) vm_page_dirty(m); pmap_unuse_l3(pmap, pv->pv_va, pmap_load(l2), &free); TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); @@ -1997,9 +1967,9 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t for (l3p = pmap_l2_to_l3(l2, sva); sva != va_next; l3p++, sva += L3_SIZE) { l3 = pmap_load(l3p); - if (pmap_l3_valid(l3)) { + if ((l3 & PTE_V) != 0) { entry = pmap_load(l3p); - entry &= ~(PTE_W); + entry &= ~PTE_W; pmap_load_store(l3p, entry); /* XXX: Use pmap_invalidate_range */ pmap_invalidate_page(pmap, sva); @@ -2186,7 +2156,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v /* * Is the specified virtual address already mapped? */ - if (pmap_l3_valid(orig_l3)) { + if ((orig_l3 & PTE_V) != 0) { /* * Wiring change, just update stats. We don't worry about * wiring PT pages as they remain resident as long as there @@ -2217,10 +2187,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v /* * No, might be a protection or wiring change. */ - if ((orig_l3 & PTE_SW_MANAGED) != 0) { - if (pmap_is_write(new_l3)) - vm_page_aflag_set(m, PGA_WRITEABLE); - } + if ((orig_l3 & PTE_SW_MANAGED) != 0 && + (new_l3 & PTE_W) != 0) + vm_page_aflag_set(m, PGA_WRITEABLE); goto validate; } @@ -2245,7 +2214,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v * concurrent calls to pmap_page_test_mappings() and * pmap_ts_referenced(). */ - if (pmap_page_dirty(orig_l3)) + if ((orig_l3 & PTE_D) != 0) vm_page_dirty(om); if ((orig_l3 & PTE_A) != 0) vm_page_aflag_set(om, PGA_REFERENCED); @@ -2278,7 +2247,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, pa); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); m->md.pv_gen++; - if (pmap_is_write(new_l3)) + if ((new_l3 & PTE_W) != 0) vm_page_aflag_set(m, PGA_WRITEABLE); } @@ -2298,8 +2267,8 @@ validate: pmap_invalidate_page(pmap, va); KASSERT(PTE_TO_PHYS(orig_l3) == pa, ("pmap_enter: invalid update")); - if (pmap_page_dirty(orig_l3) && - (orig_l3 & PTE_SW_MANAGED) != 0) + if ((orig_l3 & (PTE_D | PTE_SW_MANAGED)) == + (PTE_D | PTE_SW_MANAGED)) vm_page_dirty(m); } else { pmap_load_store(l3, new_l3); @@ -2840,7 +2809,7 @@ pmap_remove_pages(pmap_t pmap) /* * Update the vm_page_t clean/reference bits. */ - if (pmap_page_dirty(tl3)) + if ((tl3 & PTE_D) != 0) vm_page_dirty(m); CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m); @@ -3044,11 +3013,11 @@ retry_pv_loop: retry: oldl3 = pmap_load(l3); - if (pmap_is_write(oldl3)) { - newl3 = oldl3 & ~(PTE_W); + if ((oldl3 & PTE_W) != 0) { + newl3 = oldl3 & ~PTE_W; if (!atomic_cmpset_long(l3, oldl3, newl3)) goto retry; - /* TODO: use pmap_page_dirty(oldl3) ? */ + /* TODO: check for PTE_D? */ if ((oldl3 & PTE_A) != 0) vm_page_dirty(m); pmap_invalidate_page(pmap, pv->pv_va); @@ -3129,7 +3098,7 @@ retry: l3 = pmap_l2_to_l3(l2, pv->pv_va); old_l3 = pmap_load(l3); - if (pmap_page_dirty(old_l3)) + if ((old_l3 & PTE_D) != 0) vm_page_dirty(m); if ((old_l3 & PTE_A) != 0) { if (safe_to_clear_referenced(pmap, old_l3)) { @@ -3271,9 +3240,9 @@ retry: val = MINCORE_INCORE; } - if (pmap_page_dirty(tpte)) + if ((tpte & PTE_D) != 0) val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; - if (pmap_page_accessed(tpte)) + if ((tpte & PTE_A) != 0) val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER; managed = (tpte & PTE_SW_MANAGED) == PTE_SW_MANAGED; } From owner-svn-src-all@freebsd.org Tue Dec 11 02:16:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A45C713121B4; Tue, 11 Dec 2018 02:16:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0807C777; Tue, 11 Dec 2018 02:16:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C35D28A33; Tue, 11 Dec 2018 02:16:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB2GSmZ027259; Tue, 11 Dec 2018 02:16:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB2GSbD027258; Tue, 11 Dec 2018 02:16:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812110216.wBB2GSbD027258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Dec 2018 02:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341808 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 341808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4B0807C777 X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 02:16:28 -0000 Author: markj Date: Tue Dec 11 02:16:27 2018 New Revision: 341808 URL: https://svnweb.freebsd.org/changeset/base/341808 Log: Remove an unused malloc(9) type. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Tue Dec 11 02:15:56 2018 (r341807) +++ head/sys/riscv/riscv/pmap.c Tue Dec 11 02:16:27 2018 (r341808) @@ -213,8 +213,6 @@ __FBSDID("$FreeBSD$"); LIST_HEAD(pmaplist, pmap); static struct pmaplist allpmaps; -static MALLOC_DEFINE(M_VMPMAP, "pmap", "PMAP L1"); - struct pmap kernel_pmap_store; vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ From owner-svn-src-all@freebsd.org Tue Dec 11 02:48:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66406131427A; Tue, 11 Dec 2018 02:48:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C1547DCD1; Tue, 11 Dec 2018 02:48:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF6E828FC7; Tue, 11 Dec 2018 02:48:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB2mnir043032; Tue, 11 Dec 2018 02:48:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB2mnEL043030; Tue, 11 Dec 2018 02:48:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812110248.wBB2mnEL043030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Dec 2018 02:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341809 - in head: lib/libc/sys sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: lib/libc/sys sys/kern X-SVN-Commit-Revision: 341809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0C1547DCD1 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 02:48:50 -0000 Author: kib Date: Tue Dec 11 02:48:49 2018 New Revision: 341809 URL: https://svnweb.freebsd.org/changeset/base/341809 Log: Remove special case handling for getfhat(fd, NULL, handle). There is no reason for it to behave differently from openat(fd, NULL). Also the handling did not worked because the substituted path was from the system address space, causing EFAULT. Submitted by: Jack Halford MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18501 Modified: head/lib/libc/sys/getfh.2 head/sys/kern/vfs_syscalls.c Modified: head/lib/libc/sys/getfh.2 ============================================================================== --- head/lib/libc/sys/getfh.2 Tue Dec 11 02:16:27 2018 (r341808) +++ head/lib/libc/sys/getfh.2 Tue Dec 11 02:48:49 2018 (r341809) @@ -29,7 +29,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 7, 2018 +.Dd December 11, 2018 .Dt GETFH 2 .Os .Sh NAME @@ -76,12 +76,12 @@ and .Fn lgetfh except when the .Fa path -specifies a relative or NULL path, or the +specifies a relative path, or the .Dv AT_BENEATH flag is provided. For .Fn getfhat -and relative or NULL +and relative .Fa path , the status is retrieved from a file relative to the directory associated with the file descriptor Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Dec 11 02:16:27 2018 (r341808) +++ head/sys/kern/vfs_syscalls.c Tue Dec 11 02:48:49 2018 (r341809) @@ -4196,8 +4196,8 @@ sys_getfhat(struct thread *td, struct getfhat_args *ua if ((uap->flags & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) return (EINVAL); - return (kern_getfhat(td, uap->flags, uap->fd, uap->path ? uap->path : ".", - UIO_USERSPACE, uap->fhp)); + return (kern_getfhat(td, uap->flags, uap->fd, uap->path, UIO_USERSPACE, + uap->fhp)); } static int From owner-svn-src-all@freebsd.org Tue Dec 11 02:54:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E36CF13147FA; Tue, 11 Dec 2018 02:54:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 834FA7E244; Tue, 11 Dec 2018 02:54:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C95A29196; Tue, 11 Dec 2018 02:54:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB2sbDZ047793; Tue, 11 Dec 2018 02:54:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB2sa1P047791; Tue, 11 Dec 2018 02:54:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812110254.wBB2sa1P047791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Dec 2018 02:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341810 - in head/sys: kern x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern x86/x86 X-SVN-Commit-Revision: 341810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 834FA7E244 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 02:54:38 -0000 Author: kib Date: Tue Dec 11 02:54:36 2018 New Revision: 341810 URL: https://svnweb.freebsd.org/changeset/base/341810 Log: Free bootstacks after AP startup. Bootstacks are unused after APs executed sched_throw() in init_secondary_tail() and started executing on proper idle thread stack. Add sysinit that detects that the idle thread for each CPU was scheduled at least once, and free corresponding bootstack. Slight addition of the code (~200 bytes) is compensated by the saving, because even on typical small modern desktop CPU we leak 128K of memory otherwise (4 pages x 8 threads). Reviewed by: jhb MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18486 Modified: head/sys/kern/kern_thread.c head/sys/x86/x86/mp_x86.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Dec 11 02:48:49 2018 (r341809) +++ head/sys/kern/kern_thread.c Tue Dec 11 02:54:36 2018 (r341810) @@ -197,7 +197,7 @@ thread_ctor(void *mem, int size, void *arg, int flags) td = (struct thread *)mem; td->td_state = TDS_INACTIVE; - td->td_oncpu = NOCPU; + td->td_lastcpu = td->td_oncpu = NOCPU; td->td_tid = tid_alloc(); Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Tue Dec 11 02:48:49 2018 (r341809) +++ head/sys/x86/x86/mp_x86.c Tue Dec 11 02:54:36 2018 (r341810) @@ -1071,9 +1071,23 @@ init_secondary_tail(void) /* NOTREACHED */ } -/******************************************************************* - * local functions and data - */ +static void +smp_after_idle_runnable(void *arg __unused) +{ + struct thread *idle_td; + int cpu; + + for (cpu = 1; cpu < mp_ncpus; cpu++) { + idle_td = pcpu_find(cpu)->pc_idlethread; + while (idle_td->td_lastcpu == NOCPU && + idle_td->td_oncpu == NOCPU) + cpu_spinwait(); + kmem_free((vm_offset_t)bootstacks[cpu], kstack_pages * + PAGE_SIZE); + } +} +SYSINIT(smp_after_idle_runnable, SI_SUB_SMP, SI_ORDER_ANY, + smp_after_idle_runnable, NULL); /* * We tell the I/O APIC code about all the CPUs we want to receive From owner-svn-src-all@freebsd.org Tue Dec 11 05:10:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7DB0131A4CE; Tue, 11 Dec 2018 05:10:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC7C83752; Tue, 11 Dec 2018 05:10:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D89A2AD61; Tue, 11 Dec 2018 05:10:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB5AN9Y016033; Tue, 11 Dec 2018 05:10:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB5ANTM016032; Tue, 11 Dec 2018 05:10:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201812110510.wBB5ANTM016032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 11 Dec 2018 05:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341811 - head/sys/dev/ahci X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/dev/ahci X-SVN-Commit-Revision: 341811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6CC7C83752 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 05:10:24 -0000 Author: delphij Date: Tue Dec 11 05:10:22 2018 New Revision: 341811 URL: https://svnweb.freebsd.org/changeset/base/341811 Log: Remove questionable initialization for ICH8M, rely on BIOS to properly initialize the controller. According to the datasheet, the old code checks if port 2 (P2E, 0x4) was the only enabled port (except port 0, which was ignored by mask 0xfe), and issue a write to the PCS register to disable all but port 0, right before ahci_ctlr_reset. Some other operating systems would issue a port enable to all ports, but since the current code only does the special initialization for ICH8M, it entirely and rely on BIOS to do the right thing (the alternative would be https://reviews.freebsd.org/D18300?id=50922 , should we see reports that we really need to do it). Reviewed by: mav MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D18300 Modified: head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Tue Dec 11 02:54:36 2018 (r341810) +++ head/sys/dev/ahci/ahci_pci.c Tue Dec 11 05:10:22 2018 (r341811) @@ -358,10 +358,7 @@ static int ahci_pci_ctlr_reset(device_t dev) { - if (pci_read_config(dev, PCIR_DEVVENDOR, 4) == 0x28298086 && - (pci_read_config(dev, 0x92, 1) & 0xfe) == 0x04) - pci_write_config(dev, 0x92, 0x01, 1); - return ahci_ctlr_reset(dev); + return(ahci_ctlr_reset(dev)); } static int From owner-svn-src-all@freebsd.org Tue Dec 11 04:57:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45B411318C3E; Tue, 11 Dec 2018 04:57:14 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA098307F; Tue, 11 Dec 2018 04:57:12 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 7198E1247; Mon, 10 Dec 2018 23:57:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 10 Dec 2018 23:57:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm2; bh=R hwREypnUcOO9txwAgiZSMmQ7uxdRsFRrBlPfekG2DE=; b=E+EjLkTV7mJ0Va0Rw LQDhUrcGYPpoXHSzVJF+ljNm4EeJp0h/8YDzMtZIzVdcPTLGMxJsOzpNMXmymTNR X/wxw+/wGsgZKvqFH3KMAU88PoTfRFsI++Pzmt7E5i0zzzJqgCa+AN6iu35N91Qk EEM1x0OiYcCAQWmrUK+rr0Tl1GTstNPJyHmRDTJ0zrSgl3U1xmIg4EiPvMLI2ODd 0nu4CWS87b84QWPNoJg2b39u6bp+J5UioNfN6UF5VqiZlUuDBZwfzeKv1EO6R9H2 NAp9NigaZQfZotA6VuhHl89pLEJ8ox052aK1MVn1ty0IwtoWUltnkNQHMnsZ1U+7 EEk4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=RhwREypnUcOO9txwAgiZSMmQ7uxdRsFRrBlPfekG2 DE=; b=isST6UXiK9Qe0jEyj6fZokUfvZIm6mFR6RPx5oJUzDZPuo7rhiTrEbUAC CyXpt73Mg8OQ3Pj6XjmeDhCDATD4EsApEpHS6XLfw2tGFpx2vzMaqdu+ylHFWO5e ECtKYGZgnOzo7bFjco2bUaka3xjlg33OBIwQqywGbP051XOLQZsCGAgaF6JNS1TU xYdu4xUlXL9p8R8JPLRRrrxfvE6eewmy8SckVKKntboE3byzlVp74n2RPyqBSGWb NMan08nmzAzUUeOMmslvkjs9SsyNkXPvK+MOo7biRXx51Q5jLVnmMQ7xOoJvfI8n ZWfrGcFp/gGhVqBU10QJISCfM5eIA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudegiedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjff fgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutghothhtucfnohhnghcuoehstgho thhtlhesshgrmhhstghordhorhhgqeenucfkphepkedrgeeirdekledrvddufeenucfrrg hrrghmpehmrghilhhfrhhomhepshgtohhtthhlsehsrghmshgtohdrohhrghenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.0.137] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id B473D102EE; Mon, 10 Dec 2018 23:57:08 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: svn commit: r341682 - head/sys/sys From: Scott Long In-Reply-To: <20181210234754.GD60291@kib.kiev.ua> Date: Mon, 10 Dec 2018 21:57:08 -0700 Cc: John Baldwin , Warner Losh , Kevin Bowling , Mateusz Guzik , Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <20181210234754.GD60291@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3445.100.39) X-Rspamd-Queue-Id: 5FA098307F X-Spamd-Result: default: False [-6.44 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[samsco.org,messagingengine.com]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.25]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[samsco.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; MX_GOOD(-0.01)[in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com]; RCPT_COUNT_SEVEN(0.00)[10]; NEURAL_HAM_SHORT(-0.86)[-0.862,0]; IP_SCORE(-3.47)[ip: (-8.97), ipnet: 64.147.123.0/24(-4.48), asn: 11403(-3.82), country: US(-0.09)]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[25.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-Mailman-Approved-At: Tue, 11 Dec 2018 05:31:35 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 04:57:14 -0000 > On Dec 10, 2018, at 4:47 PM, Konstantin Belousov = wrote: >=20 > On Mon, Dec 10, 2018 at 02:15:20PM -0800, John Baldwin wrote: >> On 12/8/18 7:43 PM, Warner Losh wrote: >>>=20 >>>=20 >>> On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling wrote: >>>=20 >>> On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > wrote: >>>=20 >>>>=20 >>>> Fully satisfying solution would be that all architectures get = 64-bit >>>> ops, even if in the worst case they end up taking a lock. Then >>>> subsystems would not have to ifdef on anything. However, there >>>> was some opposition to this proposal and I don't think this is >>>> important enough to push. >>>=20 >>> Mateusz, >>>=20 >>> Who is opposing this particular polyfill solution? Scott Long = brought >>> up a situation in driver development where this would be useful = as >>> well. The polyfills lower the cognitive load and #ifdef soup = which >>> are the right call here regardless of performance on toy ports. >>>=20 >>>=20 >>> I don't recall seeing the opposition either. It would have to be a = global lock for all 64bit atomics.... but I think it would only be 2 = atomics on those architectures.=20 >>=20 >> It would have to be a spin lock, so in the case of unrl you would be = trading >> an operation on one of N regular mutexes for a single spin lock that = was >> also contested by other things. This would be pretty crappy. For = drivers >> that aren't actually used on platforms without 32-bit atomics we can = simply >> not build them in sys/modules/Makefile or not put them in GENERIC. = For >> something in the core kernel like unrl I think we will have to do = what >> Mateusz has done here. >=20 > It is worse. All atomics that acess the same location must use the = same > lock. Otherwise, you could observe torn writes and out of thin air > values. Since you cannot know in advance which locations are acceses > by the locked variant, all freebsd atomics ops have to be switched to > locked variant on the architecture. 64bit atomics on I486 already suffer the risk of torn reads; the = implementation merely does a CLI to protect against local preemption (though you could = still get unlucky with an NMI). I suppose you could argue that SMP isn=E2=80=99= t really viable on I486 and therefore this fact is irrelevant, but it does = illustrate precedence for having API completeness in a platform. Really, this isn=E2=80=99t that hard. Part of the existing contract of = using atomics is that you carefully evaluate all uses of the variable and decide when to = use an atomic instruction. Arguing that we can=E2=80=99t make this process = automatic and foolproof for 64bit quantities, especially for a subset of subset of platforms/architectures, and therefore we should be even more of a = difficult landmine, is not=E2=80=A6. I don=E2=80=99t know what to say=E2=80=A6 = sensical? 64bit operations are a reality for MI code in a modern OS, and I=E2=80=99m= tired of having to tip-toe around them due to incomplete MD implementations. The instructions have been available on Intel CPUs for 25 years! My very strong preference is to have a complete and functional = implementation of atomic.h for any architecture that is hooked up to the build. We can = then tackle the details of optimization and edge case refinement, just like = we do with every other API and service that we work on. It doesn=E2=80=99t = have to be perfect to be useful, and at this point we=E2=80=99re providing neither = perfection nor utility, just =E2=80=9Cbuts=E2=80=9D and =E2=80=9Cwhat ifs=E2=80=9D. Going forward, I=E2=80=99m going to start using 64bit atomics where = they=E2=80=99re prudent, instead of avoiding them due to this niche 32bit argument. If that = means more and more of what I do no longer compiles on a mips or a ppc32, then that=E2=80=99s a sacrifice that is fine with me. It still creates extra = development work, and having a uniformly available implementation would be much nicer. Scott From owner-svn-src-all@freebsd.org Tue Dec 11 11:13:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1AF5132BD65; Tue, 11 Dec 2018 11:13:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 567728FFB8; Tue, 11 Dec 2018 11:13:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3642B2ECA9; Tue, 11 Dec 2018 11:13:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBBDCi3007145; Tue, 11 Dec 2018 11:13:12 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBBDCE4007144; Tue, 11 Dec 2018 11:13:12 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201812111113.wBBBDCE4007144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 11 Dec 2018 11:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341814 - head/sys/arm64/acpica X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/acpica X-SVN-Commit-Revision: 341814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 567728FFB8 X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 11:13:12 -0000 Author: andrew Date: Tue Dec 11 11:13:11 2018 New Revision: 341814 URL: https://svnweb.freebsd.org/changeset/base/341814 Log: Only read the ACPI proximity tabled on arm64 when we are booting from ACPI. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/acpica/acpi_machdep.c Modified: head/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- head/sys/arm64/acpica/acpi_machdep.c Tue Dec 11 06:47:04 2018 (r341813) +++ head/sys/arm64/acpica/acpi_machdep.c Tue Dec 11 11:13:11 2018 (r341814) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -238,6 +240,10 @@ acpi_map_addr(struct acpi_generic_address *addr, bus_s static void parse_pxm_tables(void *dummy) { + + /* Only parse ACPI tables when booting via ACPI */ + if (arm64_bus_method != ARM64_BUS_ACPI) + return; acpi_pxm_init(MAXCPU, (vm_paddr_t)1 << 40); acpi_pxm_parse_tables(); From owner-svn-src-all@freebsd.org Tue Dec 11 11:31:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9200C132C701; Tue, 11 Dec 2018 11:31:15 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44BD56A38B; Tue, 11 Dec 2018 11:31:15 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25DE32EEC5; Tue, 11 Dec 2018 11:31:15 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBBVFJG016592; Tue, 11 Dec 2018 11:31:15 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBBVEo7015945; Tue, 11 Dec 2018 11:31:14 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812111131.wBBBVEo7015945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 11 Dec 2018 11:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341815 - in stable/12/sys: conf dev/netmap modules/netmap net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12/sys: conf dev/netmap modules/netmap net X-SVN-Commit-Revision: 341815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 44BD56A38B X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 11:31:16 -0000 Author: vmaffione Date: Tue Dec 11 11:31:13 2018 New Revision: 341815 URL: https://svnweb.freebsd.org/changeset/base/341815 Log: MFC r341516, r341589 netmap: align codebase to the current upstream (760279cfb2730a585) Changelist: - Replace netmap passthrough host support with a more general mechanism to call TXSYNC/RXSYNC from an in-kernel event-loop. No kernel threads are used to use this feature: the application is required to spawn a thread (or a process) and issue a SYNC_KLOOP_START (NIOCCTRL) command in the thread body. The kernel loop is executed by the ioctl implementation, which returns to userspace only when a different thread calls SYNC_KLOOP_STOP or the netmap file descriptor is closed. - Update the if_ptnet driver to cope with the new data structures, and prune all the obsolete ptnetmap code. - Add support for "null" netmap ports, useful to allocate netmap_if, netmap_ring and netmap buffers to be used by specialized applications (e.g. hypervisors). TXSYNC/RXSYNC on these ports have no effect. - Various fixes and code refactoring. Sponsored by: Sunny Valley Networks Differential Revision: https://reviews.freebsd.org/D18015 Added: stable/12/sys/dev/netmap/netmap_kloop.c - copied unchanged from r341516, head/sys/dev/netmap/netmap_kloop.c stable/12/sys/dev/netmap/netmap_null.c - copied unchanged from r341516, head/sys/dev/netmap/netmap_null.c Modified: stable/12/sys/conf/files stable/12/sys/dev/netmap/if_ixl_netmap.h stable/12/sys/dev/netmap/if_ptnet.c stable/12/sys/dev/netmap/if_vtnet_netmap.h stable/12/sys/dev/netmap/netmap.c stable/12/sys/dev/netmap/netmap_bdg.c stable/12/sys/dev/netmap/netmap_bdg.h stable/12/sys/dev/netmap/netmap_freebsd.c stable/12/sys/dev/netmap/netmap_generic.c stable/12/sys/dev/netmap/netmap_kern.h stable/12/sys/dev/netmap/netmap_legacy.c stable/12/sys/dev/netmap/netmap_mem2.c stable/12/sys/dev/netmap/netmap_mem2.h stable/12/sys/dev/netmap/netmap_pipe.c stable/12/sys/dev/netmap/netmap_vale.c stable/12/sys/modules/netmap/Makefile stable/12/sys/net/netmap.h stable/12/sys/net/netmap_user.h stable/12/sys/net/netmap_virt.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Tue Dec 11 11:13:11 2018 (r341814) +++ stable/12/sys/conf/files Tue Dec 11 11:31:13 2018 (r341815) @@ -2534,17 +2534,19 @@ dev/ncv/ncr53c500.c optional ncv dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/netmap/if_ptnet.c optional netmap inet dev/netmap/netmap.c optional netmap +dev/netmap/netmap_bdg.c optional netmap dev/netmap/netmap_freebsd.c optional netmap dev/netmap/netmap_generic.c optional netmap +dev/netmap/netmap_kloop.c optional netmap +dev/netmap/netmap_legacy.c optional netmap dev/netmap/netmap_mbq.c optional netmap dev/netmap/netmap_mem2.c optional netmap dev/netmap/netmap_monitor.c optional netmap +dev/netmap/netmap_null.c optional netmap dev/netmap/netmap_offloadings.c optional netmap dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_pt.c optional netmap dev/netmap/netmap_vale.c optional netmap -dev/netmap/netmap_legacy.c optional netmap -dev/netmap/netmap_bdg.c optional netmap # compile-with "${NORMAL_C} -Wconversion -Wextra" dev/nfsmb/nfsmb.c optional nfsmb pci dev/nge/if_nge.c optional nge Modified: stable/12/sys/dev/netmap/if_ixl_netmap.h ============================================================================== --- stable/12/sys/dev/netmap/if_ixl_netmap.h Tue Dec 11 11:13:11 2018 (r341814) +++ stable/12/sys/dev/netmap/if_ixl_netmap.h Tue Dec 11 11:31:13 2018 (r341815) @@ -129,7 +129,7 @@ ixl_netmap_attach(struct ixl_vsi *vsi) na.ifp = vsi->ifp; na.na_flags = NAF_BDG_MAYSLEEP; // XXX check that queues is set. - nm_prinf("queues is %p\n", vsi->queues); + nm_prinf("queues is %p", vsi->queues); if (vsi->queues) { na.num_tx_desc = vsi->queues[0].num_desc; na.num_rx_desc = vsi->queues[0].num_desc; Modified: stable/12/sys/dev/netmap/if_ptnet.c ============================================================================== --- stable/12/sys/dev/netmap/if_ptnet.c Tue Dec 11 11:13:11 2018 (r341814) +++ stable/12/sys/dev/netmap/if_ptnet.c Tue Dec 11 11:31:13 2018 (r341815) @@ -128,8 +128,8 @@ struct ptnet_queue { struct resource *irq; void *cookie; int kring_id; - struct ptnet_csb_gh *ptgh; - struct ptnet_csb_hg *pthg; + struct nm_csb_atok *atok; + struct nm_csb_ktoa *ktoa; unsigned int kick; struct mtx lock; struct buf_ring *bufring; /* for TX queues */ @@ -166,8 +166,8 @@ struct ptnet_softc { unsigned int num_tx_rings; struct ptnet_queue *queues; struct ptnet_queue *rxqueues; - struct ptnet_csb_gh *csb_gh; - struct ptnet_csb_hg *csb_hg; + struct nm_csb_atok *csb_gh; + struct nm_csb_ktoa *csb_hg; unsigned int min_tx_space; @@ -209,7 +209,7 @@ static void ptnet_tick(void *opaque); static int ptnet_irqs_init(struct ptnet_softc *sc); static void ptnet_irqs_fini(struct ptnet_softc *sc); -static uint32_t ptnet_nm_ptctl(if_t ifp, uint32_t cmd); +static uint32_t ptnet_nm_ptctl(struct ptnet_softc *sc, uint32_t cmd); static int ptnet_nm_config(struct netmap_adapter *na, struct nm_config_info *info); static void ptnet_update_vnet_hdr(struct ptnet_softc *sc); @@ -327,7 +327,7 @@ ptnet_attach(device_t dev) sc->num_rings = num_tx_rings + num_rx_rings; sc->num_tx_rings = num_tx_rings; - if (sc->num_rings * sizeof(struct ptnet_csb_gh) > PAGE_SIZE) { + if (sc->num_rings * sizeof(struct nm_csb_atok) > PAGE_SIZE) { device_printf(dev, "CSB cannot handle that many rings (%u)\n", sc->num_rings); err = ENOMEM; @@ -342,7 +342,7 @@ ptnet_attach(device_t dev) err = ENOMEM; goto err_path; } - sc->csb_hg = (struct ptnet_csb_hg *)(((char *)sc->csb_gh) + PAGE_SIZE); + sc->csb_hg = (struct nm_csb_ktoa *)(((char *)sc->csb_gh) + PAGE_SIZE); { /* @@ -379,8 +379,8 @@ ptnet_attach(device_t dev) pq->sc = sc; pq->kring_id = i; pq->kick = PTNET_IO_KICK_BASE + 4 * i; - pq->ptgh = sc->csb_gh + i; - pq->pthg = sc->csb_hg + i; + pq->atok = sc->csb_gh + i; + pq->ktoa = sc->csb_hg + i; snprintf(pq->lock_name, sizeof(pq->lock_name), "%s-%d", device_get_nameunit(dev), i); mtx_init(&pq->lock, pq->lock_name, NULL, MTX_DEF); @@ -505,12 +505,25 @@ err_path: return err; } +/* Stop host sync-kloop if it was running. */ +static void +ptnet_device_shutdown(struct ptnet_softc *sc) +{ + ptnet_nm_ptctl(sc, PTNETMAP_PTCTL_DELETE); + bus_write_4(sc->iomem, PTNET_IO_CSB_GH_BAH, 0); + bus_write_4(sc->iomem, PTNET_IO_CSB_GH_BAL, 0); + bus_write_4(sc->iomem, PTNET_IO_CSB_HG_BAH, 0); + bus_write_4(sc->iomem, PTNET_IO_CSB_HG_BAL, 0); +} + static int ptnet_detach(device_t dev) { struct ptnet_softc *sc = device_get_softc(dev); int i; + ptnet_device_shutdown(sc); + #ifdef DEVICE_POLLING if (sc->ifp->if_capenable & IFCAP_POLLING) { ether_poll_deregister(sc->ifp); @@ -543,10 +556,6 @@ ptnet_detach(device_t dev) ptnet_irqs_fini(sc); if (sc->csb_gh) { - bus_write_4(sc->iomem, PTNET_IO_CSB_GH_BAH, 0); - bus_write_4(sc->iomem, PTNET_IO_CSB_GH_BAL, 0); - bus_write_4(sc->iomem, PTNET_IO_CSB_HG_BAH, 0); - bus_write_4(sc->iomem, PTNET_IO_CSB_HG_BAL, 0); contigfree(sc->csb_gh, 2*PAGE_SIZE, M_DEVBUF); sc->csb_gh = NULL; sc->csb_hg = NULL; @@ -583,9 +592,8 @@ ptnet_detach(device_t dev) static int ptnet_suspend(device_t dev) { - struct ptnet_softc *sc; + struct ptnet_softc *sc = device_get_softc(dev); - sc = device_get_softc(dev); (void)sc; return (0); @@ -594,9 +602,8 @@ ptnet_suspend(device_t dev) static int ptnet_resume(device_t dev) { - struct ptnet_softc *sc; + struct ptnet_softc *sc = device_get_softc(dev); - sc = device_get_softc(dev); (void)sc; return (0); @@ -605,11 +612,11 @@ ptnet_resume(device_t dev) static int ptnet_shutdown(device_t dev) { - /* - * Suspend already does all of what we need to - * do here; we just never expect to be resumed. - */ - return (ptnet_suspend(dev)); + struct ptnet_softc *sc = device_get_softc(dev); + + ptnet_device_shutdown(sc); + + return (0); } static int @@ -796,7 +803,7 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) /* Make sure the worker sees the * IFF_DRV_RUNNING down. */ PTNET_Q_LOCK(pq); - pq->ptgh->guest_need_kick = 0; + pq->atok->appl_need_kick = 0; PTNET_Q_UNLOCK(pq); /* Wait for rescheduling to finish. */ if (pq->taskq) { @@ -810,7 +817,7 @@ ptnet_ioctl(if_t ifp, u_long cmd, caddr_t data) for (i = 0; i < sc->num_rings; i++) { pq = sc-> queues + i; PTNET_Q_LOCK(pq); - pq->ptgh->guest_need_kick = 1; + pq->atok->appl_need_kick = 1; PTNET_Q_UNLOCK(pq); } } @@ -881,7 +888,7 @@ ptnet_init_locked(struct ptnet_softc *sc) return ret; } - if (sc->ptna->backend_regifs == 0) { + if (sc->ptna->backend_users == 0) { ret = ptnet_nm_krings_create(na_nm); if (ret) { device_printf(sc->dev, "ptnet_nm_krings_create() " @@ -962,7 +969,7 @@ ptnet_stop(struct ptnet_softc *sc) ptnet_nm_register(na_dr, 0 /* off */); - if (sc->ptna->backend_regifs == 0) { + if (sc->ptna->backend_users == 0) { netmap_mem_rings_delete(na_dr); ptnet_nm_krings_delete(na_nm); } @@ -1092,9 +1099,8 @@ ptnet_media_status(if_t ifp, struct ifmediareq *ifmr) } static uint32_t -ptnet_nm_ptctl(if_t ifp, uint32_t cmd) +ptnet_nm_ptctl(struct ptnet_softc *sc, uint32_t cmd) { - struct ptnet_softc *sc = if_getsoftc(ifp); /* * Write a command and read back error status, * with zero meaning success. @@ -1130,8 +1136,8 @@ ptnet_sync_from_csb(struct ptnet_softc *sc, struct net /* Sync krings from the host, reading from * CSB. */ for (i = 0; i < sc->num_rings; i++) { - struct ptnet_csb_gh *ptgh = sc->queues[i].ptgh; - struct ptnet_csb_hg *pthg = sc->queues[i].pthg; + struct nm_csb_atok *atok = sc->queues[i].atok; + struct nm_csb_ktoa *ktoa = sc->queues[i].ktoa; struct netmap_kring *kring; if (i < na->num_tx_rings) { @@ -1139,15 +1145,15 @@ ptnet_sync_from_csb(struct ptnet_softc *sc, struct net } else { kring = na->rx_rings[i - na->num_tx_rings]; } - kring->rhead = kring->ring->head = ptgh->head; - kring->rcur = kring->ring->cur = ptgh->cur; - kring->nr_hwcur = pthg->hwcur; + kring->rhead = kring->ring->head = atok->head; + kring->rcur = kring->ring->cur = atok->cur; + kring->nr_hwcur = ktoa->hwcur; kring->nr_hwtail = kring->rtail = - kring->ring->tail = pthg->hwtail; + kring->ring->tail = ktoa->hwtail; ND("%d,%d: csb {hc %u h %u c %u ht %u}", t, i, - pthg->hwcur, ptgh->head, ptgh->cur, - pthg->hwtail); + ktoa->hwcur, atok->head, atok->cur, + ktoa->hwtail); ND("%d,%d: kring {hc %u rh %u rc %u h %u c %u ht %u rt %u t %u}", t, i, kring->nr_hwcur, kring->rhead, kring->rcur, kring->ring->head, kring->ring->cur, kring->nr_hwtail, @@ -1178,7 +1184,7 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff int i; if (!onoff) { - sc->ptna->backend_regifs--; + sc->ptna->backend_users--; } /* If this is the last netmap client, guest interrupt enable flags may @@ -1191,17 +1197,17 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff D("Exit netmap mode, re-enable interrupts"); for (i = 0; i < sc->num_rings; i++) { pq = sc->queues + i; - pq->ptgh->guest_need_kick = 1; + pq->atok->appl_need_kick = 1; } } if (onoff) { - if (sc->ptna->backend_regifs == 0) { + if (sc->ptna->backend_users == 0) { /* Initialize notification enable fields in the CSB. */ for (i = 0; i < sc->num_rings; i++) { pq = sc->queues + i; - pq->pthg->host_need_kick = 1; - pq->ptgh->guest_need_kick = + pq->ktoa->kern_need_kick = 1; + pq->atok->appl_need_kick = (!(ifp->if_capenable & IFCAP_POLLING) && i >= sc->num_tx_rings); } @@ -1211,17 +1217,13 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff /* Make sure the host adapter passed through is ready * for txsync/rxsync. */ - ret = ptnet_nm_ptctl(ifp, PTNETMAP_PTCTL_CREATE); + ret = ptnet_nm_ptctl(sc, PTNETMAP_PTCTL_CREATE); if (ret) { return ret; } - } - /* Sync from CSB must be done after REGIF PTCTL. Skip this - * step only if this is a netmap client and it is not the - * first one. */ - if ((!native && sc->ptna->backend_regifs == 0) || - (native && na->active_fds == 0)) { + /* Align the guest krings and rings to the state stored + * in the CSB. */ ptnet_sync_from_csb(sc, na); } @@ -1254,19 +1256,13 @@ ptnet_nm_register(struct netmap_adapter *na, int onoff } } - /* Sync from CSB must be done before UNREGIF PTCTL, on the last - * netmap client. */ - if (native && na->active_fds == 0) { - ptnet_sync_from_csb(sc, na); + if (sc->ptna->backend_users == 0) { + ret = ptnet_nm_ptctl(sc, PTNETMAP_PTCTL_DELETE); } - - if (sc->ptna->backend_regifs == 0) { - ret = ptnet_nm_ptctl(ifp, PTNETMAP_PTCTL_DELETE); - } } if (onoff) { - sc->ptna->backend_regifs++; + sc->ptna->backend_users++; } return ret; @@ -1279,7 +1275,7 @@ ptnet_nm_txsync(struct netmap_kring *kring, int flags) struct ptnet_queue *pq = sc->queues + kring->ring_id; bool notify; - notify = netmap_pt_guest_txsync(pq->ptgh, pq->pthg, kring, flags); + notify = netmap_pt_guest_txsync(pq->atok, pq->ktoa, kring, flags); if (notify) { ptnet_kick(pq); } @@ -1294,7 +1290,7 @@ ptnet_nm_rxsync(struct netmap_kring *kring, int flags) struct ptnet_queue *pq = sc->rxqueues + kring->ring_id; bool notify; - notify = netmap_pt_guest_rxsync(pq->ptgh, pq->pthg, kring, flags); + notify = netmap_pt_guest_rxsync(pq->atok, pq->ktoa, kring, flags); if (notify) { ptnet_kick(pq); } @@ -1310,7 +1306,7 @@ ptnet_nm_intr(struct netmap_adapter *na, int onoff) for (i = 0; i < sc->num_rings; i++) { struct ptnet_queue *pq = sc->queues + i; - pq->ptgh->guest_need_kick = onoff; + pq->atok->appl_need_kick = onoff; } } @@ -1676,25 +1672,13 @@ ptnet_rx_csum(struct mbuf *m, struct virtio_net_hdr *h } /* End of offloading-related functions to be shared with vtnet. */ -static inline void -ptnet_sync_tail(struct ptnet_csb_hg *pthg, struct netmap_kring *kring) -{ - struct netmap_ring *ring = kring->ring; - - /* Update hwcur and hwtail as known by the host. */ - ptnetmap_guest_read_kring_csb(pthg, kring); - - /* nm_sync_finalize */ - ring->tail = kring->rtail = kring->nr_hwtail; -} - static void ptnet_ring_update(struct ptnet_queue *pq, struct netmap_kring *kring, unsigned int head, unsigned int sync_flags) { struct netmap_ring *ring = kring->ring; - struct ptnet_csb_gh *ptgh = pq->ptgh; - struct ptnet_csb_hg *pthg = pq->pthg; + struct nm_csb_atok *atok = pq->atok; + struct nm_csb_ktoa *ktoa = pq->ktoa; /* Some packets have been pushed to the netmap ring. We have * to tell the host to process the new packets, updating cur @@ -1704,11 +1688,11 @@ ptnet_ring_update(struct ptnet_queue *pq, struct netma /* Mimic nm_txsync_prologue/nm_rxsync_prologue. */ kring->rcur = kring->rhead = head; - ptnetmap_guest_write_kring_csb(ptgh, kring->rcur, kring->rhead); + ptnetmap_guest_write_kring_csb(atok, kring->rcur, kring->rhead); /* Kick the host if needed. */ - if (NM_ACCESS_ONCE(pthg->host_need_kick)) { - ptgh->sync_flags = sync_flags; + if (NM_ACCESS_ONCE(ktoa->kern_need_kick)) { + atok->sync_flags = sync_flags; ptnet_kick(pq); } } @@ -1728,8 +1712,8 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns struct netmap_adapter *na = &sc->ptna->dr.up; if_t ifp = sc->ifp; unsigned int batch_count = 0; - struct ptnet_csb_gh *ptgh; - struct ptnet_csb_hg *pthg; + struct nm_csb_atok *atok; + struct nm_csb_ktoa *ktoa; struct netmap_kring *kring; struct netmap_ring *ring; struct netmap_slot *slot; @@ -1758,8 +1742,8 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns return ENETDOWN; } - ptgh = pq->ptgh; - pthg = pq->pthg; + atok = pq->atok; + ktoa = pq->ktoa; kring = na->tx_rings[pq->kring_id]; ring = kring->ring; lim = kring->nkr_num_slots - 1; @@ -1771,17 +1755,17 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns /* We ran out of slot, let's see if the host has * freed up some, by reading hwcur and hwtail from * the CSB. */ - ptnet_sync_tail(pthg, kring); + ptnet_sync_tail(ktoa, kring); if (PTNET_TX_NOSPACE(head, kring, minspace)) { /* Still no slots available. Reactivate the * interrupts so that we can be notified * when some free slots are made available by * the host. */ - ptgh->guest_need_kick = 1; + atok->appl_need_kick = 1; /* Double-check. */ - ptnet_sync_tail(pthg, kring); + ptnet_sync_tail(ktoa, kring); if (likely(PTNET_TX_NOSPACE(head, kring, minspace))) { break; @@ -1790,7 +1774,7 @@ ptnet_drain_transmit_queue(struct ptnet_queue *pq, uns RD(1, "Found more slots by doublecheck"); /* More slots were freed before reactivating * the interrupts. */ - ptgh->guest_need_kick = 0; + atok->appl_need_kick = 0; } } @@ -2020,8 +2004,8 @@ ptnet_rx_eof(struct ptnet_queue *pq, unsigned int budg { struct ptnet_softc *sc = pq->sc; bool have_vnet_hdr = sc->vnet_hdr_len; - struct ptnet_csb_gh *ptgh = pq->ptgh; - struct ptnet_csb_hg *pthg = pq->pthg; + struct nm_csb_atok *atok = pq->atok; + struct nm_csb_ktoa *ktoa = pq->ktoa; struct netmap_adapter *na = &sc->ptna->dr.up; struct netmap_kring *kring = na->rx_rings[pq->kring_id]; struct netmap_ring *ring = kring->ring; @@ -2053,21 +2037,21 @@ host_sync: /* We ran out of slot, let's see if the host has * added some, by reading hwcur and hwtail from * the CSB. */ - ptnet_sync_tail(pthg, kring); + ptnet_sync_tail(ktoa, kring); if (head == ring->tail) { /* Still no slots available. Reactivate * interrupts as they were disabled by the * host thread right before issuing the * last interrupt. */ - ptgh->guest_need_kick = 1; + atok->appl_need_kick = 1; /* Double-check. */ - ptnet_sync_tail(pthg, kring); + ptnet_sync_tail(ktoa, kring); if (likely(head == ring->tail)) { break; } - ptgh->guest_need_kick = 0; + atok->appl_need_kick = 0; } } Modified: stable/12/sys/dev/netmap/if_vtnet_netmap.h ============================================================================== --- stable/12/sys/dev/netmap/if_vtnet_netmap.h Tue Dec 11 11:13:11 2018 (r341814) +++ stable/12/sys/dev/netmap/if_vtnet_netmap.h Tue Dec 11 11:31:13 2018 (r341815) @@ -79,7 +79,7 @@ vtnet_free_used(struct virtqueue *vq, int netmap_bufs, } if (deq) - nm_prinf("%d sgs dequeued from %s-%d (netmap=%d)\n", + nm_prinf("%d sgs dequeued from %s-%d (netmap=%d)", deq, nm_txrx2str(t), idx, netmap_bufs); } @@ -230,7 +230,7 @@ vtnet_netmap_txsync(struct netmap_kring *kring, int fl /*writeable=*/0); if (unlikely(err)) { if (err != ENOSPC) - nm_prerr("virtqueue_enqueue(%s) failed: %d\n", + nm_prerr("virtqueue_enqueue(%s) failed: %d", kring->name, err); break; } @@ -251,7 +251,7 @@ vtnet_netmap_txsync(struct netmap_kring *kring, int fl if (token == NULL) break; if (unlikely(token != (void *)txq)) - nm_prerr("BUG: TX token mismatch\n"); + nm_prerr("BUG: TX token mismatch"); else n++; } @@ -307,7 +307,7 @@ vtnet_netmap_kring_refill(struct netmap_kring *kring, /*readable=*/0, /*writeable=*/sg.sg_nseg); if (unlikely(err)) { if (err != ENOSPC) - nm_prerr("virtqueue_enqueue(%s) failed: %d\n", + nm_prerr("virtqueue_enqueue(%s) failed: %d", kring->name, err); break; } @@ -391,7 +391,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int fl break; } if (unlikely(token != (void *)rxq)) { - nm_prerr("BUG: RX token mismatch\n"); + nm_prerr("BUG: RX token mismatch"); } else { /* Skip the virtio-net header. */ len -= sc->vtnet_hdr_size; @@ -533,7 +533,7 @@ vtnet_netmap_attach(struct vtnet_softc *sc) netmap_attach(&na); - nm_prinf("vtnet attached txq=%d, txd=%d rxq=%d, rxd=%d\n", + nm_prinf("vtnet attached txq=%d, txd=%d rxq=%d, rxd=%d", na.num_tx_rings, na.num_tx_desc, na.num_tx_rings, na.num_rx_desc); } Modified: stable/12/sys/dev/netmap/netmap.c ============================================================================== --- stable/12/sys/dev/netmap/netmap.c Tue Dec 11 11:13:11 2018 (r341814) +++ stable/12/sys/dev/netmap/netmap.c Tue Dec 11 11:31:13 2018 (r341815) @@ -480,6 +480,9 @@ ports attached to the switch) /* user-controlled variables */ int netmap_verbose; +#ifdef CONFIG_NETMAP_DEBUG +int netmap_debug; +#endif /* CONFIG_NETMAP_DEBUG */ static int netmap_no_timestamp; /* don't timestamp on rxsync */ int netmap_no_pendintr = 1; @@ -527,9 +530,6 @@ int netmap_generic_hwcsum = 0; /* Non-zero if ptnet devices are allowed to use virtio-net headers. */ int ptnet_vnet_hdr = 1; -/* 0 if ptnetmap should not use worker threads for TX processing */ -int ptnetmap_tx_workers = 1; - /* * SYSCTL calls are grouped between SYSBEGIN and SYSEND to be emulated * in some other operating systems @@ -540,6 +540,10 @@ SYSCTL_DECL(_dev_netmap); SYSCTL_NODE(_dev, OID_AUTO, netmap, CTLFLAG_RW, 0, "Netmap args"); SYSCTL_INT(_dev_netmap, OID_AUTO, verbose, CTLFLAG_RW, &netmap_verbose, 0, "Verbose mode"); +#ifdef CONFIG_NETMAP_DEBUG +SYSCTL_INT(_dev_netmap, OID_AUTO, debug, + CTLFLAG_RW, &netmap_debug, 0, "Debug messages"); +#endif /* CONFIG_NETMAP_DEBUG */ SYSCTL_INT(_dev_netmap, OID_AUTO, no_timestamp, CTLFLAG_RW, &netmap_no_timestamp, 0, "no_timestamp"); SYSCTL_INT(_dev_netmap, OID_AUTO, no_pendintr, CTLFLAG_RW, &netmap_no_pendintr, @@ -569,8 +573,6 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, generic_txqdisc, CTL #endif SYSCTL_INT(_dev_netmap, OID_AUTO, ptnet_vnet_hdr, CTLFLAG_RW, &ptnet_vnet_hdr, 0, "Allow ptnet devices to use virtio-net headers"); -SYSCTL_INT(_dev_netmap, OID_AUTO, ptnetmap_tx_workers, CTLFLAG_RW, - &ptnetmap_tx_workers, 0, "Use worker threads for pnetmap TX processing"); SYSEND; @@ -692,7 +694,7 @@ nm_bound_var(u_int *v, u_int dflt, u_int lo, u_int hi, op = "Clamp"; } if (op && msg) - nm_prinf("%s %s to %d (was %d)\n", op, msg, *v, oldv); + nm_prinf("%s %s to %d (was %d)", op, msg, *v, oldv); return *v; } @@ -776,13 +778,14 @@ netmap_update_config(struct netmap_adapter *na) na->num_rx_rings = info.num_rx_rings; na->num_rx_desc = info.num_rx_descs; na->rx_buf_maxsize = info.rx_buf_maxsize; - D("configuration changed for %s: txring %d x %d, " - "rxring %d x %d, rxbufsz %d", - na->name, na->num_tx_rings, na->num_tx_desc, - na->num_rx_rings, na->num_rx_desc, na->rx_buf_maxsize); + if (netmap_verbose) + nm_prinf("configuration changed for %s: txring %d x %d, " + "rxring %d x %d, rxbufsz %d", + na->name, na->num_tx_rings, na->num_tx_desc, + na->num_rx_rings, na->num_rx_desc, na->rx_buf_maxsize); return 0; } - D("WARNING: configuration changed for %s while active: " + nm_prerr("WARNING: configuration changed for %s while active: " "txring %d x %d, rxring %d x %d, rxbufsz %d", na->name, info.num_tx_rings, info.num_tx_descs, info.num_rx_rings, info.num_rx_descs, @@ -828,7 +831,8 @@ netmap_krings_create(struct netmap_adapter *na, u_int enum txrx t; if (na->tx_rings != NULL) { - D("warning: krings were already created"); + if (netmap_debug & NM_DEBUG_ON) + nm_prerr("warning: krings were already created"); return 0; } @@ -842,7 +846,7 @@ netmap_krings_create(struct netmap_adapter *na, u_int na->tx_rings = nm_os_malloc((size_t)len); if (na->tx_rings == NULL) { - D("Cannot allocate krings"); + nm_prerr("Cannot allocate krings"); return ENOMEM; } na->rx_rings = na->tx_rings + n[NR_TX]; @@ -910,7 +914,8 @@ netmap_krings_delete(struct netmap_adapter *na) enum txrx t; if (na->tx_rings == NULL) { - D("warning: krings were already deleted"); + if (netmap_debug & NM_DEBUG_ON) + nm_prerr("warning: krings were already deleted"); return; } @@ -1012,11 +1017,11 @@ netmap_do_unregif(struct netmap_priv_d *priv) * happens if the close() occurs while a concurrent * syscall is running. */ - if (netmap_verbose) - D("deleting last instance for %s", na->name); + if (netmap_debug & NM_DEBUG_ON) + nm_prinf("deleting last instance for %s", na->name); if (nm_netmap_on(na)) { - D("BUG: netmap on while going to delete the krings"); + nm_prerr("BUG: netmap on while going to delete the krings"); } na->nm_krings_delete(na); @@ -1033,14 +1038,6 @@ netmap_do_unregif(struct netmap_priv_d *priv) priv->np_nifp = NULL; } -/* call with NMG_LOCK held */ -static __inline int -nm_si_user(struct netmap_priv_d *priv, enum txrx t) -{ - return (priv->np_na != NULL && - (priv->np_qlast[t] - priv->np_qfirst[t] > 1)); -} - struct netmap_priv_d* netmap_priv_new(void) { @@ -1136,8 +1133,8 @@ netmap_send_up(struct ifnet *dst, struct mbq *q) /* Send packets up, outside the lock; head/prev machinery * is only useful for Windows. */ while ((m = mbq_dequeue(q)) != NULL) { - if (netmap_verbose & NM_VERB_HOST) - D("sending up pkt %p size %d", m, MBUF_LEN(m)); + if (netmap_debug & NM_DEBUG_HOST) + nm_prinf("sending up pkt %p size %d", m, MBUF_LEN(m)); prev = nm_os_send_up(dst, m, prev); if (head == NULL) head = prev; @@ -1332,8 +1329,8 @@ netmap_rxsync_from_host(struct netmap_kring *kring, in m_copydata(m, 0, len, NMB(na, slot)); ND("nm %d len %d", nm_i, len); - if (netmap_verbose) - D("%s", nm_dump_buf(NMB(na, slot),len, 128, NULL)); + if (netmap_debug & NM_DEBUG_HOST) + nm_prinf("%s", nm_dump_buf(NMB(na, slot),len, 128, NULL)); slot->len = len; slot->flags = 0; @@ -1500,7 +1497,7 @@ netmap_get_na(struct nmreq_header *hdr, if (req->nr_mode == NR_REG_PIPE_MASTER || req->nr_mode == NR_REG_PIPE_SLAVE) { /* Do not accept deprecated pipe modes. */ - D("Deprecated pipe nr_mode, use xx{yy or xx}yy syntax"); + nm_prerr("Deprecated pipe nr_mode, use xx{yy or xx}yy syntax"); return EINVAL; } @@ -1527,9 +1524,7 @@ netmap_get_na(struct nmreq_header *hdr, * 0 !NULL type matches and na created/found * !0 !NULL impossible */ - - /* try to see if this is a ptnetmap port */ - error = netmap_get_pt_host_na(hdr, na, nmd, create); + error = netmap_get_null_na(hdr, na, nmd, create); if (error || *na != NULL) goto out; @@ -1739,7 +1734,7 @@ nm_rxsync_prologue(struct netmap_kring *kring, struct /* * Error routine called when txsync/rxsync detects an error. - * Can't do much more than resetting head =cur = hwcur, tail = hwtail + * Can't do much more than resetting head = cur = hwcur, tail = hwtail * Return 1 on reinit. * * This routine is only called by the upper half of the kernel. @@ -1810,12 +1805,6 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 enum txrx t; u_int j; - if ((nr_flags & NR_PTNETMAP_HOST) && ((nr_mode != NR_REG_ALL_NIC) || - nr_flags & (NR_RX_RINGS_ONLY|NR_TX_RINGS_ONLY))) { - D("Error: only NR_REG_ALL_NIC supported with netmap passthrough"); - return EINVAL; - } - for_rx_tx(t) { if (nr_flags & excluded_direction[t]) { priv->np_qfirst[t] = priv->np_qlast[t] = 0; @@ -1823,6 +1812,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 } switch (nr_mode) { case NR_REG_ALL_NIC: + case NR_REG_NULL: priv->np_qfirst[t] = 0; priv->np_qlast[t] = nma_get_nrings(na, t); ND("ALL/PIPE: %s %d %d", nm_txrx2str(t), @@ -1831,7 +1821,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 case NR_REG_SW: case NR_REG_NIC_SW: if (!(na->na_flags & NAF_HOST_RINGS)) { - D("host rings not supported"); + nm_prerr("host rings not supported"); return EINVAL; } priv->np_qfirst[t] = (nr_mode == NR_REG_SW ? @@ -1844,7 +1834,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 case NR_REG_ONE_NIC: if (nr_ringid >= na->num_tx_rings && nr_ringid >= na->num_rx_rings) { - D("invalid ring id %d", nr_ringid); + nm_prerr("invalid ring id %d", nr_ringid); return EINVAL; } /* if not enough rings, use the first one */ @@ -1857,11 +1847,11 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 priv->np_qfirst[t], priv->np_qlast[t]); break; default: - D("invalid regif type %d", nr_mode); + nm_prerr("invalid regif type %d", nr_mode); return EINVAL; } } - priv->np_flags = nr_flags | nr_mode; // TODO + priv->np_flags = nr_flags; /* Allow transparent forwarding mode in the host --> nic * direction only if all the TX hw rings have been opened. */ @@ -1871,7 +1861,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 } if (netmap_verbose) { - D("%s: tx [%d,%d) rx [%d,%d) id %d", + nm_prinf("%s: tx [%d,%d) rx [%d,%d) id %d", na->name, priv->np_qfirst[NR_TX], priv->np_qlast[NR_TX], @@ -1927,6 +1917,7 @@ netmap_unset_ringid(struct netmap_priv_d *priv) } priv->np_flags = 0; priv->np_txpoll = 0; + priv->np_kloop_state = 0; } @@ -1943,8 +1934,8 @@ netmap_krings_get(struct netmap_priv_d *priv) int excl = (priv->np_flags & NR_EXCLUSIVE); enum txrx t; - if (netmap_verbose) - D("%s: grabbing tx [%d, %d) rx [%d, %d)", + if (netmap_debug & NM_DEBUG_ON) + nm_prinf("%s: grabbing tx [%d, %d) rx [%d, %d)", na->name, priv->np_qfirst[NR_TX], priv->np_qlast[NR_TX], @@ -2021,6 +2012,110 @@ nm_priv_rx_enabled(struct netmap_priv_d *priv) return (priv->np_qfirst[NR_RX] != priv->np_qlast[NR_RX]); } +/* Validate the CSB entries for both directions (atok and ktoa). + * To be called under NMG_LOCK(). */ +static int +netmap_csb_validate(struct netmap_priv_d *priv, struct nmreq_opt_csb *csbo) +{ + struct nm_csb_atok *csb_atok_base = + (struct nm_csb_atok *)(uintptr_t)csbo->csb_atok; + struct nm_csb_ktoa *csb_ktoa_base = + (struct nm_csb_ktoa *)(uintptr_t)csbo->csb_ktoa; + enum txrx t; + int num_rings[NR_TXRX], tot_rings; + size_t entry_size[2]; + void *csb_start[2]; + int i; + + if (priv->np_kloop_state & NM_SYNC_KLOOP_RUNNING) { + nm_prerr("Cannot update CSB while kloop is running"); + return EBUSY; + } + + tot_rings = 0; + for_rx_tx(t) { + num_rings[t] = priv->np_qlast[t] - priv->np_qfirst[t]; + tot_rings += num_rings[t]; + } + if (tot_rings <= 0) + return 0; + + if (!(priv->np_flags & NR_EXCLUSIVE)) { + nm_prerr("CSB mode requires NR_EXCLUSIVE"); + return EINVAL; + } + + entry_size[0] = sizeof(*csb_atok_base); + entry_size[1] = sizeof(*csb_ktoa_base); + csb_start[0] = (void *)csb_atok_base; + csb_start[1] = (void *)csb_ktoa_base; + + for (i = 0; i < 2; i++) { + /* On Linux we could use access_ok() to simplify + * the validation. However, the advantage of + * this approach is that it works also on + * FreeBSD. */ + size_t csb_size = tot_rings * entry_size[i]; + void *tmp; + int err; + + if ((uintptr_t)csb_start[i] & (entry_size[i]-1)) { + nm_prerr("Unaligned CSB address"); + return EINVAL; + } + + tmp = nm_os_malloc(csb_size); + if (!tmp) + return ENOMEM; + if (i == 0) { + /* Application --> kernel direction. */ + err = copyin(csb_start[i], tmp, csb_size); + } else { + /* Kernel --> application direction. */ + memset(tmp, 0, csb_size); + err = copyout(tmp, csb_start[i], csb_size); + } + nm_os_free(tmp); + if (err) { + nm_prerr("Invalid CSB address"); + return err; + } + } + + priv->np_csb_atok_base = csb_atok_base; + priv->np_csb_ktoa_base = csb_ktoa_base; + + /* Initialize the CSB. */ + for_rx_tx(t) { + for (i = 0; i < num_rings[t]; i++) { + struct netmap_kring *kring = + NMR(priv->np_na, t)[i + priv->np_qfirst[t]]; + struct nm_csb_atok *csb_atok = csb_atok_base + i; + struct nm_csb_ktoa *csb_ktoa = csb_ktoa_base + i; + + if (t == NR_RX) { + csb_atok += num_rings[NR_TX]; + csb_ktoa += num_rings[NR_TX]; + } + + CSB_WRITE(csb_atok, head, kring->rhead); + CSB_WRITE(csb_atok, cur, kring->rcur); + CSB_WRITE(csb_atok, appl_need_kick, 1); + CSB_WRITE(csb_atok, sync_flags, 1); + CSB_WRITE(csb_ktoa, hwcur, kring->nr_hwcur); + CSB_WRITE(csb_ktoa, hwtail, kring->nr_hwtail); + CSB_WRITE(csb_ktoa, kern_need_kick, 1); + + nm_prinf("csb_init for kring %s: head %u, cur %u, " + "hwcur %u, hwtail %u", kring->name, + kring->rhead, kring->rcur, kring->nr_hwcur, + kring->nr_hwtail); + } + } + + return 0; +} + /* * possibly move the interface to netmap-mode. * If success it returns a pointer to netmap_if, otherwise NULL. @@ -2137,7 +2232,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net na->name, mtu, na->rx_buf_maxsize, nbs); if (na->rx_buf_maxsize == 0) { - D("%s: error: rx_buf_maxsize == 0", na->name); + nm_prerr("%s: error: rx_buf_maxsize == 0", na->name); error = EIO; goto err_drop_mem; } @@ -2149,7 +2244,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net * cannot be used in this case. */ if (nbs < mtu) { nm_prerr("error: netmap buf size (%u) " - "< device MTU (%u)\n", nbs, mtu); + "< device MTU (%u)", nbs, mtu); error = EINVAL; goto err_drop_mem; } @@ -2162,14 +2257,14 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net if (!(na->na_flags & NAF_MOREFRAG)) { nm_prerr("error: large MTU (%d) needed " "but %s does not support " - "NS_MOREFRAG\n", mtu, + "NS_MOREFRAG", mtu, na->ifp->if_xname); error = EINVAL; goto err_drop_mem; } else if (nbs < na->rx_buf_maxsize) { nm_prerr("error: using NS_MOREFRAG on " "%s requires netmap buf size " - ">= %u\n", na->ifp->if_xname, + ">= %u", na->ifp->if_xname, na->rx_buf_maxsize); error = EINVAL; goto err_drop_mem; @@ -2177,7 +2272,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net nm_prinf("info: netmap application on " "%s needs to support " "NS_MOREFRAG " - "(MTU=%u,netmap_buf_size=%u)\n", + "(MTU=%u,netmap_buf_size=%u)", na->ifp->if_xname, mtu, nbs); } } @@ -2307,7 +2402,6 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c struct ifnet *ifp = NULL; int error = 0; u_int i, qfirst, qlast; - struct netmap_if *nifp; struct netmap_kring **krings; int sync_flags; enum txrx t; @@ -2316,14 +2410,10 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c case NIOCCTRL: { struct nmreq_header *hdr = (struct nmreq_header *)data; - if (hdr->nr_version != NETMAP_API) { - D("API mismatch for reqtype %d: got %d need %d", - hdr->nr_version, - hdr->nr_version, NETMAP_API); - hdr->nr_version = NETMAP_API; - } if (hdr->nr_version < NETMAP_MIN_API || hdr->nr_version > NETMAP_MAX_API) { + nm_prerr("API mismatch: got %d need %d", + hdr->nr_version, NETMAP_API); return EINVAL; } @@ -2345,13 +2435,13 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c case NETMAP_REQ_REGISTER: { struct nmreq_register *req = (struct nmreq_register *)(uintptr_t)hdr->nr_body; + struct netmap_if *nifp; + /* Protect access to priv from concurrent requests. */ NMG_LOCK(); do { - u_int memflags; -#ifdef WITH_EXTMEM struct nmreq_option *opt; -#endif /* WITH_EXTMEM */ + u_int memflags; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 11 08:20:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D6601325F72 for ; Tue, 11 Dec 2018 08:20:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82B5B8A5AA for ; Tue, 11 Dec 2018 08:20:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x743.google.com with SMTP id a132so8129346qkg.1 for ; Tue, 11 Dec 2018 00:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kj0CstleGLFyxn1V5J0ew/D7SufRTwRvAIvkMCvwEJc=; b=mxtu0idnjyQF426QwtGclw1hHO3VFyrY60ONF3+CwkFNWv1CMlL6Wpm1vyK6d96j14 ou+7u3quXMM9VNaNflAIBDWlgxusIRfssprDJKyDAMoYb6cpZTBb3xgA7/NPrXR9XYPR 0f+0Mc7I14F4mVkmPVwUMzqdckZ0lr0DGyVCpOdyEFAhq+spmfF8mC596rwZzN0wwP2r HpwLDyF+v9yoyMPDZxCvn8eSnBNiKBiOQyELfZJpWPKH5YcTKDWnq6nFbRqRFSwAYRhd qhVw0Y4MDhfooENpOb3KRE7/veYnDePvB0S0F1oAhM6PopM/2MzmtLl7JkiZWMMY6cD5 CumA== 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=kj0CstleGLFyxn1V5J0ew/D7SufRTwRvAIvkMCvwEJc=; b=jZfWSHQRk5i1anv/oPbaVG7/g6/GZr/BniCNPGU5nHeVxExaJDLPImIb8rRM2g7Dbx YOYdMFoC5DOc/ATVZzE4OCXt9KV42XYtTmTg1sKoZIqDYNgWI29sfv/qtWV1ZqTdnnS4 878QygmBavYDnqm6d/ejRG+NjeLnCT6g87a4YvOZCYQpjWb/yVpmsneysU3bZGv7aCif qKmJJX1x7X5Hc7g8FylzkNGASHetOIac7fXe7mYdYHz0P6YLiukMGnKJSCYRFrQs0SBo 5/u6G43b65FoiYnY8nx8/W48067J4I/PPN5dysHAOKsLVjTve2vJy9FT/5EJVCoxfRqi FpHQ== X-Gm-Message-State: AA+aEWYd0JrvYDg3D2lI/q0JPxiG+YHR2GTAsWPvhe1eSwXcHc9VVWxx Xgg9g6HQpNXcpgiJKXu/UxwfgmEjTH1v0YGARO2FZQ== X-Google-Smtp-Source: AFSGD/V9ki6YsZT/uPRZrdUDNLNHoIDs97cVO8Swsug2wszmjNoBqPWfJLuH1tdrTInuQ9IrExGo2yzOzzNJnzBYvAo= X-Received: by 2002:a37:6e86:: with SMTP id j128mr14197936qkc.46.1544516408844; Tue, 11 Dec 2018 00:20:08 -0800 (PST) MIME-Version: 1.0 References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <20181210234754.GD60291@kib.kiev.ua> In-Reply-To: From: Warner Losh Date: Tue, 11 Dec 2018 01:19:57 -0700 Message-ID: Subject: Re: svn commit: r341682 - head/sys/sys To: Scott Long Cc: Konstantin Belousov , John Baldwin , Kevin Bowling , Mateusz Guzik , Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Scott Long X-Rspamd-Queue-Id: 82B5B8A5AA X-Spamd-Result: default: False [3.23 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_SPAM_SHORT(0.89)[0.893,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_MEDIUM(0.95)[0.946,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[ALT1.aspmx.l.google.com,aspmx.l.google.com,ALT2.aspmx.l.google.com]; RCPT_COUNT_SEVEN(0.00)[10]; RCVD_IN_DNSWL_NONE(0.00)[3.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_SPAM_LONG(0.95)[0.950,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(0.45)[ip: (5.13), ipnet: 2607:f8b0::/32(-1.51), asn: 15169(-1.27), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_CC(0.00)[gmail.com] X-Rspamd-Server: mx1.freebsd.org X-Mailman-Approved-At: Tue, 11 Dec 2018 11:41:15 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 08:20:10 -0000 On Mon, Dec 10, 2018 at 9:57 PM Scott Long wrote: > > > > On Dec 10, 2018, at 4:47 PM, Konstantin Belousov > wrote: > > > > On Mon, Dec 10, 2018 at 02:15:20PM -0800, John Baldwin wrote: > >> On 12/8/18 7:43 PM, Warner Losh wrote: > >>> > >>> > >>> On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling wrote: > >>> > >>> On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > wrote: > >>> > >>>> > >>>> Fully satisfying solution would be that all architectures get 64-bit > >>>> ops, even if in the worst case they end up taking a lock. Then > >>>> subsystems would not have to ifdef on anything. However, there > >>>> was some opposition to this proposal and I don't think this is > >>>> important enough to push. > >>> > >>> Mateusz, > >>> > >>> Who is opposing this particular polyfill solution? Scott Long > brought > >>> up a situation in driver development where this would be useful as > >>> well. The polyfills lower the cognitive load and #ifdef soup whic= h > >>> are the right call here regardless of performance on toy ports. > >>> > >>> > >>> I don't recall seeing the opposition either. It would have to be a > global lock for all 64bit atomics.... but I think it would only be 2 > atomics on those architectures. > >> > >> It would have to be a spin lock, so in the case of unrl you would be > trading > >> an operation on one of N regular mutexes for a single spin lock that w= as > >> also contested by other things. This would be pretty crappy. For > drivers > >> that aren't actually used on platforms without 32-bit atomics we can > simply > >> not build them in sys/modules/Makefile or not put them in GENERIC. Fo= r > >> something in the core kernel like unrl I think we will have to do what > >> Mateusz has done here. > > > > It is worse. All atomics that acess the same location must use the same > > lock. Otherwise, you could observe torn writes and out of thin air > > values. Since you cannot know in advance which locations are acceses > > by the locked variant, all freebsd atomics ops have to be switched to > > locked variant on the architecture. > > 64bit atomics on I486 already suffer the risk of torn reads; the > implementation > merely does a CLI to protect against local preemption (though you could > still > get unlucky with an NMI). I suppose you could argue that SMP isn=E2=80= =99t really > viable on I486 and therefore this fact is irrelevant, but it does > illustrate > precedence for having API completeness in a platform. > We haven't ever supported SMP on i486, to my knowledge. Certainly by the 5.x time frame with SMPng it wasn't there. The 64-bit ops that are there are mostly to smoothly support some of the (now older) embedded boards. I haven't looked at the SMP work smp did for 4.x, but IIRC, it wasn't even supported there. > Really, this isn=E2=80=99t that hard. Part of the existing contract of u= sing > atomics is > that you carefully evaluate all uses of the variable and decide when to u= se > an atomic instruction. Arguing that we can=E2=80=99t make this process a= utomatic > and foolproof for 64bit quantities, especially for a subset of subset of > platforms/architectures, and therefore we should be even more of a > difficult > landmine, is not=E2=80=A6. I don=E2=80=99t know what to say=E2=80=A6 sens= ical? > I think it's fine to say that 64-bit atomics need to be efficient on the supported platforms (more on that below). > 64bit operations are a reality for MI code in a modern OS, and I=E2=80=99= m tired of > having to tip-toe around them due to incomplete MD implementations. The > instructions have been available on Intel CPUs for 25 years! My > very strong preference is to have a complete and functional implementatio= n > of atomic.h for any architecture that is hooked up to the build. We can > then > tackle the details of optimization and edge case refinement, just like we > do > with every other API and service that we work on. It doesn=E2=80=99t hav= e to be > perfect to be useful, and at this point we=E2=80=99re providing neither p= erfection > nor > utility, just =E2=80=9Cbuts=E2=80=9D and =E2=80=9Cwhat ifs=E2=80=9D. > I think you miss the point of discussion, at least on my part. I'm looking at the MIPS side and asking the question whatever 32-bit SMP support we may have had in the past should die. We only ever supported it on one not-so-common board that's aged out of relevance (JZ4780 is the only one I found that needs 32-bit MIPS SMP, and it's a 4 year old embedded board that's not that relevant today and there's no successor products in the market or as far as I can tell planned). We also have kernels that run in 32-bit mode on 64-bit hardware, but those provide little value and w already transitioned our largest 64-bit mips platform away from that support, so we can deorbit as well, I think. They give little value to the project. some house keeping here is likely in order. If that just leaves an odd PPC thing, then I think it's perfectly fine to start conversations there as well about trimming that support with the powerpc guys. Going forward, I=E2=80=99m going to start using 64bit atomics where they=E2= =80=99re prudent, > instead of avoiding them due to this niche 32bit argument. If that means > more and more of what I do no longer compiles on a mips or a ppc32, then > that=E2=80=99s a sacrifice that is fine with me. It still creates extra > development work, > and having a uniformly available implementation would be much nicer. > To be clear, I'm not making the argument since I could dig up one place in mips land that uses it, we should hold things back. I think the cost / benefit ratio for mips at least is the same as we have for some of the older arm stuff: we can implement it by disabling interrupts and declaring by fiat we won't support what few SMP chips that might be out there on that platform. FreeBSD/arm decided years ago we would never support the armv4 and armv5 SMP designs that were in the market place, for example. I think it's fine that we do that today with at least the mips32 stuff. And if people want to keep the mips32 UP stuff going, it's with the same CLI ; do it; POPF trick we do on intel to keep i486 going. My argument is that we need to find all the places that this would hurt, and we should make a calm, dispassionate decision about that pain. So far, the pain brought up on the 'hard to support end' suggests a minor trimming of what we support is in order rather than a holding back of other gains that can be made. I do plan on making this argument in the thread that's going on in mips@ right now, and hope to have it all squared away by the end of the week what the plans will be. We need to take a look at the trailing edge more aggressively. I'm looking at super-old SCSI cards, PC Card, armv5 and a few others that we should trim in 13. We've already circulated these ideas, and apart from very specific objections met with general support. Maybe we should seriously look at adding i486 to the list, as well as taking a hard look at 32-bit platforms post 13 and planning for that transition starting today. Brooks also has in motion this on the older nic card side of things too, so we'll see a big trimming there in the coming months as well. One thing the project has been bad about has been collecting data on what's actually in use and using that to more aggressively drive deprecation and removal of old drivers and features from the system that are no longer relevant. So we get stuck in arguments of someone has it, might be using it and since there's not organized pushback that articulates the real cost this has to the project, we accumulate a lot of drivers whose only changes have been API changes (and we're not even sure those were done right). The 64-bit atomics friction and grumpiness is but one symptom of this larger, deeper problem. And unless we address that, these narrow issues that are easy to talk to death will continue to plague our forward progress. Warner From owner-svn-src-all@freebsd.org Tue Dec 11 11:57:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C2A132D8FB; Tue, 11 Dec 2018 11:57:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8646B316; Tue, 11 Dec 2018 11:57:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DAAD2F3DE; Tue, 11 Dec 2018 11:57:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBBvCUx027864; Tue, 11 Dec 2018 11:57:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBBvCZj027863; Tue, 11 Dec 2018 11:57:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812111157.wBBBvCZj027863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Dec 2018 11:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341816 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 341816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C8646B316 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 11:57:13 -0000 Author: mjg Date: Tue Dec 11 11:57:12 2018 New Revision: 341816 URL: https://svnweb.freebsd.org/changeset/base/341816 Log: fd: stop looking for exact freefile after allocation If a lower fd is closed later, the lookup goes to waste. Allocation always performs the lookup anyway. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Dec 11 11:31:13 2018 (r341815) +++ head/sys/kern/kern_descrip.c Tue Dec 11 11:57:12 2018 (r341816) @@ -262,7 +262,7 @@ fdused(struct filedesc *fdp, int fd) if (fd > fdp->fd_lastfile) fdp->fd_lastfile = fd; if (fd == fdp->fd_freefile) - fdp->fd_freefile = fd_first_free(fdp, fd, fdp->fd_nfiles); + fdp->fd_freefile++; } /* From owner-svn-src-all@freebsd.org Tue Dec 11 11:58:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE196132DA5E; Tue, 11 Dec 2018 11:58:45 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95A236B4BA; Tue, 11 Dec 2018 11:58:45 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 769DC2F3E6; Tue, 11 Dec 2018 11:58:45 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBBwjsk027965; Tue, 11 Dec 2018 11:58:45 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBBwjIm027964; Tue, 11 Dec 2018 11:58:45 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812111158.wBBBwjIm027964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Dec 2018 11:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341817 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 341817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 95A236B4BA X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 11:58:46 -0000 Author: mjg Date: Tue Dec 11 11:58:44 2018 New Revision: 341817 URL: https://svnweb.freebsd.org/changeset/base/341817 Log: fd: tidy up closing a fd - avoid a call to knote_close in the common case - annotate mqueue as unlikely Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Dec 11 11:57:12 2018 (r341816) +++ head/sys/kern/kern_descrip.c Tue Dec 11 11:58:44 2018 (r341817) @@ -1186,12 +1186,13 @@ closefp(struct filedesc *fdp, int fd, struct file *fp, * knote_fdclose to prevent a race of the fd getting opened, a knote * added, and deleteing a knote for the new fd. */ - knote_fdclose(td, fd); + if (__predict_false(!TAILQ_EMPTY(&fdp->fd_kqlist))) + knote_fdclose(td, fd); /* * We need to notify mqueue if the object is of type mqueue. */ - if (fp->f_type == DTYPE_MQUEUE) + if (__predict_false(fp->f_type == DTYPE_MQUEUE)) mq_fdclose(td, fd, fp); FILEDESC_XUNLOCK(fdp); From owner-svn-src-all@freebsd.org Tue Dec 11 12:01:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 524DA132E689; Tue, 11 Dec 2018 12:01:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E84766B9F2; Tue, 11 Dec 2018 12:01:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB13E2F569; Tue, 11 Dec 2018 12:01:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBC1kY0031375; Tue, 11 Dec 2018 12:01:46 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBC1kl2031373; Tue, 11 Dec 2018 12:01:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812111201.wBBC1kl2031373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Dec 2018 12:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341818 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 341818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E84766B9F2 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 12:01:47 -0000 Author: mjg Date: Tue Dec 11 12:01:46 2018 New Revision: 341818 URL: https://svnweb.freebsd.org/changeset/base/341818 Log: Make lim_cur inline if possible. It is a function call only to accomodate *some* ABIs which install a hook. They only care for 3 types of limits: DATA, STACK, VMEM Instead of always calling the func, see at compilation time if the requested limit is something else and just do the read if so. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_resource.c head/sys/sys/resourcevar.h Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Tue Dec 11 11:58:44 2018 (r341817) +++ head/sys/kern/kern_resource.c Tue Dec 11 12:01:46 2018 (r341818) @@ -1168,7 +1168,7 @@ lim_max_proc(struct proc *p, int which) * The which parameter which specifies the index into the rlimit array */ rlim_t -lim_cur(struct thread *td, int which) +(lim_cur)(struct thread *td, int which) { struct rlimit rl; Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Tue Dec 11 11:58:44 2018 (r341817) +++ head/sys/sys/resourcevar.h Tue Dec 11 12:01:46 2018 (r341818) @@ -132,6 +132,19 @@ struct plimit *lim_alloc(void); void lim_copy(struct plimit *dst, struct plimit *src); rlim_t lim_cur(struct thread *td, int which); +#define lim_cur(td, which) ({ \ + rlim_t _rlim; \ + struct thread *_td = (td); \ + int _which = (which); \ + if (__builtin_constant_p(which) && which != RLIMIT_DATA && \ + which != RLIMIT_STACK && which != RLIMIT_VMEM) { \ + _rlim = td->td_limit->pl_rlimit[which].rlim_cur; \ + } else { \ + _rlim = lim_cur(_td, _which); \ + } \ + _rlim; \ +}) + rlim_t lim_cur_proc(struct proc *p, int which); void lim_fork(struct proc *p1, struct proc *p2); void lim_free(struct plimit *limp); From owner-svn-src-all@freebsd.org Tue Dec 11 12:08:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51811132EF4D; Tue, 11 Dec 2018 12:08:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E840D6C0DC; Tue, 11 Dec 2018 12:08:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3D7B2F5AD; Tue, 11 Dec 2018 12:08:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBC8Ikt033443; Tue, 11 Dec 2018 12:08:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBC8I2M033442; Tue, 11 Dec 2018 12:08:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812111208.wBBC8I2M033442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Dec 2018 12:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341819 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 341819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E840D6C0DC X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 12:08:19 -0000 Author: mjg Date: Tue Dec 11 12:08:18 2018 New Revision: 341819 URL: https://svnweb.freebsd.org/changeset/base/341819 Log: fd: dedup code in sys_getdtablesize Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Dec 11 12:01:46 2018 (r341818) +++ head/sys/kern/kern_descrip.c Tue Dec 11 12:08:18 2018 (r341819) @@ -348,8 +348,7 @@ sys_getdtablesize(struct thread *td, struct getdtables uint64_t lim; #endif - td->td_retval[0] = - min((int)lim_cur(td, RLIMIT_NOFILE), maxfilesperproc); + td->td_retval[0] = getmaxfd(td); #ifdef RACCT PROC_LOCK(td->td_proc); lim = racct_get_limit(td->td_proc, RACCT_NOFILE); From owner-svn-src-all@freebsd.org Tue Dec 11 11:40:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86977132CD80; Tue, 11 Dec 2018 11:40:49 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id B90076A8BA; Tue, 11 Dec 2018 11:40:48 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 47B651484E; Tue, 11 Dec 2018 11:40:47 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id wBBBekuu066229 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 11 Dec 2018 11:40:46 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id wBBBejm4066228; Tue, 11 Dec 2018 11:40:45 GMT (envelope-from phk) To: Warner Losh cc: Scott Long , Konstantin Belousov , John Baldwin , Kevin Bowling , Mateusz Guzik , Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Scott Long Subject: Re: svn commit: r341682 - head/sys/sys In-reply-to: From: "Poul-Henning Kamp" References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <20181210234754.GD60291@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <66226.1544528445.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Tue, 11 Dec 2018 11:40:45 +0000 Message-ID: <66227.1544528445@critter.freebsd.dk> X-Rspamd-Queue-Id: B90076A8BA X-Spamd-Result: default: False [4.12 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.78)[0.784,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.dk]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.95)[0.945,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: phk.freebsd.dk]; NEURAL_SPAM_LONG(0.94)[0.937,0]; RCPT_COUNT_SEVEN(0.00)[11]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; RCVD_NO_TLS_LAST(0.10)[]; R_DKIM_NA(0.00)[]; IP_SCORE(0.17)[asn: 1835(0.85), country: EU(-0.00)]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU]; FROM_NEQ_ENVFROM(0.00)[phk@phk.freebsd.dk,phk@critter.freebsd.dk] X-Rspamd-Server: mx1.freebsd.org X-Mailman-Approved-At: Tue, 11 Dec 2018 14:21:20 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 11:40:49 -0000 -------- In message , Warner Losh writes: >We haven't ever supported SMP on i486, to my knowledge. There were never any usable i486 SMP hardware. The i486 CPU was not designed to do SMP so getting two CPUs to talk together (IPIs and all that) required a lot of glue-logic, which never got chip-ified. A few prototypes were built, but nothing ever reached production, least of all HP's 1000xi486 chip "mainfram" project. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-all@freebsd.org Tue Dec 11 16:36:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51A0513373F4; Tue, 11 Dec 2018 16:36:00 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E81987F6C2; Tue, 11 Dec 2018 16:35:59 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C918B242F; Tue, 11 Dec 2018 16:35:59 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBGZxux074272; Tue, 11 Dec 2018 16:35:59 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBGZxaD074270; Tue, 11 Dec 2018 16:35:59 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201812111635.wBBGZxaD074270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Tue, 11 Dec 2018 16:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341820 - head/sys/dev/asmc X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/dev/asmc X-SVN-Commit-Revision: 341820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E81987F6C2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.51 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.51)[-0.506,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 16:36:00 -0000 Author: dab Date: Tue Dec 11 16:35:59 2018 New Revision: 341820 URL: https://svnweb.freebsd.org/changeset/base/341820 Log: asmc: Add Support for MacBookAir 7,1 and 7,2 PR: 226172 Submitted by: James Wright Reported by: James Wright MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18396 Modified: head/sys/dev/asmc/asmc.c head/sys/dev/asmc/asmcvar.h Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Tue Dec 11 12:08:18 2018 (r341819) +++ head/sys/dev/asmc/asmc.c Tue Dec 11 16:35:59 2018 (r341820) @@ -300,6 +300,21 @@ struct asmc_model asmc_models[] = { ASMC_MBA5_TEMPS, ASMC_MBA5_TEMPNAMES, ASMC_MBA5_TEMPDESCS }, + { + "MacBookAir7,1", "Apple SMC MacBook Air 11-inch (Early 2015)", + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS, + ASMC_MBA7_TEMPS, ASMC_MBA7_TEMPNAMES, ASMC_MBA7_TEMPDESCS + }, + + { + "MacBookAir7,2", "Apple SMC MacBook Air 13-inch (Early 2015)", + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS, + ASMC_MBA7_TEMPS, ASMC_MBA7_TEMPNAMES, ASMC_MBA7_TEMPDESCS + }, { NULL, NULL } }; Modified: head/sys/dev/asmc/asmcvar.h ============================================================================== --- head/sys/dev/asmc/asmcvar.h Tue Dec 11 12:08:18 2018 (r341819) +++ head/sys/dev/asmc/asmcvar.h Tue Dec 11 16:35:59 2018 (r341820) @@ -428,3 +428,27 @@ struct asmc_softc { "TCXC", "THSP", "Memory Bank A", "PCH Die", \ "Ta0P", "Heatpipe", "Mainboard Proximity 1", "Mainboard Proximity 2", \ "Palm Rest", "Memory Proximity" } + +#define ASMC_MBA7_TEMPS { "TB0T", "TB1T", "TB2T", \ + "TC0E", "TC0F", "TC0P", \ + "TC1C", "TC2C", \ + "TCGC", "TCSA", "TCXC", \ + "THSP", "TM0P", "TPCD", \ + "TW0P" "Ta0P", "Th1H", \ + "Tm0P", "Ts0P", "Ts0S", NULL } + +#define ASMC_MBA7_TEMPNAMES { "enclosure1", "enclosure2", "enclosure3", \ + "cputemp1", "cputemp2", "cpuproximity", \ + "cpucore1", "cpucore2", \ + "pecigpu", "pecisa", "pecicpu", \ + "thunderboltproximity", "memorybank", "pchdie", \ + "wirelessproximity", "airflowproximity", "heatpipe", \ + "mainboardproximity", "palmrest", "memoryproximity" } + +#define ASMC_MBA7_TEMPDESCS { "Enclosure Bottom 1", "Enclosure Bottom 2", "Enclosure Bottom 3", \ + "CPU Temp 1", "CPU Temp 2", "CPU Proximity", \ + "CPU Core 1", "CPU Core 2", \ + "PECI GPU", "PECI SA", "PECI CPU", \ + "Thunderbolt Proximity", "Memory Bank A", "PCH Die", \ + "Wireless Proximity", "Airflow Proxmity", "Heatpipe", \ + "Mainboard Proximity", "Palm Rest", "Memory Proximity" } From owner-svn-src-all@freebsd.org Tue Dec 11 16:49:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99B9F13379DF; Tue, 11 Dec 2018 16:49:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36A167FF2B; Tue, 11 Dec 2018 16:49:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1820725F2; Tue, 11 Dec 2018 16:49:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBGn1l1079695; Tue, 11 Dec 2018 16:49:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBGn1rB079694; Tue, 11 Dec 2018 16:49:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812111649.wBBGn1rB079694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Dec 2018 16:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341821 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 341821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36A167FF2B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.50 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.50)[-0.496,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 16:49:02 -0000 Author: markj Date: Tue Dec 11 16:49:01 2018 New Revision: 341821 URL: https://svnweb.freebsd.org/changeset/base/341821 Log: Fix the PAE kernel gcc build. The error was caused by map_ucode() casting a vm_paddr_t to a void *. Use a uintptr_t instead to match the caller. Fix some style bugs while here. Reported by: bde Reviewed by: bde MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/x86/x86/ucode.c Modified: head/sys/x86/x86/ucode.c ============================================================================== --- head/sys/x86/x86/ucode.c Tue Dec 11 16:35:59 2018 (r341820) +++ head/sys/x86/x86/ucode.c Tue Dec 11 16:49:01 2018 (r341821) @@ -278,12 +278,13 @@ ucode_load_ap(int cpu) } static void * -map_ucode(vm_paddr_t free, size_t len) +map_ucode(uintptr_t free, size_t len) { - #ifdef __i386__ - for (vm_paddr_t pa = free; pa < free + len; pa += PAGE_SIZE) - pmap_kenter(pa, pa); + uintptr_t va; + + for (va = free; va < free + len; va += PAGE_SIZE) + pmap_kenter(va, (vm_paddr_t)va); #else (void)len; #endif @@ -291,12 +292,13 @@ map_ucode(vm_paddr_t free, size_t len) } static void -unmap_ucode(vm_paddr_t free, size_t len) +unmap_ucode(uintptr_t free, size_t len) { - #ifdef __i386__ - for (vm_paddr_t pa = free; pa < free + len; pa += PAGE_SIZE) - pmap_kremove((vm_offset_t)pa); + uintptr_t va; + + for (va = free; va < free + len; va += PAGE_SIZE) + pmap_kremove(va); #else (void)free; (void)len; From owner-svn-src-all@freebsd.org Tue Dec 11 17:14:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16743130B0F9; Tue, 11 Dec 2018 17:14:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFAFF81614; Tue, 11 Dec 2018 17:14:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91C832B03; Tue, 11 Dec 2018 17:14:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBHECb1095832; Tue, 11 Dec 2018 17:14:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBHECSk095831; Tue, 11 Dec 2018 17:14:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812111714.wBBHECSk095831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Dec 2018 17:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341822 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 341822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AFAFF81614 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.55 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.55)[-0.545,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 17:14:13 -0000 Author: mjg Date: Tue Dec 11 17:14:12 2018 New Revision: 341822 URL: https://svnweb.freebsd.org/changeset/base/341822 Log: audi: replace open-coded TDP_AUDITREC checks with the macro Sponsored by: The FreeBSD Foundation Modified: head/sys/security/audit/audit.h Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Tue Dec 11 16:49:01 2018 (r341821) +++ head/sys/security/audit/audit.h Tue Dec 11 17:14:12 2018 (r341822) @@ -389,7 +389,7 @@ void audit_thread_free(struct thread *td); * auditing is disabled, so we don't just check audit_syscalls_enabled here. */ #define AUDIT_SYSCALL_EXIT(error, td) do { \ - if (td->td_pflags & TDP_AUDITREC) \ + if (AUDITING_TD(td)) \ audit_syscall_exit(error, td); \ } while (0) @@ -397,7 +397,7 @@ void audit_thread_free(struct thread *td); * A Macro to wrap the audit_sysclose() function. */ #define AUDIT_SYSCLOSE(td, fd) do { \ - if (td->td_pflags & TDP_AUDITREC) \ + if (AUDITING_TD(td)) \ audit_sysclose(td, fd); \ } while (0) From owner-svn-src-all@freebsd.org Tue Dec 11 17:23:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 887F9130B614; Tue, 11 Dec 2018 17:23:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EAF781E62; Tue, 11 Dec 2018 17:23:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 33C2710A87D; Tue, 11 Dec 2018 12:23:57 -0500 (EST) Subject: Re: svn commit: r341803 - head/libexec/rc To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812110138.wBB1cp1p006660@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= xsDiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg80eSm9obiBCYWxk d2luIDxqb2huQGJhbGR3aW4uY3g+wmMEExECACMCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX gAUCRND5wwIZAQAKCRBy3lIGd+N/BNLXAJ9KIb6teuDL1W+FkCgvv+y8PxKTkACeIUfbn3sl cueBzqTcf09idwa8YTbOwU0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Ds gnr31AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh +GojXlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cM SOrHYUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOF QVHOEVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq 1tqzhltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZ TwtXsNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m 7Z164yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioI AjjHaIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbU KWwxQ4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjH uW/CSQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZN wwCfafMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> Date: Tue, 11 Dec 2018 09:23:56 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <201812110138.wBB1cp1p006660@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 11 Dec 2018 12:23:57 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-Rspamd-Queue-Id: 2EAF781E62 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.48 / 15.00]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.48)[-0.483,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 17:23:58 -0000 On 12/10/18 5:38 PM, Conrad Meyer wrote: > Author: cem > Date: Tue Dec 11 01:38:50 2018 > New Revision: 341803 > URL: https://svnweb.freebsd.org/changeset/base/341803 > > Log: > rc.subr: Implement list_vars without using 'read' > > 'read' pessimistically read(2)s one byte at a time, which can be quite > silly for large environments in slow emulators. > > In my boring user environment, truss shows that the number of read() > syscalls to source rc.subr and invoke list_vars is reduced by something like > 3400 to 60. ministat(1) shows a significant time difference of about -71% > for my environment. > > Suggested by: jilles > Discussed with: dteske, jhb, jilles > Differential Revision: https://reviews.freebsd.org/D18481 For some background, one my colleagues reported that it was taking hours in (an admittedly slow) CPU simulator to get through '/etc/rc.d/netif start'. I ended up running that script under truss in a RISC-V qemu machine. The entire run took 212 seconds (truss did slow it down quite a bit). Of that 212 seconds, the read side of each list_vars invocation took ~25.5 seconds, and with lo0 and vtnet0 there were 8 list_vars invocations, so 204 out of the 212 seconds were spent in the single-byte read() syscalls in 'while read'. Even on qemu without truss during bootup 'netif start' took a couple of seconds (long enough to get 2-3 Ctrl-T's in) before this change and is now similar to bare metal with the change. list_vars is rarely used outside of 'netif', so it probably doesn't make a measurable difference on bare metal. -- John Baldwin                                                                              From owner-svn-src-all@freebsd.org Tue Dec 11 17:40:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3E32130C03A; Tue, 11 Dec 2018 17:40:55 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDDDB82A8A; Tue, 11 Dec 2018 17:40:54 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [76.77.180.168] (port=60367 helo=eskarina.lan) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1gWm1W-000C5t-ME; Tue, 11 Dec 2018 09:40:46 -0800 From: Devin Teske Message-Id: <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r341803 - head/libexec/rc Date: Tue, 11 Dec 2018 09:40:45 -0800 In-Reply-To: <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> Cc: Devin Teske , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: John Baldwin References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: CDDDB82A8A X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.17 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; IP_SCORE(0.29)[ip: (0.80), ipnet: 64.201.240.0/20(0.40), asn: 36734(0.32), country: US(-0.09)]; NEURAL_SPAM_SHORT(0.19)[0.195,0]; MX_GOOD(-0.01)[mail.shxd.cx]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 17:40:56 -0000 > On Dec 11, 2018, at 9:23 AM, John Baldwin wrote: >=20 > On 12/10/18 5:38 PM, Conrad Meyer wrote: >> Author: cem >> Date: Tue Dec 11 01:38:50 2018 >> New Revision: 341803 >> URL: https://svnweb.freebsd.org/changeset/base/341803 >>=20 >> Log: >> rc.subr: Implement list_vars without using 'read' >>=20 >> 'read' pessimistically read(2)s one byte at a time, which can be = quite >> silly for large environments in slow emulators. >>=20 >> In my boring user environment, truss shows that the number of read() >> syscalls to source rc.subr and invoke list_vars is reduced by = something like >> 3400 to 60. ministat(1) shows a significant time difference of = about -71% >> for my environment. >>=20 >> Suggested by: jilles >> Discussed with: dteske, jhb, jilles >> Differential Revision: https://reviews.freebsd.org/D18481 >=20 > For some background, one my colleagues reported that it was taking = hours in > (an admittedly slow) CPU simulator to get through '/etc/rc.d/netif = start'. > I ended up running that script under truss in a RISC-V qemu machine. = The > entire run took 212 seconds (truss did slow it down quite a bit). Of = that > 212 seconds, the read side of each list_vars invocation took ~25.5 = seconds, > and with lo0 and vtnet0 there were 8 list_vars invocations, so 204 out = of > the 212 seconds were spent in the single-byte read() syscalls in = 'while read'. >=20 > Even on qemu without truss during bootup 'netif start' took a couple = of > seconds (long enough to get 2-3 Ctrl-T's in) before this change and is = now > similar to bare metal with the change. list_vars is rarely used = outside of > 'netif', so it probably doesn't make a measurable difference on bare = metal. >=20 Thank you for the background which was lost by the time I got to the = phab. I can't help but ask though,... If it was noticed that read(2) processes the stream one byte at a time, why not just optimize read(2)? I'm afraid of the prospect of having to hunt down every instance of = while-read, but if we can fix the underlying read(2) inefficiency then we make = while-read OK. --=20 Devin= From owner-svn-src-all@freebsd.org Tue Dec 11 17:46:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39FFE130C2EA; Tue, 11 Dec 2018 17:46:02 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D543F82EBF; Tue, 11 Dec 2018 17:46:01 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B63B73026; Tue, 11 Dec 2018 17:46:01 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBHk1b4011917; Tue, 11 Dec 2018 17:46:01 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBHk1E2011916; Tue, 11 Dec 2018 17:46:01 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201812111746.wBBHk1E2011916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Tue, 11 Dec 2018 17:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341824 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 341824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D543F82EBF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.57 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.57)[-0.574,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 17:46:02 -0000 Author: shurd Date: Tue Dec 11 17:46:01 2018 New Revision: 341824 URL: https://svnweb.freebsd.org/changeset/base/341824 Log: Fix !tx_abdicate error from r336560 r336560 was supposed to restore pre-r323954 behaviour when tx_abdicate is not set (the default case). However, it appears that rather than the drainage check being made conditional on tx_abdicate being set, it was duplicated so it occured twice if tx_abdicate was set and once if it was not. Now when !tx_abdicate, drainage is only checked if the doorbell isn't pending. Reported by: lev MFC after: 1 week Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Dec 11 17:39:49 2018 (r341823) +++ head/sys/net/iflib.c Tue Dec 11 17:46:01 2018 (r341824) @@ -3582,7 +3582,6 @@ _task_fn_tx(void *context) */ if (abdicate) ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); - ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); else { From owner-svn-src-all@freebsd.org Tue Dec 11 17:55:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1A0D130C797; Tue, 11 Dec 2018 17:55:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DBF83588; Tue, 11 Dec 2018 17:55:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 6D94A10A87D; Tue, 11 Dec 2018 12:54:59 -0500 (EST) Subject: Re: svn commit: r341803 - head/libexec/rc To: Devin Teske Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= xsDiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg80eSm9obiBCYWxk d2luIDxqb2huQGJhbGR3aW4uY3g+wmMEExECACMCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX gAUCRND5wwIZAQAKCRBy3lIGd+N/BNLXAJ9KIb6teuDL1W+FkCgvv+y8PxKTkACeIUfbn3sl cueBzqTcf09idwa8YTbOwU0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Ds gnr31AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh +GojXlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cM SOrHYUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOF QVHOEVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq 1tqzhltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZ TwtXsNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m 7Z164yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioI AjjHaIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbU KWwxQ4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjH uW/CSQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZN wwCfafMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 11 Dec 2018 09:54:58 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 11 Dec 2018 12:54:59 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-Rspamd-Queue-Id: 65DBF83588 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.50 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.50)[-0.499,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 17:55:01 -0000 On 12/11/18 9:40 AM, Devin Teske wrote: > > >> On Dec 11, 2018, at 9:23 AM, John Baldwin > wrote: >> >> On 12/10/18 5:38 PM, Conrad Meyer wrote: >>> Author: cem >>> Date: Tue Dec 11 01:38:50 2018 >>> New Revision: 341803 >>> URL: https://svnweb.freebsd.org/changeset/base/341803 >>> >>> Log: >>>  rc.subr: Implement list_vars without using 'read' >>> >>>  'read' pessimistically read(2)s one byte at a time, which can be quite >>>  silly for large environments in slow emulators. >>> >>>  In my boring user environment, truss shows that the number of read() >>>  syscalls to source rc.subr and invoke list_vars is reduced by something like >>>  3400 to 60.  ministat(1) shows a significant time difference of about -71% >>>  for my environment. >>> >>>  Suggested by:jilles >>>  Discussed with:dteske, jhb, jilles >>>  Differential Revision:https://reviews.freebsd.org/D18481 >> >> For some background, one my colleagues reported that it was taking hours in >> (an admittedly slow) CPU simulator to get through '/etc/rc.d/netif start'. >> I ended up running that script under truss in a RISC-V qemu machine.  The >> entire run took 212 seconds (truss did slow it down quite a bit).  Of that >> 212 seconds, the read side of each list_vars invocation took ~25.5 seconds, >> and with lo0 and vtnet0 there were 8 list_vars invocations, so 204 out of >> the 212 seconds were spent in the single-byte read() syscalls in 'while read'. >> >> Even on qemu without truss during bootup 'netif start' took a couple of >> seconds (long enough to get 2-3 Ctrl-T's in) before this change and is now >> similar to bare metal with the change.  list_vars is rarely used outside of >> 'netif', so it probably doesn't make a measurable difference on bare metal. >> > > Thank you for the background which was lost by the time I got to the phab. > > I can't help but ask though,... > > If it was noticed that read(2) processes the stream one byte at a time, > why not just optimize read(2)? > > I'm afraid of the prospect of having to hunt down every instance of while-read, > but if we can fix the underlying read(2) inefficiency then we make while-read OK. It's a system call. A CPU emulator has to do a lot of work for a system call because it involves two mode switches (user -> kernel and back again). You can't "fix" that as it's just a part of the CPU architecture. There's a reason that stdio uses buffering by default, it's because system calls have overhead. The 'read' builtin in sh can't use buffering, so it is always going to be inefficient. -- John Baldwin                                                                              From owner-svn-src-all@freebsd.org Tue Dec 11 18:04:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA093130CD9F for ; Tue, 11 Dec 2018 18:04:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E328783BFD for ; Tue, 11 Dec 2018 18:04:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id w204so9165281qka.2 for ; Tue, 11 Dec 2018 10:04:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xOECVAH5OHnyxXbd2NP4+thkmRxZPFkFRhC0MRjqDYU=; b=Fw05dZBEc76y0j4lljRAvF4SmfK7BsCXmwXiFGR+LQiA5B8f2T/1HYL5k7Px8nZIlf 8+cRURp23m1SfJzvA0xaRExWKfW2EvsQjAH69N6TtBioXYw/7UYpFwFldeimucNnaZQf kmTes6IdW4a5GAWhibo2g+bJSr4HM/TLaXfbq20xiq9SyncKWRgEBVwpYCmLgRz4D+Ib XRoa8haP3yUYnMsYMa10E7b8bop7gv97bL8gU2DcwM9pMXw5olEim8smXTvmMQLpyFHc 7VojzE+FGPI4kj41EJ2S8Dd9kj2r5dJFwqL3mSj1JwR7Qb6sSxufUBV5LZzKbNRqAC9J YenA== 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=xOECVAH5OHnyxXbd2NP4+thkmRxZPFkFRhC0MRjqDYU=; b=oMqFKrIWbjpur2XiNK0eZpRQdwkl12FAzSDh0PpkyzUiUtn6zdRB2dMjkYskcU1k4t 5rwdnzI8sCahWzHAuyacAD1Enw4x2LB4nGbYaxEG8DKMLSA+5PkO9MHb8XRC8HSYXGga GZK5hJXpIRzH2rruJZpIqNZL/DGyESyYgNdiZuCg4Ew2wF39r+PDrMhobb1RShGvx/5Z EJP/PNBAiFyZ3Zi6bwbgtiCNLzSh6QLi4+/OO3BzNBanB6tE+t0Hfw9LpUa7hEzz8KMb QVYLWELyEM2Oa3u0Wt+nCCxHw6nLIafJ4nvl2mgZwk8WaF7KvZ7LYjxm3zLLExPVNgNn LW8A== X-Gm-Message-State: AA+aEWZzSNEkJ+pbOODI5jbBMA8n+Q0vHuzkLAiPxpReCwSQltiXtSCY zkIVMQ5KxjajG5so8hTT6ltFxMOT1inJufQXgVJcVQ== X-Google-Smtp-Source: AFSGD/Ux29L2XEoLMu4sRrgBxEa8x8Bb7qXNUGUM40fEussidU01KolRwQGfRKskFnRG6xyL4BXJ8uFupLhj+aHuNKY= X-Received: by 2002:a37:6e86:: with SMTP id j128mr16046831qkc.46.1544551447267; Tue, 11 Dec 2018 10:04:07 -0800 (PST) MIME-Version: 1.0 References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Tue, 11 Dec 2018 11:03:55 -0700 Message-ID: Subject: Re: svn commit: r341803 - head/libexec/rc To: John Baldwin Cc: Devin Teske , "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: E328783BFD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Fw05dZBE X-Spamd-Result: default: False [-2.72 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[1.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-1.76)[ip: (-5.94), ipnet: 2607:f8b0::/32(-1.53), asn: 15169(-1.27), country: US(-0.09)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 18:04:09 -0000 On Tue, Dec 11, 2018, 9:55 AM John Baldwin The 'read' builtin in sh can't use buffering, so it is always going to be > slow > It can't use it because of pipes. The example from the parts of this that was on IRC was basically: foo | (read bar; baz) Which reads one line into the bar variable and then sends the rest to the bar command. Warner > From owner-svn-src-all@freebsd.org Tue Dec 11 19:05:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3329A130F88E; Tue, 11 Dec 2018 19:05:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D43BE867FC; Tue, 11 Dec 2018 19:05:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4CF64258; Tue, 11 Dec 2018 19:05:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBJ5Z4L053496; Tue, 11 Dec 2018 19:05:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBJ5Yfu053488; Tue, 11 Dec 2018 19:05:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812111905.wBBJ5Yfu053488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Dec 2018 19:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341825 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/include/xray contrib/compiler-rt/lib/BlocksRuntime contrib/compiler-rt/lib/asan contri... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/include/xray contrib/compiler-rt/lib/BlocksRuntime contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtin... X-SVN-Commit-Revision: 341825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D43BE867FC X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.49)[-0.494,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 19:05:38 -0000 Author: dim Date: Tue Dec 11 19:05:28 2018 New Revision: 341825 URL: https://svnweb.freebsd.org/changeset/base/341825 Log: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to the upstream release_70 branch r348686 (effectively, 7.0.1 rc3). The release will follow very soon, but no more functional changes are expected. Release notes for llvm, clang and lld 7.0.0 are available here: PR: 230240, 230355 Relnotes: yes MFC after: 2 months Added: head/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h head/contrib/compiler-rt/lib/asan/asan_malloc_local.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/asan/asan_malloc_local.h head/contrib/compiler-rt/lib/asan/asan_mapping_myriad.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/asan/asan_mapping_myriad.h head/contrib/compiler-rt/lib/asan/asan_rtems.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/asan/asan_rtems.cc head/contrib/compiler-rt/lib/builtins/arm/chkstk.S - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/builtins/arm/chkstk.S head/contrib/compiler-rt/lib/builtins/hexagon/ - copied from r341824, projects/clang700-import/contrib/compiler-rt/lib/builtins/hexagon/ head/contrib/compiler-rt/lib/builtins/riscv/ - copied from r341824, projects/clang700-import/contrib/compiler-rt/lib/builtins/riscv/ - copied from r341824, projects/clang700-import/contrib/compiler-rt/lib/fuzzer/ head/contrib/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc head/contrib/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.h head/contrib/compiler-rt/lib/hwasan/hwasan_mapping.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/hwasan/hwasan_mapping.h head/contrib/compiler-rt/lib/hwasan/hwasan_report.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/hwasan/hwasan_report.h head/contrib/compiler-rt/lib/msan/msan_report.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/msan/msan_report.h head/contrib/compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_openbsd.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_openbsd.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_rtems.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_rtems.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_rtems.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_rtems.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_rtems.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_rtems.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc head/contrib/compiler-rt/lib/scudo/scudo_errors.cpp - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/scudo/scudo_errors.cpp head/contrib/compiler-rt/lib/scudo/scudo_errors.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/scudo/scudo_errors.h head/contrib/compiler-rt/lib/scudo/scudo_malloc.cpp - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/scudo/scudo_malloc.cpp head/contrib/compiler-rt/lib/ubsan/ubsan_init_standalone_preinit.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/ubsan/ubsan_init_standalone_preinit.cc head/contrib/compiler-rt/lib/ubsan/ubsan_monitor.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/ubsan/ubsan_monitor.cc head/contrib/compiler-rt/lib/ubsan/ubsan_monitor.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/ubsan/ubsan_monitor.h head/contrib/compiler-rt/lib/xray/xray_allocator.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_allocator.h head/contrib/compiler-rt/lib/xray/xray_basic_flags.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_basic_flags.cc head/contrib/compiler-rt/lib/xray/xray_basic_flags.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_basic_flags.h head/contrib/compiler-rt/lib/xray/xray_basic_flags.inc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_basic_flags.inc head/contrib/compiler-rt/lib/xray/xray_basic_logging.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_basic_logging.cc head/contrib/compiler-rt/lib/xray/xray_basic_logging.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_basic_logging.h head/contrib/compiler-rt/lib/xray/xray_fdr_flags.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_fdr_flags.cc head/contrib/compiler-rt/lib/xray/xray_fdr_flags.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_fdr_flags.h head/contrib/compiler-rt/lib/xray/xray_fdr_flags.inc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_fdr_flags.inc head/contrib/compiler-rt/lib/xray/xray_function_call_trie.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_function_call_trie.h head/contrib/compiler-rt/lib/xray/xray_profile_collector.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_profile_collector.cc head/contrib/compiler-rt/lib/xray/xray_profile_collector.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_profile_collector.h head/contrib/compiler-rt/lib/xray/xray_profiling.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_profiling.cc head/contrib/compiler-rt/lib/xray/xray_profiling_flags.cc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_profiling_flags.cc head/contrib/compiler-rt/lib/xray/xray_profiling_flags.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_profiling_flags.h head/contrib/compiler-rt/lib/xray/xray_profiling_flags.inc - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_profiling_flags.inc head/contrib/compiler-rt/lib/xray/xray_recursion_guard.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_recursion_guard.h head/contrib/compiler-rt/lib/xray/xray_segmented_array.h - copied unchanged from r341824, projects/clang700-import/contrib/compiler-rt/lib/xray/xray_segmented_array.h head/contrib/libc++/include/__errc - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/__errc head/contrib/libc++/include/__node_handle - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/__node_handle head/contrib/libc++/include/charconv - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/charconv head/contrib/libc++/include/compare - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/compare head/contrib/libc++/include/experimental/simd - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/experimental/simd head/contrib/libc++/include/filesystem - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/filesystem head/contrib/libc++/include/span - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/span head/contrib/libc++/include/version - copied unchanged from r341824, projects/clang700-import/contrib/libc++/include/version head/contrib/libc++/src/charconv.cpp - copied unchanged from r341824, projects/clang700-import/contrib/libc++/src/charconv.cpp head/contrib/libc++/src/filesystem/ - copied from r341824, projects/clang700-import/contrib/libc++/src/filesystem/ head/contrib/libc++/src/include/apple_availability.h - copied unchanged from r341824, projects/clang700-import/contrib/libc++/src/include/apple_availability.h head/contrib/llvm/include/llvm-c/Comdat.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm-c/Comdat.h head/contrib/llvm/include/llvm-c/DataTypes.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm-c/DataTypes.h head/contrib/llvm/include/llvm-c/DisassemblerTypes.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm-c/DisassemblerTypes.h head/contrib/llvm/include/llvm-c/Transforms/InstCombine.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm-c/Transforms/InstCombine.h head/contrib/llvm/include/llvm-c/Transforms/Utils.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm-c/Transforms/Utils.h head/contrib/llvm/include/llvm/ADT/Any.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/ADT/Any.h head/contrib/llvm/include/llvm/ADT/FunctionExtras.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/ADT/FunctionExtras.h head/contrib/llvm/include/llvm/Analysis/MustExecute.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Analysis/MustExecute.h head/contrib/llvm/include/llvm/Analysis/PhiValues.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Analysis/PhiValues.h head/contrib/llvm/include/llvm/Analysis/SyntheticCountsUtils.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Analysis/SyntheticCountsUtils.h head/contrib/llvm/include/llvm/Analysis/Utils/ - copied from r341824, projects/clang700-import/contrib/llvm/include/llvm/Analysis/Utils/ head/contrib/llvm/include/llvm/BinaryFormat/DynamicTags.def - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/BinaryFormat/DynamicTags.def head/contrib/llvm/include/llvm/CodeGen/AccelTable.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/AccelTable.h head/contrib/llvm/include/llvm/CodeGen/CommandFlags.inc - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/CommandFlags.inc head/contrib/llvm/include/llvm/CodeGen/ExecutionDomainFix.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/ExecutionDomainFix.h head/contrib/llvm/include/llvm/CodeGen/GlobalISel/Combiner.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/Combiner.h head/contrib/llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h head/contrib/llvm/include/llvm/CodeGen/GlobalISel/CombinerInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/CombinerInfo.h head/contrib/llvm/include/llvm/CodeGen/GlobalISel/ConstantFoldingMIRBuilder.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/ConstantFoldingMIRBuilder.h head/contrib/llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h head/contrib/llvm/include/llvm/CodeGen/LoopTraversal.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/LoopTraversal.h head/contrib/llvm/include/llvm/CodeGen/MachineOutliner.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/MachineOutliner.h head/contrib/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h head/contrib/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFListTable.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFListTable.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAInjectedSource.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAInjectedSource.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASectionContrib.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASectionContrib.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAUtils.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAUtils.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBInjectedSource.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBInjectedSource.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/Core.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/Core.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/Layer.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/Layer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/Legacy.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/Legacy.h head/contrib/llvm/include/llvm/IR/DomTreeUpdater.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/IR/DomTreeUpdater.h head/contrib/llvm/include/llvm/IR/RuntimeLibcalls.def - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/IR/RuntimeLibcalls.def head/contrib/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc head/contrib/llvm/include/llvm/Object/CVDebugRecord.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Object/CVDebugRecord.h head/contrib/llvm/include/llvm/Object/WasmTraits.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Object/WasmTraits.h head/contrib/llvm/include/llvm/Passes/PassPlugin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Passes/PassPlugin.h head/contrib/llvm/include/llvm/Support/AMDHSAKernelDescriptor.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/AMDHSAKernelDescriptor.h head/contrib/llvm/include/llvm/Support/CheckedArithmetic.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/CheckedArithmetic.h head/contrib/llvm/include/llvm/Support/DJB.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/DJB.h head/contrib/llvm/include/llvm/Support/DataTypes.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/DataTypes.h head/contrib/llvm/include/llvm/Support/InitLLVM.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/InitLLVM.h head/contrib/llvm/include/llvm/Support/JSON.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/JSON.h head/contrib/llvm/include/llvm/Support/MachineValueType.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/MachineValueType.h head/contrib/llvm/include/llvm/Support/MemAlloc.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/MemAlloc.h head/contrib/llvm/include/llvm/Support/SmallVectorMemoryBuffer.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/SmallVectorMemoryBuffer.h head/contrib/llvm/include/llvm/Support/TargetOpcodes.def - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/TargetOpcodes.def head/contrib/llvm/include/llvm/Support/TaskQueue.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/TaskQueue.h head/contrib/llvm/include/llvm/Support/VersionTuple.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/VersionTuple.h head/contrib/llvm/include/llvm/Support/WithColor.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/WithColor.h head/contrib/llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h head/contrib/llvm/include/llvm/Target/CodeGenCWrappers.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Target/CodeGenCWrappers.h head/contrib/llvm/include/llvm/Target/TargetInstrPredicate.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Target/TargetInstrPredicate.td head/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/Transforms/AggressiveInstCombine/ - copied from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/AggressiveInstCombine/ head/contrib/llvm/include/llvm/Transforms/IPO/SampleProfile.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/IPO/SampleProfile.h head/contrib/llvm/include/llvm/Transforms/IPO/SyntheticCountsPropagation.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/IPO/SyntheticCountsPropagation.h head/contrib/llvm/include/llvm/Transforms/Instrumentation/CGProfile.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Instrumentation/CGProfile.h head/contrib/llvm/include/llvm/Transforms/Instrumentation/GCOVProfiler.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Instrumentation/GCOVProfiler.h head/contrib/llvm/include/llvm/Transforms/Instrumentation/InstrProfiling.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Instrumentation/InstrProfiling.h head/contrib/llvm/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h head/contrib/llvm/include/llvm/Transforms/Scalar/InductiveRangeCheckElimination.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Scalar/InductiveRangeCheckElimination.h head/contrib/llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h head/contrib/llvm/include/llvm/Transforms/Scalar/LoopUnrollAndJamPass.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Scalar/LoopUnrollAndJamPass.h head/contrib/llvm/include/llvm/Transforms/Utils.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Utils.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopRotationUtils.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Utils/LoopRotationUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h head/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h head/contrib/llvm/lib/Analysis/MustExecute.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Analysis/MustExecute.cpp head/contrib/llvm/lib/Analysis/PhiValues.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Analysis/PhiValues.cpp head/contrib/llvm/lib/Analysis/SyntheticCountsUtils.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Analysis/SyntheticCountsUtils.cpp head/contrib/llvm/lib/BinaryFormat/Wasm.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/BinaryFormat/Wasm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.h head/contrib/llvm/lib/CodeGen/BreakFalseDeps.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/BreakFalseDeps.cpp head/contrib/llvm/lib/CodeGen/CFIInstrInserter.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/CFIInstrInserter.cpp head/contrib/llvm/lib/CodeGen/ExecutionDomainFix.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/ExecutionDomainFix.cpp head/contrib/llvm/lib/CodeGen/GlobalISel/Combiner.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/GlobalISel/Combiner.cpp head/contrib/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp head/contrib/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp head/contrib/llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp head/contrib/llvm/lib/CodeGen/LoopTraversal.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/LoopTraversal.cpp head/contrib/llvm/lib/CodeGen/ReachingDefAnalysis.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/ReachingDefAnalysis.cpp head/contrib/llvm/lib/CodeGen/ValueTypes.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/ValueTypes.cpp head/contrib/llvm/lib/CodeGen/WasmEHPrepare.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/CodeGen/WasmEHPrepare.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFAddressRange.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFAddressRange.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAInjectedSource.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAInjectedSource.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASectionContrib.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASectionContrib.cpp head/contrib/llvm/lib/Demangle/Compiler.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Demangle/Compiler.h head/contrib/llvm/lib/Demangle/MicrosoftDemangle.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Demangle/MicrosoftDemangle.cpp head/contrib/llvm/lib/Demangle/StringView.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Demangle/StringView.h head/contrib/llvm/lib/Demangle/Utility.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Demangle/Utility.h head/contrib/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/Core.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/Core.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/Layer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/Layer.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/Legacy.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/Legacy.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp head/contrib/llvm/lib/ExecutionEngine/PerfJITEvents/ - copied from r341824, projects/clang700-import/contrib/llvm/lib/ExecutionEngine/PerfJITEvents/ head/contrib/llvm/lib/IR/DomTreeUpdater.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/IR/DomTreeUpdater.cpp head/contrib/llvm/lib/MC/MCAsmMacro.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/MC/MCAsmMacro.cpp head/contrib/llvm/lib/Passes/PassPlugin.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Passes/PassPlugin.cpp head/contrib/llvm/lib/Support/DJB.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Support/DJB.cpp head/contrib/llvm/lib/Support/InitLLVM.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Support/InitLLVM.cpp head/contrib/llvm/lib/Support/JSON.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Support/JSON.cpp head/contrib/llvm/lib/Support/UnicodeCaseFold.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Support/UnicodeCaseFold.cpp head/contrib/llvm/lib/Support/VersionTuple.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Support/VersionTuple.cpp head/contrib/llvm/lib/Support/WithColor.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Support/WithColor.cpp head/contrib/llvm/lib/TableGen/JSONBackend.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/TableGen/JSONBackend.cpp head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM1.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM1.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUFeatures.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUFeatures.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUGISel.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUGISel.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCTargetDesc.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCTargetDesc.cpp head/contrib/llvm/lib/Target/AMDGPU/R600.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/R600.td head/contrib/llvm/lib/Target/AMDGPU/R600AsmPrinter.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/R600AsmPrinter.cpp head/contrib/llvm/lib/Target/AMDGPU/R600AsmPrinter.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/R600AsmPrinter.h head/contrib/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp head/contrib/llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp head/contrib/llvm/lib/Target/AMDGPU/SIProgramInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/SIProgramInfo.h head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPULaneDominator.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPULaneDominator.cpp head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPULaneDominator.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPULaneDominator.h head/contrib/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp head/contrib/llvm/lib/Target/ARM/ARMParallelDSP.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/ARM/ARMParallelDSP.cpp head/contrib/llvm/lib/Target/BPF/BPFMIPeephole.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/BPF/BPFMIPeephole.cpp head/contrib/llvm/lib/Target/BPF/BPFSelectionDAGInfo.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/BPF/BPFSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/BPF/BPFSelectionDAGInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/BPF/BPFSelectionDAGInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonCallingConv.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Hexagon/HexagonCallingConv.td head/contrib/llvm/lib/Target/Hexagon/HexagonPatternsHVX.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Hexagon/HexagonPatternsHVX.td head/contrib/llvm/lib/Target/Hexagon/HexagonVExtract.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Hexagon/HexagonVExtract.cpp head/contrib/llvm/lib/Target/Mips/MipsBranchExpansion.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsBranchExpansion.cpp head/contrib/llvm/lib/Target/Mips/MipsCallLowering.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsCallLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsCallLowering.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsCallLowering.h head/contrib/llvm/lib/Target/Mips/MipsExpandPseudo.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsExpandPseudo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstructionSelector.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsInstructionSelector.cpp head/contrib/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsLegalizerInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsLegalizerInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterBankInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsRegisterBankInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterBanks.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/Mips/MipsRegisterBanks.td head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXTargetStreamer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXTargetStreamer.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXTargetStreamer.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXTargetStreamer.h head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500.td head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h head/contrib/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h head/contrib/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp head/contrib/llvm/lib/Target/RISCV/RISCVTargetObjectFile.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/RISCVTargetObjectFile.cpp head/contrib/llvm/lib/Target/RISCV/RISCVTargetObjectFile.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/RISCV/RISCVTargetObjectFile.h head/contrib/llvm/lib/Target/WebAssembly/AsmParser/ - copied from r341824, projects/clang700-import/contrib/llvm/lib/Target/WebAssembly/AsmParser/ head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrExceptRef.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrExceptRef.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstPrinterCommon.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/InstPrinter/X86InstPrinterCommon.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstPrinterCommon.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/InstPrinter/X86InstPrinterCommon.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCExpr.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCExpr.h head/contrib/llvm/lib/Target/X86/ShadowCallStack.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/ShadowCallStack.cpp head/contrib/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp head/contrib/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp head/contrib/llvm/lib/Target/X86/X86InstrFoldTables.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/X86InstrFoldTables.cpp head/contrib/llvm/lib/Target/X86/X86InstrFoldTables.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/X86InstrFoldTables.h head/contrib/llvm/lib/Target/X86/X86PfmCounters.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/X86PfmCounters.td head/contrib/llvm/lib/Target/X86/X86SchedPredicates.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/X86SchedPredicates.td head/contrib/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp head/contrib/llvm/lib/Transforms/AggressiveInstCombine/ - copied from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/AggressiveInstCombine/ head/contrib/llvm/lib/Transforms/IPO/BlockExtractor.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/IPO/BlockExtractor.cpp head/contrib/llvm/lib/Transforms/IPO/SCCP.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/IPO/SCCP.cpp head/contrib/llvm/lib/Transforms/IPO/SyntheticCountsPropagation.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/IPO/SyntheticCountsPropagation.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineTables.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineTables.td head/contrib/llvm/lib/Transforms/Instrumentation/CGProfile.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Instrumentation/CGProfile.cpp head/contrib/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp head/contrib/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp head/contrib/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h head/contrib/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h head/contrib/llvm/lib/Transforms/Vectorize/VPlanDominatorTree.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanDominatorTree.h head/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp head/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.h head/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp head/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.h head/contrib/llvm/lib/Transforms/Vectorize/VPlanLoopInfo.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanLoopInfo.h head/contrib/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp head/contrib/llvm/lib/Transforms/Vectorize/VPlanVerifier.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/lib/Transforms/Vectorize/VPlanVerifier.h head/contrib/llvm/tools/clang/include/clang/AST/ComparisonCategories.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/AST/ComparisonCategories.h head/contrib/llvm/tools/clang/include/clang/AST/NonTrivialTypeVisitor.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/AST/NonTrivialTypeVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/PrettyDeclStackTrace.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/AST/PrettyDeclStackTrace.h head/contrib/llvm/tools/clang/include/clang/Analysis/ConstructionContext.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Analysis/ConstructionContext.h head/contrib/llvm/tools/clang/include/clang/Basic/BitmaskEnum.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Basic/BitmaskEnum.h head/contrib/llvm/tools/clang/include/clang/Basic/Features.def - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Basic/Features.def head/contrib/llvm/tools/clang/include/clang/Basic/Stack.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Basic/Stack.h head/contrib/llvm/tools/clang/include/clang/Basic/XRayInstr.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Basic/XRayInstr.h head/contrib/llvm/tools/clang/include/clang/Basic/arm_fp16.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Basic/arm_fp16.td head/contrib/llvm/tools/clang/include/clang/Basic/arm_neon_incl.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Basic/arm_neon_incl.td head/contrib/llvm/tools/clang/include/clang/Sema/ParsedAttr.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Sema/ParsedAttr.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateInstCallback.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Sema/TemplateInstCallback.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTContext.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTContext.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTExpr.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTExpr.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSort.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSort.h head/contrib/llvm/tools/clang/include/clang/Tooling/AllTUsExecution.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Tooling/AllTUsExecution.h head/contrib/llvm/tools/clang/include/clang/Tooling/Inclusions/ - copied from r341824, projects/clang700-import/contrib/llvm/tools/clang/include/clang/Tooling/Inclusions/ head/contrib/llvm/tools/clang/lib/AST/ComparisonCategories.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/AST/ComparisonCategories.cpp head/contrib/llvm/tools/clang/lib/Analysis/ConstructionContext.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Analysis/ConstructionContext.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets/RISCV.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/Targets/RISCV.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets/RISCV.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/Targets/RISCV.h head/contrib/llvm/tools/clang/lib/Basic/XRayInstr.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/XRayInstr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/RISCV.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/RISCV.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/RISCV.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/RISCV.h head/contrib/llvm/tools/clang/lib/Driver/ToolChains/HIP.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/HIP.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/HIP.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/HIP.h head/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCV.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCV.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCV.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCV.h head/contrib/llvm/tools/clang/lib/Frontend/FrontendTiming.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Frontend/FrontendTiming.cpp head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_device_functions.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_device_functions.h head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_libdevice_declares.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_libdevice_declares.h head/contrib/llvm/tools/clang/lib/Headers/cldemoteintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/cldemoteintrin.h head/contrib/llvm/tools/clang/lib/Headers/invpcidintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/invpcidintrin.h head/contrib/llvm/tools/clang/lib/Headers/movdirintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/movdirintrin.h head/contrib/llvm/tools/clang/lib/Headers/pconfigintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/pconfigintrin.h head/contrib/llvm/tools/clang/lib/Headers/ptwriteintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/ptwriteintrin.h head/contrib/llvm/tools/clang/lib/Headers/sgxintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/sgxintrin.h head/contrib/llvm/tools/clang/lib/Headers/waitpkgintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/waitpkgintrin.h head/contrib/llvm/tools/clang/lib/Headers/wbnoinvdintrin.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Headers/wbnoinvdintrin.h head/contrib/llvm/tools/clang/lib/Sema/ParsedAttr.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Sema/ParsedAttr.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AllocationState.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AllocationState.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/WorkList.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/WorkList.cpp head/contrib/llvm/tools/clang/lib/Tooling/AllTUsExecution.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Tooling/AllTUsExecution.cpp head/contrib/llvm/tools/clang/lib/Tooling/Inclusions/ - copied from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Tooling/Inclusions/ head/contrib/llvm/tools/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp head/contrib/llvm/tools/clang/tools/driver/cc1gen_reproducer_main.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/clang/tools/driver/cc1gen_reproducer_main.cpp head/contrib/llvm/tools/lld/COFF/ICF.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/COFF/ICF.h head/contrib/llvm/tools/lld/COFF/MarkLive.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/COFF/MarkLive.h head/contrib/llvm/tools/lld/Common/Timer.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/Common/Timer.cpp head/contrib/llvm/tools/lld/ELF/Arch/Hexagon.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/ELF/Arch/Hexagon.cpp head/contrib/llvm/tools/lld/ELF/CallGraphSort.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/ELF/CallGraphSort.cpp head/contrib/llvm/tools/lld/ELF/CallGraphSort.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/ELF/CallGraphSort.h head/contrib/llvm/tools/lld/ELF/MarkLive.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/ELF/MarkLive.h head/contrib/llvm/tools/lld/docs/ - copied from r341824, projects/clang700-import/contrib/llvm/tools/lld/docs/ head/contrib/llvm/tools/lld/include/lld/Common/Timer.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lld/include/lld/Common/Timer.h head/contrib/llvm/tools/lldb/include/lldb/Core/DumpRegisterValue.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/include/lldb/Core/DumpRegisterValue.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionArgParser.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionArgParser.h head/contrib/llvm/tools/lldb/include/lldb/Utility/Args.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/include/lldb/Utility/Args.h head/contrib/llvm/tools/lldb/include/lldb/Utility/CompletionRequest.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/include/lldb/Utility/CompletionRequest.h head/contrib/llvm/tools/lldb/include/lldb/Utility/Environment.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/include/lldb/Utility/Environment.h head/contrib/llvm/tools/lldb/include/lldb/Utility/StringExtractorGDBRemote.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/include/lldb/Utility/StringExtractorGDBRemote.h head/contrib/llvm/tools/lldb/include/lldb/module.modulemap - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/include/lldb/module.modulemap head/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectStats.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectStats.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectStats.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectStats.h head/contrib/llvm/tools/lldb/source/Core/DumpRegisterValue.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Core/DumpRegisterValue.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionArgParser.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Interpreter/OptionArgParser.cpp head/contrib/llvm/tools/lldb/source/Plugins/Architecture/PPC64/ - copied from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/Architecture/PPC64/ head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/PPC64/ - copied from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/Instruction/PPC64/ head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwinConstants.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwinConstants.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.h head/contrib/llvm/tools/lldb/source/Utility/Args.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Utility/Args.cpp head/contrib/llvm/tools/lldb/source/Utility/CompletionRequest.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Utility/CompletionRequest.cpp head/contrib/llvm/tools/lldb/source/Utility/Environment.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Utility/Environment.cpp head/contrib/llvm/tools/lldb/source/Utility/PPC64_DWARF_Registers.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/source/Utility/PPC64_DWARF_Registers.h head/contrib/llvm/tools/lldb/tools/lldb-mi/module.modulemap - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/tools/lldb-mi/module.modulemap head/contrib/llvm/tools/lldb/tools/lldb-server/SystemInitializerLLGS.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/tools/lldb-server/SystemInitializerLLGS.cpp head/contrib/llvm/tools/lldb/tools/lldb-server/SystemInitializerLLGS.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/lldb/tools/lldb-server/SystemInitializerLLGS.h head/contrib/llvm/tools/llvm-cov/CoverageExporter.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-cov/CoverageExporter.h head/contrib/llvm/tools/llvm-cov/CoverageExporterJson.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-cov/CoverageExporterJson.h head/contrib/llvm/tools/llvm-mca/ - copied from r341824, projects/clang700-import/contrib/llvm/tools/llvm-mca/ head/contrib/llvm/tools/llvm-objcopy/ObjcopyOpts.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-objcopy/ObjcopyOpts.td head/contrib/llvm/tools/llvm-objcopy/StripOpts.td - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-objcopy/StripOpts.td head/contrib/llvm/tools/llvm-pdbutil/ExplainOutputStyle.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-pdbutil/ExplainOutputStyle.cpp head/contrib/llvm/tools/llvm-pdbutil/ExplainOutputStyle.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-pdbutil/ExplainOutputStyle.h head/contrib/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h head/contrib/llvm/tools/llvm-xray/func-id-helper.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/func-id-helper.cpp head/contrib/llvm/tools/llvm-xray/llvm-xray.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/llvm-xray.cpp head/contrib/llvm/tools/llvm-xray/xray-account.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-account.cpp head/contrib/llvm/tools/llvm-xray/xray-color-helper.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-color-helper.cpp head/contrib/llvm/tools/llvm-xray/xray-converter.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-converter.cpp head/contrib/llvm/tools/llvm-xray/xray-extract.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-extract.cpp head/contrib/llvm/tools/llvm-xray/xray-graph-diff.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-graph-diff.cpp head/contrib/llvm/tools/llvm-xray/xray-graph.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-graph.cpp head/contrib/llvm/tools/llvm-xray/xray-registry.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-registry.cpp head/contrib/llvm/tools/llvm-xray/xray-stacks.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/llvm-xray/xray-stacks.cpp head/contrib/llvm/tools/opt/Debugify.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/tools/opt/Debugify.h head/contrib/llvm/utils/TableGen/PredicateExpander.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/utils/TableGen/PredicateExpander.cpp head/contrib/llvm/utils/TableGen/PredicateExpander.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/utils/TableGen/PredicateExpander.h head/contrib/llvm/utils/TableGen/RISCVCompressInstEmitter.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/utils/TableGen/RISCVCompressInstEmitter.cpp head/contrib/llvm/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp - copied unchanged from r341824, projects/clang700-import/contrib/llvm/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp head/contrib/llvm/utils/TableGen/WebAssemblyDisassemblerEmitter.h - copied unchanged from r341824, projects/clang700-import/contrib/llvm/utils/TableGen/WebAssemblyDisassemblerEmitter.h head/lib/libc++fs/ - copied from r341824, projects/clang700-import/lib/libc++fs/ head/lib/libclang_rt/fuzzer/ - copied from r341824, projects/clang700-import/lib/libclang_rt/fuzzer/ head/lib/libclang_rt/fuzzer_no_main/ - copied from r341824, projects/clang700-import/lib/libclang_rt/fuzzer_no_main/ head/lib/libclang_rt/msan/ - copied from r341824, projects/clang700-import/lib/libclang_rt/msan/ head/lib/libclang_rt/msan_cxx/ - copied from r341824, projects/clang700-import/lib/libclang_rt/msan_cxx/ head/usr.bin/clang/llvm-mca/ - copied from r341824, projects/clang700-import/usr.bin/clang/llvm-mca/ Directory Properties: head/contrib/compiler-rt/lib/fuzzer/ (props changed) Deleted: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_freebsd.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc head/contrib/compiler-rt/lib/scudo/scudo_interceptors.cpp head/contrib/compiler-rt/lib/xray/xray_fdr_logging_impl.h head/contrib/compiler-rt/lib/xray/xray_inmemory_log.cc head/contrib/compiler-rt/lib/xray/xray_inmemory_log.h head/contrib/libc++/src/experimental/filesystem/directory_iterator.cpp head/contrib/libc++/src/experimental/filesystem/filesystem_time_helper.h head/contrib/libc++/src/experimental/filesystem/operations.cpp head/contrib/libc++/src/experimental/filesystem/path.cpp head/contrib/llvm/include/llvm/Analysis/ObjectUtils.h head/contrib/llvm/include/llvm/BinaryFormat/ELFRelocs/WebAssembly.def head/contrib/llvm/include/llvm/CodeGen/CommandFlags.def head/contrib/llvm/include/llvm/CodeGen/ExecutionDepsFix.h head/contrib/llvm/include/llvm/CodeGen/MachineValueType.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.def head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/CodeGen/TargetOpcodes.def head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVDebugRecord.h head/contrib/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h head/contrib/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.def head/contrib/llvm/include/llvm/Support/AMDGPUKernelDescriptor.h head/contrib/llvm/include/llvm/Support/CodeGenCWrappers.h head/contrib/llvm/include/llvm/Transforms/GCOVProfiler.h head/contrib/llvm/include/llvm/Transforms/InstrProfiling.h head/contrib/llvm/include/llvm/Transforms/PGOInstrumentation.h head/contrib/llvm/include/llvm/Transforms/SampleProfile.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyInstructions.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h head/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp head/contrib/llvm/lib/DebugInfo/DWARF/SyntaxHighlighting.cpp head/contrib/llvm/lib/DebugInfo/DWARF/SyntaxHighlighting.h head/contrib/llvm/lib/ExecutionEngine/MCJIT/ObjectBuffer.h head/contrib/llvm/lib/IR/ValueTypes.cpp head/contrib/llvm/lib/Target/AArch64/AArch64SchedM1.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUOpenCLImageTypeLoweringPass.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUHSAMetadataStreamer.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUHSAMetadataStreamer.h head/contrib/llvm/lib/Target/AMDGPU/Processors.td head/contrib/llvm/lib/Target/AMDGPU/R600Intrinsics.td head/contrib/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonDepDecoders.h head/contrib/llvm/lib/Target/Mips/MipsHazardSchedule.cpp head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSection.h head/contrib/llvm/lib/Target/PowerPC/PPCMachineBasicBlockUtils.h head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyELFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h head/contrib/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp head/contrib/llvm/lib/Transforms/Vectorize/VPlanBuilder.h head/contrib/llvm/patches/ head/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h head/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Sema/PrettyDeclStackTrace.h head/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp head/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangedConstraintManager.h head/contrib/llvm/tools/lld/COFF/Strings.cpp head/contrib/llvm/tools/lld/COFF/Strings.h head/contrib/llvm/tools/lld/ELF/Strings.cpp head/contrib/llvm/tools/lld/ELF/Strings.h head/contrib/llvm/tools/lld/lib/Support/ head/contrib/llvm/tools/lld/tools/linker-script-test/ head/contrib/llvm/tools/lldb/include/lldb/API/SystemInitializerFull.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/Args.h head/contrib/llvm/tools/lldb/include/lldb/Utility/History.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectArgs.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectArgs.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSyntax.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSyntax.h head/contrib/llvm/tools/lldb/source/Interpreter/Args.cpp head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/ head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/UndefinedBehaviorSanitizer/ head/contrib/llvm/tools/lldb/source/Plugins/Process/win-minidump/ head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h head/contrib/llvm/tools/lldb/source/Utility/History.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.h head/contrib/llvm/tools/lldb/tools/intel-mpx/ head/contrib/llvm/tools/lli/OrcLazyJIT.cpp head/contrib/llvm/tools/lli/OrcLazyJIT.h head/contrib/llvm/tools/llvm-pdbutil/Diff.cpp head/contrib/llvm/tools/llvm-pdbutil/Diff.h head/contrib/llvm/tools/llvm-pdbutil/DiffPrinter.cpp head/contrib/llvm/tools/llvm-pdbutil/DiffPrinter.h head/contrib/llvm/tools/llvm-xray/func-id-helper.cc head/contrib/llvm/tools/llvm-xray/llvm-xray.cc head/contrib/llvm/tools/llvm-xray/xray-account.cc head/contrib/llvm/tools/llvm-xray/xray-color-helper.cc head/contrib/llvm/tools/llvm-xray/xray-converter.cc head/contrib/llvm/tools/llvm-xray/xray-extract.cc head/contrib/llvm/tools/llvm-xray/xray-graph-diff.cc head/contrib/llvm/tools/llvm-xray/xray-graph.cc head/contrib/llvm/tools/llvm-xray/xray-registry.cc head/contrib/llvm/tools/llvm-xray/xray-stacks.cc head/lib/clang/include/llvm/Support/DataTypes.h head/usr.bin/clang/lld/ld.lld.1 Modified: head/ObsoleteFiles.inc head/UPDATING head/contrib/compiler-rt/LICENSE.TXT head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h head/contrib/compiler-rt/include/sanitizer/msan_interface.h head/contrib/compiler-rt/include/sanitizer/scudo_interface.h (contents, props changed) head/contrib/compiler-rt/include/xray/xray_interface.h (contents, props changed) head/contrib/compiler-rt/include/xray/xray_log_interface.h (contents, props changed) head/contrib/compiler-rt/include/xray/xray_records.h (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_allocator.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_allocator.h head/contrib/compiler-rt/lib/asan/asan_debugging.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_descriptions.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_descriptions.h (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_errors.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_errors.h (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_flags.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_flags.inc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_globals.cc head/contrib/compiler-rt/lib/asan/asan_globals_win.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_interceptors.cc head/contrib/compiler-rt/lib/asan/asan_interceptors.h head/contrib/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_interceptors_memintrinsics.h (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_internal.h head/contrib/compiler-rt/lib/asan/asan_mac.cc head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc head/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc head/contrib/compiler-rt/lib/asan/asan_mapping.h head/contrib/compiler-rt/lib/asan/asan_memory_profile.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_new_delete.cc head/contrib/compiler-rt/lib/asan/asan_poisoning.cc head/contrib/compiler-rt/lib/asan/asan_poisoning.h head/contrib/compiler-rt/lib/asan/asan_report.cc head/contrib/compiler-rt/lib/asan/asan_report.h head/contrib/compiler-rt/lib/asan/asan_rtl.cc head/contrib/compiler-rt/lib/asan/asan_shadow_setup.cc (contents, props changed) head/contrib/compiler-rt/lib/asan/asan_thread.cc head/contrib/compiler-rt/lib/asan/asan_win.cc head/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc (contents, props changed) head/contrib/compiler-rt/lib/builtins/clear_cache.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/clzdi2.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/cpu_model.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/ctzdi2.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/emutls.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/int_types.h (contents, props changed) head/contrib/compiler-rt/lib/builtins/os_version_check.c (contents, props changed) head/contrib/compiler-rt/lib/cfi/cfi.cc (contents, props changed) head/contrib/compiler-rt/lib/cfi/cfi_blacklist.txt (contents, props changed) head/contrib/compiler-rt/lib/dfsan/dfsan.cc (contents, props changed) head/contrib/compiler-rt/lib/dfsan/dfsan_custom.cc (contents, props changed) head/contrib/compiler-rt/lib/dfsan/done_abilist.txt (contents, props changed) head/contrib/compiler-rt/lib/esan/esan.cpp (contents, props changed) head/contrib/compiler-rt/lib/esan/esan_interceptors.cpp (contents, props changed) head/contrib/compiler-rt/lib/esan/esan_sideline_linux.cpp (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan.h (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_allocator.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_flags.inc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_interceptors.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_interface_internal.h (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_linux.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_new_delete.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_poisoning.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_report.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_thread.cc (contents, props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_thread.h (contents, props changed) head/contrib/compiler-rt/lib/interception/interception.h head/contrib/compiler-rt/lib/interception/interception_linux.cc head/contrib/compiler-rt/lib/interception/interception_linux.h head/contrib/compiler-rt/lib/interception/interception_win.cc head/contrib/compiler-rt/lib/lsan/lsan.cc head/contrib/compiler-rt/lib/lsan/lsan_allocator.cc head/contrib/compiler-rt/lib/lsan/lsan_allocator.h head/contrib/compiler-rt/lib/lsan/lsan_common.cc head/contrib/compiler-rt/lib/lsan/lsan_common.h head/contrib/compiler-rt/lib/lsan/lsan_common_mac.cc (contents, props changed) head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc head/contrib/compiler-rt/lib/lsan/lsan_malloc_mac.cc (contents, props changed) head/contrib/compiler-rt/lib/lsan/lsan_thread.cc head/contrib/compiler-rt/lib/msan/msan.cc head/contrib/compiler-rt/lib/msan/msan.h head/contrib/compiler-rt/lib/msan/msan_allocator.cc head/contrib/compiler-rt/lib/msan/msan_interceptors.cc head/contrib/compiler-rt/lib/msan/msan_interface_internal.h head/contrib/compiler-rt/lib/msan/msan_linux.cc head/contrib/compiler-rt/lib/msan/msan_new_delete.cc head/contrib/compiler-rt/lib/msan/msan_poisoning.cc (contents, props changed) head/contrib/compiler-rt/lib/msan/msan_report.cc head/contrib/compiler-rt/lib/profile/GCDAProfiling.c head/contrib/compiler-rt/lib/profile/InstrProfData.inc (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfiling.h (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingFile.c (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingMerge.c (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingMergeFile.c (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingPort.h (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingUtil.c (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingUtil.h (contents, props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingValue.c (contents, props changed) head/contrib/compiler-rt/lib/safestack/safestack.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_bytemap.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_local_cache.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector2.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_errno.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_file.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_getauxval.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libignore.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libignore.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_s390.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_malloc_mac.inc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_printf.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_report_decorator.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_vector.h (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc head/contrib/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh (contents, props changed) head/contrib/compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_allocator.cpp (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_allocator.h (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_allocator_combined.h (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_allocator_secondary.h (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_flags.cpp (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_interface_internal.h (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_new_delete.cpp (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_platform.h (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_termination.cpp (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_tsd.h (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_tsd_exclusive.cpp (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_tsd_exclusive.inc (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_tsd_shared.cpp (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_tsd_shared.inc (contents, props changed) head/contrib/compiler-rt/lib/scudo/scudo_utils.cpp (contents, props changed) head/contrib/compiler-rt/lib/stats/stats.cc (contents, props changed) head/contrib/compiler-rt/lib/tsan/go/test.c head/contrib/compiler-rt/lib/tsan/go/tsan_go.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_debugging.cc (contents, props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc (contents, props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc (contents, props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_mman.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc (contents, props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_posix.cc (contents, props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc (contents, props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_stack_trace.h (contents, props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_symbolize.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_sync.cc head/contrib/compiler-rt/lib/ubsan/ubsan_checks.inc (contents, props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_diag.cc head/contrib/compiler-rt/lib/ubsan/ubsan_diag.h head/contrib/compiler-rt/lib/ubsan/ubsan_flags.cc (contents, props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_flags.inc (contents, props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc head/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h head/contrib/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc head/contrib/compiler-rt/lib/ubsan/ubsan_interface.inc (contents, props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_platform.h (contents, props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_signals_standalone.cc (contents, props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_win_weak_interception.cc (contents, props changed) head/contrib/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_AArch64.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_arm.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_buffer_queue.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_buffer_queue.h (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_fdr_log_records.h (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_fdr_logging.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_flags.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_flags.h (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_flags.inc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_init.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_interface.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_interface_internal.h (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_log_interface.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_mips.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_mips64.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_powerpc64.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_trampoline_x86_64.S (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_utils.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_utils.h (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_x86_64.cc (contents, props changed) head/contrib/compiler-rt/lib/xray/xray_x86_64.inc (contents, props changed) head/contrib/libc++/include/__bsd_locale_fallbacks.h (contents, props changed) head/contrib/libc++/include/__config head/contrib/libc++/include/__functional_03 head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__libcpp_version head/contrib/libc++/include/__locale head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/__nullptr head/contrib/libc++/include/__sso_allocator head/contrib/libc++/include/__string head/contrib/libc++/include/__threading_support head/contrib/libc++/include/__tree head/contrib/libc++/include/algorithm head/contrib/libc++/include/any head/contrib/libc++/include/array head/contrib/libc++/include/atomic head/contrib/libc++/include/cfloat head/contrib/libc++/include/chrono head/contrib/libc++/include/cmath head/contrib/libc++/include/codecvt head/contrib/libc++/include/complex head/contrib/libc++/include/cstdlib head/contrib/libc++/include/ctime head/contrib/libc++/include/deque head/contrib/libc++/include/exception head/contrib/libc++/include/experimental/__config head/contrib/libc++/include/experimental/algorithm head/contrib/libc++/include/experimental/any head/contrib/libc++/include/experimental/chrono head/contrib/libc++/include/experimental/coroutine head/contrib/libc++/include/experimental/dynarray head/contrib/libc++/include/experimental/filesystem head/contrib/libc++/include/experimental/functional head/contrib/libc++/include/experimental/memory_resource head/contrib/libc++/include/experimental/numeric head/contrib/libc++/include/experimental/optional head/contrib/libc++/include/experimental/propagate_const head/contrib/libc++/include/experimental/ratio head/contrib/libc++/include/experimental/string_view head/contrib/libc++/include/experimental/system_error head/contrib/libc++/include/experimental/tuple head/contrib/libc++/include/experimental/type_traits head/contrib/libc++/include/float.h (contents, props changed) head/contrib/libc++/include/forward_list head/contrib/libc++/include/fstream head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/initializer_list head/contrib/libc++/include/ios head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/math.h (contents, props changed) head/contrib/libc++/include/memory head/contrib/libc++/include/module.modulemap head/contrib/libc++/include/new head/contrib/libc++/include/numeric head/contrib/libc++/include/optional head/contrib/libc++/include/ostream head/contrib/libc++/include/queue head/contrib/libc++/include/random head/contrib/libc++/include/regex head/contrib/libc++/include/set head/contrib/libc++/include/shared_mutex head/contrib/libc++/include/stack head/contrib/libc++/include/stdexcept head/contrib/libc++/include/stdio.h (contents, props changed) head/contrib/libc++/include/streambuf head/contrib/libc++/include/string head/contrib/libc++/include/string_view head/contrib/libc++/include/system_error head/contrib/libc++/include/tgmath.h (contents, props changed) head/contrib/libc++/include/thread head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/typeinfo head/contrib/libc++/include/unordered_map head/contrib/libc++/include/unordered_set head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/variant head/contrib/libc++/include/vector head/contrib/libc++/src/any.cpp (contents, props changed) head/contrib/libc++/src/bind.cpp (contents, props changed) head/contrib/libc++/src/chrono.cpp (contents, props changed) head/contrib/libc++/src/experimental/memory_resource.cpp (contents, props changed) head/contrib/libc++/src/future.cpp (contents, props changed) head/contrib/libc++/src/include/config_elast.h (contents, props changed) head/contrib/libc++/src/locale.cpp (contents, props changed) head/contrib/libc++/src/memory.cpp (contents, props changed) head/contrib/libc++/src/mutex.cpp (contents, props changed) head/contrib/libc++/src/new.cpp (contents, props changed) head/contrib/libc++/src/optional.cpp (contents, props changed) head/contrib/libc++/src/shared_mutex.cpp (contents, props changed) head/contrib/libc++/src/support/runtime/exception_msvc.ipp head/contrib/libc++/src/support/runtime/exception_pointer_msvc.ipp head/contrib/libc++/src/system_error.cpp (contents, props changed) head/contrib/libc++/src/typeinfo.cpp (contents, props changed) head/contrib/libc++/src/utility.cpp (contents, props changed) head/contrib/llvm/LICENSE.TXT head/contrib/llvm/include/llvm-c/Core.h head/contrib/llvm/include/llvm-c/DebugInfo.h (contents, props changed) head/contrib/llvm/include/llvm-c/Disassembler.h head/contrib/llvm/include/llvm-c/ExecutionEngine.h head/contrib/llvm/include/llvm-c/Initialization.h head/contrib/llvm/include/llvm-c/OrcBindings.h (contents, props changed) head/contrib/llvm/include/llvm-c/Support.h head/contrib/llvm/include/llvm-c/TargetMachine.h head/contrib/llvm/include/llvm-c/Transforms/Scalar.h head/contrib/llvm/include/llvm-c/Transforms/Vectorize.h head/contrib/llvm/include/llvm-c/Types.h (contents, props changed) head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/APFloat.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/APSInt.h head/contrib/llvm/include/llvm/ADT/ArrayRef.h head/contrib/llvm/include/llvm/ADT/BitVector.h head/contrib/llvm/include/llvm/ADT/CachedHashString.h (contents, props changed) head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h head/contrib/llvm/include/llvm/ADT/DenseSet.h head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h head/contrib/llvm/include/llvm/ADT/EpochTracker.h (contents, props changed) head/contrib/llvm/include/llvm/ADT/GraphTraits.h head/contrib/llvm/include/llvm/ADT/Hashing.h head/contrib/llvm/include/llvm/ADT/ImmutableList.h head/contrib/llvm/include/llvm/ADT/ImmutableMap.h head/contrib/llvm/include/llvm/ADT/ImmutableSet.h head/contrib/llvm/include/llvm/ADT/MapVector.h head/contrib/llvm/include/llvm/ADT/None.h head/contrib/llvm/include/llvm/ADT/Optional.h head/contrib/llvm/include/llvm/ADT/PackedVector.h head/contrib/llvm/include/llvm/ADT/PointerUnion.h head/contrib/llvm/include/llvm/ADT/SCCIterator.h head/contrib/llvm/include/llvm/ADT/STLExtras.h head/contrib/llvm/include/llvm/ADT/ScopeExit.h (contents, props changed) head/contrib/llvm/include/llvm/ADT/SetVector.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/SmallSet.h head/contrib/llvm/include/llvm/ADT/SmallVector.h head/contrib/llvm/include/llvm/ADT/SparseMultiSet.h head/contrib/llvm/include/llvm/ADT/SparseSet.h head/contrib/llvm/include/llvm/ADT/Statistic.h head/contrib/llvm/include/llvm/ADT/StringExtras.h head/contrib/llvm/include/llvm/ADT/StringMap.h head/contrib/llvm/include/llvm/ADT/StringRef.h head/contrib/llvm/include/llvm/ADT/StringSwitch.h head/contrib/llvm/include/llvm/ADT/TinyPtrVector.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/UniqueVector.h head/contrib/llvm/include/llvm/ADT/VariadicFunction.h head/contrib/llvm/include/llvm/ADT/edit_distance.h head/contrib/llvm/include/llvm/ADT/ilist.h head/contrib/llvm/include/llvm/ADT/ilist_node.h head/contrib/llvm/include/llvm/ADT/ilist_node_options.h (contents, props changed) head/contrib/llvm/include/llvm/ADT/iterator.h head/contrib/llvm/include/llvm/ADT/iterator_range.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/Analysis/AssumptionCache.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/BasicAliasAnalysis.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h head/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h head/contrib/llvm/include/llvm/Analysis/CFG.h head/contrib/llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h head/contrib/llvm/include/llvm/Analysis/CallGraph.h head/contrib/llvm/include/llvm/Analysis/CaptureTracking.h head/contrib/llvm/include/llvm/Analysis/CodeMetrics.h head/contrib/llvm/include/llvm/Analysis/ConstantFolding.h head/contrib/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h head/contrib/llvm/include/llvm/Analysis/DemandedBits.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/DivergenceAnalysis.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/DominanceFrontier.h head/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h head/contrib/llvm/include/llvm/Analysis/EHPersonalities.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/LazyValueInfo.h head/contrib/llvm/include/llvm/Analysis/Lint.h head/contrib/llvm/include/llvm/Analysis/LoopAccessAnalysis.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/LoopAnalysisManager.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/LoopInfo.h head/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h head/contrib/llvm/include/llvm/Analysis/LoopIterator.h head/contrib/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h head/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/MemoryLocation.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/MemorySSA.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/MemorySSAUpdater.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/ObjCARCInstKind.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/OrderedBasicBlock.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/PHITransAddr.h head/contrib/llvm/include/llvm/Analysis/Passes.h head/contrib/llvm/include/llvm/Analysis/PostDominators.h head/contrib/llvm/include/llvm/Analysis/ProfileSummaryInfo.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/PtrUseVisitor.h head/contrib/llvm/include/llvm/Analysis/RegionInfo.h head/contrib/llvm/include/llvm/Analysis/RegionInfoImpl.h head/contrib/llvm/include/llvm/Analysis/RegionIterator.h head/contrib/llvm/include/llvm/Analysis/RegionPass.h head/contrib/llvm/include/llvm/Analysis/RegionPrinter.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h head/contrib/llvm/include/llvm/Analysis/SparsePropagation.h head/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.def head/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h head/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/TypeMetadataUtils.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/ValueLattice.h (contents, props changed) head/contrib/llvm/include/llvm/Analysis/ValueTracking.h head/contrib/llvm/include/llvm/Analysis/VectorUtils.h (contents, props changed) head/contrib/llvm/include/llvm/AsmParser/Parser.h head/contrib/llvm/include/llvm/BinaryFormat/COFF.h (contents, props changed) head/contrib/llvm/include/llvm/BinaryFormat/Dwarf.def head/contrib/llvm/include/llvm/BinaryFormat/Dwarf.h (contents, props changed) head/contrib/llvm/include/llvm/BinaryFormat/ELF.h (contents, props changed) head/contrib/llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC64.def head/contrib/llvm/include/llvm/BinaryFormat/MachO.h (contents, props changed) head/contrib/llvm/include/llvm/BinaryFormat/Magic.h (contents, props changed) head/contrib/llvm/include/llvm/BinaryFormat/Wasm.h (contents, props changed) head/contrib/llvm/include/llvm/BinaryFormat/WasmRelocs.def head/contrib/llvm/include/llvm/Bitcode/BitcodeWriter.h (contents, props changed) head/contrib/llvm/include/llvm/Bitcode/BitcodeWriterPass.h head/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h head/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h head/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h head/contrib/llvm/include/llvm/CodeGen/Analysis.h head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/CodeGen/AtomicExpandUtils.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/CodeGen/CostTable.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/DIE.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/GCStrategy.h head/contrib/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/RegisterBank.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/Utils.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/LatencyPriorityQueue.h head/contrib/llvm/include/llvm/CodeGen/LazyMachineBlockFrequencyInfo.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalUnion.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervals.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/LivePhysRegs.h head/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h head/contrib/llvm/include/llvm/CodeGen/LiveRegMatrix.h head/contrib/llvm/include/llvm/CodeGen/LiveRegUnits.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/MIRParser/MIRParser.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/MIRPrinter.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/MIRYamlMapping.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/MachORelocation.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h head/contrib/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h head/contrib/llvm/include/llvm/CodeGen/MachineDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineFunction.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h head/contrib/llvm/include/llvm/CodeGen/MachineLoopInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineMemOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineSSAUpdater.h head/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h head/contrib/llvm/include/llvm/CodeGen/MacroFusion.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Math.h head/contrib/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Solution.h head/contrib/llvm/include/llvm/CodeGen/PBQPRAConstraint.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/ParallelCG.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h head/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h head/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h head/contrib/llvm/include/llvm/CodeGen/RegisterUsageInfo.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDFS.h head/contrib/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/CodeGen/StackMaps.h head/contrib/llvm/include/llvm/CodeGen/StackProtector.h head/contrib/llvm/include/llvm/CodeGen/TargetCallingConv.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/TargetFrameLowering.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/TargetInstrInfo.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/TargetLowering.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h head/contrib/llvm/include/llvm/CodeGen/TargetOpcodes.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/TargetPassConfig.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/TargetRegisterInfo.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h head/contrib/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h (contents, props changed) head/contrib/llvm/include/llvm/CodeGen/ValueTypes.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.td head/contrib/llvm/include/llvm/CodeGen/VirtRegMap.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVRecord.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewRegisters.def head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewTypes.def head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeHashing.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DIContext.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFObject.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/MSF/MSFBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/MSF/MSFCommon.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/GlobalsStream.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/InfoStream.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NamedStreamMap.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/RawConstants.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/TpiStream.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h (contents, props changed) head/contrib/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h (contents, props changed) head/contrib/llvm/include/llvm/Demangle/Demangle.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/ExecutionEngine/JITEventListener.h head/contrib/llvm/include/llvm/ExecutionEngine/JITSymbol.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/LambdaResolver.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/NullResolver.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcError.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/RPCSerialization.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h (contents, props changed) head/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h head/contrib/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h head/contrib/llvm/include/llvm/FuzzMutate/FuzzerCLI.h (contents, props changed) head/contrib/llvm/include/llvm/FuzzMutate/OpDescriptor.h (contents, props changed) head/contrib/llvm/include/llvm/IR/Attributes.h head/contrib/llvm/include/llvm/IR/Attributes.td head/contrib/llvm/include/llvm/IR/AutoUpgrade.h head/contrib/llvm/include/llvm/IR/BasicBlock.h head/contrib/llvm/include/llvm/IR/CFG.h head/contrib/llvm/include/llvm/IR/CallSite.h head/contrib/llvm/include/llvm/IR/CallingConv.h head/contrib/llvm/include/llvm/IR/Comdat.h head/contrib/llvm/include/llvm/IR/Constant.h head/contrib/llvm/include/llvm/IR/ConstantRange.h head/contrib/llvm/include/llvm/IR/Constants.h head/contrib/llvm/include/llvm/IR/DIBuilder.h head/contrib/llvm/include/llvm/IR/DataLayout.h head/contrib/llvm/include/llvm/IR/DebugInfo.h head/contrib/llvm/include/llvm/IR/DebugInfoFlags.def head/contrib/llvm/include/llvm/IR/DebugInfoMetadata.h (contents, props changed) head/contrib/llvm/include/llvm/IR/DebugLoc.h head/contrib/llvm/include/llvm/IR/DerivedTypes.h head/contrib/llvm/include/llvm/IR/DiagnosticHandler.h (contents, props changed) head/contrib/llvm/include/llvm/IR/DiagnosticInfo.h head/contrib/llvm/include/llvm/IR/DiagnosticPrinter.h head/contrib/llvm/include/llvm/IR/Dominators.h head/contrib/llvm/include/llvm/IR/Function.h head/contrib/llvm/include/llvm/IR/GlobalObject.h head/contrib/llvm/include/llvm/IR/GlobalValue.h head/contrib/llvm/include/llvm/IR/GlobalVariable.h head/contrib/llvm/include/llvm/IR/IRBuilder.h head/contrib/llvm/include/llvm/IR/IRPrintingPasses.h head/contrib/llvm/include/llvm/IR/InstVisitor.h head/contrib/llvm/include/llvm/IR/InstrTypes.h head/contrib/llvm/include/llvm/IR/Instruction.h head/contrib/llvm/include/llvm/IR/Instructions.h head/contrib/llvm/include/llvm/IR/IntrinsicInst.h head/contrib/llvm/include/llvm/IR/Intrinsics.h head/contrib/llvm/include/llvm/IR/Intrinsics.td head/contrib/llvm/include/llvm/IR/IntrinsicsAArch64.td head/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td head/contrib/llvm/include/llvm/IR/IntrinsicsARM.td head/contrib/llvm/include/llvm/IR/IntrinsicsHexagon.td head/contrib/llvm/include/llvm/IR/IntrinsicsNVVM.td head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td head/contrib/llvm/include/llvm/IR/IntrinsicsWebAssembly.td head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td head/contrib/llvm/include/llvm/IR/LLVMContext.h head/contrib/llvm/include/llvm/IR/LegacyPassManagers.h head/contrib/llvm/include/llvm/IR/MDBuilder.h head/contrib/llvm/include/llvm/IR/Mangler.h head/contrib/llvm/include/llvm/IR/Metadata.def head/contrib/llvm/include/llvm/IR/Metadata.h head/contrib/llvm/include/llvm/IR/Module.h head/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h (contents, props changed) head/contrib/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h (contents, props changed) head/contrib/llvm/include/llvm/IR/Operator.h head/contrib/llvm/include/llvm/IR/OptBisect.h (contents, props changed) head/contrib/llvm/include/llvm/IR/PassManager.h head/contrib/llvm/include/llvm/IR/PassManagerInternal.h (contents, props changed) head/contrib/llvm/include/llvm/IR/PatternMatch.h head/contrib/llvm/include/llvm/IR/ProfileSummary.h (contents, props changed) head/contrib/llvm/include/llvm/IR/Statepoint.h (contents, props changed) head/contrib/llvm/include/llvm/IR/TrackingMDRef.h (contents, props changed) head/contrib/llvm/include/llvm/IR/Type.h head/contrib/llvm/include/llvm/IR/Use.h head/contrib/llvm/include/llvm/IR/UseListOrder.h (contents, props changed) head/contrib/llvm/include/llvm/IR/User.h head/contrib/llvm/include/llvm/IR/Value.h head/contrib/llvm/include/llvm/IR/ValueHandle.h head/contrib/llvm/include/llvm/IR/ValueMap.h head/contrib/llvm/include/llvm/IR/ValueSymbolTable.h head/contrib/llvm/include/llvm/IR/Verifier.h head/contrib/llvm/include/llvm/IRReader/IRReader.h head/contrib/llvm/include/llvm/InitializePasses.h head/contrib/llvm/include/llvm/LTO/Caching.h (contents, props changed) head/contrib/llvm/include/llvm/LTO/Config.h (contents, props changed) head/contrib/llvm/include/llvm/LTO/LTO.h (contents, props changed) head/contrib/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h (contents, props changed) head/contrib/llvm/include/llvm/LinkAllIR.h head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/Linker/Linker.h head/contrib/llvm/include/llvm/MC/MCAsmBackend.h head/contrib/llvm/include/llvm/MC/MCAsmInfo.h head/contrib/llvm/include/llvm/MC/MCAsmLayout.h head/contrib/llvm/include/llvm/MC/MCAsmMacro.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCCodePadder.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCCodeView.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDisassembler/MCExternalSymbolizer.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCDisassembler/MCRelocationInfo.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCDisassembler/MCSymbolizer.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h head/contrib/llvm/include/llvm/MC/MCELFStreamer.h head/contrib/llvm/include/llvm/MC/MCExpr.h head/contrib/llvm/include/llvm/MC/MCFixup.h head/contrib/llvm/include/llvm/MC/MCFixupKindInfo.h head/contrib/llvm/include/llvm/MC/MCFragment.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCInst.h head/contrib/llvm/include/llvm/MC/MCInstBuilder.h head/contrib/llvm/include/llvm/MC/MCInstPrinter.h head/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h head/contrib/llvm/include/llvm/MC/MCInstrDesc.h head/contrib/llvm/include/llvm/MC/MCInstrInfo.h head/contrib/llvm/include/llvm/MC/MCInstrItineraries.h head/contrib/llvm/include/llvm/MC/MCLabel.h head/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h head/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCObjectWriter.h head/contrib/llvm/include/llvm/MC/MCParser/AsmCond.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h head/contrib/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCRegisterInfo.h head/contrib/llvm/include/llvm/MC/MCSchedule.h head/contrib/llvm/include/llvm/MC/MCSection.h head/contrib/llvm/include/llvm/MC/MCSectionWasm.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h head/contrib/llvm/include/llvm/MC/MCSymbol.h head/contrib/llvm/include/llvm/MC/MCSymbolMachO.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCSymbolWasm.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCTargetOptions.h head/contrib/llvm/include/llvm/MC/MCValue.h head/contrib/llvm/include/llvm/MC/MCWasmObjectWriter.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCWasmStreamer.h (contents, props changed) head/contrib/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h head/contrib/llvm/include/llvm/MC/MCWinCOFFStreamer.h head/contrib/llvm/include/llvm/MC/StringTableBuilder.h head/contrib/llvm/include/llvm/Object/Archive.h head/contrib/llvm/include/llvm/Object/Binary.h head/contrib/llvm/include/llvm/Object/COFF.h head/contrib/llvm/include/llvm/Object/COFFImportFile.h (contents, props changed) head/contrib/llvm/include/llvm/Object/Decompressor.h (contents, props changed) head/contrib/llvm/include/llvm/Object/ELF.h head/contrib/llvm/include/llvm/Object/ELFObjectFile.h head/contrib/llvm/include/llvm/Object/ELFTypes.h head/contrib/llvm/include/llvm/Object/IRObjectFile.h head/contrib/llvm/include/llvm/Object/MachO.h head/contrib/llvm/include/llvm/Object/MachOUniversal.h head/contrib/llvm/include/llvm/Object/ModuleSymbolTable.h (contents, props changed) head/contrib/llvm/include/llvm/Object/ObjectFile.h head/contrib/llvm/include/llvm/Object/RelocVisitor.h head/contrib/llvm/include/llvm/Object/Wasm.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/COFFYAML.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/CodeViewYAMLTypeHashing.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/CodeViewYAMLTypes.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/DWARFEmitter.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/DWARFYAML.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/ELFYAML.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/MachOYAML.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/WasmYAML.h (contents, props changed) head/contrib/llvm/include/llvm/ObjectYAML/YAML.h (contents, props changed) head/contrib/llvm/include/llvm/Option/Arg.h head/contrib/llvm/include/llvm/Option/ArgList.h head/contrib/llvm/include/llvm/Option/OptTable.h head/contrib/llvm/include/llvm/Option/Option.h head/contrib/llvm/include/llvm/Pass.h head/contrib/llvm/include/llvm/PassAnalysisSupport.h head/contrib/llvm/include/llvm/PassRegistry.h head/contrib/llvm/include/llvm/Passes/PassBuilder.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/GCOV.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/InstrProf.h head/contrib/llvm/include/llvm/ProfileData/InstrProfData.inc (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/InstrProfReader.h head/contrib/llvm/include/llvm/ProfileData/ProfileCommon.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/SampleProf.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/SampleProfReader.h (contents, props changed) head/contrib/llvm/include/llvm/ProfileData/SampleProfWriter.h (contents, props changed) head/contrib/llvm/include/llvm/Support/AArch64TargetParser.def head/contrib/llvm/include/llvm/Support/AMDGPUMetadata.h (contents, props changed) head/contrib/llvm/include/llvm/Support/ARMTargetParser.def head/contrib/llvm/include/llvm/Support/AlignOf.h head/contrib/llvm/include/llvm/Support/Allocator.h head/contrib/llvm/include/llvm/Support/AtomicOrdering.h (contents, props changed) head/contrib/llvm/include/llvm/Support/BinaryByteStream.h (contents, props changed) head/contrib/llvm/include/llvm/Support/BinaryStream.h (contents, props changed) head/contrib/llvm/include/llvm/Support/BinaryStreamArray.h (contents, props changed) head/contrib/llvm/include/llvm/Support/BinaryStreamReader.h (contents, props changed) head/contrib/llvm/include/llvm/Support/BinaryStreamRef.h (contents, props changed) head/contrib/llvm/include/llvm/Support/BinaryStreamWriter.h (contents, props changed) head/contrib/llvm/include/llvm/Support/BlockFrequency.h head/contrib/llvm/include/llvm/Support/BranchProbability.h head/contrib/llvm/include/llvm/Support/CachePruning.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Casting.h head/contrib/llvm/include/llvm/Support/CodeGenCoverage.h (contents, props changed) head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/Compiler.h head/contrib/llvm/include/llvm/Support/ConvertUTF.h head/contrib/llvm/include/llvm/Support/CrashRecoveryContext.h head/contrib/llvm/include/llvm/Support/DataExtractor.h head/contrib/llvm/include/llvm/Support/Debug.h head/contrib/llvm/include/llvm/Support/DebugCounter.h (contents, props changed) head/contrib/llvm/include/llvm/Support/DynamicLibrary.h head/contrib/llvm/include/llvm/Support/Endian.h head/contrib/llvm/include/llvm/Support/EndianStream.h head/contrib/llvm/include/llvm/Support/Errc.h head/contrib/llvm/include/llvm/Support/Errno.h head/contrib/llvm/include/llvm/Support/Error.h (contents, props changed) head/contrib/llvm/include/llvm/Support/ErrorHandling.h head/contrib/llvm/include/llvm/Support/ErrorOr.h head/contrib/llvm/include/llvm/Support/FileOutputBuffer.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/FormatAdapters.h (contents, props changed) head/contrib/llvm/include/llvm/Support/FormatVariadic.h (contents, props changed) head/contrib/llvm/include/llvm/Support/FormatVariadicDetails.h (contents, props changed) head/contrib/llvm/include/llvm/Support/GenericDomTree.h head/contrib/llvm/include/llvm/Support/GenericDomTreeConstruction.h head/contrib/llvm/include/llvm/Support/GraphWriter.h head/contrib/llvm/include/llvm/Support/Host.h head/contrib/llvm/include/llvm/Support/JamCRC.h (contents, props changed) head/contrib/llvm/include/llvm/Support/KnownBits.h (contents, props changed) head/contrib/llvm/include/llvm/Support/LEB128.h head/contrib/llvm/include/llvm/Support/LineIterator.h head/contrib/llvm/include/llvm/Support/LockFileManager.h head/contrib/llvm/include/llvm/Support/LowLevelTypeImpl.h (contents, props changed) head/contrib/llvm/include/llvm/Support/MD5.h head/contrib/llvm/include/llvm/Support/MathExtras.h head/contrib/llvm/include/llvm/Support/Memory.h head/contrib/llvm/include/llvm/Support/MemoryBuffer.h head/contrib/llvm/include/llvm/Support/MipsABIFlags.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Mutex.h head/contrib/llvm/include/llvm/Support/MutexGuard.h head/contrib/llvm/include/llvm/Support/OnDiskHashTable.h head/contrib/llvm/include/llvm/Support/Options.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Parallel.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Path.h head/contrib/llvm/include/llvm/Support/PointerLikeTypeTraits.h head/contrib/llvm/include/llvm/Support/Process.h head/contrib/llvm/include/llvm/Support/Program.h head/contrib/llvm/include/llvm/Support/RWMutex.h head/contrib/llvm/include/llvm/Support/Regex.h head/contrib/llvm/include/llvm/Support/SMLoc.h head/contrib/llvm/include/llvm/Support/SaveAndRestore.h head/contrib/llvm/include/llvm/Support/ScaledNumber.h head/contrib/llvm/include/llvm/Support/ScopedPrinter.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Signals.h head/contrib/llvm/include/llvm/Support/SourceMgr.h head/contrib/llvm/include/llvm/Support/StringSaver.h (contents, props changed) head/contrib/llvm/include/llvm/Support/SystemUtils.h head/contrib/llvm/include/llvm/Support/TargetParser.h (contents, props changed) head/contrib/llvm/include/llvm/Support/TargetRegistry.h head/contrib/llvm/include/llvm/Support/ThreadLocal.h head/contrib/llvm/include/llvm/Support/ThreadPool.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Threading.h head/contrib/llvm/include/llvm/Support/Timer.h head/contrib/llvm/include/llvm/Support/ToolOutputFile.h head/contrib/llvm/include/llvm/Support/TrailingObjects.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Unicode.h head/contrib/llvm/include/llvm/Support/UnicodeCharRanges.h head/contrib/llvm/include/llvm/Support/UniqueLock.h (contents, props changed) head/contrib/llvm/include/llvm/Support/Win64EH.h head/contrib/llvm/include/llvm/Support/X86TargetParser.def head/contrib/llvm/include/llvm/Support/YAMLParser.h head/contrib/llvm/include/llvm/Support/YAMLTraits.h head/contrib/llvm/include/llvm/Support/raw_ostream.h head/contrib/llvm/include/llvm/Support/type_traits.h head/contrib/llvm/include/llvm/Support/xxhash.h (contents, props changed) head/contrib/llvm/include/llvm/TableGen/Record.h head/contrib/llvm/include/llvm/TableGen/SearchableTable.td head/contrib/llvm/include/llvm/Target/GenericOpcodes.td head/contrib/llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td head/contrib/llvm/include/llvm/Target/GlobalISel/Target.td head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetCallingConv.td head/contrib/llvm/include/llvm/Target/TargetItinerary.td head/contrib/llvm/include/llvm/Target/TargetMachine.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetSchedule.td head/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td head/contrib/llvm/include/llvm/Testing/Support/Error.h (contents, props changed) head/contrib/llvm/include/llvm/Testing/Support/SupportHelpers.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/IPO.h head/contrib/llvm/include/llvm/Transforms/IPO/AlwaysInliner.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/IPO/ArgumentPromotion.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/IPO/FunctionImport.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/IPO/Inliner.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/InstCombine/InstCombine.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/InstCombine/InstCombineWorklist.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Instrumentation.h head/contrib/llvm/include/llvm/Transforms/Scalar.h head/contrib/llvm/include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/CallSiteSplitting.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/EarlyCSE.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/GVN.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/GVNExpression.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/JumpThreading.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopAccessAnalysisPrinter.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopDataPrefetch.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/MergedLoadStoreMotion.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/NewGVN.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/Reassociate.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/SCCP.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/SROA.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/SimpleLoopUnswitch.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/SpeculateAroundPHIs.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/SpeculativeExecution.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h head/contrib/llvm/include/llvm/Transforms/Utils/CodeExtractor.h head/contrib/llvm/include/llvm/Transforms/Utils/Evaluator.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/FunctionComparator.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/IntegerDivision.h head/contrib/llvm/include/llvm/Transforms/Utils/Local.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopSimplify.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopVersioning.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/OrderedInstructions.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/PredicateInfo.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdaterImpl.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/SymbolRewriter.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h head/contrib/llvm/include/llvm/Transforms/Vectorize.h head/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h (contents, props changed) head/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h (contents, props changed) head/contrib/llvm/include/llvm/XRay/XRayRecord.h (contents, props changed) head/contrib/llvm/include/llvm/XRay/YAMLXRayRecord.h (contents, props changed) head/contrib/llvm/include/llvm/module.modulemap head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisSummary.h (contents, props changed) head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/Analysis.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp head/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp head/contrib/llvm/lib/Analysis/CFGPrinter.cpp head/contrib/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/CFLGraph.h (contents, props changed) head/contrib/llvm/lib/Analysis/CFLSteensAliasAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/CGSCCPassManager.cpp head/contrib/llvm/lib/Analysis/CallGraph.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/CallGraphSCCPass.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/CaptureTracking.cpp head/contrib/llvm/lib/Analysis/CodeMetrics.cpp head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/Delinearization.cpp head/contrib/llvm/lib/Analysis/DemandedBits.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/DivergenceAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/DominanceFrontier.cpp head/contrib/llvm/lib/Analysis/EHPersonalities.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/GlobalsModRef.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/IVUsers.cpp head/contrib/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/InlineCost.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/IteratedDominanceFrontier.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/LazyBranchProbabilityInfo.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/LazyCallGraph.cpp head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/Loads.cpp head/contrib/llvm/lib/Analysis/LoopAccessAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/LoopAnalysisManager.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/LoopInfo.cpp head/contrib/llvm/lib/Analysis/LoopPass.cpp head/contrib/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/MemDepPrinter.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/MemoryLocation.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/MemorySSA.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/MemorySSAUpdater.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/ObjCARCAnalysisUtils.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/ObjCARCInstKind.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/OrderedBasicBlock.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/PHITransAddr.cpp head/contrib/llvm/lib/Analysis/PostDominators.cpp head/contrib/llvm/lib/Analysis/ProfileSummaryInfo.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/RegionInfo.cpp head/contrib/llvm/lib/Analysis/RegionPass.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/StratifiedSets.h (contents, props changed) head/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp (contents, props changed) head/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp head/contrib/llvm/lib/Analysis/Trace.cpp head/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/Analysis/VectorUtils.cpp (contents, props changed) head/contrib/llvm/lib/AsmParser/LLLexer.cpp head/contrib/llvm/lib/AsmParser/LLLexer.h head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/AsmParser/LLParser.h head/contrib/llvm/lib/AsmParser/LLToken.h head/contrib/llvm/lib/AsmParser/Parser.cpp head/contrib/llvm/lib/BinaryFormat/Dwarf.cpp (contents, props changed) head/contrib/llvm/lib/BinaryFormat/Magic.cpp (contents, props changed) head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp (contents, props changed) head/contrib/llvm/lib/Bitcode/Reader/ValueList.cpp (contents, props changed) head/contrib/llvm/lib/Bitcode/Writer/BitWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/AllocationOrder.cpp head/contrib/llvm/lib/CodeGen/Analysis.cpp head/contrib/llvm/lib/CodeGen/AntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.h (contents, props changed) head/contrib/llvm/lib/CodeGen/AtomicExpandPass.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.h head/contrib/llvm/lib/CodeGen/BranchRelaxation.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/BuiltinGCs.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp head/contrib/llvm/lib/CodeGen/CodeGen.cpp head/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp head/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp head/contrib/llvm/lib/CodeGen/DetectDeadLanes.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp head/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp head/contrib/llvm/lib/CodeGen/ExpandMemCmp.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp head/contrib/llvm/lib/CodeGen/ExpandReductions.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/FaultMaps.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/FuncletLayout.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GCMetadata.cpp head/contrib/llvm/lib/CodeGen/GCRootLowering.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/Localizer.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/Utils.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/GlobalMerge.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/ImplicitNullChecks.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.cpp head/contrib/llvm/lib/CodeGen/InterleavedAccessPass.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LatencyPriorityQueue.cpp head/contrib/llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/LexicalScopes.cpp head/contrib/llvm/lib/CodeGen/LiveDebugValues.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp head/contrib/llvm/lib/CodeGen/LiveIntervals.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/LivePhysRegs.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.h head/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp head/contrib/llvm/lib/CodeGen/LiveRangeShrink.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp head/contrib/llvm/lib/CodeGen/LiveRegUnits.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp head/contrib/llvm/lib/CodeGen/LowerEmuTLS.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MIRParser/MILexer.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MIRParser/MILexer.h (contents, props changed) head/contrib/llvm/lib/CodeGen/MIRParser/MIParser.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MIRParser/MIParser.h (contents, props changed) head/contrib/llvm/lib/CodeGen/MIRParser/MIRParser.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MIRPrinter.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineCombiner.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp head/contrib/llvm/lib/CodeGen/MachineDominators.cpp head/contrib/llvm/lib/CodeGen/MachineFrameInfo.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MachineFunction.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineLoopInfo.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp head/contrib/llvm/lib/CodeGen/MachineOperand.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MachineOutliner.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MachinePipeliner.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/MachineRegionInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp head/contrib/llvm/lib/CodeGen/MachineScheduler.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/MacroFusion.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/OptimizePHIs.cpp head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/ParallelCG.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/PatchableFunction.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp head/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp head/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp head/contrib/llvm/lib/CodeGen/RegAllocFast.cpp head/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegUsageInfoCollector.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp head/contrib/llvm/lib/CodeGen/RegisterPressure.cpp head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/RegisterUsageInfo.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/RenameIndependentSubregs.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/SafeStack.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/SafeStackColoring.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/SafeStackLayout.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/SafeStackLayout.h (contents, props changed) head/contrib/llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGCLowering.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/ShrinkWrap.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SlotIndexes.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.cpp head/contrib/llvm/lib/CodeGen/SplitKit.cpp head/contrib/llvm/lib/CodeGen/SplitKit.h head/contrib/llvm/lib/CodeGen/StackColoring.cpp head/contrib/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp head/contrib/llvm/lib/CodeGen/StackMaps.cpp head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp head/contrib/llvm/lib/CodeGen/TailDuplication.cpp head/contrib/llvm/lib/CodeGen/TailDuplicator.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TargetPassConfig.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/TargetSchedule.cpp head/contrib/llvm/lib/CodeGen/TargetSubtargetInfo.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.cpp head/contrib/llvm/lib/CodeGen/WinEHPrepare.cpp (contents, props changed) head/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/GlobalTypeTableBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/RecordName.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/TypeHashing.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/MSF/MSFBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/MSF/MSFCommon.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/GenericError.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptor.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/PDBStringTable.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/TpiStream.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBExtras.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp (contents, props changed) head/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp (contents, props changed) head/contrib/llvm/lib/Demangle/ItaniumDemangle.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp head/contrib/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/ittnotify_config.h head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.h head/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/NullResolver.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/OrcCBindings.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/OrcError.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFMips.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFMips.h (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h head/contrib/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp (contents, props changed) head/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp head/contrib/llvm/lib/FuzzMutate/FuzzerCLI.cpp (contents, props changed) head/contrib/llvm/lib/FuzzMutate/IRMutator.cpp (contents, props changed) head/contrib/llvm/lib/IR/AsmWriter.cpp head/contrib/llvm/lib/IR/AttributeImpl.h head/contrib/llvm/lib/IR/Attributes.cpp head/contrib/llvm/lib/IR/AutoUpgrade.cpp head/contrib/llvm/lib/IR/BasicBlock.cpp head/contrib/llvm/lib/IR/Comdat.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp head/contrib/llvm/lib/IR/ConstantRange.cpp head/contrib/llvm/lib/IR/Constants.cpp head/contrib/llvm/lib/IR/ConstantsContext.h head/contrib/llvm/lib/IR/Core.cpp head/contrib/llvm/lib/IR/DIBuilder.cpp head/contrib/llvm/lib/IR/DataLayout.cpp head/contrib/llvm/lib/IR/DebugInfo.cpp head/contrib/llvm/lib/IR/DebugInfoMetadata.cpp (contents, props changed) head/contrib/llvm/lib/IR/DebugLoc.cpp head/contrib/llvm/lib/IR/DiagnosticHandler.cpp (contents, props changed) head/contrib/llvm/lib/IR/DiagnosticInfo.cpp head/contrib/llvm/lib/IR/Dominators.cpp head/contrib/llvm/lib/IR/Function.cpp head/contrib/llvm/lib/IR/Globals.cpp head/contrib/llvm/lib/IR/IRBuilder.cpp head/contrib/llvm/lib/IR/IRPrintingPasses.cpp head/contrib/llvm/lib/IR/InlineAsm.cpp head/contrib/llvm/lib/IR/Instruction.cpp head/contrib/llvm/lib/IR/Instructions.cpp head/contrib/llvm/lib/IR/IntrinsicInst.cpp head/contrib/llvm/lib/IR/LLVMContext.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.h head/contrib/llvm/lib/IR/LegacyPassManager.cpp head/contrib/llvm/lib/IR/MDBuilder.cpp head/contrib/llvm/lib/IR/Mangler.cpp head/contrib/llvm/lib/IR/Metadata.cpp head/contrib/llvm/lib/IR/Module.cpp head/contrib/llvm/lib/IR/ModuleSummaryIndex.cpp (contents, props changed) head/contrib/llvm/lib/IR/Operator.cpp (contents, props changed) head/contrib/llvm/lib/IR/OptBisect.cpp (contents, props changed) head/contrib/llvm/lib/IR/Pass.cpp head/contrib/llvm/lib/IR/ProfileSummary.cpp (contents, props changed) head/contrib/llvm/lib/IR/SafepointIRVerifier.cpp (contents, props changed) head/contrib/llvm/lib/IR/SymbolTableListTraitsImpl.h head/contrib/llvm/lib/IR/Type.cpp head/contrib/llvm/lib/IR/TypeFinder.cpp head/contrib/llvm/lib/IR/Value.cpp head/contrib/llvm/lib/IR/ValueSymbolTable.cpp head/contrib/llvm/lib/IR/Verifier.cpp head/contrib/llvm/lib/IRReader/IRReader.cpp head/contrib/llvm/lib/LTO/Caching.cpp (contents, props changed) head/contrib/llvm/lib/LTO/LTO.cpp (contents, props changed) head/contrib/llvm/lib/LTO/LTOBackend.cpp (contents, props changed) head/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp head/contrib/llvm/lib/LTO/LTOModule.cpp head/contrib/llvm/lib/LTO/ThinLTOCodeGenerator.cpp (contents, props changed) head/contrib/llvm/lib/Linker/IRMover.cpp (contents, props changed) head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCAsmBackend.cpp head/contrib/llvm/lib/MC/MCAsmInfo.cpp head/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCCodeView.cpp (contents, props changed) head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h head/contrib/llvm/lib/MC/MCDwarf.cpp head/contrib/llvm/lib/MC/MCELFStreamer.cpp head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCFragment.cpp (contents, props changed) head/contrib/llvm/lib/MC/MCInst.cpp head/contrib/llvm/lib/MC/MCInstrAnalysis.cpp head/contrib/llvm/lib/MC/MCLabel.cpp head/contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCNullStreamer.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp head/contrib/llvm/lib/MC/MCSchedule.cpp (contents, props changed) head/contrib/llvm/lib/MC/MCSection.cpp head/contrib/llvm/lib/MC/MCSectionCOFF.cpp head/contrib/llvm/lib/MC/MCSectionELF.cpp head/contrib/llvm/lib/MC/MCStreamer.cpp head/contrib/llvm/lib/MC/MCSubtargetInfo.cpp head/contrib/llvm/lib/MC/MCSymbol.cpp head/contrib/llvm/lib/MC/MCValue.cpp head/contrib/llvm/lib/MC/MCWasmObjectTargetWriter.cpp (contents, props changed) head/contrib/llvm/lib/MC/MCWasmStreamer.cpp (contents, props changed) head/contrib/llvm/lib/MC/MCWinCOFFStreamer.cpp (contents, props changed) head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/MC/StringTableBuilder.cpp head/contrib/llvm/lib/MC/SubtargetFeature.cpp head/contrib/llvm/lib/MC/WasmObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/Object/Archive.cpp head/contrib/llvm/lib/Object/ArchiveWriter.cpp (contents, props changed) head/contrib/llvm/lib/Object/Binary.cpp head/contrib/llvm/lib/Object/COFFImportFile.cpp (contents, props changed) head/contrib/llvm/lib/Object/COFFModuleDefinition.cpp (contents, props changed) head/contrib/llvm/lib/Object/COFFObjectFile.cpp head/contrib/llvm/lib/Object/ELF.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Object/IRSymtab.cpp (contents, props changed) head/contrib/llvm/lib/Object/MachOObjectFile.cpp head/contrib/llvm/lib/Object/ModuleSymbolTable.cpp (contents, props changed) head/contrib/llvm/lib/Object/Object.cpp head/contrib/llvm/lib/Object/ObjectFile.cpp head/contrib/llvm/lib/Object/RecordStreamer.cpp head/contrib/llvm/lib/Object/RecordStreamer.h head/contrib/llvm/lib/Object/SymbolSize.cpp (contents, props changed) head/contrib/llvm/lib/Object/SymbolicFile.cpp head/contrib/llvm/lib/Object/WasmObjectFile.cpp (contents, props changed) head/contrib/llvm/lib/Object/WindowsResource.cpp (contents, props changed) head/contrib/llvm/lib/ObjectYAML/COFFYAML.cpp (contents, props changed) head/contrib/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp (contents, props changed) head/contrib/llvm/lib/ObjectYAML/CodeViewYAMLTypeHashing.cpp (contents, props changed) head/contrib/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp (contents, props changed) head/contrib/llvm/lib/ObjectYAML/DWARFEmitter.cpp (contents, props changed) head/contrib/llvm/lib/ObjectYAML/DWARFVisitor.h (contents, props changed) head/contrib/llvm/lib/ObjectYAML/ELFYAML.cpp (contents, props changed) head/contrib/llvm/lib/ObjectYAML/WasmYAML.cpp (contents, props changed) head/contrib/llvm/lib/Option/Arg.cpp head/contrib/llvm/lib/Option/ArgList.cpp head/contrib/llvm/lib/Option/OptTable.cpp head/contrib/llvm/lib/Option/Option.cpp head/contrib/llvm/lib/Passes/PassBuilder.cpp (contents, props changed) head/contrib/llvm/lib/Passes/PassRegistry.def head/contrib/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp (contents, props changed) head/contrib/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp (contents, props changed) head/contrib/llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp (contents, props changed) head/contrib/llvm/lib/ProfileData/GCOV.cpp (contents, props changed) head/contrib/llvm/lib/ProfileData/InstrProf.cpp head/contrib/llvm/lib/ProfileData/InstrProfReader.cpp head/contrib/llvm/lib/ProfileData/InstrProfWriter.cpp head/contrib/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp (contents, props changed) head/contrib/llvm/lib/ProfileData/SampleProf.cpp (contents, props changed) head/contrib/llvm/lib/ProfileData/SampleProfReader.cpp (contents, props changed) head/contrib/llvm/lib/ProfileData/SampleProfWriter.cpp (contents, props changed) head/contrib/llvm/lib/Support/AMDGPUMetadata.cpp (contents, props changed) head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/ARMAttributeParser.cpp (contents, props changed) head/contrib/llvm/lib/Support/BinaryStreamRef.cpp (contents, props changed) head/contrib/llvm/lib/Support/BranchProbability.cpp head/contrib/llvm/lib/Support/COM.cpp (contents, props changed) head/contrib/llvm/lib/Support/CachePruning.cpp (contents, props changed) head/contrib/llvm/lib/Support/Chrono.cpp (contents, props changed) head/contrib/llvm/lib/Support/CodeGenCoverage.cpp (contents, props changed) head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/ConvertUTF.cpp (contents, props changed) head/contrib/llvm/lib/Support/CrashRecoveryContext.cpp head/contrib/llvm/lib/Support/DAGDeltaAlgorithm.cpp head/contrib/llvm/lib/Support/Debug.cpp head/contrib/llvm/lib/Support/DebugCounter.cpp (contents, props changed) head/contrib/llvm/lib/Support/DynamicLibrary.cpp head/contrib/llvm/lib/Support/Errno.cpp head/contrib/llvm/lib/Support/Error.cpp (contents, props changed) head/contrib/llvm/lib/Support/ErrorHandling.cpp head/contrib/llvm/lib/Support/FileOutputBuffer.cpp head/contrib/llvm/lib/Support/FoldingSet.cpp head/contrib/llvm/lib/Support/FormattedStream.cpp head/contrib/llvm/lib/Support/GraphWriter.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Support/Locale.cpp head/contrib/llvm/lib/Support/LockFileManager.cpp head/contrib/llvm/lib/Support/MD5.cpp head/contrib/llvm/lib/Support/ManagedStatic.cpp head/contrib/llvm/lib/Support/Memory.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/Mutex.cpp head/contrib/llvm/lib/Support/NativeFormatting.cpp (contents, props changed) head/contrib/llvm/lib/Support/Parallel.cpp (contents, props changed) head/contrib/llvm/lib/Support/Path.cpp head/contrib/llvm/lib/Support/PrettyStackTrace.cpp head/contrib/llvm/lib/Support/Process.cpp head/contrib/llvm/lib/Support/Program.cpp head/contrib/llvm/lib/Support/RWMutex.cpp head/contrib/llvm/lib/Support/RandomNumberGenerator.cpp head/contrib/llvm/lib/Support/Regex.cpp head/contrib/llvm/lib/Support/SHA1.cpp (contents, props changed) head/contrib/llvm/lib/Support/Signals.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/SmallVector.cpp head/contrib/llvm/lib/Support/SourceMgr.cpp head/contrib/llvm/lib/Support/Statistic.cpp head/contrib/llvm/lib/Support/StringExtras.cpp head/contrib/llvm/lib/Support/StringMap.cpp head/contrib/llvm/lib/Support/StringPool.cpp head/contrib/llvm/lib/Support/StringRef.cpp head/contrib/llvm/lib/Support/StringSaver.cpp (contents, props changed) head/contrib/llvm/lib/Support/TarWriter.cpp (contents, props changed) head/contrib/llvm/lib/Support/TargetParser.cpp (contents, props changed) head/contrib/llvm/lib/Support/TargetRegistry.cpp head/contrib/llvm/lib/Support/ThreadLocal.cpp head/contrib/llvm/lib/Support/Threading.cpp head/contrib/llvm/lib/Support/Timer.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/Twine.cpp head/contrib/llvm/lib/Support/Unix/Host.inc head/contrib/llvm/lib/Support/Unix/Memory.inc head/contrib/llvm/lib/Support/Unix/Path.inc head/contrib/llvm/lib/Support/Unix/Process.inc head/contrib/llvm/lib/Support/Unix/Program.inc head/contrib/llvm/lib/Support/Unix/Signals.inc head/contrib/llvm/lib/Support/Unix/ThreadLocal.inc head/contrib/llvm/lib/Support/Unix/Threading.inc (contents, props changed) head/contrib/llvm/lib/Support/Unix/Unix.h head/contrib/llvm/lib/Support/Unix/Watchdog.inc head/contrib/llvm/lib/Support/Watchdog.cpp head/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc head/contrib/llvm/lib/Support/Windows/Host.inc head/contrib/llvm/lib/Support/Windows/Path.inc head/contrib/llvm/lib/Support/Windows/Process.inc head/contrib/llvm/lib/Support/Windows/Program.inc head/contrib/llvm/lib/Support/Windows/RWMutex.inc head/contrib/llvm/lib/Support/Windows/Signals.inc head/contrib/llvm/lib/Support/Windows/WindowsSupport.h head/contrib/llvm/lib/Support/YAMLParser.cpp head/contrib/llvm/lib/Support/YAMLTraits.cpp head/contrib/llvm/lib/Support/circular_raw_ostream.cpp head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/Support/regcomp.c head/contrib/llvm/lib/Support/regengine.inc head/contrib/llvm/lib/Support/regex_impl.h head/contrib/llvm/lib/Support/xxhash.cpp (contents, props changed) head/contrib/llvm/lib/TableGen/Error.cpp head/contrib/llvm/lib/TableGen/Main.cpp head/contrib/llvm/lib/TableGen/Record.cpp head/contrib/llvm/lib/TableGen/StringMatcher.cpp head/contrib/llvm/lib/TableGen/TGLexer.cpp head/contrib/llvm/lib/TableGen/TGLexer.h head/contrib/llvm/lib/TableGen/TGParser.cpp head/contrib/llvm/lib/TableGen/TGParser.h head/contrib/llvm/lib/Target/AArch64/AArch64.td head/contrib/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.td head/contrib/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CondBrTuning.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp head/contrib/llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64FastISel.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrAtomics.td head/contrib/llvm/lib/Target/AArch64/AArch64InstrFormats.td head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp head/contrib/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64MacroFusion.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedA53.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedFalkor.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedFalkorDetails.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedKryo.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedThunderX.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedThunderX2T99.td head/contrib/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h head/contrib/llvm/lib/Target/AArch64/AArch64SystemOperands.td head/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp head/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.h (contents, props changed) head/contrib/llvm/lib/Target/AArch64/SVEInstrFormats.td head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPU.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.def head/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInline.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsicInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsicInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsics.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMacroFusion.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBanks.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUUnifyMetadata.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDKernelCodeT.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/BUFInstructions.td head/contrib/llvm/lib/Target/AMDGPU/DSInstructions.td head/contrib/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/EvergreenInstructions.td head/contrib/llvm/lib/Target/AMDGPU/FLATInstructions.td head/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNILPSched.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNMinRegStrategy.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNProcessors.td head/contrib/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNRegPressure.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/MIMGInstructions.td head/contrib/llvm/lib/Target/AMDGPU/R600ClauseMergePass.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600Defines.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600ISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600InstrFormats.td head/contrib/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600InstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600Instructions.td head/contrib/llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600MachineScheduler.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600Packetizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600Processors.td head/contrib/llvm/lib/Target/AMDGPU/R600RegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600RegisterInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/R600RegisterInfo.td head/contrib/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIDefines.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIFixVGPRCopies.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIFixWWMLiveness.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIFrameLowering.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIInsertSkips.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIInstrFormats.td head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.td head/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td head/contrib/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIMachineScheduler.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.td head/contrib/llvm/lib/Target/AMDGPU/SISchedule.td head/contrib/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/SMInstructions.td head/contrib/llvm/lib/Target/AMDGPU/SOPInstructions.td head/contrib/llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AMDGPU/VOP1Instructions.td head/contrib/llvm/lib/Target/AMDGPU/VOP2Instructions.td head/contrib/llvm/lib/Target/AMDGPU/VOP3Instructions.td head/contrib/llvm/lib/Target/AMDGPU/VOP3PInstructions.td head/contrib/llvm/lib/Target/AMDGPU/VOPCInstructions.td head/contrib/llvm/lib/Target/AMDGPU/VOPInstructions.td head/contrib/llvm/lib/Target/ARC/ARCAsmPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCBranchFinalize.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCFrameLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCInstrFormats.td head/contrib/llvm/lib/Target/ARC/ARCInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCInstrInfo.td head/contrib/llvm/lib/Target/ARC/ARCMCInstLower.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCMCInstLower.h (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCMachineFunctionInfo.h (contents, props changed) head/contrib/llvm/lib/Target/ARC/ARCRegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/Disassembler/ARCDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/InstPrinter/ARCInstPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARC/InstPrinter/ARCInstPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/ARC/MCTargetDesc/ARCInfo.h (contents, props changed) head/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARM.h head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCallLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h head/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td head/contrib/llvm/lib/Target/ARM/ARMInstructionSelector.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h head/contrib/llvm/lib/Target/ARM/ARMMacroFusion.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/ARM/ARMRegisterBanks.td head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA57.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td head/contrib/llvm/lib/Target/ARM/ARMScheduleR52.td head/contrib/llvm/lib/Target/ARM/ARMScheduleSwift.td head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.h head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h (contents, props changed) head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h (contents, props changed) head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h (contents, props changed) head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h (contents, props changed) head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp head/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/AVR.h (contents, props changed) head/contrib/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/AVRISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.td head/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.h (contents, props changed) head/contrib/llvm/lib/Target/AVR/AVRTargetMachine.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h (contents, props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRELFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCELFStreamer.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCELFStreamer.h (contents, props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp (contents, props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.h (contents, props changed) head/contrib/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPF.h (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPF.td head/contrib/llvm/lib/Target/BPF/BPFCallingConv.td head/contrib/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td head/contrib/llvm/lib/Target/BPF/BPFRegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFRegisterInfo.h (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFSubtarget.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFSubtarget.h (contents, props changed) head/contrib/llvm/lib/Target/BPF/BPFTargetMachine.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/InstPrinter/BPFInstPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h (contents, props changed) head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp (contents, props changed) head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/BitTracker.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/BitTracker.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/Hexagon.h head/contrib/llvm/lib/Target/Hexagon/Hexagon.td head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.h head/contrib/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonBlockRanges.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonDepArch.td head/contrib/llvm/lib/Target/Hexagon/HexagonDepIICScalar.td head/contrib/llvm/lib/Target/Hexagon/HexagonDepInstrInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonDepMappings.td head/contrib/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonGatherPacketize.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonGenMux.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonHazardRecognizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonHazardRecognizer.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV60.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsics.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV5.td head/contrib/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h head/contrib/llvm/lib/Target/Hexagon/HexagonMapAsm2IntrinV65.gen.td head/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonPatterns.td head/contrib/llvm/lib/Target/Hexagon/HexagonPseudo.td head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonStoreWidening.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCompound.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/RDFCopy.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/RDFDeadCode.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/RDFGraph.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/RDFLiveness.cpp (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/RDFLiveness.h (contents, props changed) head/contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp head/contrib/llvm/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiDelaySlotFiller.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiInstrFormats.td head/contrib/llvm/lib/Target/Lanai/LanaiInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiInstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiInstrInfo.td head/contrib/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/LanaiTargetObjectFile.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiELFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp (contents, props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.h (contents, props changed) head/contrib/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCNaCl.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsDSPInstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp (contents, props changed) head/contrib/llvm/lib/Target/Mips/Mips.h head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips32r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsCondMov.td head/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp head/contrib/llvm/lib/Target/Mips/MipsDSPInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsEVAInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsEVAInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h head/contrib/llvm/lib/Target/Mips/MipsMSAInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMTInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp head/contrib/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsOptimizePICCall.cpp head/contrib/llvm/lib/Target/Mips/MipsOs16.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSchedule.td head/contrib/llvm/lib/Target/Mips/MipsScheduleGeneric.td head/contrib/llvm/lib/Target/Mips/MipsScheduleP5600.td head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h head/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTX.td head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h head/contrib/llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td head/contrib/llvm/lib/Target/NVPTX/NVPTXMachineFunctionInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/NVPTX/NVVMReflect.cpp head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.h (contents, props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2ELFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.h (contents, props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2TargetStreamer.cpp (contents, props changed) head/contrib/llvm/lib/Target/Nios2/Nios2ISelDAGToDAG.cpp (contents, props changed) head/contrib/llvm/lib/Target/Nios2/Nios2ISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/Nios2/Nios2InstrFormats.td head/contrib/llvm/lib/Target/Nios2/Nios2InstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/Nios2/Nios2InstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/Nios2/Nios2InstrInfo.td head/contrib/llvm/lib/Target/Nios2/Nios2TargetObjectFile.h (contents, props changed) head/contrib/llvm/lib/Target/Nios2/Nios2TargetStreamer.h (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp head/contrib/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h head/contrib/llvm/lib/Target/PowerPC/P9InstrResources.td head/contrib/llvm/lib/Target/PowerPC/PPC.h head/contrib/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCBranchCoalescing.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td head/contrib/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCExpandISEL.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrQPX.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrSPE.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrVSX.td head/contrib/llvm/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleP9.td head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp (contents, props changed) head/contrib/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/InstPrinter/RISCVInstPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/InstPrinter/RISCVInstPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCV.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCV.td head/contrib/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVCallingConv.td head/contrib/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVFrameLowering.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVInstrFormats.td head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfo.td head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoA.td head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoC.td head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoD.td head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoF.td head/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoM.td head/contrib/llvm/lib/Target/RISCV/RISCVMCInstLower.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVRegisterInfo.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVRegisterInfo.td head/contrib/llvm/lib/Target/RISCV/RISCVSubtarget.h (contents, props changed) head/contrib/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp (contents, props changed) head/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp head/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp head/contrib/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp head/contrib/llvm/lib/Target/Sparc/LeonFeatures.td head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h head/contrib/llvm/lib/Target/Sparc/Sparc.h head/contrib/llvm/lib/Target/Sparc/Sparc.td head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h head/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h head/contrib/llvm/lib/Target/SystemZ/SystemZ.h head/contrib/llvm/lib/Target/SystemZ/SystemZ.td head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h head/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.td head/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZExpandPseudo.cpp (contents, props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZFeatures.td head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp (contents, props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.h (contents, props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFormats.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZMachineScheduler.cpp (contents, props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZMachineScheduler.h (contents, props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZOperands.td head/contrib/llvm/lib/Target/SystemZ/SystemZOperators.td head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZSchedule.td head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ13.td head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ14.td head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ196.td head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZEC12.td head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/Target.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/TargetMachineC.cpp head/contrib/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/README.txt (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssembly.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssembly.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISD.def head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrConv.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrFormats.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLowerGlobalDtors.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h (contents, props changed) head/contrib/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt (contents, props changed) head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86Operand.h head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86.td head/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/X86AsmPrinter.h head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp head/contrib/llvm/lib/Target/X86/X86CallLowering.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86CallingConv.h head/contrib/llvm/lib/Target/X86/X86CallingConv.td head/contrib/llvm/lib/Target/X86/X86CmovConversion.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86DomainReassignment.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86EvexToVex.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86ExpandPseudo.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FixupBWInsts.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp head/contrib/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.h head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86Instr3DNow.td head/contrib/llvm/lib/Target/X86/X86InstrAVX512.td head/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td head/contrib/llvm/lib/Target/X86/X86InstrCMovSetCC.td head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrControl.td head/contrib/llvm/lib/Target/X86/X86InstrExtension.td head/contrib/llvm/lib/Target/X86/X86InstrFMA.td head/contrib/llvm/lib/Target/X86/X86InstrFMA3Info.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86InstrFMA3Info.h (contents, props changed) head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrMMX.td head/contrib/llvm/lib/Target/X86/X86InstrMPX.td head/contrib/llvm/lib/Target/X86/X86InstrSGX.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86InstrSVM.td head/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86InstrVMX.td head/contrib/llvm/lib/Target/X86/X86InstrVecCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrXOP.td head/contrib/llvm/lib/Target/X86/X86InstructionSelector.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86InterleavedAccess.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86IntrinsicsInfo.h (contents, props changed) head/contrib/llvm/lib/Target/X86/X86LegalizerInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp head/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h head/contrib/llvm/lib/Target/X86/X86MacroFusion.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86OptimizeLEAs.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86PadShortFunction.cpp head/contrib/llvm/lib/Target/X86/X86RegisterBankInfo.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86RetpolineThunks.cpp head/contrib/llvm/lib/Target/X86/X86SchedBroadwell.td head/contrib/llvm/lib/Target/X86/X86SchedHaswell.td head/contrib/llvm/lib/Target/X86/X86SchedSandyBridge.td head/contrib/llvm/lib/Target/X86/X86SchedSkylakeClient.td head/contrib/llvm/lib/Target/X86/X86SchedSkylakeServer.td head/contrib/llvm/lib/Target/X86/X86Schedule.td head/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td head/contrib/llvm/lib/Target/X86/X86ScheduleBtVer2.td head/contrib/llvm/lib/Target/X86/X86ScheduleSLM.td head/contrib/llvm/lib/Target/X86/X86ScheduleZnver1.td head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.h (contents, props changed) head/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp head/contrib/llvm/lib/Target/X86/X86WinAllocaExpander.cpp (contents, props changed) head/contrib/llvm/lib/Target/X86/X86WinEHState.cpp (contents, props changed) head/contrib/llvm/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp head/contrib/llvm/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h head/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp head/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.cpp head/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.h head/contrib/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h head/contrib/llvm/lib/Target/XCore/XCoreSubtarget.h head/contrib/llvm/lib/Testing/Support/Error.cpp (contents, props changed) head/contrib/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp (contents, props changed) head/contrib/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp (contents, props changed) head/contrib/llvm/lib/ToolDrivers/llvm-lib/Options.td head/contrib/llvm/lib/Transforms/Coroutines/CoroEarly.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Coroutines/CoroElide.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Coroutines/CoroFrame.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Coroutines/CoroInternal.h (contents, props changed) head/contrib/llvm/lib/Transforms/Coroutines/CoroSplit.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Coroutines/Coroutines.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/AlwaysInliner.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/BarrierNoopPass.cpp head/contrib/llvm/lib/Transforms/IPO/CalledValuePropagation.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp head/contrib/llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/FunctionImport.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp head/contrib/llvm/lib/Transforms/IPO/IPO.cpp head/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/Internalize.cpp head/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp head/contrib/llvm/lib/Transforms/IPO/LowerTypeTests.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp head/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp head/contrib/llvm/lib/Transforms/IPO/SampleProfile.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp head/contrib/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineInternal.h (contents, props changed) head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp head/contrib/llvm/lib/Transforms/Instrumentation/CFGMST.h (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp head/contrib/llvm/lib/Transforms/ObjCARC/BlotMapVector.h (contents, props changed) head/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/PtrState.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/ObjCARC/PtrState.h (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp head/contrib/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/BDCE.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp head/contrib/llvm/lib/Transforms/Scalar/ConstantProp.cpp head/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp head/contrib/llvm/lib/Transforms/Scalar/DCE.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp head/contrib/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/Float2Int.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/GVNHoist.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/GVNSink.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/GuardWidening.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDistribute.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInterchange.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopPredication.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopSink.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/MergeICmps.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp head/contrib/llvm/lib/Transforms/Scalar/NaryReassociate.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/Reg2Mem.cpp head/contrib/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp head/contrib/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp head/contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/Sink.cpp head/contrib/llvm/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp head/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp head/contrib/llvm/lib/Transforms/Utils/AddDiscriminators.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp head/contrib/llvm/lib/Transforms/Utils/CallPromotionUtils.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp head/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp head/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp head/contrib/llvm/lib/Transforms/Utils/CtorUtils.cpp head/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp head/contrib/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/EscapeEnumerator.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/Evaluator.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/FlattenCFG.cpp head/contrib/llvm/lib/Transforms/Utils/FunctionComparator.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp head/contrib/llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/InstructionNamer.cpp head/contrib/llvm/lib/Transforms/Utils/IntegerDivision.cpp head/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp head/contrib/llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/LoopVersioning.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp head/contrib/llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp head/contrib/llvm/lib/Transforms/Utils/Mem2Reg.cpp head/contrib/llvm/lib/Transforms/Utils/MetaRenamer.cpp head/contrib/llvm/lib/Transforms/Utils/OrderedInstructions.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/PredicateInfo.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/SplitModule.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/StripGCRelocates.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/StripNonLineTableDebugInfo.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/SymbolRewriter.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp head/contrib/llvm/lib/Transforms/Utils/Utils.cpp head/contrib/llvm/lib/Transforms/Utils/VNCoercion.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp head/contrib/llvm/lib/Transforms/Vectorize/VPlan.cpp (contents, props changed) head/contrib/llvm/lib/Transforms/Vectorize/VPlan.h (contents, props changed) head/contrib/llvm/lib/Transforms/Vectorize/VPlanValue.h (contents, props changed) head/contrib/llvm/lib/Transforms/Vectorize/Vectorize.cpp head/contrib/llvm/lib/XRay/Trace.cpp (contents, props changed) head/contrib/llvm/tools/bugpoint/BugDriver.cpp head/contrib/llvm/tools/bugpoint/BugDriver.h head/contrib/llvm/tools/bugpoint/CrashDebugger.cpp head/contrib/llvm/tools/bugpoint/ExecutionDriver.cpp head/contrib/llvm/tools/bugpoint/ExtractFunction.cpp head/contrib/llvm/tools/bugpoint/FindBugs.cpp head/contrib/llvm/tools/bugpoint/Miscompilation.cpp head/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.cpp head/contrib/llvm/tools/bugpoint/bugpoint.cpp head/contrib/llvm/tools/clang/LICENSE.TXT head/contrib/llvm/tools/clang/include/clang-c/BuildSystem.h head/contrib/llvm/tools/clang/include/clang-c/CXCompilationDatabase.h head/contrib/llvm/tools/clang/include/clang-c/CXErrorCode.h head/contrib/llvm/tools/clang/include/clang-c/CXString.h head/contrib/llvm/tools/clang/include/clang-c/Documentation.h head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h head/contrib/llvm/tools/clang/include/clang/AST/APValue.h head/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/ASTFwd.h head/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h head/contrib/llvm/tools/clang/include/clang/AST/ASTLambda.h head/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h head/contrib/llvm/tools/clang/include/clang/AST/ASTStructuralEquivalence.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h head/contrib/llvm/tools/clang/include/clang/AST/ASTUnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/AttrIterator.h head/contrib/llvm/tools/clang/include/clang/AST/Availability.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/BaseSubobject.h head/contrib/llvm/tools/clang/include/clang/AST/BuiltinTypes.def head/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h head/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h head/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h head/contrib/llvm/tools/clang/include/clang/AST/Comment.h head/contrib/llvm/tools/clang/include/clang/AST/CommentBriefParser.h head/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h head/contrib/llvm/tools/clang/include/clang/AST/CommentLexer.h head/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h head/contrib/llvm/tools/clang/include/clang/AST/DataCollection.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h head/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h head/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/DeclVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h head/contrib/llvm/tools/clang/include/clang/AST/DependentDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h head/contrib/llvm/tools/clang/include/clang/AST/ExprOpenMP.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTMerger.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/GlobalDecl.h head/contrib/llvm/tools/clang/include/clang/AST/LambdaCapture.h head/contrib/llvm/tools/clang/include/clang/AST/LocInfoType.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/Mangle.h head/contrib/llvm/tools/clang/include/clang/AST/MangleNumberingContext.h head/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h head/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h head/contrib/llvm/tools/clang/include/clang/AST/ODRHash.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/OpenMPClause.h head/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.def head/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h head/contrib/llvm/tools/clang/include/clang/AST/ParentMap.h head/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h head/contrib/llvm/tools/clang/include/clang/AST/QualTypeNames.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/AST/RawCommentList.h head/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Redeclarable.h head/contrib/llvm/tools/clang/include/clang/AST/SelectorLocationsKind.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h head/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h head/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h head/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/StmtVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateName.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def head/contrib/llvm/tools/clang/include/clang/AST/TypeOrdering.h head/contrib/llvm/tools/clang/include/clang/AST/TypeVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/AST/VTTBuilder.h head/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Parser.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Registry.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Consumed.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ReachableCode.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyLogical.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDeclContext.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h head/contrib/llvm/tools/clang/include/clang/Analysis/CFGStmtMap.h head/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h head/contrib/llvm/tools/clang/include/clang/Analysis/CloneDetection.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Analysis/CodeInjector.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h head/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h head/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h head/contrib/llvm/tools/clang/include/clang/Analysis/Support/BumpVector.h head/contrib/llvm/tools/clang/include/clang/Basic/ABI.h head/contrib/llvm/tools/clang/include/clang/Basic/AddressSpaces.h head/contrib/llvm/tools/clang/include/clang/Basic/AlignedAllocation.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/AllDiagnostics.h head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/AttrSubjectMatchRules.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/Attributes.h head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAMDGPU.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsHexagon.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNEON.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPPC.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsWebAssembly.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86_64.def head/contrib/llvm/tools/clang/include/clang/Basic/CapturedStmt.h head/contrib/llvm/tools/clang/include/clang/Basic/CharInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/CommentOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Cuda.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/DebugInfoOptions.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommentKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticError.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/ExceptionSpecificationType.h head/contrib/llvm/tools/clang/include/clang/Basic/ExpressionTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/FileSystemOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h head/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Linkage.h head/contrib/llvm/tools/clang/include/clang/Basic/MacroBuilder.h head/contrib/llvm/tools/clang/include/clang/Basic/Module.h head/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenCLExtensions.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenCLOptions.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/OperatorKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/OperatorPrecedence.h head/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/PlistSupport.h head/contrib/llvm/tools/clang/include/clang/Basic/PrettyStackTrace.h head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManagerInternals.h head/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/SyncScope.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetCXXABI.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/TemplateKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/Version.h head/contrib/llvm/tools/clang/include/clang/Basic/VirtualFileSystem.h head/contrib/llvm/tools/clang/include/clang/Basic/Visibility.h head/contrib/llvm/tools/clang/include/clang/Basic/X86Target.def head/contrib/llvm/tools/clang/include/clang/Basic/XRayLists.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td head/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ConstantInitBuilder.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/CodeGen/SwiftCallingConv.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/CrossTU/CrossTranslationUnit.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Driver/Action.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Driver/Distro.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/Job.h head/contrib/llvm/tools/clang/include/clang/Driver/Multilib.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h head/contrib/llvm/tools/clang/include/clang/Driver/Tool.h head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Driver/Types.def head/contrib/llvm/tools/clang/include/clang/Driver/Types.h head/contrib/llvm/tools/clang/include/clang/Driver/XRayArgs.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Edit/Commit.h head/contrib/llvm/tools/clang/include/clang/Edit/EditedSource.h head/contrib/llvm/tools/clang/include/clang/Edit/EditsReceiver.h head/contrib/llvm/tools/clang/include/clang/Edit/FileOffset.h head/contrib/llvm/tools/clang/include/clang/Edit/Rewriters.h head/contrib/llvm/tools/clang/include/clang/Format/Format.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CommandLineSourceLoc.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h head/contrib/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticRenderer.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendPluginRegistry.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def head/contrib/llvm/tools/clang/include/clang/Frontend/LayoutOverrideSource.h head/contrib/llvm/tools/clang/include/clang/Frontend/LogDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/PCHContainerOperations.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Frontend/PrecompiledPreamble.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticReader.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnostics.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticBuffer.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h head/contrib/llvm/tools/clang/include/clang/FrontendTool/Utils.h head/contrib/llvm/tools/clang/include/clang/Index/IndexDataConsumer.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Index/IndexSymbol.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Index/IndexingAction.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Index/USRGeneration.h head/contrib/llvm/tools/clang/include/clang/Lex/CodeCompletionHandler.h head/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h head/contrib/llvm/tools/clang/include/clang/Lex/ExternalPreprocessorSource.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h head/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h head/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroArgs.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h head/contrib/llvm/tools/clang/include/clang/Lex/MultipleIncludeOpt.h head/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h head/contrib/llvm/tools/clang/include/clang/Lex/PPConditionalDirectiveRecord.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h head/contrib/llvm/tools/clang/include/clang/Lex/Token.h head/contrib/llvm/tools/clang/include/clang/Lex/TokenConcatenation.h head/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/VariadicMacroSupport.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Parse/ParseAST.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Parse/RAIIObjectsForParser.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/DeltaTree.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/HTMLRewrite.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/RewriteBuffer.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/RewriteRope.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/Rewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/TokenRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FixItRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Sema/AnalysisBasedWarnings.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteOptions.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h head/contrib/llvm/tools/clang/include/clang/Sema/LoopHint.h head/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/ObjCMethodList.h head/contrib/llvm/tools/clang/include/clang/Sema/Overload.h head/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h head/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaConsumer.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaFixItUtils.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaInternal.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h head/contrib/llvm/tools/clang/include/clang/Sema/Template.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h head/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h head/contrib/llvm/tools/clang/include/clang/Sema/Weak.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h head/contrib/llvm/tools/clang/include/clang/Serialization/GlobalModuleIndex.h head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h head/contrib/llvm/tools/clang/include/clang/Serialization/ModuleFileExtension.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerOptInfo.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/IssueHash.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SimpleConstraintManager.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SummaryManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h head/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h head/contrib/llvm/tools/clang/include/clang/Tooling/Core/Diagnostic.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Core/Replacement.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/DiagnosticsYaml.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Execution.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/FileMatchTrie.h head/contrib/llvm/tools/clang/include/clang/Tooling/FixIt.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/JSONCompilationDatabase.h head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/AtomicChange.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringActionRule.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringResultConsumer.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/Rename/SymbolName.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/Rename/USRFinder.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/Rename/USRLocFinder.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/RefactoringCallbacks.h head/contrib/llvm/tools/clang/include/clang/Tooling/ReplacementsYaml.h head/contrib/llvm/tools/clang/include/clang/Tooling/StandaloneExecution.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/ToolExecutorPluginRegistry.h (contents, props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h head/contrib/llvm/tools/clang/include/clang/module.modulemap head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Internals.h head/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/PlistReporter.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransARCAssign.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransBlockObjCVariable.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransProperties.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransProtectedScope.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h head/contrib/llvm/tools/clang/lib/AST/APValue.cpp head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/ASTStructuralEquivalence.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp head/contrib/llvm/tools/clang/lib/AST/Comment.cpp head/contrib/llvm/tools/clang/lib/AST/CommentBriefParser.cpp head/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp head/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclFriend.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclOpenMP.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp head/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/ExternalASTMerger.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/Mangle.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp head/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp head/contrib/llvm/tools/clang/lib/AST/ODRHash.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/OpenMPClause.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp head/contrib/llvm/tools/clang/lib/AST/QualTypeNames.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/RawCommentList.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtCXX.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/StmtObjC.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/StmtOpenMP.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/AST/VTTBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Marshallers.h head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Parser.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/VariantValue.cpp head/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFGReachabilityAnalysis.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFGStmtMap.cpp head/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp head/contrib/llvm/tools/clang/lib/Analysis/CloneDetection.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp head/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp head/contrib/llvm/tools/clang/lib/Analysis/Dominators.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatStringParsing.h head/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp head/contrib/llvm/tools/clang/lib/Analysis/ObjCNoReturn.cpp head/contrib/llvm/tools/clang/lib/Analysis/PostOrderCFGView.cpp head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/ProgramPoint.cpp head/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp head/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyCommon.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyTIL.cpp head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp head/contrib/llvm/tools/clang/lib/Basic/Cuda.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticOptions.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp head/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp head/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp head/contrib/llvm/tools/clang/lib/Basic/Module.cpp head/contrib/llvm/tools/clang/lib/Basic/ObjCRuntime.cpp head/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp head/contrib/llvm/tools/clang/lib/Basic/OperatorPrecedence.cpp head/contrib/llvm/tools/clang/lib/Basic/Sanitizers.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/AArch64.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/AArch64.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/AMDGPU.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/AMDGPU.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/ARM.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/ARM.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/AVR.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/AVR.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/BPF.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/BPF.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Hexagon.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Hexagon.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Lanai.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Lanai.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Mips.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Mips.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/NVPTX.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/NVPTX.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Nios2.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/OSTargets.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/PPC.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/PPC.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/SPIR.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Sparc.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Sparc.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/SystemZ.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/SystemZ.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/WebAssembly.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/WebAssembly.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/Basic/VirtualFileSystem.cpp head/contrib/llvm/tools/clang/lib/Basic/Warnings.cpp head/contrib/llvm/tools/clang/lib/Basic/XRayLists.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuilder.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCoroutine.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGGPUBuiltin.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h head/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypeCache.h (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/ConstantEmitter.h (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/ConstantInitBuilder.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.h (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MacroPPCallbacks.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/MacroPPCallbacks.h (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/SwiftCallingConv.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/VarBypassDetector.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/Action.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/Distro.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/Job.cpp head/contrib/llvm/tools/clang/lib/Driver/Multilib.cpp head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/AMDGPU.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Ananas.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/AArch64.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/ARM.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/Mips.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/Mips.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/PPC.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/PPC.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/Sparc.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/X86.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/BareMetal.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/BareMetal.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/CloudABI.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/CloudABI.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/CommonArgs.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/CommonArgs.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Contiki.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Cuda.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Cuda.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Darwin.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Fuchsia.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Fuchsia.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Haiku.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Haiku.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hexagon.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hexagon.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Lanai.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Linux.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Linux.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSVC.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSVC.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MinGW.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MinGW.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MipsLinux.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MipsLinux.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Myriad.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Myriad.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/NaCl.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/NaCl.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/NetBSD.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/NetBSD.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/PS4CPU.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/PS4CPU.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Solaris.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Solaris.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/WebAssembly.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/WebAssembly.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Driver/Types.cpp head/contrib/llvm/tools/clang/lib/Driver/XRayArgs.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Edit/Commit.cpp head/contrib/llvm/tools/clang/lib/Edit/EditedSource.cpp head/contrib/llvm/tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp head/contrib/llvm/tools/clang/lib/Format/AffectedRangeManager.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/AffectedRangeManager.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp head/contrib/llvm/tools/clang/lib/Format/BreakableToken.h head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h head/contrib/llvm/tools/clang/lib/Format/Encoding.h head/contrib/llvm/tools/clang/lib/Format/Format.cpp head/contrib/llvm/tools/clang/lib/Format/FormatInternal.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp head/contrib/llvm/tools/clang/lib/Format/FormatToken.h head/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/NamespaceEndCommentsFixer.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/NamespaceEndCommentsFixer.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/SortJavaScriptImports.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/SortJavaScriptImports.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/TokenAnalyzer.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/TokenAnalyzer.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h head/contrib/llvm/tools/clang/lib/Format/UsingDeclarationsSorter.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/UsingDeclarationsSorter.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.h head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp head/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/CodeGenOptions.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp head/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp head/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/LayoutOverrideSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp head/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHContainerOperations.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Frontend/PrecompiledPreamble.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FixItRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/HTMLPrint.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticReader.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_builtin_vars.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_intrinsics.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_runtime_wrapper.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h head/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h head/contrib/llvm/tools/clang/lib/Headers/altivec.h head/contrib/llvm/tools/clang/lib/Headers/ammintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512bitalgintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512cdintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512erintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512ifmaintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512ifmavlintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512pfintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vbmi2intrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vbmiintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vbmivlintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vlbitalgintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vlcdintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vlvbmi2intrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vlvnniintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vnniintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vpopcntdqintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avx512vpopcntdqvlintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/avxintrin.h head/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h head/contrib/llvm/tools/clang/lib/Headers/cetintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/clflushoptintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/clwbintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/clzerointrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/cpuid.h head/contrib/llvm/tools/clang/lib/Headers/cuda_wrappers/algorithm head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h head/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h head/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h head/contrib/llvm/tools/clang/lib/Headers/fxsrintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/gfniintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/htmxlintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/ia32intrin.h head/contrib/llvm/tools/clang/lib/Headers/immintrin.h head/contrib/llvm/tools/clang/lib/Headers/intrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/lwpintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h head/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h head/contrib/llvm/tools/clang/lib/Headers/mmintrin.h head/contrib/llvm/tools/clang/lib/Headers/module.modulemap head/contrib/llvm/tools/clang/lib/Headers/mwaitxintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/nmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/opencl-c.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/pkuintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h head/contrib/llvm/tools/clang/lib/Headers/prfchwintrin.h head/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h head/contrib/llvm/tools/clang/lib/Headers/shaintrin.h head/contrib/llvm/tools/clang/lib/Headers/smmintrin.h head/contrib/llvm/tools/clang/lib/Headers/stdint.h head/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/unwind.h head/contrib/llvm/tools/clang/lib/Headers/vaesintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/vpclmulqdqintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/wmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/x86intrin.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/xopintrin.h head/contrib/llvm/tools/clang/lib/Headers/xsavecintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/xsaveintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/xsaveoptintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/xsavesintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Headers/xtestintrin.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/IndexBody.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/IndexDecl.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/IndexSymbol.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/IndexTypeSourceInfo.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/IndexingAction.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/IndexingContext.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/IndexingContext.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Index/SimpleFormatContext.h head/contrib/llvm/tools/clang/lib/Index/USRGeneration.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp head/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp head/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp head/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp head/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Rewrite/DeltaTree.cpp head/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp head/contrib/llvm/tools/clang/lib/Rewrite/TokenRewriter.cpp head/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp head/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp head/contrib/llvm/tools/clang/lib/Sema/CoroutineStmtBuilder.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/DelayedDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp head/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCUDA.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCoroutine.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.h head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp head/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp head/contrib/llvm/tools/clang/lib/Serialization/MultiOnDiskHashTable.h (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AllocationDiagnostics.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CXXSelfAssignmentChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MisusedMovedObjectChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/DynamicTypeMap.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/IssueHash.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/LoopWidening.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelConsumer.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/ASTDiff/ASTDiff.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp head/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/Execution.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/FileMatchTrie.cpp head/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/AtomicChange.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Extract/Extract.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/USRFinder.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/StandaloneExecution.cpp (contents, props changed) head/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangOptionDocEmitter.cpp (contents, props changed) head/contrib/llvm/tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp head/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h head/contrib/llvm/tools/llc/llc.cpp head/contrib/llvm/tools/lld/COFF/CMakeLists.txt (contents, props changed) head/contrib/llvm/tools/lld/COFF/Chunks.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/Chunks.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/Config.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/DLL.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/DLL.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/Driver.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/Driver.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/DriverUtils.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/ICF.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/InputFiles.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/InputFiles.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/LTO.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/LTO.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/MapFile.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/MarkLive.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/MinGW.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/Options.td head/contrib/llvm/tools/lld/COFF/PDB.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/PDB.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/SymbolTable.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/SymbolTable.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/Symbols.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/Symbols.h (contents, props changed) head/contrib/llvm/tools/lld/COFF/Writer.cpp (contents, props changed) head/contrib/llvm/tools/lld/COFF/Writer.h (contents, props changed) head/contrib/llvm/tools/lld/Common/Args.cpp (contents, props changed) head/contrib/llvm/tools/lld/Common/CMakeLists.txt (contents, props changed) head/contrib/llvm/tools/lld/Common/ErrorHandler.cpp (contents, props changed) head/contrib/llvm/tools/lld/Common/Strings.cpp (contents, props changed) head/contrib/llvm/tools/lld/Common/TargetOptionsCommandFlags.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/AArch64ErrataFix.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/AArch64ErrataFix.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/AArch64.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/AMDGPU.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/ARM.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/Mips.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/MipsArchTree.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/PPC.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/SPARCV9.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/X86.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Arch/X86_64.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/CMakeLists.txt (contents, props changed) head/contrib/llvm/tools/lld/ELF/Config.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/Driver.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Driver.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/DriverUtils.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/EhFrame.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Filesystem.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/GdbIndex.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/GdbIndex.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/ICF.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/ICF.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/InputFiles.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/InputFiles.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/InputSection.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/InputSection.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/LTO.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/LTO.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/LinkerScript.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/LinkerScript.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/MapFile.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/MapFile.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/MarkLive.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Options.td head/contrib/llvm/tools/lld/ELF/OutputSections.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/OutputSections.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/Relocations.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Relocations.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/ScriptLexer.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/ScriptParser.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/SymbolTable.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/Symbols.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Symbols.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/SyntheticSections.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/Target.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Target.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/Thunks.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Thunks.h (contents, props changed) head/contrib/llvm/tools/lld/ELF/Writer.cpp (contents, props changed) head/contrib/llvm/tools/lld/ELF/Writer.h (contents, props changed) head/contrib/llvm/tools/lld/LICENSE.TXT (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Common/Driver.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Common/ErrorHandler.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Common/Strings.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Common/TargetOptionsCommandFlags.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Common/Version.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/DefinedAtom.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/File.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/Instrumentation.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/LinkingContext.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/PassManager.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/Reader.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/Resolver.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/Simple.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/SymbolTable.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/TODO.txt (contents, props changed) head/contrib/llvm/tools/lld/include/lld/Core/Writer.h (contents, props changed) head/contrib/llvm/tools/lld/include/lld/ReaderWriter/MachOLinkingContext.h (contents, props changed) head/contrib/llvm/tools/lld/lib/Core/LinkingContext.cpp (contents, props changed) head/contrib/llvm/tools/lld/lib/Driver/CMakeLists.txt (contents, props changed) head/contrib/llvm/tools/lld/lib/Driver/DarwinLdDriver.cpp (contents, props changed) head/contrib/llvm/tools/lld/lib/Driver/DarwinLdOptions.td head/contrib/llvm/tools/lld/lib/ReaderWriter/FileArchive.cpp (contents, props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp (contents, props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/CMakeLists.txt (contents, props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp (contents, props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/LayoutPass.cpp (contents, props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (contents, props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h (contents, props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (contents, props changed) head/contrib/llvm/tools/lld/tools/lld/lld.cpp (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBAddress.h head/contrib/llvm/tools/lldb/include/lldb/API/SBBroadcaster.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCommandInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCommandReturnObject.h head/contrib/llvm/tools/lldb/include/lldb/API/SBData.h head/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h head/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFrame.h head/contrib/llvm/tools/lldb/include/lldb/API/SBInstruction.h head/contrib/llvm/tools/lldb/include/lldb/API/SBInstructionList.h head/contrib/llvm/tools/lldb/include/lldb/API/SBLaunchInfo.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBModule.h head/contrib/llvm/tools/lldb/include/lldb/API/SBProcess.h head/contrib/llvm/tools/lldb/include/lldb/API/SBStream.h head/contrib/llvm/tools/lldb/include/lldb/API/SBStructuredData.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBSymbol.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h head/contrib/llvm/tools/lldb/include/lldb/API/SBValue.h head/contrib/llvm/tools/lldb/include/lldb/API/SBValueList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointID.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointIDList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocation.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointName.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointOptions.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolver.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverName.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSite.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSiteList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/StoppointCallbackContext.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/StoppointLocation.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Watchpoint.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/WatchpointList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/WatchpointOptions.h head/contrib/llvm/tools/lldb/include/lldb/Core/Address.h head/contrib/llvm/tools/lldb/include/lldb/Core/AddressRange.h head/contrib/llvm/tools/lldb/include/lldb/Core/AddressResolver.h head/contrib/llvm/tools/lldb/include/lldb/Core/AddressResolverFileLine.h head/contrib/llvm/tools/lldb/include/lldb/Core/AddressResolverName.h head/contrib/llvm/tools/lldb/include/lldb/Core/Architecture.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/Broadcaster.h head/contrib/llvm/tools/lldb/include/lldb/Core/Communication.h head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h head/contrib/llvm/tools/lldb/include/lldb/Core/Disassembler.h head/contrib/llvm/tools/lldb/include/lldb/Core/EmulateInstruction.h head/contrib/llvm/tools/lldb/include/lldb/Core/Event.h head/contrib/llvm/tools/lldb/include/lldb/Core/FileLineResolver.h head/contrib/llvm/tools/lldb/include/lldb/Core/FileSpecList.h head/contrib/llvm/tools/lldb/include/lldb/Core/FormatEntity.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/IOHandler.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/LoadedModuleInfoList.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/Mangled.h head/contrib/llvm/tools/lldb/include/lldb/Core/MappedHash.h head/contrib/llvm/tools/lldb/include/lldb/Core/Module.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleChild.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleList.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleSpec.h head/contrib/llvm/tools/lldb/include/lldb/Core/PluginManager.h head/contrib/llvm/tools/lldb/include/lldb/Core/RangeMap.h head/contrib/llvm/tools/lldb/include/lldb/Core/RegisterValue.h head/contrib/llvm/tools/lldb/include/lldb/Core/STLUtils.h head/contrib/llvm/tools/lldb/include/lldb/Core/Scalar.h head/contrib/llvm/tools/lldb/include/lldb/Core/SearchFilter.h head/contrib/llvm/tools/lldb/include/lldb/Core/Section.h head/contrib/llvm/tools/lldb/include/lldb/Core/SourceManager.h head/contrib/llvm/tools/lldb/include/lldb/Core/StreamBuffer.h head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseSet.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeValue.h head/contrib/llvm/tools/lldb/include/lldb/Core/UniqueCStringMap.h head/contrib/llvm/tools/lldb/include/lldb/Core/UserSettingsController.h head/contrib/llvm/tools/lldb/include/lldb/Core/Value.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObject.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/DataVisualization.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatClasses.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormattersContainer.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/StringPrinter.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeFormat.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSummary.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSynthetic.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeValidator.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/VectorIterator.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/DWARFExpression.h head/contrib/llvm/tools/lldb/include/lldb/Expression/Expression.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionParser.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionSourceCode.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionVariable.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/FunctionCaller.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/IRDynamicChecks.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRExecutionUnit.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRMemoryMap.h head/contrib/llvm/tools/lldb/include/lldb/Expression/LLVMUserExpression.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/UserExpression.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/UtilityFunction.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/Config.h.cmake head/contrib/llvm/tools/lldb/include/lldb/Host/Debug.h head/contrib/llvm/tools/lldb/include/lldb/Host/Editline.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/File.h head/contrib/llvm/tools/lldb/include/lldb/Host/Host.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostInfo.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostInfoBase.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostProcess.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostThread.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/MainLoop.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/MainLoopBase.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/MonitoringProcessLauncher.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/PosixApi.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/Predicate.h head/contrib/llvm/tools/lldb/include/lldb/Host/ProcessRunLock.h head/contrib/llvm/tools/lldb/include/lldb/Host/PseudoTerminal.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/Socket.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/SocketAddress.h head/contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/Symbols.h head/contrib/llvm/tools/lldb/include/lldb/Host/TaskPool.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/Terminal.h head/contrib/llvm/tools/lldb/include/lldb/Host/XML.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/GetOptInc.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeBreakpoint.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeProcessProtocol.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeRegisterContext.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeThreadProtocol.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/freebsd/HostInfoFreeBSD.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/netbsd/HostInfoNetBSD.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostInfoPosix.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/PipePosix.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandAlias.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandCompletions.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObject.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObjectMultiword.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupBoolean.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupPlatform.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValue.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueArch.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueArray.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueBoolean.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueEnumeration.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFileSpec.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueProperties.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueUInt64.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueUUID.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/Options.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Block.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTImporter.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompactUnwindInfo.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompileUnit.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompilerType.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/DeclVendor.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/Declaration.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/FuncUnwinders.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Function.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/GoASTContext.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/LineEntry.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/LineTable.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ObjectContainer.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ObjectFile.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Symbol.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolContextScope.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolFile.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolVendor.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Type.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/TypeSystem.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindPlan.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindTable.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Variable.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/VariableList.h head/contrib/llvm/tools/lldb/include/lldb/Target/ABI.h head/contrib/llvm/tools/lldb/include/lldb/Target/DynamicLoader.h head/contrib/llvm/tools/lldb/include/lldb/Target/ExecutionContext.h head/contrib/llvm/tools/lldb/include/lldb/Target/ExecutionContextScope.h head/contrib/llvm/tools/lldb/include/lldb/Target/JITLoader.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/Language.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/LanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/Memory.h head/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ModuleCache.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ObjCLanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/OperatingSystem.h head/contrib/llvm/tools/lldb/include/lldb/Target/PathMappingList.h head/contrib/llvm/tools/lldb/include/lldb/Target/Platform.h head/contrib/llvm/tools/lldb/include/lldb/Target/Process.h head/contrib/llvm/tools/lldb/include/lldb/Target/ProcessInfo.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ProcessLaunchInfo.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ProcessStructReader.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/Queue.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/QueueItem.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/QueueList.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/RegisterCheckpoint.h head/contrib/llvm/tools/lldb/include/lldb/Target/RegisterContext.h head/contrib/llvm/tools/lldb/include/lldb/Target/RegisterNumber.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/SectionLoadHistory.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/SectionLoadList.h head/contrib/llvm/tools/lldb/include/lldb/Target/StackFrame.h head/contrib/llvm/tools/lldb/include/lldb/Target/StackID.h head/contrib/llvm/tools/lldb/include/lldb/Target/StopInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/SystemRuntime.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/Target.h head/contrib/llvm/tools/lldb/include/lldb/Target/Thread.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadCollection.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadList.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlan.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunction.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanShouldStopHere.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepRange.h head/contrib/llvm/tools/lldb/include/lldb/Target/UnixSignals.h head/contrib/llvm/tools/lldb/include/lldb/Utility/AnsiTerminal.h head/contrib/llvm/tools/lldb/include/lldb/Utility/ArchSpec.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Baton.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/CleanUp.h head/contrib/llvm/tools/lldb/include/lldb/Utility/Connection.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/ConstString.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/DataBuffer.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/DataBufferHeap.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/DataBufferLLVM.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/DataEncoder.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/DataExtractor.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/FileSpec.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Flags.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/JSON.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Log.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/RegularExpression.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/SafeMachO.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/SelectHelper.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/SharedCluster.h head/contrib/llvm/tools/lldb/include/lldb/Utility/SharingPtr.h head/contrib/llvm/tools/lldb/include/lldb/Utility/Status.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Stream.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StreamTee.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StringExtractor.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StringList.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StructuredData.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/TildeExpressionResolver.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Timeout.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Timer.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/UUID.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/UserID.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/VMRange.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/lldb-defines.h head/contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-forward.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-defines.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-forward.h (contents, props changed) head/contrib/llvm/tools/lldb/include/lldb/lldb-private-types.h head/contrib/llvm/tools/lldb/include/lldb/lldb-types.h head/contrib/llvm/tools/lldb/include/lldb/lldb-versioning.h head/contrib/llvm/tools/lldb/source/API/SBAddress.cpp head/contrib/llvm/tools/lldb/source/API/SBAttachInfo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/API/SBBreakpointName.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/API/SBCommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/API/SBDebugger.cpp head/contrib/llvm/tools/lldb/source/API/SBEvent.cpp head/contrib/llvm/tools/lldb/source/API/SBFrame.cpp head/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp head/contrib/llvm/tools/lldb/source/API/SBInstruction.cpp head/contrib/llvm/tools/lldb/source/API/SBInstructionList.cpp head/contrib/llvm/tools/lldb/source/API/SBLaunchInfo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/API/SBModule.cpp head/contrib/llvm/tools/lldb/source/API/SBModuleSpec.cpp head/contrib/llvm/tools/lldb/source/API/SBPlatform.cpp head/contrib/llvm/tools/lldb/source/API/SBProcess.cpp head/contrib/llvm/tools/lldb/source/API/SBQueueItem.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/API/SBStream.cpp head/contrib/llvm/tools/lldb/source/API/SBTarget.cpp head/contrib/llvm/tools/lldb/source/API/SBThread.cpp head/contrib/llvm/tools/lldb/source/API/SBThreadPlan.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/API/SBType.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeCategory.cpp head/contrib/llvm/tools/lldb/source/API/SBValue.cpp head/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointID.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointIDList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointOptions.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolver.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverAddress.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverName.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointSiteList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/Watchpoint.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/WatchpointList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/WatchpointOptions.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandCompletions.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectApropos.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpointCommand.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectCommands.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectDisassemble.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLog.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMultiword.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlatform.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlugin.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectQuit.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectRegister.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSettings.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSource.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectTarget.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectThread.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectType.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpoint.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpointCommand.cpp head/contrib/llvm/tools/lldb/source/Core/Address.cpp head/contrib/llvm/tools/lldb/source/Core/AddressResolverName.cpp head/contrib/llvm/tools/lldb/source/Core/Broadcaster.cpp head/contrib/llvm/tools/lldb/source/Core/Communication.cpp head/contrib/llvm/tools/lldb/source/Core/Debugger.cpp head/contrib/llvm/tools/lldb/source/Core/Disassembler.cpp head/contrib/llvm/tools/lldb/source/Core/DumpDataExtractor.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Core/DynamicLoader.cpp head/contrib/llvm/tools/lldb/source/Core/EmulateInstruction.cpp head/contrib/llvm/tools/lldb/source/Core/Event.cpp head/contrib/llvm/tools/lldb/source/Core/FileLineResolver.cpp head/contrib/llvm/tools/lldb/source/Core/FileSpecList.cpp head/contrib/llvm/tools/lldb/source/Core/FormatEntity.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Core/IOHandler.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Core/Listener.cpp head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp head/contrib/llvm/tools/lldb/source/Core/Module.cpp head/contrib/llvm/tools/lldb/source/Core/ModuleList.cpp head/contrib/llvm/tools/lldb/source/Core/Opcode.cpp head/contrib/llvm/tools/lldb/source/Core/PluginManager.cpp head/contrib/llvm/tools/lldb/source/Core/RegisterValue.cpp head/contrib/llvm/tools/lldb/source/Core/Scalar.cpp head/contrib/llvm/tools/lldb/source/Core/Section.cpp head/contrib/llvm/tools/lldb/source/Core/SourceManager.cpp head/contrib/llvm/tools/lldb/source/Core/Value.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObject.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectCast.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectChild.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectDynamicValue.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectList.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectSyntheticFilter.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatManager.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/StringPrinter.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/DataFormatters/TypeFormat.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/ValueObjectPrinter.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/DataFormatters/VectorType.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Expression/DWARFExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/DiagnosticManager.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Expression/ExpressionSourceCode.cpp head/contrib/llvm/tools/lldb/source/Expression/ExpressionVariable.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Expression/FunctionCaller.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Expression/IRDynamicChecks.cpp head/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp head/contrib/llvm/tools/lldb/source/Expression/IRInterpreter.cpp head/contrib/llvm/tools/lldb/source/Expression/IRMemoryMap.cpp head/contrib/llvm/tools/lldb/source/Expression/LLVMUserExpression.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Expression/Materializer.cpp head/contrib/llvm/tools/lldb/source/Expression/REPL.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Expression/UserExpression.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/Editline.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/File.cpp head/contrib/llvm/tools/lldb/source/Host/common/Host.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostInfoBase.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/MainLoop.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/MonitoringProcessLauncher.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpointList.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/NativeProcessProtocol.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/NativeRegisterContext.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/NativeThreadProtocol.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/PseudoTerminal.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/Socket.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/SoftwareBreakpoint.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp head/contrib/llvm/tools/lldb/source/Host/common/TCPSocket.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/TaskPool.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/Terminal.cpp head/contrib/llvm/tools/lldb/source/Host/common/UDPSocket.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/common/XML.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/freebsd/Host.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/netbsd/Host.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/netbsd/HostInfoNetBSD.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/openbsd/Host.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/posix/FileSystem.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/posix/HostInfoPosix.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/posix/HostThreadPosix.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Initialization/SystemInitializerCommon.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Interpreter/CommandAlias.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObject.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectRegexCommand.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectScript.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectScript.h head/contrib/llvm/tools/lldb/source/Interpreter/CommandReturnObject.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupBoolean.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupFormat.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupPlatform.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupVariable.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupWatchpoint.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValue.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArch.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArgs.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArray.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueBoolean.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueChar.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueEnumeration.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpec.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormat.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormatEntity.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueLanguage.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Interpreter/OptionValuePathMappings.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueProperties.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueSInt64.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueString.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueUUID.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Options.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Property.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Architecture/Arm/ArchitectureArm.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Architecture/Arm/ArchitectureArm.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp head/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoParser.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoUserExpression.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/Cocoa.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/Cocoa.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSError.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSException.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSSet.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSString.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/CFString.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/MachException.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXStopInfo.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/CrashReason.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/InstructionUtils.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpParser.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpTypes.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ProcessMinidump.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DIERef.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h (contents, props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Symbol/ArmUnwindInfo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Symbol/Block.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTImporter.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompactUnwindInfo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Symbol/CompileUnit.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompilerType.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Symbol/DWARFCallFrameInfo.cpp head/contrib/llvm/tools/lldb/source/Symbol/Declaration.cpp head/contrib/llvm/tools/lldb/source/Symbol/FuncUnwinders.cpp head/contrib/llvm/tools/lldb/source/Symbol/Function.cpp head/contrib/llvm/tools/lldb/source/Symbol/GoASTContext.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Symbol/LineEntry.cpp head/contrib/llvm/tools/lldb/source/Symbol/LineTable.cpp head/contrib/llvm/tools/lldb/source/Symbol/ObjectFile.cpp head/contrib/llvm/tools/lldb/source/Symbol/Symbol.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolFile.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolVendor.cpp head/contrib/llvm/tools/lldb/source/Symbol/Symtab.cpp head/contrib/llvm/tools/lldb/source/Symbol/Type.cpp head/contrib/llvm/tools/lldb/source/Symbol/TypeList.cpp head/contrib/llvm/tools/lldb/source/Symbol/TypeMap.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp head/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp head/contrib/llvm/tools/lldb/source/Target/ABI.cpp head/contrib/llvm/tools/lldb/source/Target/ExecutionContext.cpp head/contrib/llvm/tools/lldb/source/Target/Memory.cpp head/contrib/llvm/tools/lldb/source/Target/ModuleCache.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Target/ObjCLanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/PathMappingList.cpp head/contrib/llvm/tools/lldb/source/Target/Platform.cpp head/contrib/llvm/tools/lldb/source/Target/Process.cpp head/contrib/llvm/tools/lldb/source/Target/ProcessInfo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Target/ProcessLaunchInfo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Target/RegisterContext.cpp head/contrib/llvm/tools/lldb/source/Target/SectionLoadHistory.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrame.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp head/contrib/llvm/tools/lldb/source/Target/StackID.cpp head/contrib/llvm/tools/lldb/source/Target/StopInfo.cpp head/contrib/llvm/tools/lldb/source/Target/Target.cpp head/contrib/llvm/tools/lldb/source/Target/TargetList.cpp head/contrib/llvm/tools/lldb/source/Target/Thread.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadList.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlan.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanBase.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunction.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallUserExpression.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanPython.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Target/ThreadPlanRunToAddress.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanShouldStopHere.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOut.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepThrough.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepUntil.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanTracer.cpp head/contrib/llvm/tools/lldb/source/Target/UnixSignals.cpp head/contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/ConstString.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/DataBufferHeap.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/DataEncoder.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/DataExtractor.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/FastDemangle.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/FileSpec.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/JSON.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/Log.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/RegularExpression.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/SharingPtr.cpp head/contrib/llvm/tools/lldb/source/Utility/Status.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/Stream.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/StringExtractor.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Utility/StructuredData.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/TildeExpressionResolver.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/UUID.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/VASprintf.cpp (contents, props changed) head/contrib/llvm/tools/lldb/source/Utility/VMRange.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/driver/Driver.cpp head/contrib/llvm/tools/lldb/tools/driver/Driver.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdBase.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdBase.h (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.h (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdExec.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdExec.h (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSymbol.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSymbol.h (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.h (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIReadMe.txt (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSingletonHelper.h (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-server/LLDBServerUtilities.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-server/lldb-gdbserver.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-server/lldb-platform.cpp (contents, props changed) head/contrib/llvm/tools/lldb/tools/lldb-server/lldb-server.cpp (contents, props changed) head/contrib/llvm/tools/lli/RemoteJITUtils.h (contents, props changed) head/contrib/llvm/tools/lli/lli.cpp head/contrib/llvm/tools/llvm-ar/llvm-ar.cpp head/contrib/llvm/tools/llvm-as/llvm-as.cpp head/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp head/contrib/llvm/tools/llvm-cov/CodeCoverage.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/CoverageExporterJson.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/CoverageFilters.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/CoverageFilters.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/CoverageReport.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/CoverageReport.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/CoverageSummaryInfo.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/CoverageViewOptions.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/RenderingSupport.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/SourceCoverageView.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/SourceCoverageView.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/SourceCoverageViewText.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/SourceCoverageViewText.h (contents, props changed) head/contrib/llvm/tools/llvm-cov/TestingSupport.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cov/llvm-cov.cpp head/contrib/llvm/tools/llvm-cxxdump/Error.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp (contents, props changed) head/contrib/llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp (contents, props changed) head/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp head/contrib/llvm/tools/llvm-dis/llvm-dis.cpp head/contrib/llvm/tools/llvm-dwarfdump/Statistics.cpp (contents, props changed) head/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp head/contrib/llvm/tools/llvm-extract/llvm-extract.cpp head/contrib/llvm/tools/llvm-link/llvm-link.cpp head/contrib/llvm/tools/llvm-lto/llvm-lto.cpp head/contrib/llvm/tools/llvm-lto2/llvm-lto2.cpp (contents, props changed) head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp head/contrib/llvm/tools/llvm-modextract/llvm-modextract.cpp (contents, props changed) head/contrib/llvm/tools/llvm-nm/llvm-nm.cpp head/contrib/llvm/tools/llvm-objcopy/Object.cpp (contents, props changed) head/contrib/llvm/tools/llvm-objcopy/Object.h (contents, props changed) head/contrib/llvm/tools/llvm-objcopy/llvm-objcopy.cpp (contents, props changed) head/contrib/llvm/tools/llvm-objcopy/llvm-objcopy.h (contents, props changed) head/contrib/llvm/tools/llvm-objdump/COFFDump.cpp head/contrib/llvm/tools/llvm-objdump/ELFDump.cpp head/contrib/llvm/tools/llvm-objdump/MachODump.cpp head/contrib/llvm/tools/llvm-objdump/WasmDump.cpp (contents, props changed) head/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.h head/contrib/llvm/tools/llvm-pdbutil/Analyze.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/DumpOutputStyle.h (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/InputFile.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/InputFile.h (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.h (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyClassLayoutGraphicalDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyCompilandDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyExternalSymbolDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyFunctionDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyTypeDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyTypedefDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyVariableDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/StreamUtil.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/StreamUtil.h (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp (contents, props changed) head/contrib/llvm/tools/llvm-pdbutil/llvm-pdbutil.h (contents, props changed) head/contrib/llvm/tools/llvm-profdata/llvm-profdata.cpp head/contrib/llvm/tools/llvm-readobj/ARMEHABIPrinter.h head/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp head/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp head/contrib/llvm/tools/llvm-readobj/COFFImportDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp head/contrib/llvm/tools/llvm-readobj/MachODumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.h head/contrib/llvm/tools/llvm-readobj/StackMapPrinter.h (contents, props changed) head/contrib/llvm/tools/llvm-readobj/WasmDumper.cpp (contents, props changed) head/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp head/contrib/llvm/tools/llvm-readobj/llvm-readobj.h head/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp head/contrib/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp head/contrib/llvm/tools/llvm-xray/func-id-helper.h (contents, props changed) head/contrib/llvm/tools/llvm-xray/xray-account.h (contents, props changed) head/contrib/llvm/tools/llvm-xray/xray-graph.h (contents, props changed) head/contrib/llvm/tools/opt/BreakpointPrinter.cpp head/contrib/llvm/tools/opt/BreakpointPrinter.h head/contrib/llvm/tools/opt/Debugify.cpp (contents, props changed) head/contrib/llvm/tools/opt/NewPMDriver.cpp head/contrib/llvm/tools/opt/NewPMDriver.h head/contrib/llvm/tools/opt/PassPrinters.cpp head/contrib/llvm/tools/opt/PassPrinters.h head/contrib/llvm/tools/opt/opt.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/CTagsEmitter.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.h head/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h head/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.h head/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp head/contrib/llvm/utils/TableGen/CodeGenSchedule.h head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.h head/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcher.h head/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherOpt.cpp head/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.cpp head/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp head/contrib/llvm/utils/TableGen/FastISelEmitter.cpp head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/GlobalISelEmitter.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/InfoByHwMode.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/InfoByHwMode.h (contents, props changed) head/contrib/llvm/utils/TableGen/InstrDocsEmitter.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp head/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp head/contrib/llvm/utils/TableGen/RegisterBankEmitter.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/SearchableTableEmitter.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp head/contrib/llvm/utils/TableGen/SubtargetFeatureInfo.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/SubtargetFeatureInfo.h (contents, props changed) head/contrib/llvm/utils/TableGen/TableGen.cpp head/contrib/llvm/utils/TableGen/TableGenBackends.h head/contrib/llvm/utils/TableGen/X86DisassemblerShared.h head/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerTables.h head/contrib/llvm/utils/TableGen/X86EVEX2VEXTablesEmitter.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/X86FoldTablesEmitter.cpp (contents, props changed) head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.h head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/Makefile head/lib/clang/freebsd_cc_version.h head/lib/clang/headers/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/lldb/Host/Config.h head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/include/llvm/Support/VCSRevision.h head/lib/clang/libclang/Makefile head/lib/clang/liblldb/Makefile head/lib/clang/libllvm/Makefile head/lib/clang/libllvmminimal/Makefile head/lib/libc++/Makefile head/lib/libc++experimental/Makefile head/lib/libclang_rt/Makefile head/lib/libclang_rt/Makefile.inc head/lib/libclang_rt/asan/Makefile head/lib/libclang_rt/asan_dynamic/Makefile head/lib/libclang_rt/include/Makefile head/lib/libclang_rt/safestack/Makefile head/lib/libclang_rt/stats/Makefile head/lib/libclang_rt/tsan/Makefile head/lib/libclang_rt/tsan_cxx/Makefile head/lib/libclang_rt/ubsan_standalone/Makefile head/share/mk/bsd.sys.mk head/share/mk/src.opts.mk head/sys/conf/files head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/conf/ldscript.i386 head/sys/i386/i386/locore.s head/sys/modules/fxp/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile head/usr.bin/clang/bugpoint/bugpoint.1 head/usr.bin/clang/clang/Makefile head/usr.bin/clang/clang/clang.1 head/usr.bin/clang/llc/llc.1 head/usr.bin/clang/lld/Makefile head/usr.bin/clang/lli/Makefile head/usr.bin/clang/lli/lli.1 head/usr.bin/clang/llvm-ar/llvm-ar.1 head/usr.bin/clang/llvm-as/llvm-as.1 head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 head/usr.bin/clang/llvm-cov/llvm-cov.1 head/usr.bin/clang/llvm-diff/llvm-diff.1 head/usr.bin/clang/llvm-dis/llvm-dis.1 head/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 head/usr.bin/clang/llvm-extract/llvm-extract.1 head/usr.bin/clang/llvm-link/llvm-link.1 head/usr.bin/clang/llvm-nm/llvm-nm.1 head/usr.bin/clang/llvm-objcopy/Makefile head/usr.bin/clang/llvm-pdbutil/Makefile head/usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1 head/usr.bin/clang/llvm-profdata/llvm-profdata.1 head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 head/usr.bin/clang/llvm-tblgen/Makefile head/usr.bin/clang/llvm-tblgen/llvm-tblgen.1 head/usr.bin/clang/llvm-xray/Makefile head/usr.bin/clang/opt/Makefile head/usr.bin/clang/opt/opt.1 Directory Properties: head/ (props changed) head/cddl/ (props changed) head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/contrib/amd/ (props changed) head/contrib/blacklist/ (props changed) head/contrib/bmake/ (props changed) head/contrib/compiler-rt/ (props changed) head/contrib/compiler-rt/include/sanitizer/allocator_interface.h (props changed) head/contrib/compiler-rt/include/sanitizer/coverage_interface.h (props changed) head/contrib/compiler-rt/include/sanitizer/dfsan_interface.h (props changed) head/contrib/compiler-rt/include/sanitizer/esan_interface.h (props changed) head/contrib/compiler-rt/include/sanitizer/hwasan_interface.h (props changed) head/contrib/compiler-rt/include/sanitizer/lsan_interface.h (props changed) head/contrib/compiler-rt/include/sanitizer/tsan_interface.h (props changed) head/contrib/compiler-rt/include/sanitizer/tsan_interface_atomic.h (props changed) head/contrib/compiler-rt/lib/BlocksRuntime/Block.h (props changed) head/contrib/compiler-rt/lib/BlocksRuntime/Block_private.h (props changed) head/contrib/compiler-rt/lib/BlocksRuntime/data.c (props changed) head/contrib/compiler-rt/lib/BlocksRuntime/runtime.c (props changed) head/contrib/compiler-rt/lib/asan/asan_activation.cc (props changed) head/contrib/compiler-rt/lib/asan/asan_activation.h (props changed) head/contrib/compiler-rt/lib/asan/asan_activation_flags.inc (props changed) head/contrib/compiler-rt/lib/asan/asan_fuchsia.cc (props changed) head/contrib/compiler-rt/lib/asan/asan_init_version.h (props changed) head/contrib/compiler-rt/lib/asan/asan_interface.inc (props changed) head/contrib/compiler-rt/lib/asan/asan_premap_shadow.cc (props changed) head/contrib/compiler-rt/lib/asan/asan_premap_shadow.h (props changed) head/contrib/compiler-rt/lib/asan/asan_scariness_score.h (props changed) head/contrib/compiler-rt/lib/asan/asan_suppressions.cc (props changed) head/contrib/compiler-rt/lib/asan/asan_suppressions.h (props changed) head/contrib/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc (props changed) head/contrib/compiler-rt/lib/asan/asan_win_weak_interception.cc (props changed) head/contrib/compiler-rt/lib/asan/weak_symbols.txt (props changed) head/contrib/compiler-rt/lib/builtins/README.txt (props changed) head/contrib/compiler-rt/lib/builtins/aarch64/chkstk.S (props changed) head/contrib/compiler-rt/lib/builtins/absvdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/absvsi2.c (props changed) head/contrib/compiler-rt/lib/builtins/absvti2.c (props changed) head/contrib/compiler-rt/lib/builtins/adddf3.c (props changed) head/contrib/compiler-rt/lib/builtins/addsf3.c (props changed) head/contrib/compiler-rt/lib/builtins/addtf3.c (props changed) head/contrib/compiler-rt/lib/builtins/addvdi3.c (props changed) head/contrib/compiler-rt/lib/builtins/addvsi3.c (props changed) head/contrib/compiler-rt/lib/builtins/addvti3.c (props changed) head/contrib/compiler-rt/lib/builtins/apple_versioning.c (props changed) head/contrib/compiler-rt/lib/builtins/arm/adddf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/addsf3.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/addsf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_dcmp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_div0.c (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_drsub.c (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_fcmp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_frsub.c (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_idivmod.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_ldivmod.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_memcmp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_memcpy.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_memmove.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_memset.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_uidivmod.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/aeabi_uldivmod.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/bswapdi2.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/bswapsi2.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/clzdi2.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/clzsi2.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/comparesf2.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/divdf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/divmodsi4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/divsf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/divsi3.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/eqdf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/eqsf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/extendsfdf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/fixdfsivfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/fixsfsivfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/fixunsdfsivfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/fixunssfsivfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/floatsidfvfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/floatsisfvfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/floatunssidfvfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/floatunssisfvfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/gedf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/gesf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/gtdf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/gtsf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/ledf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/lesf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/ltdf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/ltsf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/modsi3.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/muldf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/mulsf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/nedf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/negdf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/negsf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/nesf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/restore_vfp_d8_d15_regs.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/save_vfp_d8_d15_regs.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/subdf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/subsf3vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/switch16.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/switch32.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/switch8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/switchu8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync-ops.h (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_add_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_and_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_and_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_max_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_max_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_min_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_min_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_nand_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_nand_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_or_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_or_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_sub_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_sub_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umax_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umax_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umin_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umin_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_xor_4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_xor_8.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/sync_synchronize.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/truncdfsf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/udivmodsi4.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/udivsi3.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/umodsi3.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/unorddf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/arm/unordsf2vfp.S (props changed) head/contrib/compiler-rt/lib/builtins/ashldi3.c (props changed) head/contrib/compiler-rt/lib/builtins/ashlti3.c (props changed) head/contrib/compiler-rt/lib/builtins/ashrdi3.c (props changed) head/contrib/compiler-rt/lib/builtins/ashrti3.c (props changed) head/contrib/compiler-rt/lib/builtins/assembly.h (props changed) head/contrib/compiler-rt/lib/builtins/atomic.c (props changed) head/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c (props changed) head/contrib/compiler-rt/lib/builtins/atomic_flag_clear_explicit.c (props changed) head/contrib/compiler-rt/lib/builtins/atomic_flag_test_and_set.c (props changed) head/contrib/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c (props changed) head/contrib/compiler-rt/lib/builtins/atomic_signal_fence.c (props changed) head/contrib/compiler-rt/lib/builtins/atomic_thread_fence.c (props changed) head/contrib/compiler-rt/lib/builtins/bswapdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/bswapsi2.c (props changed) head/contrib/compiler-rt/lib/builtins/clzsi2.c (props changed) head/contrib/compiler-rt/lib/builtins/clzti2.c (props changed) head/contrib/compiler-rt/lib/builtins/cmpdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/cmpti2.c (props changed) head/contrib/compiler-rt/lib/builtins/comparedf2.c (props changed) head/contrib/compiler-rt/lib/builtins/comparesf2.c (props changed) head/contrib/compiler-rt/lib/builtins/comparetf2.c (props changed) head/contrib/compiler-rt/lib/builtins/ctzsi2.c (props changed) head/contrib/compiler-rt/lib/builtins/ctzti2.c (props changed) head/contrib/compiler-rt/lib/builtins/divdc3.c (props changed) head/contrib/compiler-rt/lib/builtins/divdf3.c (props changed) head/contrib/compiler-rt/lib/builtins/divdi3.c (props changed) head/contrib/compiler-rt/lib/builtins/divmoddi4.c (props changed) head/contrib/compiler-rt/lib/builtins/divmodsi4.c (props changed) head/contrib/compiler-rt/lib/builtins/divsc3.c (props changed) head/contrib/compiler-rt/lib/builtins/divsf3.c (props changed) head/contrib/compiler-rt/lib/builtins/divsi3.c (props changed) head/contrib/compiler-rt/lib/builtins/divtc3.c (props changed) head/contrib/compiler-rt/lib/builtins/divtf3.c (props changed) head/contrib/compiler-rt/lib/builtins/divti3.c (props changed) head/contrib/compiler-rt/lib/builtins/divxc3.c (props changed) head/contrib/compiler-rt/lib/builtins/enable_execute_stack.c (props changed) head/contrib/compiler-rt/lib/builtins/eprintf.c (props changed) head/contrib/compiler-rt/lib/builtins/extenddftf2.c (props changed) head/contrib/compiler-rt/lib/builtins/extendhfsf2.c (props changed) head/contrib/compiler-rt/lib/builtins/extendsfdf2.c (props changed) head/contrib/compiler-rt/lib/builtins/extendsftf2.c (props changed) head/contrib/compiler-rt/lib/builtins/ffsdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/ffssi2.c (props changed) head/contrib/compiler-rt/lib/builtins/ffsti2.c (props changed) head/contrib/compiler-rt/lib/builtins/fixdfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixdfsi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixdfti.c (props changed) head/contrib/compiler-rt/lib/builtins/fixsfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixsfsi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixsfti.c (props changed) head/contrib/compiler-rt/lib/builtins/fixtfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixtfsi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixtfti.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunsdfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunsdfsi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunsdfti.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunssfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunssfsi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunssfti.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunstfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunstfsi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunstfti.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunsxfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunsxfsi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixunsxfti.c (props changed) head/contrib/compiler-rt/lib/builtins/fixxfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/fixxfti.c (props changed) head/contrib/compiler-rt/lib/builtins/floatdidf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatdisf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatditf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatdixf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatsidf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatsisf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatsitf.c (props changed) head/contrib/compiler-rt/lib/builtins/floattidf.c (props changed) head/contrib/compiler-rt/lib/builtins/floattisf.c (props changed) head/contrib/compiler-rt/lib/builtins/floattitf.c (props changed) head/contrib/compiler-rt/lib/builtins/floattixf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatundidf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatundisf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatunditf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatundixf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatunsidf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatunsisf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatunsitf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatuntidf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatuntisf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatuntitf.c (props changed) head/contrib/compiler-rt/lib/builtins/floatuntixf.c (props changed) head/contrib/compiler-rt/lib/builtins/fp_add_impl.inc (props changed) head/contrib/compiler-rt/lib/builtins/fp_extend.h (props changed) head/contrib/compiler-rt/lib/builtins/fp_extend_impl.inc (props changed) head/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc (props changed) head/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc (props changed) head/contrib/compiler-rt/lib/builtins/fp_lib.h (props changed) head/contrib/compiler-rt/lib/builtins/fp_mul_impl.inc (props changed) head/contrib/compiler-rt/lib/builtins/fp_trunc.h (props changed) head/contrib/compiler-rt/lib/builtins/fp_trunc_impl.inc (props changed) head/contrib/compiler-rt/lib/builtins/gcc_personality_v0.c (props changed) head/contrib/compiler-rt/lib/builtins/i386/ashldi3.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/ashrdi3.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/chkstk.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/chkstk2.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/divdi3.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/floatdidf.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/floatdisf.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/floatdixf.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/floatundidf.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/floatundisf.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/floatundixf.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/lshrdi3.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/moddi3.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/muldi3.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/udivdi3.S (props changed) head/contrib/compiler-rt/lib/builtins/i386/umoddi3.S (props changed) head/contrib/compiler-rt/lib/builtins/int_endianness.h (props changed) head/contrib/compiler-rt/lib/builtins/int_lib.h (props changed) head/contrib/compiler-rt/lib/builtins/int_math.h (props changed) head/contrib/compiler-rt/lib/builtins/int_util.c (props changed) head/contrib/compiler-rt/lib/builtins/int_util.h (props changed) head/contrib/compiler-rt/lib/builtins/lshrdi3.c (props changed) head/contrib/compiler-rt/lib/builtins/lshrti3.c (props changed) head/contrib/compiler-rt/lib/builtins/mingw_fixfloat.c (props changed) head/contrib/compiler-rt/lib/builtins/moddi3.c (props changed) head/contrib/compiler-rt/lib/builtins/modsi3.c (props changed) head/contrib/compiler-rt/lib/builtins/modti3.c (props changed) head/contrib/compiler-rt/lib/builtins/muldc3.c (props changed) head/contrib/compiler-rt/lib/builtins/muldf3.c (props changed) head/contrib/compiler-rt/lib/builtins/muldi3.c (props changed) head/contrib/compiler-rt/lib/builtins/mulodi4.c (props changed) head/contrib/compiler-rt/lib/builtins/mulosi4.c (props changed) head/contrib/compiler-rt/lib/builtins/muloti4.c (props changed) head/contrib/compiler-rt/lib/builtins/mulsc3.c (props changed) head/contrib/compiler-rt/lib/builtins/mulsf3.c (props changed) head/contrib/compiler-rt/lib/builtins/multf3.c (props changed) head/contrib/compiler-rt/lib/builtins/multi3.c (props changed) head/contrib/compiler-rt/lib/builtins/mulvdi3.c (props changed) head/contrib/compiler-rt/lib/builtins/mulvsi3.c (props changed) head/contrib/compiler-rt/lib/builtins/mulvti3.c (props changed) head/contrib/compiler-rt/lib/builtins/mulxc3.c (props changed) head/contrib/compiler-rt/lib/builtins/negdf2.c (props changed) head/contrib/compiler-rt/lib/builtins/negdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/negsf2.c (props changed) head/contrib/compiler-rt/lib/builtins/negti2.c (props changed) head/contrib/compiler-rt/lib/builtins/negvdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/negvsi2.c (props changed) head/contrib/compiler-rt/lib/builtins/negvti2.c (props changed) head/contrib/compiler-rt/lib/builtins/paritydi2.c (props changed) head/contrib/compiler-rt/lib/builtins/paritysi2.c (props changed) head/contrib/compiler-rt/lib/builtins/parityti2.c (props changed) head/contrib/compiler-rt/lib/builtins/popcountdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/popcountsi2.c (props changed) head/contrib/compiler-rt/lib/builtins/popcountti2.c (props changed) head/contrib/compiler-rt/lib/builtins/powidf2.c (props changed) head/contrib/compiler-rt/lib/builtins/powisf2.c (props changed) head/contrib/compiler-rt/lib/builtins/powitf2.c (props changed) head/contrib/compiler-rt/lib/builtins/powixf2.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/DD.h (props changed) head/contrib/compiler-rt/lib/builtins/ppc/divtc3.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/fixtfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/fixunstfdi.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/floatditf.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/floatunditf.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/gcc_qadd.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/gcc_qdiv.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/gcc_qmul.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/gcc_qsub.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/multc3.c (props changed) head/contrib/compiler-rt/lib/builtins/ppc/restFP.S (props changed) head/contrib/compiler-rt/lib/builtins/ppc/saveFP.S (props changed) head/contrib/compiler-rt/lib/builtins/subdf3.c (props changed) head/contrib/compiler-rt/lib/builtins/subsf3.c (props changed) head/contrib/compiler-rt/lib/builtins/subtf3.c (props changed) head/contrib/compiler-rt/lib/builtins/subvdi3.c (props changed) head/contrib/compiler-rt/lib/builtins/subvsi3.c (props changed) head/contrib/compiler-rt/lib/builtins/subvti3.c (props changed) head/contrib/compiler-rt/lib/builtins/trampoline_setup.c (props changed) head/contrib/compiler-rt/lib/builtins/truncdfhf2.c (props changed) head/contrib/compiler-rt/lib/builtins/truncdfsf2.c (props changed) head/contrib/compiler-rt/lib/builtins/truncsfhf2.c (props changed) head/contrib/compiler-rt/lib/builtins/trunctfdf2.c (props changed) head/contrib/compiler-rt/lib/builtins/trunctfsf2.c (props changed) head/contrib/compiler-rt/lib/builtins/ucmpdi2.c (props changed) head/contrib/compiler-rt/lib/builtins/ucmpti2.c (props changed) head/contrib/compiler-rt/lib/builtins/udivdi3.c (props changed) head/contrib/compiler-rt/lib/builtins/udivmoddi4.c (props changed) head/contrib/compiler-rt/lib/builtins/udivmodsi4.c (props changed) head/contrib/compiler-rt/lib/builtins/udivmodti4.c (props changed) head/contrib/compiler-rt/lib/builtins/udivsi3.c (props changed) head/contrib/compiler-rt/lib/builtins/udivti3.c (props changed) head/contrib/compiler-rt/lib/builtins/umoddi3.c (props changed) head/contrib/compiler-rt/lib/builtins/umodsi3.c (props changed) head/contrib/compiler-rt/lib/builtins/umodti3.c (props changed) head/contrib/compiler-rt/lib/builtins/unwind-ehabi-helpers.h (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/chkstk.S (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/chkstk2.S (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/floatdidf.c (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/floatdisf.c (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/floatdixf.c (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/floatundidf.S (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/floatundisf.S (props changed) head/contrib/compiler-rt/lib/builtins/x86_64/floatundixf.S (props changed) head/contrib/compiler-rt/lib/dfsan/dfsan.h (props changed) head/contrib/compiler-rt/lib/dfsan/dfsan_flags.inc (props changed) head/contrib/compiler-rt/lib/dfsan/dfsan_interceptors.cc (props changed) head/contrib/compiler-rt/lib/dfsan/dfsan_platform.h (props changed) head/contrib/compiler-rt/lib/dfsan/libc_ubuntu1404_abilist.txt (props changed) head/contrib/compiler-rt/lib/esan/cache_frag.cpp (props changed) head/contrib/compiler-rt/lib/esan/cache_frag.h (props changed) head/contrib/compiler-rt/lib/esan/esan.h (props changed) head/contrib/compiler-rt/lib/esan/esan_circular_buffer.h (props changed) head/contrib/compiler-rt/lib/esan/esan_flags.cpp (props changed) head/contrib/compiler-rt/lib/esan/esan_flags.h (props changed) head/contrib/compiler-rt/lib/esan/esan_flags.inc (props changed) head/contrib/compiler-rt/lib/esan/esan_hashtable.h (props changed) head/contrib/compiler-rt/lib/esan/esan_interface.cpp (props changed) head/contrib/compiler-rt/lib/esan/esan_interface_internal.h (props changed) head/contrib/compiler-rt/lib/esan/esan_linux.cpp (props changed) head/contrib/compiler-rt/lib/esan/esan_shadow.h (props changed) head/contrib/compiler-rt/lib/esan/esan_sideline.h (props changed) head/contrib/compiler-rt/lib/esan/working_set.cpp (props changed) head/contrib/compiler-rt/lib/esan/working_set.h (props changed) head/contrib/compiler-rt/lib/esan/working_set_posix.cpp (props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_allocator.h (props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_blacklist.txt (props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_flags.h (props changed) head/contrib/compiler-rt/lib/hwasan/hwasan_poisoning.h (props changed) head/contrib/compiler-rt/lib/lsan/lsan_flags.inc (props changed) head/contrib/compiler-rt/lib/lsan/lsan_linux.cc (props changed) head/contrib/compiler-rt/lib/lsan/lsan_mac.cc (props changed) head/contrib/compiler-rt/lib/lsan/lsan_preinit.cc (props changed) head/contrib/compiler-rt/lib/lsan/weak_symbols.txt (props changed) head/contrib/compiler-rt/lib/msan/msan_allocator.h (props changed) head/contrib/compiler-rt/lib/msan/msan_chained_origin_depot.cc (props changed) head/contrib/compiler-rt/lib/msan/msan_chained_origin_depot.h (props changed) head/contrib/compiler-rt/lib/msan/msan_flags.inc (props changed) head/contrib/compiler-rt/lib/msan/msan_origin.h (props changed) head/contrib/compiler-rt/lib/msan/msan_poisoning.h (props changed) head/contrib/compiler-rt/lib/msan/msan_thread.cc (props changed) head/contrib/compiler-rt/lib/msan/msan_thread.h (props changed) head/contrib/compiler-rt/lib/profile/InstrProfiling.c (props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingBuffer.c (props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingInternal.h (props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingNameVar.c (props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c (props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingPlatformOther.c (props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingRuntime.cc (props changed) head/contrib/compiler-rt/lib/profile/InstrProfilingWriter.c (props changed) head/contrib/compiler-rt/lib/profile/WindowsMMap.c (props changed) head/contrib/compiler-rt/lib/profile/WindowsMMap.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sancov_begin.S (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sancov_end.S (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sancov_flags.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sancov_flags.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sancov_flags.inc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_interface.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_asm.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_mips.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_bitvector.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_bvgraph.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_format.inc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interface_posix.inc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dll_thunk.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dynamic_runtime_thunk.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_sections.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_weak_interception.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_dbghelp.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector1.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector_interface.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_errno.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_errno_codes.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_file.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_mips64.S (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac_libcdep.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_signal_interceptors.inc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_solaris.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_aarch64.inc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_arm.inc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_termination.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_dynamic_runtime_thunk.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.h (props changed) head/contrib/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cc (props changed) head/contrib/compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh (props changed) head/contrib/compiler-rt/lib/sanitizer_common/weak_symbols.txt (props changed) head/contrib/compiler-rt/lib/scudo/scudo_crc32.cpp (props changed) head/contrib/compiler-rt/lib/scudo/scudo_crc32.h (props changed) head/contrib/compiler-rt/lib/scudo/scudo_flags.h (props changed) head/contrib/compiler-rt/lib/scudo/scudo_flags.inc (props changed) head/contrib/compiler-rt/lib/scudo/scudo_utils.h (props changed) head/contrib/compiler-rt/lib/stats/stats.h (props changed) head/contrib/compiler-rt/lib/stats/stats_client.cc (props changed) head/contrib/compiler-rt/lib/tsan/dd/dd_interceptors.cc (props changed) head/contrib/compiler-rt/lib/tsan/dd/dd_rtl.cc (props changed) head/contrib/compiler-rt/lib/tsan/dd/dd_rtl.h (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_external.cc (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.inc (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_ignoreset.cc (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_ignoreset.h (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.h (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_ppc_regs.h (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_preinit.cc (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_mips64.S (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_ppc64.S (props changed) head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_proc.cc (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_diag_standalone.cc (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_flags.h (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_init.cc (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_init.h (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_init_standalone.cc (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_signals_standalone.h (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash_win.cc (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_win_dll_thunk.cc (props changed) head/contrib/compiler-rt/lib/ubsan/ubsan_win_dynamic_runtime_thunk.cc (props changed) head/contrib/compiler-rt/lib/ubsan/weak_symbols.txt (props changed) head/contrib/compiler-rt/lib/xray/weak_symbols.txt (props changed) head/contrib/compiler-rt/lib/xray/xray_always_instrument.txt (props changed) head/contrib/compiler-rt/lib/xray/xray_defs.h (props changed) head/contrib/compiler-rt/lib/xray/xray_fdr_logging.h (props changed) head/contrib/compiler-rt/lib/xray/xray_never_instrument.txt (props changed) head/contrib/compiler-rt/lib/xray/xray_powerpc64.inc (props changed) head/contrib/compiler-rt/lib/xray/xray_trampoline_AArch64.S (props changed) head/contrib/compiler-rt/lib/xray/xray_trampoline_arm.S (props changed) head/contrib/compiler-rt/lib/xray/xray_trampoline_mips.S (props changed) head/contrib/compiler-rt/lib/xray/xray_trampoline_mips64.S (props changed) head/contrib/compiler-rt/lib/xray/xray_trampoline_powerpc64.cc (props changed) head/contrib/compiler-rt/lib/xray/xray_trampoline_powerpc64_asm.S (props changed) head/contrib/compiler-rt/lib/xray/xray_tsc.h (props changed) head/contrib/dialog/ (props changed) head/contrib/dma/ (props changed) head/contrib/elftoolchain/ (props changed) head/contrib/expat/ (props changed) head/contrib/file/ (props changed) head/contrib/gcc/ (props changed) head/contrib/ipfilter/ (props changed) head/contrib/ldns/ (props changed) head/contrib/libarchive/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libc++/include/__bsd_locale_defaults.h (props changed) head/contrib/libc++/include/complex.h (props changed) head/contrib/libc++/include/ctype.h (props changed) head/contrib/libc++/include/errno.h (props changed) head/contrib/libc++/include/inttypes.h (props changed) head/contrib/libc++/include/limits.h (props changed) head/contrib/libc++/include/locale.h (props changed) head/contrib/libc++/include/setjmp.h (props changed) head/contrib/libc++/include/stdbool.h (props changed) head/contrib/libc++/include/stddef.h (props changed) head/contrib/libc++/include/stdint.h (props changed) head/contrib/libc++/include/stdlib.h (props changed) head/contrib/libc++/include/string.h (props changed) head/contrib/libc++/include/wchar.h (props changed) head/contrib/libc++/include/wctype.h (props changed) head/contrib/libc++/src/algorithm.cpp (props changed) head/contrib/libc++/src/condition_variable.cpp (props changed) head/contrib/libc++/src/debug.cpp (props changed) head/contrib/libc++/src/exception.cpp (props changed) head/contrib/libc++/src/functional.cpp (props changed) head/contrib/libc++/src/hash.cpp (props changed) head/contrib/libc++/src/include/atomic_support.h (props changed) head/contrib/libc++/src/include/refstring.h (props changed) head/contrib/libc++/src/ios.cpp (props changed) head/contrib/libc++/src/iostream.cpp (props changed) head/contrib/libc++/src/random.cpp (props changed) head/contrib/libc++/src/regex.cpp (props changed) head/contrib/libc++/src/stdexcept.cpp (props changed) head/contrib/libc++/src/string.cpp (props changed) head/contrib/libc++/src/strstream.cpp (props changed) head/contrib/libc++/src/thread.cpp (props changed) head/contrib/libc++/src/valarray.cpp (props changed) head/contrib/libc++/src/variant.cpp (props changed) head/contrib/libc++/src/vector.cpp (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/include/llvm-c/ErrorHandling.h (props changed) head/contrib/llvm/include/llvm/ADT/AllocatorList.h (props changed) head/contrib/llvm/include/llvm/ADT/BitmaskEnum.h (props changed) head/contrib/llvm/include/llvm/ADT/BreadthFirstIterator.h (props changed) head/contrib/llvm/include/llvm/ADT/PointerEmbeddedInt.h (props changed) head/contrib/llvm/include/llvm/ADT/PointerSumType.h (props changed) head/contrib/llvm/include/llvm/ADT/PriorityWorklist.h (props changed) head/contrib/llvm/include/llvm/ADT/Sequence.h (props changed) head/contrib/llvm/include/llvm/ADT/ilist_base.h (props changed) head/contrib/llvm/include/llvm/ADT/ilist_iterator.h (props changed) head/contrib/llvm/include/llvm/ADT/ilist_node_base.h (props changed) head/contrib/llvm/include/llvm/ADT/simple_ilist.h (props changed) head/contrib/llvm/include/llvm/Analysis/CFLAliasAnalysisUtils.h (props changed) head/contrib/llvm/include/llvm/Analysis/CmpInstAnalysis.h (props changed) head/contrib/llvm/include/llvm/Analysis/GlobalsModRef.h (props changed) head/contrib/llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h (props changed) head/contrib/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h (props changed) head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h (props changed) head/contrib/llvm/include/llvm/Analysis/ScopedNoAliasAA.h (props changed) head/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.h (props changed) head/contrib/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h (props changed) head/contrib/llvm/include/llvm/Analysis/ValueLatticeUtils.h (props changed) head/contrib/llvm/include/llvm/AsmParser/SlotMapping.h (props changed) head/contrib/llvm/include/llvm/Bitcode/BitcodeReader.h (props changed) head/contrib/llvm/include/llvm/CodeGen/ExpandReductions.h (props changed) head/contrib/llvm/include/llvm/CodeGen/FaultMaps.h (props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/GISelWorkList.h (props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelect.h (props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h (props changed) head/contrib/llvm/include/llvm/CodeGen/GlobalISel/Types.h (props changed) head/contrib/llvm/include/llvm/CodeGen/LiveStacks.h (props changed) head/contrib/llvm/include/llvm/CodeGen/LowLevelType.h (props changed) head/contrib/llvm/include/llvm/CodeGen/MachineCombinerPattern.h (props changed) head/contrib/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h (props changed) head/contrib/llvm/include/llvm/CodeGen/PreISelIntrinsicLowering.h (props changed) head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGMutation.h (props changed) head/contrib/llvm/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h (props changed) head/contrib/llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h (props changed) head/contrib/llvm/include/llvm/CodeGen/TailDuplicator.h (props changed) head/contrib/llvm/include/llvm/CodeGen/UnreachableBlockElim.h (props changed) head/contrib/llvm/include/llvm/CodeGen/WinEHFuncInfo.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/AppendingTypeTableBuilder.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/ContinuationRecordBuilder.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugCrossExSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugCrossImpSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/EnumTables.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/Formatters.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/FunctionId.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/GUID.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/Line.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/MergingTypeTableBuilder.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/RecordName.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/RecordSerialization.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SimpleTypeSerializer.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/StringsAndChecksums.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumpDelegate.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecordMapping.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolSerializer.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbackPipeline.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeCollection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeDeserializer.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeDumpVisitor.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeIndex.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeIndexDiscovery.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecordMapping.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeSymbolEmitter.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeTableCollection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFAttribute.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFGdbIndex.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFSection.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/MSF/IMSFFile.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/MSF/MSFError.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/MSF/MappedBlockStream.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIATable.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/GenericError.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBTable.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/EnumTables.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/Formatters.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/GSIStreamBuilder.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/Hash.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/ISectionContribVisitor.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumSymbol.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBFile.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PublicsStream.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/RawError.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/SymbolStream.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/TpiHashing.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDB.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBContext.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymDumper.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/PDB/UDTLayout.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h (props changed) head/contrib/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h (props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h (props changed) head/contrib/llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h (props changed) head/contrib/llvm/include/llvm/ExecutionEngine/OrcMCJITReplacement.h (props changed) head/contrib/llvm/include/llvm/FuzzMutate/IRMutator.h (props changed) head/contrib/llvm/include/llvm/FuzzMutate/Operations.h (props changed) head/contrib/llvm/include/llvm/FuzzMutate/Random.h (props changed) head/contrib/llvm/include/llvm/FuzzMutate/RandomIRBuilder.h (props changed) head/contrib/llvm/include/llvm/IR/DerivedUser.h (props changed) head/contrib/llvm/include/llvm/IR/GlobalIFunc.h (props changed) head/contrib/llvm/include/llvm/IR/GlobalIndirectSymbol.h (props changed) head/contrib/llvm/include/llvm/IR/ModuleSlotTracker.h (props changed) head/contrib/llvm/include/llvm/IR/SafepointIRVerifier.h (props changed) head/contrib/llvm/include/llvm/LTO/LTOBackend.h (props changed) head/contrib/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h (props changed) head/contrib/llvm/include/llvm/LTO/legacy/LTOModule.h (props changed) head/contrib/llvm/include/llvm/LTO/legacy/UpdateCompilerUsed.h (props changed) head/contrib/llvm/include/llvm/Linker/IRMover.h (props changed) head/contrib/llvm/include/llvm/MC/LaneBitmask.h (props changed) head/contrib/llvm/include/llvm/MC/MCAsmInfoWasm.h (props changed) head/contrib/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h (props changed) head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserUtils.h (props changed) head/contrib/llvm/include/llvm/MC/MCSymbolCOFF.h (props changed) head/contrib/llvm/include/llvm/MC/MCSymbolELF.h (props changed) head/contrib/llvm/include/llvm/Object/ArchiveWriter.h (props changed) head/contrib/llvm/include/llvm/Object/COFFModuleDefinition.h (props changed) head/contrib/llvm/include/llvm/Object/IRSymtab.h (props changed) head/contrib/llvm/include/llvm/Object/StackMapParser.h (props changed) head/contrib/llvm/include/llvm/Object/SymbolSize.h (props changed) head/contrib/llvm/include/llvm/Object/WindowsResource.h (props changed) head/contrib/llvm/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h (props changed) head/contrib/llvm/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h (props changed) head/contrib/llvm/include/llvm/ObjectYAML/ObjectYAML.h (props changed) head/contrib/llvm/include/llvm/Support/ARMAttributeParser.h (props changed) head/contrib/llvm/include/llvm/Support/BinaryItemStream.h (props changed) head/contrib/llvm/include/llvm/Support/BinaryStreamError.h (props changed) head/contrib/llvm/include/llvm/Support/COM.h (props changed) head/contrib/llvm/include/llvm/Support/Chrono.h (props changed) head/contrib/llvm/include/llvm/Support/FormatCommon.h (props changed) head/contrib/llvm/include/llvm/Support/FormatProviders.h (props changed) head/contrib/llvm/include/llvm/Support/GlobPattern.h (props changed) head/contrib/llvm/include/llvm/Support/NativeFormatting.h (props changed) head/contrib/llvm/include/llvm/Support/Printable.h (props changed) head/contrib/llvm/include/llvm/Support/ReverseIteration.h (props changed) head/contrib/llvm/include/llvm/Support/SHA1.h (props changed) head/contrib/llvm/include/llvm/Support/Solaris/sys/regset.h (props changed) head/contrib/llvm/include/llvm/Support/TarWriter.h (props changed) head/contrib/llvm/include/llvm/Support/TrigramIndex.h (props changed) head/contrib/llvm/include/llvm/Support/TypeName.h (props changed) head/contrib/llvm/include/llvm/Support/raw_sha1_ostream.h (props changed) head/contrib/llvm/include/llvm/Support/thread.h (props changed) head/contrib/llvm/include/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h (props changed) head/contrib/llvm/include/llvm/ToolDrivers/llvm-lib/LibDriver.h (props changed) head/contrib/llvm/include/llvm/Transforms/Coroutines.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/CalledValuePropagation.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/ConstantMerge.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/DeadArgumentElimination.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/ElimAvailExtern.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/ForceFunctionAttrs.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/GlobalDCE.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/GlobalOpt.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/GlobalSplit.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/Internalize.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/PartialInlining.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/SCCP.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/StripDeadPrototypes.h (props changed) head/contrib/llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h (props changed) head/contrib/llvm/include/llvm/Transforms/Instrumentation/BoundsChecking.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/ADCE.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/BDCE.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/CorrelatedValuePropagation.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/DCE.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/DeadStoreElimination.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/DivRemPairs.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/Float2Int.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/GuardWidening.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/IVUsersPrinter.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/IndVarSimplify.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LICM.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopDeletion.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopDistribute.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopInstSimplify.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopLoadElimination.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopPredication.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopRotation.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopSimplifyCFG.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopSink.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopStrengthReduce.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LoopUnrollPass.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LowerAtomic.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/LowerGuardIntrinsic.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/NaryReassociate.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/PartiallyInlineLibCalls.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/RewriteStatepointsForGC.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/Sink.h (props changed) head/contrib/llvm/include/llvm/Transforms/Scalar/TailRecursionElimination.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/AddDiscriminators.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/BreakCriticalEdges.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/CallPromotionUtils.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/EntryExitInstrumenter.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/EscapeEnumerator.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/FunctionImportUtils.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/LCSSA.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/LibCallsShrinkWrap.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/LowerInvoke.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/LowerMemIntrinsics.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/Mem2Reg.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/SanitizerStats.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/SplitModule.h (props changed) head/contrib/llvm/include/llvm/Transforms/Utils/VNCoercion.h (props changed) head/contrib/llvm/include/llvm/WindowsManifest/WindowsManifestMerger.h (props changed) head/contrib/llvm/include/llvm/WindowsResource/ResourceProcessor.h (props changed) head/contrib/llvm/include/llvm/WindowsResource/ResourceScriptToken.h (props changed) head/contrib/llvm/include/llvm/WindowsResource/ResourceScriptTokenList.h (props changed) head/contrib/llvm/include/llvm/XRay/Graph.h (props changed) head/contrib/llvm/include/llvm/XRay/InstrumentationMap.h (props changed) head/contrib/llvm/include/llvm/XRay/Trace.h (props changed) head/contrib/llvm/lib/Analysis/AliasAnalysisSummary.cpp (props changed) head/contrib/llvm/lib/Analysis/AssumptionCache.cpp (props changed) head/contrib/llvm/lib/Analysis/CallPrinter.cpp (props changed) head/contrib/llvm/lib/Analysis/CmpInstAnalysis.cpp (props changed) head/contrib/llvm/lib/Analysis/MemDerefPrinter.cpp (props changed) head/contrib/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp (props changed) head/contrib/llvm/lib/Analysis/OptimizationRemarkEmitter.cpp (props changed) head/contrib/llvm/lib/Analysis/ScopedNoAliasAA.cpp (props changed) head/contrib/llvm/lib/Analysis/TypeMetadataUtils.cpp (props changed) head/contrib/llvm/lib/Analysis/ValueLattice.cpp (props changed) head/contrib/llvm/lib/Analysis/ValueLatticeUtils.cpp (props changed) head/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.h (props changed) head/contrib/llvm/lib/Bitcode/Reader/ValueList.h (props changed) head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.cpp (props changed) head/contrib/llvm/lib/CodeGen/FEntryInserter.cpp (props changed) head/contrib/llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp (props changed) head/contrib/llvm/lib/CodeGen/LiveRangeUtils.h (props changed) head/contrib/llvm/lib/CodeGen/LiveStacks.cpp (props changed) head/contrib/llvm/lib/CodeGen/LowLevelType.cpp (props changed) head/contrib/llvm/lib/CodeGen/MIRPrintingPass.cpp (props changed) head/contrib/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp (props changed) head/contrib/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp (props changed) head/contrib/llvm/lib/CodeGen/SafeStackColoring.h (props changed) head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGTargetInfo.cpp (props changed) head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/AppendingTypeTableBuilder.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugSubsection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/DebugSymbolsSubsection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/EnumTables.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/Formatters.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/Line.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/RecordSerialization.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/TypeIndex.cpp (props changed) head/contrib/llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp (props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp (props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp (props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp (props changed) head/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp (props changed) head/contrib/llvm/lib/DebugInfo/MSF/MSFError.cpp (props changed) head/contrib/llvm/lib/DebugInfo/MSF/MappedBlockStream.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIALineNumber.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASourceFile.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIATable.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/IPDBSourceFile.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/DbiModuleList.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/EnumTables.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/Hash.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeBuiltinSymbol.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumSymbol.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/RawError.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/SymbolStream.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/TpiHashing.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDB.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBContext.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymDumper.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCustom.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolLabel.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp (props changed) head/contrib/llvm/lib/DebugInfo/PDB/UDTLayout.cpp (props changed) head/contrib/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp (props changed) head/contrib/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h (props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp (props changed) head/contrib/llvm/lib/ExecutionEngine/Orc/RPCUtils.cpp (props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp (props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.h (props changed) head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h (props changed) head/contrib/llvm/lib/FuzzMutate/OpDescriptor.cpp (props changed) head/contrib/llvm/lib/FuzzMutate/Operations.cpp (props changed) head/contrib/llvm/lib/FuzzMutate/RandomIRBuilder.cpp (props changed) head/contrib/llvm/lib/IR/MetadataImpl.h (props changed) head/contrib/llvm/lib/IR/Statepoint.cpp (props changed) head/contrib/llvm/lib/LTO/UpdateCompilerUsed.cpp (props changed) head/contrib/llvm/lib/Linker/LinkDiagnosticInfo.h (props changed) head/contrib/llvm/lib/MC/MCAsmInfoWasm.cpp (props changed) head/contrib/llvm/lib/MC/MCCodePadder.cpp (props changed) head/contrib/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp (props changed) head/contrib/llvm/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp (props changed) head/contrib/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp (props changed) head/contrib/llvm/lib/MC/MCDisassembler/MCSymbolizer.cpp (props changed) head/contrib/llvm/lib/MC/MCInstrDesc.cpp (props changed) head/contrib/llvm/lib/MC/MCSectionWasm.cpp (props changed) head/contrib/llvm/lib/MC/MCSymbolELF.cpp (props changed) head/contrib/llvm/lib/MC/MCWinEH.cpp (props changed) head/contrib/llvm/lib/Object/Decompressor.cpp (props changed) head/contrib/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp (props changed) head/contrib/llvm/lib/ObjectYAML/DWARFVisitor.cpp (props changed) head/contrib/llvm/lib/ObjectYAML/DWARFYAML.cpp (props changed) head/contrib/llvm/lib/ObjectYAML/MachOYAML.cpp (props changed) head/contrib/llvm/lib/ObjectYAML/ObjectYAML.cpp (props changed) head/contrib/llvm/lib/ObjectYAML/YAML.cpp (props changed) head/contrib/llvm/lib/Support/BinaryStreamError.cpp (props changed) head/contrib/llvm/lib/Support/BinaryStreamReader.cpp (props changed) head/contrib/llvm/lib/Support/BinaryStreamWriter.cpp (props changed) head/contrib/llvm/lib/Support/FormatVariadic.cpp (props changed) head/contrib/llvm/lib/Support/GlobPattern.cpp (props changed) head/contrib/llvm/lib/Support/JamCRC.cpp (props changed) head/contrib/llvm/lib/Support/KnownBits.cpp (props changed) head/contrib/llvm/lib/Support/LowLevelType.cpp (props changed) head/contrib/llvm/lib/Support/MathExtras.cpp (props changed) head/contrib/llvm/lib/Support/Options.cpp (props changed) head/contrib/llvm/lib/Support/ScopedPrinter.cpp (props changed) head/contrib/llvm/lib/Support/ThreadPool.cpp (props changed) head/contrib/llvm/lib/Support/TrigramIndex.cpp (props changed) head/contrib/llvm/lib/Support/Unix/COM.inc (props changed) head/contrib/llvm/lib/Support/Unix/DynamicLibrary.inc (props changed) head/contrib/llvm/lib/Support/Windows/COM.inc (props changed) head/contrib/llvm/lib/Support/Windows/Threading.inc (props changed) head/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.h (props changed) head/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.h (props changed) head/contrib/llvm/lib/Target/AArch64/AArch64LegalizerInfo.h (props changed) head/contrib/llvm/lib/Target/AArch64/AArch64MacroFusion.h (props changed) head/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.h (props changed) head/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp (props changed) head/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h (props changed) head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMacroFusion.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUPTNote.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegAsmNames.inc.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUFixupKinds.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/R600FrameLowering.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/R600FrameLowering.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/R600MachineFunctionInfo.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/R600MachineFunctionInfo.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.h (props changed) head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp (props changed) head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h (props changed) head/contrib/llvm/lib/Target/ARC/ARC.h (props changed) head/contrib/llvm/lib/Target/ARC/ARCExpandPseudos.cpp (props changed) head/contrib/llvm/lib/Target/ARC/ARCFrameLowering.h (props changed) head/contrib/llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp (props changed) head/contrib/llvm/lib/Target/ARC/ARCInstrInfo.h (props changed) head/contrib/llvm/lib/Target/ARC/ARCMachineFunctionInfo.cpp (props changed) head/contrib/llvm/lib/Target/ARC/ARCRegisterInfo.h (props changed) head/contrib/llvm/lib/Target/ARC/ARCSubtarget.cpp (props changed) head/contrib/llvm/lib/Target/ARC/ARCSubtarget.h (props changed) head/contrib/llvm/lib/Target/ARC/ARCTargetMachine.cpp (props changed) head/contrib/llvm/lib/Target/ARC/ARCTargetMachine.h (props changed) head/contrib/llvm/lib/Target/ARC/ARCTargetStreamer.h (props changed) head/contrib/llvm/lib/Target/ARC/ARCTargetTransformInfo.h (props changed) head/contrib/llvm/lib/Target/ARC/MCTargetDesc/ARCMCAsmInfo.cpp (props changed) head/contrib/llvm/lib/Target/ARC/MCTargetDesc/ARCMCAsmInfo.h (props changed) head/contrib/llvm/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp (props changed) head/contrib/llvm/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.h (props changed) head/contrib/llvm/lib/Target/ARC/TargetInfo/ARCTargetInfo.cpp (props changed) head/contrib/llvm/lib/Target/ARM/ARMBasicBlockInfo.h (props changed) head/contrib/llvm/lib/Target/ARM/ARMCallLowering.h (props changed) head/contrib/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp (props changed) head/contrib/llvm/lib/Target/ARM/ARMLegalizerInfo.h (props changed) head/contrib/llvm/lib/Target/ARM/ARMMacroFusion.h (props changed) head/contrib/llvm/lib/Target/ARM/ARMRegisterBankInfo.h (props changed) head/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.h (props changed) head/contrib/llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp (props changed) head/contrib/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRAsmPrinter.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRFrameLowering.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRFrameLowering.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRISelLowering.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRMCInstLower.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRMCInstLower.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRMachineFunctionInfo.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRRelaxMemOperations.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRSelectionDAGInfo.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRSubtarget.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRSubtarget.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRTargetMachine.h (props changed) head/contrib/llvm/lib/Target/AVR/AVRTargetObjectFile.cpp (props changed) head/contrib/llvm/lib/Target/AVR/AVRTargetObjectFile.h (props changed) head/contrib/llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp (props changed) head/contrib/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp (props changed) head/contrib/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.h (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.h (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRFixupKinds.h (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCCodeEmitter.cpp (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCCodeEmitter.h (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.cpp (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp (props changed) head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h (props changed) head/contrib/llvm/lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp (props changed) head/contrib/llvm/lib/Target/BPF/BPFAsmPrinter.cpp (props changed) head/contrib/llvm/lib/Target/BPF/BPFFrameLowering.cpp (props changed) head/contrib/llvm/lib/Target/BPF/BPFFrameLowering.h (props changed) head/contrib/llvm/lib/Target/BPF/BPFMCInstLower.cpp (props changed) head/contrib/llvm/lib/Target/BPF/BPFMCInstLower.h (props changed) head/contrib/llvm/lib/Target/BPF/BPFTargetMachine.h (props changed) head/contrib/llvm/lib/Target/BPF/InstPrinter/BPFInstPrinter.h (props changed) head/contrib/llvm/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonBlockRanges.h (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonDepArch.h (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonDepITypes.h (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonDepTimingClasses.h (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonOptimizeSZextends.cpp (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp (props changed) head/contrib/llvm/lib/Target/Hexagon/HexagonTargetStreamer.h (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonFixupKinds.h (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.h (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.cpp (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.h (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.cpp (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.h (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.h (props changed) head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h (props changed) head/contrib/llvm/lib/Target/Hexagon/RDFCopy.h (props changed) head/contrib/llvm/lib/Target/Hexagon/RDFDeadCode.h (props changed) head/contrib/llvm/lib/Target/Hexagon/RDFGraph.h (props changed) head/contrib/llvm/lib/Target/Hexagon/RDFRegisters.cpp (props changed) head/contrib/llvm/lib/Target/Hexagon/RDFRegisters.h (props changed) head/contrib/llvm/lib/Target/Lanai/Disassembler/LanaiDisassembler.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/Disassembler/LanaiDisassembler.h (props changed) head/contrib/llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.h (props changed) head/contrib/llvm/lib/Target/Lanai/Lanai.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiAluCode.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiCondCode.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiFrameLowering.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiFrameLowering.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiMCInstLower.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiMCInstLower.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiMachineFunctionInfo.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiMachineFunctionInfo.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiRegisterInfo.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiRegisterInfo.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiSelectionDAGInfo.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiSelectionDAGInfo.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiSubtarget.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiSubtarget.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiTargetMachine.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiTargetMachine.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiTargetObjectFile.h (props changed) head/contrib/llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h (props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiBaseInfo.h (props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiFixupKinds.h (props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCAsmInfo.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCAsmInfo.h (props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCExpr.cpp (props changed) head/contrib/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCExpr.h (props changed) head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h (props changed) head/contrib/llvm/lib/Target/Mips/MipsCCState.cpp (props changed) head/contrib/llvm/lib/Target/Mips/MipsCCState.h (props changed) head/contrib/llvm/lib/Target/Mips/Relocation.txt (props changed) head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp (props changed) head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp (props changed) head/contrib/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp (props changed) head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp (props changed) head/contrib/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/InstPrinter/Nios2InstPrinter.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/InstPrinter/Nios2InstPrinter.h (props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2BaseInfo.h (props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2FixupKinds.h (props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCAsmInfo.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCAsmInfo.h (props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCExpr.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCExpr.h (props changed) head/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2.h (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2AsmPrinter.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2FrameLowering.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2FrameLowering.h (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2ISelLowering.h (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2MCInstLower.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2MachineFunction.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2MachineFunction.h (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2RegisterInfo.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2RegisterInfo.h (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2Subtarget.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2Subtarget.h (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2TargetMachine.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2TargetMachine.h (props changed) head/contrib/llvm/lib/Target/Nios2/Nios2TargetObjectFile.cpp (props changed) head/contrib/llvm/lib/Target/Nios2/TargetInfo/Nios2TargetInfo.cpp (props changed) head/contrib/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp (props changed) head/contrib/llvm/lib/Target/PowerPC/PPCCCState.cpp (props changed) head/contrib/llvm/lib/Target/PowerPC/PPCCCState.h (props changed) head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.h (props changed) head/contrib/llvm/lib/Target/PowerPC/PPCQPXLoadSplat.cpp (props changed) head/contrib/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp (props changed) head/contrib/llvm/lib/Target/PowerPC/PPCVSXCopy.cpp (props changed) head/contrib/llvm/lib/Target/PowerPC/README_P9.txt (props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h (props changed) head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.h (props changed) head/contrib/llvm/lib/Target/RISCV/RISCVSubtarget.cpp (props changed) head/contrib/llvm/lib/Target/RISCV/RISCVTargetMachine.h (props changed) head/contrib/llvm/lib/Target/RISCV/TargetInfo/RISCVTargetInfo.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/LeonPasses.cpp (props changed) head/contrib/llvm/lib/Target/Sparc/LeonPasses.h (props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp (props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZTDC.cpp (props changed) head/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h (props changed) head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyFixupKinds.h (props changed) head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86TargetStreamer.h (props changed) head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp (props changed) head/contrib/llvm/lib/Target/X86/X86CallLowering.h (props changed) head/contrib/llvm/lib/Target/X86/X86CallingConv.cpp (props changed) head/contrib/llvm/lib/Target/X86/X86FixupSetCC.cpp (props changed) head/contrib/llvm/lib/Target/X86/X86LegalizerInfo.h (props changed) head/contrib/llvm/lib/Target/X86/X86MacroFusion.h (props changed) head/contrib/llvm/lib/Target/X86/X86RegisterBankInfo.h (props changed) head/contrib/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp (props changed) head/contrib/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h (props changed) head/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.h (props changed) head/contrib/llvm/lib/Transforms/Coroutines/CoroCleanup.cpp (props changed) head/contrib/llvm/lib/Transforms/Coroutines/CoroInstr.h (props changed) head/contrib/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp (props changed) head/contrib/llvm/lib/Transforms/IPO/GlobalSplit.cpp (props changed) head/contrib/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp (props changed) head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp (props changed) head/contrib/llvm/lib/Transforms/Scalar/DivRemPairs.cpp (props changed) head/contrib/llvm/lib/Transforms/Scalar/IVUsersPrinter.cpp (props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopAccessAnalysisPrinter.cpp (props changed) head/contrib/llvm/lib/Transforms/Scalar/LoopPassManager.cpp (props changed) head/contrib/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp (props changed) head/contrib/llvm/lib/Transforms/Utils/NameAnonGlobals.cpp (props changed) head/contrib/llvm/lib/Transforms/Utils/SanitizerStats.cpp (props changed) head/contrib/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp (props changed) head/contrib/llvm/lib/XRay/InstrumentationMap.cpp (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/clang/include/clang/AST/LexicallyOrderedRecursiveASTVisitor.h (props changed) head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/OSLog.h (props changed) head/contrib/llvm/tools/clang/include/clang/Analysis/BodyFarm.h (props changed) head/contrib/llvm/tools/clang/include/clang/Basic/MemoryBufferCache.h (props changed) head/contrib/llvm/tools/clang/include/clang/Basic/PragmaKinds.h (props changed) head/contrib/llvm/tools/clang/include/clang/Basic/SanitizerBlacklist.h (props changed) head/contrib/llvm/tools/clang/include/clang/Basic/SanitizerSpecialCaseList.h (props changed) head/contrib/llvm/tools/clang/include/clang/CodeGen/ConstantInitFuture.h (props changed) head/contrib/llvm/tools/clang/include/clang/CodeGen/ObjectFilePCHContainerOperations.h (props changed) head/contrib/llvm/tools/clang/include/clang/CrossTU/CrossTUDiagnostic.h (props changed) head/contrib/llvm/tools/clang/include/clang/Index/CodegenNameGenerator.h (props changed) head/contrib/llvm/tools/clang/include/clang/Lex/HeaderMapTypes.h (props changed) head/contrib/llvm/tools/clang/include/clang/Sema/CleanupInfo.h (props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h (props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h (props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h (props changed) head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValVisitor.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/ASTDiff/ASTDiff.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/ASTDiff/ASTDiffInternal.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Core/Lookup.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/ASTSelection.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/Extract/Extract.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringAction.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringActionRules.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringOption.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringOptionVisitor.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringOptions.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringRuleContext.h (props changed) head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h (props changed) head/contrib/llvm/tools/clang/lib/AST/DataCollection.cpp (props changed) head/contrib/llvm/tools/clang/lib/AST/ExprObjC.cpp (props changed) head/contrib/llvm/tools/clang/lib/AST/Linkage.h (props changed) head/contrib/llvm/tools/clang/lib/Analysis/CodeInjector.cpp (props changed) head/contrib/llvm/tools/clang/lib/Analysis/OSLog.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/MemoryBufferCache.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/SanitizerBlacklist.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/SanitizerSpecialCaseList.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Le64.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Le64.h (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/MSP430.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/MSP430.h (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/Nios2.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/OSTargets.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/PNaCl.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/PNaCl.h (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/SPIR.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/TCE.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/TCE.h (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/XCore.cpp (props changed) head/contrib/llvm/tools/clang/lib/Basic/Targets/XCore.h (props changed) head/contrib/llvm/tools/clang/lib/CodeGen/Address.h (props changed) head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.h (props changed) head/contrib/llvm/tools/clang/lib/CodeGen/VarBypassDetector.h (props changed) head/contrib/llvm/tools/clang/lib/CrossTU/CrossTranslationUnit.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/AMDGPU.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/AVR.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/AVR.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Ananas.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/AArch64.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/ARM.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/Sparc.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/SystemZ.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/SystemZ.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/X86.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Contiki.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/CrossWindows.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/CrossWindows.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Darwin.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/DragonFly.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/DragonFly.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSVCSetupApi.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Minix.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Minix.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/TCE.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/TCE.h (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/XCore.cpp (props changed) head/contrib/llvm/tools/clang/lib/Driver/ToolChains/XCore.h (props changed) head/contrib/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_cmath.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_complex_builtins.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_math_forward_declares.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/__stddef_max_align_t.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/adxintrin.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/arm64intr.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/armintr.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/htmintrin.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/inttypes.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/msa.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/s390intrin.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/stdatomic.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/vadefs.h (props changed) head/contrib/llvm/tools/clang/lib/Headers/vecintrin.h (props changed) head/contrib/llvm/tools/clang/lib/Index/CodegenNameGenerator.cpp (props changed) head/contrib/llvm/tools/clang/lib/Serialization/ModuleFileExtension.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.h (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCPropertyChecker.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp (props changed) head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Core/Diagnostic.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Core/Lookup.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/FixIt.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/ASTSelection.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.h (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/RefactoringActions.cpp (props changed) head/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp (props changed) head/contrib/llvm/tools/clang/utils/TableGen/ClangDataCollectorsEmitter.cpp (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lld/CMakeLists.txt (props changed) head/contrib/llvm/tools/lld/CODE_OWNERS.TXT (props changed) head/contrib/llvm/tools/lld/COFF/MapFile.h (props changed) head/contrib/llvm/tools/lld/COFF/MinGW.h (props changed) head/contrib/llvm/tools/lld/Common/Memory.cpp (props changed) head/contrib/llvm/tools/lld/Common/Reproduce.cpp (props changed) head/contrib/llvm/tools/lld/Common/Threads.cpp (props changed) head/contrib/llvm/tools/lld/Common/Version.cpp (props changed) head/contrib/llvm/tools/lld/ELF/Arch/AVR.cpp (props changed) head/contrib/llvm/tools/lld/ELF/Bits.h (props changed) head/contrib/llvm/tools/lld/ELF/EhFrame.h (props changed) head/contrib/llvm/tools/lld/ELF/Filesystem.h (props changed) head/contrib/llvm/tools/lld/ELF/ScriptLexer.h (props changed) head/contrib/llvm/tools/lld/ELF/ScriptParser.h (props changed) head/contrib/llvm/tools/lld/include/lld/Common/Args.h (props changed) head/contrib/llvm/tools/lld/include/lld/Common/LLVM.h (props changed) head/contrib/llvm/tools/lld/include/lld/Common/Memory.h (props changed) head/contrib/llvm/tools/lld/include/lld/Common/Reproduce.h (props changed) head/contrib/llvm/tools/lld/include/lld/Common/Threads.h (props changed) head/contrib/llvm/tools/lld/include/lld/Common/Version.inc.in (props changed) head/contrib/llvm/tools/lld/include/lld/Core/AbsoluteAtom.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/ArchiveLibraryFile.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/Atom.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/Error.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/Node.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/Pass.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/Reference.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/SharedLibraryAtom.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/SharedLibraryFile.h (props changed) head/contrib/llvm/tools/lld/include/lld/Core/UndefinedAtom.h (props changed) head/contrib/llvm/tools/lld/include/lld/ReaderWriter/YamlContext.h (props changed) head/contrib/llvm/tools/lld/lib/CMakeLists.txt (props changed) head/contrib/llvm/tools/lld/lib/Core/CMakeLists.txt (props changed) head/contrib/llvm/tools/lld/lib/Core/DefinedAtom.cpp (props changed) head/contrib/llvm/tools/lld/lib/Core/Error.cpp (props changed) head/contrib/llvm/tools/lld/lib/Core/File.cpp (props changed) head/contrib/llvm/tools/lld/lib/Core/Reader.cpp (props changed) head/contrib/llvm/tools/lld/lib/Core/Resolver.cpp (props changed) head/contrib/llvm/tools/lld/lib/Core/SymbolTable.cpp (props changed) head/contrib/llvm/tools/lld/lib/Core/Writer.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/CMakeLists.txt (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/Atoms.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/DebugInfo.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ExecutableAtoms.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/File.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/FlatNamespaceFile.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/GOTPass.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/LayoutPass.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachOPasses.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ObjCPass.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/SectCreateFile.h (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ShimPass.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/StubsPass.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/TLVPass.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/WriterMachO.cpp (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/YAML/CMakeLists.txt (props changed) head/contrib/llvm/tools/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp (props changed) head/contrib/llvm/tools/lld/tools/lld/CMakeLists.txt (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBAttachInfo.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBBreakpointName.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBExecutionContext.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBLanguageRuntime.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfo.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfoList.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBProcessInfo.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBQueue.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBQueueItem.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBThreadCollection.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBThreadPlan.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBTrace.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBTraceOptions.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeEnumMember.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBUnixSignals.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/API/SBVariablesOptions.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/DumpDataExtractor.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/StructuredDataImpl.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseMap.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeSTLVector.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultCast.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/CXXFunctionPointer.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormattersHelpers.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/LanguageCategory.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/VectorType.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/DiagnosticManager.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Expression/REPL.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/ConnectionFileDescriptor.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/FileCache.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/FileSystem.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostGetOpt.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeProcess.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeProcessBase.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThread.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThreadBase.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThreadForward.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/LockFile.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/LockFileBase.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/OptionParser.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/Pipe.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/PipeBase.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/ProcessLauncher.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/ThreadLauncher.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/Time.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeBreakpointList.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeWatchpointList.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/SoftwareBreakpoint.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/TCPSocket.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/common/UDPSocket.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/openbsd/HostInfoOpenBSD.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/DomainSocket.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/Fcntl.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostProcessPosix.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostThreadPosix.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/LockFilePosix.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Host/posix/ProcessLauncherPosixFork.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Initialization/SystemInitializer.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Initialization/SystemInitializerCommon.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Initialization/SystemLifetimeManager.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandOptionValidators.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueChar.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueLanguage.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/ArmUnwindInfo.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangUtil.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompilerDecl.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompilerDeclContext.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/DebugMacros.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/JavaASTContext.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/OCamlASTContext.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Symbol/TypeMap.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/FileAction.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntime.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/JITLoaderList.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/MemoryHistory.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/StructuredDataPlugin.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallOnFunctionExit.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanPython.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Either.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Endian.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/FastDemangle.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/IOObject.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/LLDBAssert.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/Logging.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/NameMatches.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StreamCallback.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StreamGDBRemote.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StreamString.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/StringLexer.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/TraceOptions.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/UriParser.h (props changed) head/contrib/llvm/tools/lldb/include/lldb/Utility/VASPrintf.h (props changed) head/contrib/llvm/tools/lldb/source/API/SBBreakpointOptionCommon.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBBreakpointOptionCommon.h (props changed) head/contrib/llvm/tools/lldb/source/API/SBExecutionContext.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBLanguageRuntime.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfo.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfoList.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBProcessInfo.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBQueue.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBStructuredData.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBThreadCollection.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBTrace.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBTraceOptions.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBTypeEnumMember.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBUnixSignals.cpp (props changed) head/contrib/llvm/tools/lldb/source/API/SBVariablesOptions.cpp (props changed) head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointName.cpp (props changed) head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.cpp (props changed) head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.h (props changed) head/contrib/llvm/tools/lldb/source/Commands/CommandObjectGUI.cpp (props changed) head/contrib/llvm/tools/lldb/source/Commands/CommandObjectGUI.h (props changed) head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.cpp (props changed) head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.h (props changed) head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResultCast.cpp (props changed) head/contrib/llvm/tools/lldb/source/DataFormatters/CXXFunctionPointer.cpp (props changed) head/contrib/llvm/tools/lldb/source/DataFormatters/DumpValueObjectOptions.cpp (props changed) head/contrib/llvm/tools/lldb/source/DataFormatters/FormattersHelpers.cpp (props changed) head/contrib/llvm/tools/lldb/source/DataFormatters/LanguageCategory.cpp (props changed) head/contrib/llvm/tools/lldb/source/DataFormatters/TypeValidator.cpp (props changed) head/contrib/llvm/tools/lldb/source/Expression/Expression.cpp (props changed) head/contrib/llvm/tools/lldb/source/Expression/UtilityFunction.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/FileCache.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/FileSystem.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/GetOptInc.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/HostNativeThreadBase.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/HostProcess.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/HostThread.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/LockFileBase.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpoint.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/NativeWatchpointList.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/OptionParser.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/PipeBase.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/ProcessRunLock.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/StringConvert.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/common/ThreadLauncher.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/posix/DomainSocket.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/posix/HostProcessPosix.cpp (props changed) head/contrib/llvm/tools/lldb/source/Host/posix/LockFilePosix.cpp (props changed) head/contrib/llvm/tools/lldb/source/Initialization/SystemInitializer.cpp (props changed) head/contrib/llvm/tools/lldb/source/Initialization/SystemLifetimeManager.cpp (props changed) head/contrib/llvm/tools/lldb/source/Interpreter/CommandOptionValidators.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoAST.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoLexer.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoLexer.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoParser.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/gen_go_ast.py (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxx.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoFormatterFunctions.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoFormatterFunctions.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoLanguage.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoLanguage.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaFormatterFunctions.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaFormatterFunctions.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaLanguage.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaLanguage.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/OCaml/OCamlLanguage.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/OCaml/OCamlLanguage.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/CF.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/CF.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/CoreMedia.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSArray.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSDictionary.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSSet.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSString.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/ObjCLanguage.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Java/JavaLanguageRuntime.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Java/JavaLanguageRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/CFBundle.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/CFBundle.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/CFString.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/CFUtils.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/LaunchFlavor.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/MachException.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXStopInfo.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/CrashReason.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/FreeBSDSignals.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxSignals.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/NetBSDSignals.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/NetBSDSignals.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_s390x.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_s390x.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_mips.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_powerpc.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_s390x.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-arm-register-enums.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-arm64-register-enums.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-s390x-register-enums.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterUtilities.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/NtStructures.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ThreadMinidump.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp (props changed) head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.h (props changed) head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h (props changed) head/contrib/llvm/tools/lldb/source/Symbol/ClangUtil.cpp (props changed) head/contrib/llvm/tools/lldb/source/Symbol/CompilerDecl.cpp (props changed) head/contrib/llvm/tools/lldb/source/Symbol/CompilerDeclContext.cpp (props changed) head/contrib/llvm/tools/lldb/source/Symbol/DebugMacros.cpp (props changed) head/contrib/llvm/tools/lldb/source/Symbol/JavaASTContext.cpp (props changed) head/contrib/llvm/tools/lldb/source/Symbol/OCamlASTContext.cpp (props changed) head/contrib/llvm/tools/lldb/source/Symbol/TypeSystem.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/FileAction.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntime.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntimeStopInfo.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/JITLoader.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/JITLoaderList.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/Language.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/Queue.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/QueueItem.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/QueueList.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/RegisterNumber.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/StructuredDataPlugin.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/SystemRuntime.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/ThreadCollection.cpp (props changed) head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunctionUsingABI.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/ARM64_DWARF_Registers.h (props changed) head/contrib/llvm/tools/lldb/source/Utility/ARM64_ehframe_Registers.h (props changed) head/contrib/llvm/tools/lldb/source/Utility/ARM_ehframe_Registers.h (props changed) head/contrib/llvm/tools/lldb/source/Utility/Baton.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/Connection.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/DataBufferLLVM.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/IOObject.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/LLDBAssert.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/Logging.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/NameMatches.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/PPC64LE_DWARF_Registers.h (props changed) head/contrib/llvm/tools/lldb/source/Utility/PPC64LE_ehframe_Registers.h (props changed) head/contrib/llvm/tools/lldb/source/Utility/StreamCallback.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/StreamGDBRemote.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/StreamString.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/StringLexer.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/StringList.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/Timer.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/UriParser.cpp (props changed) head/contrib/llvm/tools/lldb/source/Utility/UserID.cpp (props changed) head/contrib/llvm/tools/lldb/tools/argdumper/argdumper.cpp (props changed) head/contrib/llvm/tools/lldb/tools/compact-unwind/compact-unwind-dumper.c (props changed) head/contrib/llvm/tools/lldb/tools/driver/Platform.cpp (props changed) head/contrib/llvm/tools/lldb/tools/driver/Platform.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgSet.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgSet.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValConsume.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValConsume.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListBase.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListBase.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListOfN.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListOfN.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValNumber.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValNumber.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionLong.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValPrintValues.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValPrintValues.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValString.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValString.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmd.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmd.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdFile.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdFile.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdMiscellanous.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdMiscellanous.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdStack.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdStack.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportInfo.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportInfo.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportList.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportList.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTrace.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTrace.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdVar.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdVar.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCommands.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCommands.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdData.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdData.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdFactory.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdFactory.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInterpreter.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInterpreter.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInvoker.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInvoker.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnConfig.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugger.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLog.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLog.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLogMediumFile.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLogMediumFile.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIResultRecord.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIResultRecord.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValue.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValue.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStderr.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStderr.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdin.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdin.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdout.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdout.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnThreadMgrStd.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnThreadMgrStd.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDataTypes.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriver.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverBase.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverBase.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIExtensions.txt (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDateTimeStd.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDateTimeStd.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSingletonBase.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilString.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilString.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilThreadBaseStd.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-mi/Platform.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-server/Acceptor.cpp (props changed) head/contrib/llvm/tools/lldb/tools/lldb-server/Acceptor.h (props changed) head/contrib/llvm/tools/lldb/tools/lldb-server/LLDBServerUtilities.h (props changed) head/contrib/llvm/tools/llvm-cov/CoverageSummaryInfo.cpp (props changed) head/contrib/llvm/tools/llvm-cov/gcov.cpp (props changed) head/contrib/llvm/tools/llvm-cxxdump/Error.h (props changed) head/contrib/llvm/tools/llvm-cxxdump/llvm-cxxdump.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/Analyze.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp (props changed) head/contrib/llvm/tools/llvm-pdbutil/BytesOutputStyle.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/FormatUtil.cpp (props changed) head/contrib/llvm/tools/llvm-pdbutil/FormatUtil.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/LinePrinter.cpp (props changed) head/contrib/llvm/tools/llvm-pdbutil/LinePrinter.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/MinimalTypeDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/OutputStyle.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PdbYaml.cpp (props changed) head/contrib/llvm/tools/llvm-pdbutil/PdbYaml.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyClassDefinitionDumper.cpp (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyClassDefinitionDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyClassLayoutGraphicalDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyCompilandDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyEnumDumper.cpp (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyEnumDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyExternalSymbolDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyFunctionDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyTypeDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyTypedefDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/PrettyVariableDumper.h (props changed) head/contrib/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp (props changed) head/contrib/llvm/tools/llvm-pdbutil/YAMLOutputStyle.h (props changed) head/contrib/llvm/tools/llvm-readobj/WindowsResourceDumper.cpp (props changed) head/contrib/llvm/tools/llvm-readobj/WindowsResourceDumper.h (props changed) head/contrib/llvm/tools/llvm-xray/trie-node.h (props changed) head/contrib/llvm/tools/llvm-xray/xray-color-helper.h (props changed) head/contrib/llvm/tools/llvm-xray/xray-converter.h (props changed) head/contrib/llvm/tools/llvm-xray/xray-graph-diff.h (props changed) head/contrib/llvm/tools/llvm-xray/xray-registry.h (props changed) head/contrib/llvm/utils/TableGen/Attributes.cpp (props changed) head/contrib/llvm/utils/TableGen/CodeGenHwModes.cpp (props changed) head/contrib/llvm/utils/TableGen/CodeGenHwModes.h (props changed) head/contrib/llvm/utils/TableGen/SDNodeProperties.cpp (props changed) head/contrib/llvm/utils/TableGen/SDNodeProperties.h (props changed) head/contrib/llvm/utils/TableGen/Types.cpp (props changed) head/contrib/llvm/utils/TableGen/Types.h (props changed) head/contrib/lua/ (props changed) head/contrib/mandoc/ (props changed) head/contrib/netbsd-tests/ (props changed) head/contrib/ntp/ (props changed) head/contrib/nvi/ (props changed) head/contrib/one-true-awk/ (props changed) head/contrib/openbsm/ (props changed) head/contrib/pf/ (props changed) head/contrib/sendmail/ (props changed) head/contrib/serf/ (props changed) head/contrib/tcpdump/ (props changed) head/contrib/tnftp/ (props changed) head/contrib/tzcode/stdtime/ (props changed) head/contrib/tzdata/ (props changed) head/contrib/unbound/ (props changed) head/contrib/wpa/ (props changed) head/crypto/heimdal/ (props changed) head/crypto/openssh/ (props changed) head/crypto/openssl/ (props changed) head/gnu/lib/ (props changed) head/gnu/usr.bin/binutils/ (props changed) head/gnu/usr.bin/cc/cc_tools/ (props changed) head/gnu/usr.bin/gdb/ (props changed) head/lib/libedit/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/contrib/ck/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/ipfilter/ (props changed) head/sys/contrib/octeon-sdk/ (props changed) head/sys/contrib/zstd/ (props changed) head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/arm64/ (props changed) head/sys/gnu/dts/include/ (props changed) head/usr.sbin/bhyve/pci_fbuf.c (props changed) head/usr.sbin/bhyve/pci_xhci.c (props changed) head/usr.sbin/bhyve/ps2kbd.c (props changed) head/usr.sbin/bhyve/rfb.c (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 11 17:46:01 2018 (r341824) +++ head/ObsoleteFiles.inc Tue Dec 11 19:05:28 2018 (r341825) @@ -38,6 +38,142 @@ # xargs -n1 | sort | uniq -d; # done +# 20181218: new clang import which bumps version from 6.0.1 to 7.0.1. +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/6.0.1/include/sanitizer +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/6.0.1/include/adxintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/altivec.h +OLD_FILES+=usr/lib/clang/6.0.1/include/ammintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/arm64intr.h +OLD_FILES+=usr/lib/clang/6.0.1/include/arm_acle.h +OLD_FILES+=usr/lib/clang/6.0.1/include/arm_neon.h +OLD_FILES+=usr/lib/clang/6.0.1/include/armintr.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avxintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/cetintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/cpuid.h +OLD_FILES+=usr/lib/clang/6.0.1/include/emmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/htmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/immintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/module.modulemap +OLD_FILES+=usr/lib/clang/6.0.1/include/msa.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/opencl-c.h +OLD_FILES+=usr/lib/clang/6.0.1/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/s390intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/shaintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/smmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vadefs.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vecintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/x86intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xopintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/6.0.1/include +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.tsan-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/6.0.1/lib/freebsd +OLD_DIRS+=usr/lib/clang/6.0.1/lib +OLD_DIRS+=usr/lib/clang/6.0.1 # 20181116: Rename test file. OLD_FILES+=usr/tests/sys/netinet/reuseport_lb # 20181112: Cleanup old libcap_dns. Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Dec 11 17:46:01 2018 (r341824) +++ head/UPDATING Tue Dec 11 19:05:28 2018 (r341825) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20181218: + Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to + 7.0.1. Please see the 20141231 entry below for information about + prerequisites and upgrading, if you are not already using clang 3.5.0 + or higher. + 20181126: On amd64, arm64 and armv7 (architectures that install LLVM's ld.lld linker as /usr/bin/ld) GNU ld is no longer installed as ld.bfd, as Modified: head/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- head/contrib/compiler-rt/LICENSE.TXT Tue Dec 11 17:46:01 2018 (r341824) +++ head/contrib/compiler-rt/LICENSE.TXT Tue Dec 11 19:05:28 2018 (r341825) @@ -14,7 +14,7 @@ Full text of the relevant licenses is included below. University of Illinois/NCSA Open Source License -Copyright (c) 2009-2016 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2018 by the contributors listed in CREDITS.TXT All rights reserved. Modified: head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Tue Dec 11 17:46:01 2018 (r341824) +++ head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Tue Dec 11 19:05:28 2018 (r341825) @@ -65,6 +65,11 @@ extern "C" { void __sanitizer_unaligned_store32(void *p, uint32_t x); void __sanitizer_unaligned_store64(void *p, uint64_t x); + // Returns 1 on the first call, then returns 0 thereafter. Called by the tool + // to ensure only one report is printed when multiple errors occur + // simultaneously. + int __sanitizer_acquire_crash_state(); + // Annotate the current state of a contiguous container, such as // std::vector, std::string or similar. // A contiguous container is a container that keeps all of its elements Modified: head/contrib/compiler-rt/include/sanitizer/msan_interface.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/msan_interface.h Tue Dec 11 17:46:01 2018 (r341824) +++ head/contrib/compiler-rt/include/sanitizer/msan_interface.h Tue Dec 11 19:05:28 2018 (r341825) @@ -104,6 +104,14 @@ extern "C" { copy. Source and destination regions can overlap. */ void __msan_copy_shadow(const volatile void *dst, const volatile void *src, size_t size); + + /* Disables uninitialized memory checks in interceptors. */ + void __msan_scoped_disable_interceptor_checks(void); + + /* Re-enables uninitialized memory checks in interceptors after a previous + call to __msan_scoped_disable_interceptor_checks. */ + void __msan_scoped_enable_interceptor_checks(void); + #ifdef __cplusplus } // extern "C" #endif Copied: head/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h (from r341824, projects/clang700-import/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h Tue Dec 11 19:05:28 2018 (r341825, copy of r341824, projects/clang700-import/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h) @@ -0,0 +1,4734 @@ +//===-- netbsd_syscall_hooks.h --------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of public sanitizer interface. +// +// System call handlers. +// +// Interface methods declared in this header implement pre- and post- syscall +// actions for the active sanitizer. +// Usage: +// __sanitizer_syscall_pre_getfoo(...args...); +// long long res = syscall(SYS_getfoo, ...args...); +// __sanitizer_syscall_post_getfoo(res, ...args...); +// +// DO NOT EDIT! THIS FILE HAS BEEN GENERATED! +// +// Generated with: generate_netbsd_syscalls.awk +// Generated date: 2018-03-03 +// Generated from: syscalls.master,v 1.291 2018/01/06 16:41:23 kamil Exp +// +//===----------------------------------------------------------------------===// +#ifndef SANITIZER_NETBSD_SYSCALL_HOOKS_H +#define SANITIZER_NETBSD_SYSCALL_HOOKS_H + +#define __sanitizer_syscall_pre_syscall(code, arg0, arg1, arg2, arg3, arg4, \ + arg5, arg6, arg7) \ + __sanitizer_syscall_pre_impl_syscall( \ + (long long)(code), (long long)(arg0), (long long)(arg1), \ + (long long)(arg2), (long long)(arg3), (long long)(arg4), \ + (long long)(arg5), (long long)(arg6), (long long)(arg7)) +#define __sanitizer_syscall_post_syscall(res, code, arg0, arg1, arg2, arg3, \ + arg4, arg5, arg6, arg7) \ + __sanitizer_syscall_post_impl_syscall( \ + res, (long long)(code), (long long)(arg0), (long long)(arg1), \ + (long long)(arg2), (long long)(arg3), (long long)(arg4), \ + (long long)(arg5), (long long)(arg6), (long long)(arg7)) +#define __sanitizer_syscall_pre_exit(rval) \ + __sanitizer_syscall_pre_impl_exit((long long)(rval)) +#define __sanitizer_syscall_post_exit(res, rval) \ + __sanitizer_syscall_post_impl_exit(res, (long long)(rval)) +#define __sanitizer_syscall_pre_fork() __sanitizer_syscall_pre_impl_fork() +#define __sanitizer_syscall_post_fork(res) \ + __sanitizer_syscall_post_impl_fork(res) +#define __sanitizer_syscall_pre_read(fd, buf, nbyte) \ + __sanitizer_syscall_pre_impl_read((long long)(fd), (long long)(buf), \ + (long long)(nbyte)) +#define __sanitizer_syscall_post_read(res, fd, buf, nbyte) \ + __sanitizer_syscall_post_impl_read(res, (long long)(fd), (long long)(buf), \ + (long long)(nbyte)) +#define __sanitizer_syscall_pre_write(fd, buf, nbyte) \ + __sanitizer_syscall_pre_impl_write((long long)(fd), (long long)(buf), \ + (long long)(nbyte)) +#define __sanitizer_syscall_post_write(res, fd, buf, nbyte) \ + __sanitizer_syscall_post_impl_write(res, (long long)(fd), (long long)(buf), \ + (long long)(nbyte)) +#define __sanitizer_syscall_pre_open(path, flags, mode) \ + __sanitizer_syscall_pre_impl_open((long long)(path), (long long)(flags), \ + (long long)(mode)) +#define __sanitizer_syscall_post_open(res, path, flags, mode) \ + __sanitizer_syscall_post_impl_open(res, (long long)(path), \ + (long long)(flags), (long long)(mode)) +#define __sanitizer_syscall_pre_close(fd) \ + __sanitizer_syscall_pre_impl_close((long long)(fd)) +#define __sanitizer_syscall_post_close(res, fd) \ + __sanitizer_syscall_post_impl_close(res, (long long)(fd)) +#define __sanitizer_syscall_pre_compat_50_wait4(pid, status, options, rusage) \ + __sanitizer_syscall_pre_impl_compat_50_wait4( \ + (long long)(pid), (long long)(status), (long long)(options), \ + (long long)(rusage)) +#define __sanitizer_syscall_post_compat_50_wait4(res, pid, status, options, \ + rusage) \ + __sanitizer_syscall_post_impl_compat_50_wait4( \ + res, (long long)(pid), (long long)(status), (long long)(options), \ + (long long)(rusage)) +#define __sanitizer_syscall_pre_compat_43_ocreat(path, mode) \ + __sanitizer_syscall_pre_impl_compat_43_ocreat((long long)(path), \ + (long long)(mode)) +#define __sanitizer_syscall_post_compat_43_ocreat(res, path, mode) \ + __sanitizer_syscall_post_impl_compat_43_ocreat(res, (long long)(path), \ + (long long)(mode)) +#define __sanitizer_syscall_pre_link(path, link) \ + __sanitizer_syscall_pre_impl_link((long long)(path), (long long)(link)) +#define __sanitizer_syscall_post_link(res, path, link) \ + __sanitizer_syscall_post_impl_link(res, (long long)(path), (long long)(link)) +#define __sanitizer_syscall_pre_unlink(path) \ + __sanitizer_syscall_pre_impl_unlink((long long)(path)) +#define __sanitizer_syscall_post_unlink(res, path) \ + __sanitizer_syscall_post_impl_unlink(res, (long long)(path)) +/* syscall 11 has been skipped */ +#define __sanitizer_syscall_pre_chdir(path) \ + __sanitizer_syscall_pre_impl_chdir((long long)(path)) +#define __sanitizer_syscall_post_chdir(res, path) \ + __sanitizer_syscall_post_impl_chdir(res, (long long)(path)) +#define __sanitizer_syscall_pre_fchdir(fd) \ + __sanitizer_syscall_pre_impl_fchdir((long long)(fd)) +#define __sanitizer_syscall_post_fchdir(res, fd) \ + __sanitizer_syscall_post_impl_fchdir(res, (long long)(fd)) +#define __sanitizer_syscall_pre_compat_50_mknod(path, mode, dev) \ + __sanitizer_syscall_pre_impl_compat_50_mknod( \ + (long long)(path), (long long)(mode), (long long)(dev)) +#define __sanitizer_syscall_post_compat_50_mknod(res, path, mode, dev) \ + __sanitizer_syscall_post_impl_compat_50_mknod( \ + res, (long long)(path), (long long)(mode), (long long)(dev)) +#define __sanitizer_syscall_pre_chmod(path, mode) \ + __sanitizer_syscall_pre_impl_chmod((long long)(path), (long long)(mode)) +#define __sanitizer_syscall_post_chmod(res, path, mode) \ + __sanitizer_syscall_post_impl_chmod(res, (long long)(path), (long long)(mode)) +#define __sanitizer_syscall_pre_chown(path, uid, gid) \ + __sanitizer_syscall_pre_impl_chown((long long)(path), (long long)(uid), \ + (long long)(gid)) +#define __sanitizer_syscall_post_chown(res, path, uid, gid) \ + __sanitizer_syscall_post_impl_chown(res, (long long)(path), \ + (long long)(uid), (long long)(gid)) +#define __sanitizer_syscall_pre_break(nsize) \ + __sanitizer_syscall_pre_impl_break((long long)(nsize)) +#define __sanitizer_syscall_post_break(res, nsize) \ + __sanitizer_syscall_post_impl_break(res, (long long)(nsize)) +#define __sanitizer_syscall_pre_compat_20_getfsstat(buf, bufsize, flags) \ + __sanitizer_syscall_pre_impl_compat_20_getfsstat( \ + (long long)(buf), (long long)(bufsize), (long long)(flags)) +#define __sanitizer_syscall_post_compat_20_getfsstat(res, buf, bufsize, flags) \ + __sanitizer_syscall_post_impl_compat_20_getfsstat( \ + res, (long long)(buf), (long long)(bufsize), (long long)(flags)) +#define __sanitizer_syscall_pre_compat_43_olseek(fd, offset, whence) \ + __sanitizer_syscall_pre_impl_compat_43_olseek( \ + (long long)(fd), (long long)(offset), (long long)(whence)) +#define __sanitizer_syscall_post_compat_43_olseek(res, fd, offset, whence) \ + __sanitizer_syscall_post_impl_compat_43_olseek( \ + res, (long long)(fd), (long long)(offset), (long long)(whence)) +#define __sanitizer_syscall_pre_getpid() __sanitizer_syscall_pre_impl_getpid() +#define __sanitizer_syscall_post_getpid(res) \ + __sanitizer_syscall_post_impl_getpid(res) +#define __sanitizer_syscall_pre_compat_40_mount(type, path, flags, data) \ + __sanitizer_syscall_pre_impl_compat_40_mount( \ + (long long)(type), (long long)(path), (long long)(flags), \ + (long long)(data)) +#define __sanitizer_syscall_post_compat_40_mount(res, type, path, flags, data) \ + __sanitizer_syscall_post_impl_compat_40_mount( \ + res, (long long)(type), (long long)(path), (long long)(flags), \ + (long long)(data)) +#define __sanitizer_syscall_pre_unmount(path, flags) \ + __sanitizer_syscall_pre_impl_unmount((long long)(path), (long long)(flags)) +#define __sanitizer_syscall_post_unmount(res, path, flags) \ + __sanitizer_syscall_post_impl_unmount(res, (long long)(path), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_setuid(uid) \ + __sanitizer_syscall_pre_impl_setuid((long long)(uid)) +#define __sanitizer_syscall_post_setuid(res, uid) \ + __sanitizer_syscall_post_impl_setuid(res, (long long)(uid)) +#define __sanitizer_syscall_pre_getuid() __sanitizer_syscall_pre_impl_getuid() +#define __sanitizer_syscall_post_getuid(res) \ + __sanitizer_syscall_post_impl_getuid(res) +#define __sanitizer_syscall_pre_geteuid() __sanitizer_syscall_pre_impl_geteuid() +#define __sanitizer_syscall_post_geteuid(res) \ + __sanitizer_syscall_post_impl_geteuid(res) +#define __sanitizer_syscall_pre_ptrace(req, pid, addr, data) \ + __sanitizer_syscall_pre_impl_ptrace((long long)(req), (long long)(pid), \ + (long long)(addr), (long long)(data)) +#define __sanitizer_syscall_post_ptrace(res, req, pid, addr, data) \ + __sanitizer_syscall_post_impl_ptrace(res, (long long)(req), \ + (long long)(pid), (long long)(addr), \ + (long long)(data)) +#define __sanitizer_syscall_pre_recvmsg(s, msg, flags) \ + __sanitizer_syscall_pre_impl_recvmsg((long long)(s), (long long)(msg), \ + (long long)(flags)) +#define __sanitizer_syscall_post_recvmsg(res, s, msg, flags) \ + __sanitizer_syscall_post_impl_recvmsg(res, (long long)(s), (long long)(msg), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_sendmsg(s, msg, flags) \ + __sanitizer_syscall_pre_impl_sendmsg((long long)(s), (long long)(msg), \ + (long long)(flags)) +#define __sanitizer_syscall_post_sendmsg(res, s, msg, flags) \ + __sanitizer_syscall_post_impl_sendmsg(res, (long long)(s), (long long)(msg), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_recvfrom(s, buf, len, flags, from, \ + fromlenaddr) \ + __sanitizer_syscall_pre_impl_recvfrom( \ + (long long)(s), (long long)(buf), (long long)(len), (long long)(flags), \ + (long long)(from), (long long)(fromlenaddr)) +#define __sanitizer_syscall_post_recvfrom(res, s, buf, len, flags, from, \ + fromlenaddr) \ + __sanitizer_syscall_post_impl_recvfrom( \ + res, (long long)(s), (long long)(buf), (long long)(len), \ + (long long)(flags), (long long)(from), (long long)(fromlenaddr)) +#define __sanitizer_syscall_pre_accept(s, name, anamelen) \ + __sanitizer_syscall_pre_impl_accept((long long)(s), (long long)(name), \ + (long long)(anamelen)) +#define __sanitizer_syscall_post_accept(res, s, name, anamelen) \ + __sanitizer_syscall_post_impl_accept(res, (long long)(s), (long long)(name), \ + (long long)(anamelen)) +#define __sanitizer_syscall_pre_getpeername(fdes, asa, alen) \ + __sanitizer_syscall_pre_impl_getpeername( \ + (long long)(fdes), (long long)(asa), (long long)(alen)) +#define __sanitizer_syscall_post_getpeername(res, fdes, asa, alen) \ + __sanitizer_syscall_post_impl_getpeername( \ + res, (long long)(fdes), (long long)(asa), (long long)(alen)) +#define __sanitizer_syscall_pre_getsockname(fdes, asa, alen) \ + __sanitizer_syscall_pre_impl_getsockname( \ + (long long)(fdes), (long long)(asa), (long long)(alen)) +#define __sanitizer_syscall_post_getsockname(res, fdes, asa, alen) \ + __sanitizer_syscall_post_impl_getsockname( \ + res, (long long)(fdes), (long long)(asa), (long long)(alen)) +#define __sanitizer_syscall_pre_access(path, flags) \ + __sanitizer_syscall_pre_impl_access((long long)(path), (long long)(flags)) +#define __sanitizer_syscall_post_access(res, path, flags) \ + __sanitizer_syscall_post_impl_access(res, (long long)(path), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_chflags(path, flags) \ + __sanitizer_syscall_pre_impl_chflags((long long)(path), (long long)(flags)) +#define __sanitizer_syscall_post_chflags(res, path, flags) \ + __sanitizer_syscall_post_impl_chflags(res, (long long)(path), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_fchflags(fd, flags) \ + __sanitizer_syscall_pre_impl_fchflags((long long)(fd), (long long)(flags)) +#define __sanitizer_syscall_post_fchflags(res, fd, flags) \ + __sanitizer_syscall_post_impl_fchflags(res, (long long)(fd), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_sync() __sanitizer_syscall_pre_impl_sync() +#define __sanitizer_syscall_post_sync(res) \ + __sanitizer_syscall_post_impl_sync(res) +#define __sanitizer_syscall_pre_kill(pid, signum) \ + __sanitizer_syscall_pre_impl_kill((long long)(pid), (long long)(signum)) +#define __sanitizer_syscall_post_kill(res, pid, signum) \ + __sanitizer_syscall_post_impl_kill(res, (long long)(pid), (long long)(signum)) +#define __sanitizer_syscall_pre_compat_43_stat43(path, ub) \ + __sanitizer_syscall_pre_impl_compat_43_stat43((long long)(path), \ + (long long)(ub)) +#define __sanitizer_syscall_post_compat_43_stat43(res, path, ub) \ + __sanitizer_syscall_post_impl_compat_43_stat43(res, (long long)(path), \ + (long long)(ub)) +#define __sanitizer_syscall_pre_getppid() __sanitizer_syscall_pre_impl_getppid() +#define __sanitizer_syscall_post_getppid(res) \ + __sanitizer_syscall_post_impl_getppid(res) +#define __sanitizer_syscall_pre_compat_43_lstat43(path, ub) \ + __sanitizer_syscall_pre_impl_compat_43_lstat43((long long)(path), \ + (long long)(ub)) +#define __sanitizer_syscall_post_compat_43_lstat43(res, path, ub) \ + __sanitizer_syscall_post_impl_compat_43_lstat43(res, (long long)(path), \ + (long long)(ub)) +#define __sanitizer_syscall_pre_dup(fd) \ + __sanitizer_syscall_pre_impl_dup((long long)(fd)) +#define __sanitizer_syscall_post_dup(res, fd) \ + __sanitizer_syscall_post_impl_dup(res, (long long)(fd)) +#define __sanitizer_syscall_pre_pipe() __sanitizer_syscall_pre_impl_pipe() +#define __sanitizer_syscall_post_pipe(res) \ + __sanitizer_syscall_post_impl_pipe(res) +#define __sanitizer_syscall_pre_getegid() __sanitizer_syscall_pre_impl_getegid() +#define __sanitizer_syscall_post_getegid(res) \ + __sanitizer_syscall_post_impl_getegid(res) +#define __sanitizer_syscall_pre_profil(samples, size, offset, scale) \ + __sanitizer_syscall_pre_impl_profil((long long)(samples), (long long)(size), \ + (long long)(offset), (long long)(scale)) +#define __sanitizer_syscall_post_profil(res, samples, size, offset, scale) \ + __sanitizer_syscall_post_impl_profil(res, (long long)(samples), \ + (long long)(size), (long long)(offset), \ + (long long)(scale)) +#define __sanitizer_syscall_pre_ktrace(fname, ops, facs, pid) \ + __sanitizer_syscall_pre_impl_ktrace((long long)(fname), (long long)(ops), \ + (long long)(facs), (long long)(pid)) +#define __sanitizer_syscall_post_ktrace(res, fname, ops, facs, pid) \ + __sanitizer_syscall_post_impl_ktrace(res, (long long)(fname), \ + (long long)(ops), (long long)(facs), \ + (long long)(pid)) +#define __sanitizer_syscall_pre_compat_13_sigaction13(signum, nsa, osa) \ + __sanitizer_syscall_pre_impl_compat_13_sigaction13( \ + (long long)(signum), (long long)(nsa), (long long)(osa)) +#define __sanitizer_syscall_post_compat_13_sigaction13(res, signum, nsa, osa) \ + __sanitizer_syscall_post_impl_compat_13_sigaction13( \ + res, (long long)(signum), (long long)(nsa), (long long)(osa)) +#define __sanitizer_syscall_pre_getgid() __sanitizer_syscall_pre_impl_getgid() +#define __sanitizer_syscall_post_getgid(res) \ + __sanitizer_syscall_post_impl_getgid(res) +#define __sanitizer_syscall_pre_compat_13_sigprocmask13(how, mask) \ + __sanitizer_syscall_pre_impl_compat_13_sigprocmask13((long long)(how), \ + (long long)(mask)) +#define __sanitizer_syscall_post_compat_13_sigprocmask13(res, how, mask) \ + __sanitizer_syscall_post_impl_compat_13_sigprocmask13(res, (long long)(how), \ + (long long)(mask)) +#define __sanitizer_syscall_pre___getlogin(namebuf, namelen) \ + __sanitizer_syscall_pre_impl___getlogin((long long)(namebuf), \ + (long long)(namelen)) +#define __sanitizer_syscall_post___getlogin(res, namebuf, namelen) \ + __sanitizer_syscall_post_impl___getlogin(res, (long long)(namebuf), \ + (long long)(namelen)) +#define __sanitizer_syscall_pre___setlogin(namebuf) \ + __sanitizer_syscall_pre_impl___setlogin((long long)(namebuf)) +#define __sanitizer_syscall_post___setlogin(res, namebuf) \ + __sanitizer_syscall_post_impl___setlogin(res, (long long)(namebuf)) +#define __sanitizer_syscall_pre_acct(path) \ + __sanitizer_syscall_pre_impl_acct((long long)(path)) +#define __sanitizer_syscall_post_acct(res, path) \ + __sanitizer_syscall_post_impl_acct(res, (long long)(path)) +#define __sanitizer_syscall_pre_compat_13_sigpending13() \ + __sanitizer_syscall_pre_impl_compat_13_sigpending13() +#define __sanitizer_syscall_post_compat_13_sigpending13(res) \ + __sanitizer_syscall_post_impl_compat_13_sigpending13(res) +#define __sanitizer_syscall_pre_compat_13_sigaltstack13(nss, oss) \ + __sanitizer_syscall_pre_impl_compat_13_sigaltstack13((long long)(nss), \ + (long long)(oss)) +#define __sanitizer_syscall_post_compat_13_sigaltstack13(res, nss, oss) \ + __sanitizer_syscall_post_impl_compat_13_sigaltstack13(res, (long long)(nss), \ + (long long)(oss)) +#define __sanitizer_syscall_pre_ioctl(fd, com, data) \ + __sanitizer_syscall_pre_impl_ioctl((long long)(fd), (long long)(com), \ + (long long)(data)) +#define __sanitizer_syscall_post_ioctl(res, fd, com, data) \ + __sanitizer_syscall_post_impl_ioctl(res, (long long)(fd), (long long)(com), \ + (long long)(data)) +#define __sanitizer_syscall_pre_compat_12_oreboot(opt) \ + __sanitizer_syscall_pre_impl_compat_12_oreboot((long long)(opt)) +#define __sanitizer_syscall_post_compat_12_oreboot(res, opt) \ + __sanitizer_syscall_post_impl_compat_12_oreboot(res, (long long)(opt)) +#define __sanitizer_syscall_pre_revoke(path) \ + __sanitizer_syscall_pre_impl_revoke((long long)(path)) +#define __sanitizer_syscall_post_revoke(res, path) \ + __sanitizer_syscall_post_impl_revoke(res, (long long)(path)) +#define __sanitizer_syscall_pre_symlink(path, link) \ + __sanitizer_syscall_pre_impl_symlink((long long)(path), (long long)(link)) +#define __sanitizer_syscall_post_symlink(res, path, link) \ + __sanitizer_syscall_post_impl_symlink(res, (long long)(path), \ + (long long)(link)) +#define __sanitizer_syscall_pre_readlink(path, buf, count) \ + __sanitizer_syscall_pre_impl_readlink((long long)(path), (long long)(buf), \ + (long long)(count)) +#define __sanitizer_syscall_post_readlink(res, path, buf, count) \ + __sanitizer_syscall_post_impl_readlink(res, (long long)(path), \ + (long long)(buf), (long long)(count)) +#define __sanitizer_syscall_pre_execve(path, argp, envp) \ + __sanitizer_syscall_pre_impl_execve((long long)(path), (long long)(argp), \ + (long long)(envp)) +#define __sanitizer_syscall_post_execve(res, path, argp, envp) \ + __sanitizer_syscall_post_impl_execve(res, (long long)(path), \ + (long long)(argp), (long long)(envp)) +#define __sanitizer_syscall_pre_umask(newmask) \ + __sanitizer_syscall_pre_impl_umask((long long)(newmask)) +#define __sanitizer_syscall_post_umask(res, newmask) \ + __sanitizer_syscall_post_impl_umask(res, (long long)(newmask)) +#define __sanitizer_syscall_pre_chroot(path) \ + __sanitizer_syscall_pre_impl_chroot((long long)(path)) +#define __sanitizer_syscall_post_chroot(res, path) \ + __sanitizer_syscall_post_impl_chroot(res, (long long)(path)) +#define __sanitizer_syscall_pre_compat_43_fstat43(fd, sb) \ + __sanitizer_syscall_pre_impl_compat_43_fstat43((long long)(fd), \ + (long long)(sb)) +#define __sanitizer_syscall_post_compat_43_fstat43(res, fd, sb) \ + __sanitizer_syscall_post_impl_compat_43_fstat43(res, (long long)(fd), \ + (long long)(sb)) +#define __sanitizer_syscall_pre_compat_43_ogetkerninfo(op, where, size, arg) \ + __sanitizer_syscall_pre_impl_compat_43_ogetkerninfo( \ + (long long)(op), (long long)(where), (long long)(size), \ + (long long)(arg)) +#define __sanitizer_syscall_post_compat_43_ogetkerninfo(res, op, where, size, \ + arg) \ + __sanitizer_syscall_post_impl_compat_43_ogetkerninfo( \ + res, (long long)(op), (long long)(where), (long long)(size), \ + (long long)(arg)) +#define __sanitizer_syscall_pre_compat_43_ogetpagesize() \ + __sanitizer_syscall_pre_impl_compat_43_ogetpagesize() +#define __sanitizer_syscall_post_compat_43_ogetpagesize(res) \ + __sanitizer_syscall_post_impl_compat_43_ogetpagesize(res) +#define __sanitizer_syscall_pre_compat_12_msync(addr, len) \ + __sanitizer_syscall_pre_impl_compat_12_msync((long long)(addr), \ + (long long)(len)) +#define __sanitizer_syscall_post_compat_12_msync(res, addr, len) \ + __sanitizer_syscall_post_impl_compat_12_msync(res, (long long)(addr), \ + (long long)(len)) +#define __sanitizer_syscall_pre_vfork() __sanitizer_syscall_pre_impl_vfork() +#define __sanitizer_syscall_post_vfork(res) \ + __sanitizer_syscall_post_impl_vfork(res) +/* syscall 67 has been skipped */ +/* syscall 68 has been skipped */ +/* syscall 69 has been skipped */ +/* syscall 70 has been skipped */ +#define __sanitizer_syscall_pre_compat_43_ommap(addr, len, prot, flags, fd, \ + pos) \ + __sanitizer_syscall_pre_impl_compat_43_ommap( \ + (long long)(addr), (long long)(len), (long long)(prot), \ + (long long)(flags), (long long)(fd), (long long)(pos)) +#define __sanitizer_syscall_post_compat_43_ommap(res, addr, len, prot, flags, \ + fd, pos) \ + __sanitizer_syscall_post_impl_compat_43_ommap( \ + res, (long long)(addr), (long long)(len), (long long)(prot), \ + (long long)(flags), (long long)(fd), (long long)(pos)) +#define __sanitizer_syscall_pre_vadvise(anom) \ + __sanitizer_syscall_pre_impl_vadvise((long long)(anom)) +#define __sanitizer_syscall_post_vadvise(res, anom) \ + __sanitizer_syscall_post_impl_vadvise(res, (long long)(anom)) +#define __sanitizer_syscall_pre_munmap(addr, len) \ + __sanitizer_syscall_pre_impl_munmap((long long)(addr), (long long)(len)) +#define __sanitizer_syscall_post_munmap(res, addr, len) \ + __sanitizer_syscall_post_impl_munmap(res, (long long)(addr), (long long)(len)) +#define __sanitizer_syscall_pre_mprotect(addr, len, prot) \ + __sanitizer_syscall_pre_impl_mprotect((long long)(addr), (long long)(len), \ + (long long)(prot)) +#define __sanitizer_syscall_post_mprotect(res, addr, len, prot) \ + __sanitizer_syscall_post_impl_mprotect(res, (long long)(addr), \ + (long long)(len), (long long)(prot)) +#define __sanitizer_syscall_pre_madvise(addr, len, behav) \ + __sanitizer_syscall_pre_impl_madvise((long long)(addr), (long long)(len), \ + (long long)(behav)) +#define __sanitizer_syscall_post_madvise(res, addr, len, behav) \ + __sanitizer_syscall_post_impl_madvise(res, (long long)(addr), \ + (long long)(len), (long long)(behav)) +/* syscall 76 has been skipped */ +/* syscall 77 has been skipped */ +#define __sanitizer_syscall_pre_mincore(addr, len, vec) \ + __sanitizer_syscall_pre_impl_mincore((long long)(addr), (long long)(len), \ + (long long)(vec)) +#define __sanitizer_syscall_post_mincore(res, addr, len, vec) \ + __sanitizer_syscall_post_impl_mincore(res, (long long)(addr), \ + (long long)(len), (long long)(vec)) +#define __sanitizer_syscall_pre_getgroups(gidsetsize, gidset) \ + __sanitizer_syscall_pre_impl_getgroups((long long)(gidsetsize), \ + (long long)(gidset)) +#define __sanitizer_syscall_post_getgroups(res, gidsetsize, gidset) \ + __sanitizer_syscall_post_impl_getgroups(res, (long long)(gidsetsize), \ + (long long)(gidset)) +#define __sanitizer_syscall_pre_setgroups(gidsetsize, gidset) \ + __sanitizer_syscall_pre_impl_setgroups((long long)(gidsetsize), \ + (long long)(gidset)) +#define __sanitizer_syscall_post_setgroups(res, gidsetsize, gidset) \ + __sanitizer_syscall_post_impl_setgroups(res, (long long)(gidsetsize), \ + (long long)(gidset)) +#define __sanitizer_syscall_pre_getpgrp() __sanitizer_syscall_pre_impl_getpgrp() +#define __sanitizer_syscall_post_getpgrp(res) \ + __sanitizer_syscall_post_impl_getpgrp(res) +#define __sanitizer_syscall_pre_setpgid(pid, pgid) \ + __sanitizer_syscall_pre_impl_setpgid((long long)(pid), (long long)(pgid)) +#define __sanitizer_syscall_post_setpgid(res, pid, pgid) \ + __sanitizer_syscall_post_impl_setpgid(res, (long long)(pid), \ + (long long)(pgid)) +#define __sanitizer_syscall_pre_compat_50_setitimer(which, itv, oitv) \ + __sanitizer_syscall_pre_impl_compat_50_setitimer( \ + (long long)(which), (long long)(itv), (long long)(oitv)) +#define __sanitizer_syscall_post_compat_50_setitimer(res, which, itv, oitv) \ + __sanitizer_syscall_post_impl_compat_50_setitimer( \ + res, (long long)(which), (long long)(itv), (long long)(oitv)) +#define __sanitizer_syscall_pre_compat_43_owait() \ + __sanitizer_syscall_pre_impl_compat_43_owait() +#define __sanitizer_syscall_post_compat_43_owait(res) \ + __sanitizer_syscall_post_impl_compat_43_owait(res) +#define __sanitizer_syscall_pre_compat_12_oswapon(name) \ + __sanitizer_syscall_pre_impl_compat_12_oswapon((long long)(name)) +#define __sanitizer_syscall_post_compat_12_oswapon(res, name) \ + __sanitizer_syscall_post_impl_compat_12_oswapon(res, (long long)(name)) +#define __sanitizer_syscall_pre_compat_50_getitimer(which, itv) \ + __sanitizer_syscall_pre_impl_compat_50_getitimer((long long)(which), \ + (long long)(itv)) +#define __sanitizer_syscall_post_compat_50_getitimer(res, which, itv) \ + __sanitizer_syscall_post_impl_compat_50_getitimer(res, (long long)(which), \ + (long long)(itv)) +#define __sanitizer_syscall_pre_compat_43_ogethostname(hostname, len) \ + __sanitizer_syscall_pre_impl_compat_43_ogethostname((long long)(hostname), \ + (long long)(len)) +#define __sanitizer_syscall_post_compat_43_ogethostname(res, hostname, len) \ + __sanitizer_syscall_post_impl_compat_43_ogethostname( \ + res, (long long)(hostname), (long long)(len)) +#define __sanitizer_syscall_pre_compat_43_osethostname(hostname, len) \ + __sanitizer_syscall_pre_impl_compat_43_osethostname((long long)(hostname), \ + (long long)(len)) +#define __sanitizer_syscall_post_compat_43_osethostname(res, hostname, len) \ + __sanitizer_syscall_post_impl_compat_43_osethostname( \ + res, (long long)(hostname), (long long)(len)) +#define __sanitizer_syscall_pre_compat_43_ogetdtablesize() \ + __sanitizer_syscall_pre_impl_compat_43_ogetdtablesize() +#define __sanitizer_syscall_post_compat_43_ogetdtablesize(res) \ + __sanitizer_syscall_post_impl_compat_43_ogetdtablesize(res) +#define __sanitizer_syscall_pre_dup2(from, to) \ + __sanitizer_syscall_pre_impl_dup2((long long)(from), (long long)(to)) +#define __sanitizer_syscall_post_dup2(res, from, to) \ + __sanitizer_syscall_post_impl_dup2(res, (long long)(from), (long long)(to)) +/* syscall 91 has been skipped */ +#define __sanitizer_syscall_pre_fcntl(fd, cmd, arg) \ + __sanitizer_syscall_pre_impl_fcntl((long long)(fd), (long long)(cmd), \ + (long long)(arg)) +#define __sanitizer_syscall_post_fcntl(res, fd, cmd, arg) \ + __sanitizer_syscall_post_impl_fcntl(res, (long long)(fd), (long long)(cmd), \ + (long long)(arg)) +#define __sanitizer_syscall_pre_compat_50_select(nd, in, ou, ex, tv) \ + __sanitizer_syscall_pre_impl_compat_50_select( \ + (long long)(nd), (long long)(in), (long long)(ou), (long long)(ex), \ + (long long)(tv)) +#define __sanitizer_syscall_post_compat_50_select(res, nd, in, ou, ex, tv) \ + __sanitizer_syscall_post_impl_compat_50_select( \ + res, (long long)(nd), (long long)(in), (long long)(ou), (long long)(ex), \ + (long long)(tv)) +/* syscall 94 has been skipped */ +#define __sanitizer_syscall_pre_fsync(fd) \ + __sanitizer_syscall_pre_impl_fsync((long long)(fd)) +#define __sanitizer_syscall_post_fsync(res, fd) \ + __sanitizer_syscall_post_impl_fsync(res, (long long)(fd)) +#define __sanitizer_syscall_pre_setpriority(which, who, prio) \ + __sanitizer_syscall_pre_impl_setpriority( \ + (long long)(which), (long long)(who), (long long)(prio)) +#define __sanitizer_syscall_post_setpriority(res, which, who, prio) \ + __sanitizer_syscall_post_impl_setpriority( \ + res, (long long)(which), (long long)(who), (long long)(prio)) +#define __sanitizer_syscall_pre_compat_30_socket(domain, type, protocol) \ + __sanitizer_syscall_pre_impl_compat_30_socket( \ + (long long)(domain), (long long)(type), (long long)(protocol)) +#define __sanitizer_syscall_post_compat_30_socket(res, domain, type, protocol) \ + __sanitizer_syscall_post_impl_compat_30_socket( \ + res, (long long)(domain), (long long)(type), (long long)(protocol)) +#define __sanitizer_syscall_pre_connect(s, name, namelen) \ + __sanitizer_syscall_pre_impl_connect((long long)(s), (long long)(name), \ + (long long)(namelen)) +#define __sanitizer_syscall_post_connect(res, s, name, namelen) \ + __sanitizer_syscall_post_impl_connect( \ + res, (long long)(s), (long long)(name), (long long)(namelen)) +#define __sanitizer_syscall_pre_compat_43_oaccept(s, name, anamelen) \ + __sanitizer_syscall_pre_impl_compat_43_oaccept( \ + (long long)(s), (long long)(name), (long long)(anamelen)) +#define __sanitizer_syscall_post_compat_43_oaccept(res, s, name, anamelen) \ + __sanitizer_syscall_post_impl_compat_43_oaccept( \ + res, (long long)(s), (long long)(name), (long long)(anamelen)) +#define __sanitizer_syscall_pre_getpriority(which, who) \ + __sanitizer_syscall_pre_impl_getpriority((long long)(which), (long long)(who)) +#define __sanitizer_syscall_post_getpriority(res, which, who) \ + __sanitizer_syscall_post_impl_getpriority(res, (long long)(which), \ + (long long)(who)) +#define __sanitizer_syscall_pre_compat_43_osend(s, buf, len, flags) \ + __sanitizer_syscall_pre_impl_compat_43_osend( \ + (long long)(s), (long long)(buf), (long long)(len), (long long)(flags)) +#define __sanitizer_syscall_post_compat_43_osend(res, s, buf, len, flags) \ + __sanitizer_syscall_post_impl_compat_43_osend( \ + res, (long long)(s), (long long)(buf), (long long)(len), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_compat_43_orecv(s, buf, len, flags) \ + __sanitizer_syscall_pre_impl_compat_43_orecv( \ + (long long)(s), (long long)(buf), (long long)(len), (long long)(flags)) +#define __sanitizer_syscall_post_compat_43_orecv(res, s, buf, len, flags) \ + __sanitizer_syscall_post_impl_compat_43_orecv( \ + res, (long long)(s), (long long)(buf), (long long)(len), \ + (long long)(flags)) +#define __sanitizer_syscall_pre_compat_13_sigreturn13(sigcntxp) \ + __sanitizer_syscall_pre_impl_compat_13_sigreturn13((long long)(sigcntxp)) +#define __sanitizer_syscall_post_compat_13_sigreturn13(res, sigcntxp) \ + __sanitizer_syscall_post_impl_compat_13_sigreturn13(res, \ + (long long)(sigcntxp)) +#define __sanitizer_syscall_pre_bind(s, name, namelen) \ + __sanitizer_syscall_pre_impl_bind((long long)(s), (long long)(name), \ + (long long)(namelen)) +#define __sanitizer_syscall_post_bind(res, s, name, namelen) \ + __sanitizer_syscall_post_impl_bind(res, (long long)(s), (long long)(name), \ + (long long)(namelen)) +#define __sanitizer_syscall_pre_setsockopt(s, level, name, val, valsize) \ + __sanitizer_syscall_pre_impl_setsockopt((long long)(s), (long long)(level), \ + (long long)(name), (long long)(val), \ + (long long)(valsize)) +#define __sanitizer_syscall_post_setsockopt(res, s, level, name, val, valsize) \ + __sanitizer_syscall_post_impl_setsockopt( \ + res, (long long)(s), (long long)(level), (long long)(name), \ + (long long)(val), (long long)(valsize)) +#define __sanitizer_syscall_pre_listen(s, backlog) \ + __sanitizer_syscall_pre_impl_listen((long long)(s), (long long)(backlog)) +#define __sanitizer_syscall_post_listen(res, s, backlog) \ + __sanitizer_syscall_post_impl_listen(res, (long long)(s), \ + (long long)(backlog)) +/* syscall 107 has been skipped */ +#define __sanitizer_syscall_pre_compat_43_osigvec(signum, nsv, osv) \ + __sanitizer_syscall_pre_impl_compat_43_osigvec( \ + (long long)(signum), (long long)(nsv), (long long)(osv)) +#define __sanitizer_syscall_post_compat_43_osigvec(res, signum, nsv, osv) \ + __sanitizer_syscall_post_impl_compat_43_osigvec( \ + res, (long long)(signum), (long long)(nsv), (long long)(osv)) +#define __sanitizer_syscall_pre_compat_43_osigblock(mask) \ + __sanitizer_syscall_pre_impl_compat_43_osigblock((long long)(mask)) +#define __sanitizer_syscall_post_compat_43_osigblock(res, mask) \ + __sanitizer_syscall_post_impl_compat_43_osigblock(res, (long long)(mask)) +#define __sanitizer_syscall_pre_compat_43_osigsetmask(mask) \ + __sanitizer_syscall_pre_impl_compat_43_osigsetmask((long long)(mask)) +#define __sanitizer_syscall_post_compat_43_osigsetmask(res, mask) \ + __sanitizer_syscall_post_impl_compat_43_osigsetmask(res, (long long)(mask)) +#define __sanitizer_syscall_pre_compat_13_sigsuspend13(mask) \ + __sanitizer_syscall_pre_impl_compat_13_sigsuspend13((long long)(mask)) +#define __sanitizer_syscall_post_compat_13_sigsuspend13(res, mask) \ + __sanitizer_syscall_post_impl_compat_13_sigsuspend13(res, (long long)(mask)) +#define __sanitizer_syscall_pre_compat_43_osigstack(nss, oss) \ + __sanitizer_syscall_pre_impl_compat_43_osigstack((long long)(nss), \ + (long long)(oss)) +#define __sanitizer_syscall_post_compat_43_osigstack(res, nss, oss) \ + __sanitizer_syscall_post_impl_compat_43_osigstack(res, (long long)(nss), \ + (long long)(oss)) +#define __sanitizer_syscall_pre_compat_43_orecvmsg(s, msg, flags) \ + __sanitizer_syscall_pre_impl_compat_43_orecvmsg( \ + (long long)(s), (long long)(msg), (long long)(flags)) +#define __sanitizer_syscall_post_compat_43_orecvmsg(res, s, msg, flags) \ + __sanitizer_syscall_post_impl_compat_43_orecvmsg( \ + res, (long long)(s), (long long)(msg), (long long)(flags)) +#define __sanitizer_syscall_pre_compat_43_osendmsg(s, msg, flags) \ + __sanitizer_syscall_pre_impl_compat_43_osendmsg( \ + (long long)(s), (long long)(msg), (long long)(flags)) +#define __sanitizer_syscall_post_compat_43_osendmsg(res, s, msg, flags) \ + __sanitizer_syscall_post_impl_compat_43_osendmsg( \ + res, (long long)(s), (long long)(msg), (long long)(flags)) +/* syscall 115 has been skipped */ +#define __sanitizer_syscall_pre_compat_50_gettimeofday(tp, tzp) \ + __sanitizer_syscall_pre_impl_compat_50_gettimeofday((long long)(tp), \ + (long long)(tzp)) +#define __sanitizer_syscall_post_compat_50_gettimeofday(res, tp, tzp) \ + __sanitizer_syscall_post_impl_compat_50_gettimeofday(res, (long long)(tp), \ + (long long)(tzp)) +#define __sanitizer_syscall_pre_compat_50_getrusage(who, rusage) \ + __sanitizer_syscall_pre_impl_compat_50_getrusage((long long)(who), \ + (long long)(rusage)) +#define __sanitizer_syscall_post_compat_50_getrusage(res, who, rusage) \ + __sanitizer_syscall_post_impl_compat_50_getrusage(res, (long long)(who), \ + (long long)(rusage)) +#define __sanitizer_syscall_pre_getsockopt(s, level, name, val, avalsize) \ + __sanitizer_syscall_pre_impl_getsockopt((long long)(s), (long long)(level), \ + (long long)(name), (long long)(val), \ + (long long)(avalsize)) +#define __sanitizer_syscall_post_getsockopt(res, s, level, name, val, \ + avalsize) \ + __sanitizer_syscall_post_impl_getsockopt( \ + res, (long long)(s), (long long)(level), (long long)(name), \ + (long long)(val), (long long)(avalsize)) +/* syscall 119 has been skipped */ +#define __sanitizer_syscall_pre_readv(fd, iovp, iovcnt) \ + __sanitizer_syscall_pre_impl_readv((long long)(fd), (long long)(iovp), \ + (long long)(iovcnt)) +#define __sanitizer_syscall_post_readv(res, fd, iovp, iovcnt) \ + __sanitizer_syscall_post_impl_readv(res, (long long)(fd), (long long)(iovp), \ + (long long)(iovcnt)) +#define __sanitizer_syscall_pre_writev(fd, iovp, iovcnt) \ + __sanitizer_syscall_pre_impl_writev((long long)(fd), (long long)(iovp), \ + (long long)(iovcnt)) +#define __sanitizer_syscall_post_writev(res, fd, iovp, iovcnt) \ + __sanitizer_syscall_post_impl_writev(res, (long long)(fd), \ + (long long)(iovp), (long long)(iovcnt)) +#define __sanitizer_syscall_pre_compat_50_settimeofday(tv, tzp) \ + __sanitizer_syscall_pre_impl_compat_50_settimeofday((long long)(tv), \ + (long long)(tzp)) +#define __sanitizer_syscall_post_compat_50_settimeofday(res, tv, tzp) \ + __sanitizer_syscall_post_impl_compat_50_settimeofday(res, (long long)(tv), \ + (long long)(tzp)) +#define __sanitizer_syscall_pre_fchown(fd, uid, gid) \ + __sanitizer_syscall_pre_impl_fchown((long long)(fd), (long long)(uid), \ + (long long)(gid)) +#define __sanitizer_syscall_post_fchown(res, fd, uid, gid) \ + __sanitizer_syscall_post_impl_fchown(res, (long long)(fd), (long long)(uid), \ + (long long)(gid)) +#define __sanitizer_syscall_pre_fchmod(fd, mode) \ + __sanitizer_syscall_pre_impl_fchmod((long long)(fd), (long long)(mode)) +#define __sanitizer_syscall_post_fchmod(res, fd, mode) \ + __sanitizer_syscall_post_impl_fchmod(res, (long long)(fd), (long long)(mode)) +#define __sanitizer_syscall_pre_compat_43_orecvfrom(s, buf, len, flags, from, \ + fromlenaddr) \ + __sanitizer_syscall_pre_impl_compat_43_orecvfrom( \ + (long long)(s), (long long)(buf), (long long)(len), (long long)(flags), \ + (long long)(from), (long long)(fromlenaddr)) +#define __sanitizer_syscall_post_compat_43_orecvfrom(res, s, buf, len, flags, \ + from, fromlenaddr) \ + __sanitizer_syscall_post_impl_compat_43_orecvfrom( \ + res, (long long)(s), (long long)(buf), (long long)(len), \ + (long long)(flags), (long long)(from), (long long)(fromlenaddr)) +#define __sanitizer_syscall_pre_setreuid(ruid, euid) \ + __sanitizer_syscall_pre_impl_setreuid((long long)(ruid), (long long)(euid)) +#define __sanitizer_syscall_post_setreuid(res, ruid, euid) \ + __sanitizer_syscall_post_impl_setreuid(res, (long long)(ruid), \ + (long long)(euid)) +#define __sanitizer_syscall_pre_setregid(rgid, egid) \ + __sanitizer_syscall_pre_impl_setregid((long long)(rgid), (long long)(egid)) +#define __sanitizer_syscall_post_setregid(res, rgid, egid) \ + __sanitizer_syscall_post_impl_setregid(res, (long long)(rgid), \ + (long long)(egid)) +#define __sanitizer_syscall_pre_rename(from, to) \ + __sanitizer_syscall_pre_impl_rename((long long)(from), (long long)(to)) +#define __sanitizer_syscall_post_rename(res, from, to) \ + __sanitizer_syscall_post_impl_rename(res, (long long)(from), (long long)(to)) +#define __sanitizer_syscall_pre_compat_43_otruncate(path, length) \ + __sanitizer_syscall_pre_impl_compat_43_otruncate((long long)(path), \ + (long long)(length)) +#define __sanitizer_syscall_post_compat_43_otruncate(res, path, length) \ + __sanitizer_syscall_post_impl_compat_43_otruncate(res, (long long)(path), \ + (long long)(length)) +#define __sanitizer_syscall_pre_compat_43_oftruncate(fd, length) \ + __sanitizer_syscall_pre_impl_compat_43_oftruncate((long long)(fd), \ + (long long)(length)) +#define __sanitizer_syscall_post_compat_43_oftruncate(res, fd, length) \ + __sanitizer_syscall_post_impl_compat_43_oftruncate(res, (long long)(fd), \ + (long long)(length)) +#define __sanitizer_syscall_pre_flock(fd, how) \ + __sanitizer_syscall_pre_impl_flock((long long)(fd), (long long)(how)) +#define __sanitizer_syscall_post_flock(res, fd, how) \ + __sanitizer_syscall_post_impl_flock(res, (long long)(fd), (long long)(how)) +#define __sanitizer_syscall_pre_mkfifo(path, mode) \ + __sanitizer_syscall_pre_impl_mkfifo((long long)(path), (long long)(mode)) +#define __sanitizer_syscall_post_mkfifo(res, path, mode) \ + __sanitizer_syscall_post_impl_mkfifo(res, (long long)(path), \ + (long long)(mode)) +#define __sanitizer_syscall_pre_sendto(s, buf, len, flags, to, tolen) \ + __sanitizer_syscall_pre_impl_sendto((long long)(s), (long long)(buf), \ + (long long)(len), (long long)(flags), \ + (long long)(to), (long long)(tolen)) +#define __sanitizer_syscall_post_sendto(res, s, buf, len, flags, to, tolen) \ + __sanitizer_syscall_post_impl_sendto(res, (long long)(s), (long long)(buf), \ + (long long)(len), (long long)(flags), \ + (long long)(to), (long long)(tolen)) +#define __sanitizer_syscall_pre_shutdown(s, how) \ + __sanitizer_syscall_pre_impl_shutdown((long long)(s), (long long)(how)) +#define __sanitizer_syscall_post_shutdown(res, s, how) \ + __sanitizer_syscall_post_impl_shutdown(res, (long long)(s), (long long)(how)) +#define __sanitizer_syscall_pre_socketpair(domain, type, protocol, rsv) \ + __sanitizer_syscall_pre_impl_socketpair( \ + (long long)(domain), (long long)(type), (long long)(protocol), \ + (long long)(rsv)) +#define __sanitizer_syscall_post_socketpair(res, domain, type, protocol, rsv) \ + __sanitizer_syscall_post_impl_socketpair( \ + res, (long long)(domain), (long long)(type), (long long)(protocol), \ + (long long)(rsv)) +#define __sanitizer_syscall_pre_mkdir(path, mode) \ + __sanitizer_syscall_pre_impl_mkdir((long long)(path), (long long)(mode)) +#define __sanitizer_syscall_post_mkdir(res, path, mode) \ + __sanitizer_syscall_post_impl_mkdir(res, (long long)(path), (long long)(mode)) +#define __sanitizer_syscall_pre_rmdir(path) \ + __sanitizer_syscall_pre_impl_rmdir((long long)(path)) +#define __sanitizer_syscall_post_rmdir(res, path) \ + __sanitizer_syscall_post_impl_rmdir(res, (long long)(path)) +#define __sanitizer_syscall_pre_compat_50_utimes(path, tptr) \ + __sanitizer_syscall_pre_impl_compat_50_utimes((long long)(path), \ + (long long)(tptr)) +#define __sanitizer_syscall_post_compat_50_utimes(res, path, tptr) \ + __sanitizer_syscall_post_impl_compat_50_utimes(res, (long long)(path), \ + (long long)(tptr)) +/* syscall 139 has been skipped */ +#define __sanitizer_syscall_pre_compat_50_adjtime(delta, olddelta) \ + __sanitizer_syscall_pre_impl_compat_50_adjtime((long long)(delta), \ + (long long)(olddelta)) +#define __sanitizer_syscall_post_compat_50_adjtime(res, delta, olddelta) \ + __sanitizer_syscall_post_impl_compat_50_adjtime(res, (long long)(delta), \ + (long long)(olddelta)) +#define __sanitizer_syscall_pre_compat_43_ogetpeername(fdes, asa, alen) \ + __sanitizer_syscall_pre_impl_compat_43_ogetpeername( \ + (long long)(fdes), (long long)(asa), (long long)(alen)) +#define __sanitizer_syscall_post_compat_43_ogetpeername(res, fdes, asa, alen) \ + __sanitizer_syscall_post_impl_compat_43_ogetpeername( \ + res, (long long)(fdes), (long long)(asa), (long long)(alen)) +#define __sanitizer_syscall_pre_compat_43_ogethostid() \ + __sanitizer_syscall_pre_impl_compat_43_ogethostid() +#define __sanitizer_syscall_post_compat_43_ogethostid(res) \ + __sanitizer_syscall_post_impl_compat_43_ogethostid(res) +#define __sanitizer_syscall_pre_compat_43_osethostid(hostid) \ + __sanitizer_syscall_pre_impl_compat_43_osethostid((long long)(hostid)) +#define __sanitizer_syscall_post_compat_43_osethostid(res, hostid) \ + __sanitizer_syscall_post_impl_compat_43_osethostid(res, (long long)(hostid)) +#define __sanitizer_syscall_pre_compat_43_ogetrlimit(which, rlp) \ + __sanitizer_syscall_pre_impl_compat_43_ogetrlimit((long long)(which), \ + (long long)(rlp)) +#define __sanitizer_syscall_post_compat_43_ogetrlimit(res, which, rlp) \ + __sanitizer_syscall_post_impl_compat_43_ogetrlimit(res, (long long)(which), \ + (long long)(rlp)) +#define __sanitizer_syscall_pre_compat_43_osetrlimit(which, rlp) \ + __sanitizer_syscall_pre_impl_compat_43_osetrlimit((long long)(which), \ + (long long)(rlp)) +#define __sanitizer_syscall_post_compat_43_osetrlimit(res, which, rlp) \ + __sanitizer_syscall_post_impl_compat_43_osetrlimit(res, (long long)(which), \ + (long long)(rlp)) +#define __sanitizer_syscall_pre_compat_43_okillpg(pgid, signum) \ + __sanitizer_syscall_pre_impl_compat_43_okillpg((long long)(pgid), \ + (long long)(signum)) +#define __sanitizer_syscall_post_compat_43_okillpg(res, pgid, signum) \ + __sanitizer_syscall_post_impl_compat_43_okillpg(res, (long long)(pgid), \ + (long long)(signum)) +#define __sanitizer_syscall_pre_setsid() __sanitizer_syscall_pre_impl_setsid() +#define __sanitizer_syscall_post_setsid(res) \ + __sanitizer_syscall_post_impl_setsid(res) +#define __sanitizer_syscall_pre_compat_50_quotactl(path, cmd, uid, arg) \ + __sanitizer_syscall_pre_impl_compat_50_quotactl( \ + (long long)(path), (long long)(cmd), (long long)(uid), (long long)(arg)) +#define __sanitizer_syscall_post_compat_50_quotactl(res, path, cmd, uid, arg) \ + __sanitizer_syscall_post_impl_compat_50_quotactl( \ + res, (long long)(path), (long long)(cmd), (long long)(uid), \ + (long long)(arg)) +#define __sanitizer_syscall_pre_compat_43_oquota() \ + __sanitizer_syscall_pre_impl_compat_43_oquota() +#define __sanitizer_syscall_post_compat_43_oquota(res) \ + __sanitizer_syscall_post_impl_compat_43_oquota(res) +#define __sanitizer_syscall_pre_compat_43_ogetsockname(fdec, asa, alen) \ + __sanitizer_syscall_pre_impl_compat_43_ogetsockname( \ + (long long)(fdec), (long long)(asa), (long long)(alen)) +#define __sanitizer_syscall_post_compat_43_ogetsockname(res, fdec, asa, alen) \ + __sanitizer_syscall_post_impl_compat_43_ogetsockname( \ + res, (long long)(fdec), (long long)(asa), (long long)(alen)) +/* syscall 151 has been skipped */ +/* syscall 152 has been skipped */ +/* syscall 153 has been skipped */ +/* syscall 154 has been skipped */ +#define __sanitizer_syscall_pre_nfssvc(flag, argp) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 11 19:12:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFD5313100AB; Tue, 11 Dec 2018 19:12:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7827B8714C; Tue, 11 Dec 2018 19:12:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 591D74407; Tue, 11 Dec 2018 19:12:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBJCjJr059558; Tue, 11 Dec 2018 19:12:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBJCj7H059557; Tue, 11 Dec 2018 19:12:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201812111912.wBBJCj7H059557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 11 Dec 2018 19:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341826 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 341826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7827B8714C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.54)[-0.541,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 19:12:46 -0000 Author: gjb Date: Tue Dec 11 19:12:44 2018 New Revision: 341826 URL: https://svnweb.freebsd.org/changeset/base/341826 Log: Call stable/12 -STABLE now that 12.0-RELEASE is out. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/conf/newvers.sh Modified: stable/12/sys/conf/newvers.sh ============================================================================== --- stable/12/sys/conf/newvers.sh Tue Dec 11 19:05:28 2018 (r341825) +++ stable/12/sys/conf/newvers.sh Tue Dec 11 19:12:44 2018 (r341826) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Tue Dec 11 19:32:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B678131123C; Tue, 11 Dec 2018 19:32:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCAE36837F; Tue, 11 Dec 2018 19:32:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE95D4788; Tue, 11 Dec 2018 19:32:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBJWN2K069895; Tue, 11 Dec 2018 19:32:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBJWHhh067846; Tue, 11 Dec 2018 19:32:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812111932.wBBJWHhh067846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Dec 2018 19:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341827 - in head/sys: cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/fs/zfs compat/linux dev/filemon fs/ext2fs fs/fuse fs/msdosfs fs/nandfs fs/nfs fs/nfsserver fs/tmp... X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/fs/zfs compat/linux dev/filemon fs/ext2fs fs/fuse fs/msdosfs fs/nandfs fs/nfs fs/nfsserver fs/tmpfs kern net netinet netin... X-SVN-Commit-Revision: 341827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CCAE36837F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.50 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.50)[-0.498,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 19:32:24 -0000 Author: mjg Date: Tue Dec 11 19:32:16 2018 New Revision: 341827 URL: https://svnweb.freebsd.org/changeset/base/341827 Log: Remove unused argument to priv_check_cred. Patch mostly generated with cocinnelle: @@ expression E1,E2; @@ - priv_check_cred(E1,E2,0) + priv_check_cred(E1,E2) Sponsored by: The FreeBSD Foundation Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c head/sys/cddl/compat/opensolaris/kern/opensolaris_zone.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_uid16.c head/sys/dev/filemon/filemon_wrapper.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/fuse/fuse_internal.c head/sys/fs/fuse/fuse_vnops.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nandfs/nandfs_vnops.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/kern_exec.c head/sys/kern/kern_fork.c head/sys/kern/kern_priv.c head/sys/kern/kern_prot.c head/sys/kern/subr_acl_nfs4.c head/sys/kern/subr_acl_posix1e.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sem.c head/sys/kern/uipc_shm.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_subr.c head/sys/kern/vfs_syscalls.c head/sys/net/if_tap.c head/sys/net/if_tun.c head/sys/netinet/in_pcb.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/ip6_output.c head/sys/netipsec/ipsec_pcb.c head/sys/netsmb/smb_subr.h head/sys/security/audit/audit_syscalls.c head/sys/security/mac/mac_net.c head/sys/security/mac_bsdextended/mac_bsdextended.c head/sys/security/mac_lomac/mac_lomac.c head/sys/security/mac_partition/mac_partition.c head/sys/security/mac_portacl/mac_portacl.c head/sys/security/mac_seeotheruids/mac_seeotheruids.c head/sys/sys/priv.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ufs/ufs_quota.c head/sys/ufs/ufs/ufs_vnops.c head/sys/vm/vm_mmap.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c Tue Dec 11 19:32:16 2018 (r341827) @@ -41,35 +41,35 @@ int secpolicy_nfs(cred_t *cr) { - return (priv_check_cred(cr, PRIV_NFS_DAEMON, 0)); + return (priv_check_cred(cr, PRIV_NFS_DAEMON)); } int secpolicy_zfs(cred_t *cr) { - return (priv_check_cred(cr, PRIV_VFS_MOUNT, 0)); + return (priv_check_cred(cr, PRIV_VFS_MOUNT)); } int secpolicy_sys_config(cred_t *cr, int checkonly __unused) { - return (priv_check_cred(cr, PRIV_ZFS_POOL_CONFIG, 0)); + return (priv_check_cred(cr, PRIV_ZFS_POOL_CONFIG)); } int secpolicy_zinject(cred_t *cr) { - return (priv_check_cred(cr, PRIV_ZFS_INJECT, 0)); + return (priv_check_cred(cr, PRIV_ZFS_INJECT)); } int secpolicy_fs_unmount(cred_t *cr, struct mount *vfsp __unused) { - return (priv_check_cred(cr, PRIV_VFS_UNMOUNT, 0)); + return (priv_check_cred(cr, PRIV_VFS_UNMOUNT)); } int @@ -97,7 +97,7 @@ secpolicy_basic_link(vnode_t *vp, cred_t *cr) return (0); if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - return (priv_check_cred(cr, PRIV_VFS_LINK, 0)); + return (priv_check_cred(cr, PRIV_VFS_LINK)); } int @@ -113,7 +113,7 @@ secpolicy_vnode_remove(vnode_t *vp, cred_t *cr) if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - return (priv_check_cred(cr, PRIV_VFS_ADMIN, 0)); + return (priv_check_cred(cr, PRIV_VFS_ADMIN)); } int @@ -123,18 +123,18 @@ secpolicy_vnode_access(cred_t *cr, vnode_t *vp, uid_t if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - if ((accmode & VREAD) && priv_check_cred(cr, PRIV_VFS_READ, 0) != 0) + if ((accmode & VREAD) && priv_check_cred(cr, PRIV_VFS_READ) != 0) return (EACCES); if ((accmode & VWRITE) && - priv_check_cred(cr, PRIV_VFS_WRITE, 0) != 0) { + priv_check_cred(cr, PRIV_VFS_WRITE) != 0) { return (EACCES); } if (accmode & VEXEC) { if (vp->v_type == VDIR) { - if (priv_check_cred(cr, PRIV_VFS_LOOKUP, 0) != 0) + if (priv_check_cred(cr, PRIV_VFS_LOOKUP) != 0) return (EACCES); } else { - if (priv_check_cred(cr, PRIV_VFS_EXEC, 0) != 0) + if (priv_check_cred(cr, PRIV_VFS_EXEC) != 0) return (EACCES); } } @@ -192,7 +192,7 @@ secpolicy_vnode_any_access(cred_t *cr, vnode_t *vp, ui continue; break; } - if (priv_check_cred(cr, priv, 0) == 0) + if (priv_check_cred(cr, priv) == 0) return (0); } return (EPERM); @@ -206,7 +206,7 @@ secpolicy_vnode_setdac(vnode_t *vp, cred_t *cr, uid_t return (0); if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - return (priv_check_cred(cr, PRIV_VFS_ADMIN, 0)); + return (priv_check_cred(cr, PRIV_VFS_ADMIN)); } int @@ -256,7 +256,7 @@ secpolicy_vnode_setattr(cred_t *cr, vnode_t *vp, struc ((mask & AT_GID) && vap->va_gid != ovap->va_gid && !groupmember(vap->va_gid, cr))) { if (secpolicy_fs_owner(vp->v_mount, cr) != 0) { - error = priv_check_cred(cr, PRIV_VFS_CHOWN, 0); + error = priv_check_cred(cr, PRIV_VFS_CHOWN); if (error) return (error); } @@ -300,7 +300,7 @@ secpolicy_vnode_setids_setgids(vnode_t *vp, cred_t *cr return (0); if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - return (priv_check_cred(cr, PRIV_VFS_SETGID, 0)); + return (priv_check_cred(cr, PRIV_VFS_SETGID)); } int @@ -310,7 +310,7 @@ secpolicy_vnode_setid_retain(vnode_t *vp, cred_t *cr, if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - return (priv_check_cred(cr, PRIV_VFS_RETAINSUGID, 0)); + return (priv_check_cred(cr, PRIV_VFS_RETAINSUGID)); } void @@ -321,7 +321,7 @@ secpolicy_setid_clear(struct vattr *vap, vnode_t *vp, return; if ((vap->va_mode & (S_ISUID | S_ISGID)) != 0) { - if (priv_check_cred(cr, PRIV_VFS_RETAINSUGID, 0)) { + if (priv_check_cred(cr, PRIV_VFS_RETAINSUGID)) { vap->va_mask |= AT_MODE; vap->va_mode &= ~(S_ISUID|S_ISGID); } @@ -343,7 +343,7 @@ secpolicy_setid_setsticky_clear(vnode_t *vp, struct va * is not a member of. Both of these are allowed in jail(8). */ if (vp->v_type != VDIR && (vap->va_mode & S_ISTXT)) { - if (priv_check_cred(cr, PRIV_VFS_STICKYFILE, 0)) + if (priv_check_cred(cr, PRIV_VFS_STICKYFILE)) return (EFTYPE); } /* @@ -359,7 +359,7 @@ secpolicy_setid_setsticky_clear(vnode_t *vp, struct va * Deny setting setuid if we are not the file owner. */ if ((vap->va_mode & S_ISUID) && ovap->va_uid != cr->cr_uid) { - error = priv_check_cred(cr, PRIV_VFS_ADMIN, 0); + error = priv_check_cred(cr, PRIV_VFS_ADMIN); if (error) return (error); } @@ -370,7 +370,7 @@ int secpolicy_fs_mount(cred_t *cr, vnode_t *mvp, struct mount *vfsp) { - return (priv_check_cred(cr, PRIV_VFS_MOUNT, 0)); + return (priv_check_cred(cr, PRIV_VFS_MOUNT)); } int @@ -383,7 +383,7 @@ secpolicy_vnode_owner(vnode_t *vp, cred_t *cr, uid_t o return (0); /* XXX: vfs_suser()? */ - return (priv_check_cred(cr, PRIV_VFS_MOUNT_OWNER, 0)); + return (priv_check_cred(cr, PRIV_VFS_MOUNT_OWNER)); } int @@ -392,14 +392,14 @@ secpolicy_vnode_chown(vnode_t *vp, cred_t *cr, uid_t o if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - return (priv_check_cred(cr, PRIV_VFS_CHOWN, 0)); + return (priv_check_cred(cr, PRIV_VFS_CHOWN)); } void secpolicy_fs_mount_clearopts(cred_t *cr, struct mount *vfsp) { - if (priv_check_cred(cr, PRIV_VFS_MOUNT_NONUSER, 0) != 0) { + if (priv_check_cred(cr, PRIV_VFS_MOUNT_NONUSER) != 0) { MNT_ILOCK(vfsp); vfsp->vfs_flag |= VFS_NOSETUID | MNT_USER; vfs_clearmntopt(vfsp, MNTOPT_SETUID); @@ -418,12 +418,12 @@ secpolicy_xvattr(vnode_t *vp, xvattr_t *xvap, uid_t ow if (secpolicy_fs_owner(vp->v_mount, cr) == 0) return (0); - return (priv_check_cred(cr, PRIV_VFS_SYSFLAGS, 0)); + return (priv_check_cred(cr, PRIV_VFS_SYSFLAGS)); } int secpolicy_smb(cred_t *cr) { - return (priv_check_cred(cr, PRIV_NETSMB, 0)); + return (priv_check_cred(cr, PRIV_NETSMB)); } Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_zone.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_zone.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_zone.c Tue Dec 11 19:32:16 2018 (r341827) @@ -63,7 +63,7 @@ zone_dataset_attach(struct ucred *cred, const char *da struct prison *pr; int dofree, error; - if ((error = priv_check_cred(cred, PRIV_ZFS_JAIL, 0)) != 0) + if ((error = priv_check_cred(cred, PRIV_ZFS_JAIL)) != 0) return (error); /* Allocate memory before we grab prison's mutex. */ @@ -115,7 +115,7 @@ zone_dataset_detach(struct ucred *cred, const char *da struct prison *pr; int error; - if ((error = priv_check_cred(cred, PRIV_ZFS_JAIL, 0)) != 0) + if ((error = priv_check_cred(cred, PRIV_ZFS_JAIL)) != 0) return (error); sx_slock(&allprison_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Dec 11 19:32:16 2018 (r341827) @@ -5205,7 +5205,7 @@ zfs_freebsd_setattr(ap) * otherwise, they behave like unprivileged processes. */ if (secpolicy_fs_owner(vp->v_mount, cred) == 0 || - priv_check_cred(cred, PRIV_VFS_SYSFLAGS, 0) == 0) { + priv_check_cred(cred, PRIV_VFS_SYSFLAGS) == 0) { if (zflags & (ZFS_IMMUTABLE | ZFS_APPENDONLY | ZFS_NOUNLINK)) { error = securelevel_gt(cred, 0); Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/compat/linux/linux_misc.c Tue Dec 11 19:32:16 2018 (r341827) @@ -1336,7 +1336,7 @@ linux_setgroups(struct thread *td, struct linux_setgro * Keep cr_groups[0] unchanged to prevent that. */ - if ((error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS, 0)) != 0) { + if ((error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS)) != 0) { PROC_UNLOCK(p); crfree(newcred); goto out; Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/compat/linux/linux_uid16.c Tue Dec 11 19:32:16 2018 (r341827) @@ -192,7 +192,7 @@ linux_setgroups16(struct thread *td, struct linux_setg * Keep cr_groups[0] unchanged to prevent that. */ - if ((error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS, 0)) != 0) { + if ((error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS)) != 0) { PROC_UNLOCK(p); crfree(newcred); Modified: head/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- head/sys/dev/filemon/filemon_wrapper.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/dev/filemon/filemon_wrapper.c Tue Dec 11 19:32:16 2018 (r341827) @@ -129,8 +129,7 @@ filemon_event_process_exec(void *arg __unused, struct /* If the credentials changed then cease tracing. */ if (imgp->newcred != NULL && imgp->credential_setid && - priv_check_cred(filemon->cred, - PRIV_DEBUG_DIFFCRED, 0) != 0) { + priv_check_cred(filemon->cred, PRIV_DEBUG_DIFFCRED) != 0) { /* * It may have changed to NULL already, but * will not be re-attached by anything else. Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/ext2fs/ext2_vnops.c Tue Dec 11 19:32:16 2018 (r341827) @@ -420,7 +420,7 @@ ext2_setattr(struct vop_setattr_args *ap) * Privileged non-jail processes may not modify system flags * if securelevel > 0 and any existing system flags are set. */ - if (!priv_check_cred(cred, PRIV_VFS_SYSFLAGS, 0)) { + if (!priv_check_cred(cred, PRIV_VFS_SYSFLAGS)) { if (ip->i_flags & (SF_IMMUTABLE | SF_APPEND)) { error = securelevel_gt(cred, 0); if (error) @@ -531,12 +531,12 @@ ext2_chmod(struct vnode *vp, int mode, struct ucred *c * process is not a member of. */ if (vp->v_type != VDIR && (mode & S_ISTXT)) { - error = priv_check_cred(cred, PRIV_VFS_STICKYFILE, 0); + error = priv_check_cred(cred, PRIV_VFS_STICKYFILE); if (error) return (EFTYPE); } if (!groupmember(ip->i_gid, cred) && (mode & ISGID)) { - error = priv_check_cred(cred, PRIV_VFS_SETGID, 0); + error = priv_check_cred(cred, PRIV_VFS_SETGID); if (error) return (error); } @@ -576,7 +576,7 @@ ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, str */ if (uid != ip->i_uid || (gid != ip->i_gid && !groupmember(gid, cred))) { - error = priv_check_cred(cred, PRIV_VFS_CHOWN, 0); + error = priv_check_cred(cred, PRIV_VFS_CHOWN); if (error) return (error); } @@ -586,7 +586,7 @@ ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, str ip->i_uid = uid; ip->i_flag |= IN_CHANGE; if ((ip->i_mode & (ISUID | ISGID)) && (ouid != uid || ogid != gid)) { - if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID, 0) != 0) + if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID) != 0) ip->i_mode &= ~(ISUID | ISGID); } return (0); @@ -1983,7 +1983,7 @@ ext2_makeinode(int mode, struct vnode *dvp, struct vno tvp->v_type = IFTOVT(mode); /* Rest init'd in getnewvnode(). */ ip->i_nlink = 1; if ((ip->i_mode & ISGID) && !groupmember(ip->i_gid, cnp->cn_cred)) { - if (priv_check_cred(cnp->cn_cred, PRIV_VFS_RETAINSUGID, 0)) + if (priv_check_cred(cnp->cn_cred, PRIV_VFS_RETAINSUGID)) ip->i_mode &= ~ISGID; } @@ -2311,7 +2311,7 @@ ext2_write(struct vop_write_args *ap) */ if ((ip->i_mode & (ISUID | ISGID)) && resid > uio->uio_resid && ap->a_cred) { - if (priv_check_cred(ap->a_cred, PRIV_VFS_RETAINSUGID, 0)) + if (priv_check_cred(ap->a_cred, PRIV_VFS_RETAINSUGID)) ip->i_mode &= ~(ISUID | ISGID); } if (error) { Modified: head/sys/fs/fuse/fuse_internal.c ============================================================================== --- head/sys/fs/fuse/fuse_internal.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/fuse/fuse_internal.c Tue Dec 11 19:32:16 2018 (r341827) @@ -171,7 +171,7 @@ fuse_internal_access(struct vnode *vp, return 0; } if ((mode & VADMIN) != 0) { - err = priv_check_cred(cred, PRIV_VFS_ADMIN, 0); + err = priv_check_cred(cred, PRIV_VFS_ADMIN); if (err) { return err; } Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/fuse/fuse_vnops.c Tue Dec 11 19:32:16 2018 (r341827) @@ -242,7 +242,7 @@ fuse_vnop_access(struct vop_access_args *ap) } if (!(data->dataflags & FSESS_INITED)) { if (vnode_isvroot(vp)) { - if (priv_check_cred(cred, PRIV_VFS_ADMIN, 0) || + if (priv_check_cred(cred, PRIV_VFS_ADMIN) || (fuse_match_cred(data->daemoncred, cred) == 0)) { return 0; } Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Tue Dec 11 19:32:16 2018 (r341827) @@ -378,7 +378,7 @@ msdosfs_setattr(struct vop_setattr_args *ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); if (cred->cr_uid != pmp->pm_uid) { - error = priv_check_cred(cred, PRIV_VFS_ADMIN, 0); + error = priv_check_cred(cred, PRIV_VFS_ADMIN); if (error) return (error); } @@ -427,7 +427,7 @@ msdosfs_setattr(struct vop_setattr_args *ap) gid = pmp->pm_gid; if (cred->cr_uid != pmp->pm_uid || uid != pmp->pm_uid || (gid != pmp->pm_gid && !groupmember(gid, cred))) { - error = priv_check_cred(cred, PRIV_VFS_CHOWN, 0); + error = priv_check_cred(cred, PRIV_VFS_CHOWN); if (error) return (error); } @@ -498,7 +498,7 @@ msdosfs_setattr(struct vop_setattr_args *ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); if (cred->cr_uid != pmp->pm_uid) { - error = priv_check_cred(cred, PRIV_VFS_ADMIN, 0); + error = priv_check_cred(cred, PRIV_VFS_ADMIN); if (error) return (error); } Modified: head/sys/fs/nandfs/nandfs_vnops.c ============================================================================== --- head/sys/fs/nandfs/nandfs_vnops.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/nandfs/nandfs_vnops.c Tue Dec 11 19:32:16 2018 (r341827) @@ -721,11 +721,11 @@ nandfs_chmod(struct vnode *vp, int mode, struct ucred * jail(8). */ if (vp->v_type != VDIR && (mode & S_ISTXT)) { - if (priv_check_cred(cred, PRIV_VFS_STICKYFILE, 0)) + if (priv_check_cred(cred, PRIV_VFS_STICKYFILE)) return (EFTYPE); } if (!groupmember(inode->i_gid, cred) && (mode & ISGID)) { - error = priv_check_cred(cred, PRIV_VFS_SETGID, 0); + error = priv_check_cred(cred, PRIV_VFS_SETGID); if (error) return (error); } @@ -734,7 +734,7 @@ nandfs_chmod(struct vnode *vp, int mode, struct ucred * Deny setting setuid if we are not the file owner. */ if ((mode & ISUID) && inode->i_uid != cred->cr_uid) { - error = priv_check_cred(cred, PRIV_VFS_ADMIN, 0); + error = priv_check_cred(cred, PRIV_VFS_ADMIN); if (error) return (error); } @@ -777,7 +777,7 @@ nandfs_chown(struct vnode *vp, uid_t uid, gid_t gid, s */ if (((uid != inode->i_uid && uid != cred->cr_uid) || (gid != inode->i_gid && !groupmember(gid, cred))) && - (error = priv_check_cred(cred, PRIV_VFS_CHOWN, 0))) + (error = priv_check_cred(cred, PRIV_VFS_CHOWN))) return (error); ogid = inode->i_gid; ouid = inode->i_uid; @@ -788,7 +788,7 @@ nandfs_chown(struct vnode *vp, uid_t uid, gid_t gid, s node->nn_flags |= IN_CHANGE; if ((inode->i_mode & (ISUID | ISGID)) && (ouid != uid || ogid != gid)) { - if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID, 0)) + if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID)) inode->i_mode &= ~(ISUID | ISGID); } DPRINTF(VNCALL, ("%s: vp %p, cred %p, td %p - ret OK\n", __func__, vp, @@ -839,7 +839,7 @@ nandfs_setattr(struct vop_setattr_args *ap) */ flags = inode->i_flags; - if (!priv_check_cred(cred, PRIV_VFS_SYSFLAGS, 0)) { + if (!priv_check_cred(cred, PRIV_VFS_SYSFLAGS)) { if (flags & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) { error = securelevel_gt(cred, 0); if (error) Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Dec 11 19:32:16 2018 (r341827) @@ -1869,7 +1869,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, case NFSATTRBIT_QUOTAHARD: NFSM_DISSECT(tl, u_int32_t *, NFSX_HYPER); if (sbp != NULL) { - if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA, 0)) + if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA)) freenum = sbp->f_bfree; else freenum = sbp->f_bavail; @@ -1898,7 +1898,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, case NFSATTRBIT_QUOTASOFT: NFSM_DISSECT(tl, u_int32_t *, NFSX_HYPER); if (sbp != NULL) { - if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA, 0)) + if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA)) freenum = sbp->f_bfree; else freenum = sbp->f_bavail; @@ -2756,7 +2756,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount free(cp, M_NFSSTRING); break; case NFSATTRBIT_QUOTAHARD: - if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA, 0)) + if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA)) freenum = fs->f_bfree; else freenum = fs->f_bavail; @@ -2780,7 +2780,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount retnum += NFSX_HYPER; break; case NFSATTRBIT_QUOTASOFT: - if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA, 0)) + if (priv_check_cred(cred, PRIV_VFS_EXCEEDQUOTA)) freenum = fs->f_bfree; else freenum = fs->f_bavail; @@ -2832,7 +2832,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount break; case NFSATTRBIT_SPACEAVAIL: NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER); - if (priv_check_cred(cred, PRIV_VFS_BLOCKRESERVE, 0)) { + if (priv_check_cred(cred, PRIV_VFS_BLOCKRESERVE)) { if (pnfssf != NULL) uquad = (u_int64_t)pnfssf->f_bfree; else Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Tue Dec 11 19:32:16 2018 (r341827) @@ -996,8 +996,7 @@ nfsvno_createsub(struct nfsrv_descript *nd, struct nam if (nvap->na_type == VCHR && rdev == 0xffffffff) nvap->na_type = VFIFO; if (nvap->na_type != VFIFO && - (error = priv_check_cred(nd->nd_cred, - PRIV_VFS_MKNOD_DEV, 0))) { + (error = priv_check_cred(nd->nd_cred, PRIV_VFS_MKNOD_DEV))) { vrele(ndp->ni_startdir); nfsvno_relpathbuf(ndp); vput(ndp->ni_dvp); @@ -1091,7 +1090,7 @@ nfsvno_mknod(struct nameidata *ndp, struct nfsvattr *n nfsvno_relpathbuf(ndp); } else { if (nvap->na_type != VFIFO && - (error = priv_check_cred(cred, PRIV_VFS_MKNOD_DEV, 0))) { + (error = priv_check_cred(cred, PRIV_VFS_MKNOD_DEV))) { vrele(ndp->ni_startdir); nfsvno_relpathbuf(ndp); vput(ndp->ni_dvp); Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/tmpfs/tmpfs_subr.c Tue Dec 11 19:32:16 2018 (r341827) @@ -1522,7 +1522,7 @@ tmpfs_chflags(struct vnode *vp, u_long flags, struct u * Unprivileged processes are not permitted to unset system * flags, or modify flags if any system flags are set. */ - if (!priv_check_cred(cred, PRIV_VFS_SYSFLAGS, 0)) { + if (!priv_check_cred(cred, PRIV_VFS_SYSFLAGS)) { if (node->tn_flags & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) { error = securelevel_gt(cred, 0); @@ -1579,11 +1579,11 @@ tmpfs_chmod(struct vnode *vp, mode_t mode, struct ucre * process is not a member of. */ if (vp->v_type != VDIR && (mode & S_ISTXT)) { - if (priv_check_cred(cred, PRIV_VFS_STICKYFILE, 0)) + if (priv_check_cred(cred, PRIV_VFS_STICKYFILE)) return (EFTYPE); } if (!groupmember(node->tn_gid, cred) && (mode & S_ISGID)) { - error = priv_check_cred(cred, PRIV_VFS_SETGID, 0); + error = priv_check_cred(cred, PRIV_VFS_SETGID); if (error) return (error); } @@ -1649,7 +1649,7 @@ tmpfs_chown(struct vnode *vp, uid_t uid, gid_t gid, st */ if ((uid != node->tn_uid || (gid != node->tn_gid && !groupmember(gid, cred))) && - (error = priv_check_cred(cred, PRIV_VFS_CHOWN, 0))) + (error = priv_check_cred(cred, PRIV_VFS_CHOWN))) return (error); ogid = node->tn_gid; @@ -1661,7 +1661,7 @@ tmpfs_chown(struct vnode *vp, uid_t uid, gid_t gid, st node->tn_status |= TMPFS_NODE_CHANGED; if ((node->tn_mode & (S_ISUID | S_ISGID)) && (ouid != uid || ogid != gid)) { - if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID, 0)) + if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID)) node->tn_mode &= ~(S_ISUID | S_ISGID); } Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Tue Dec 11 19:32:16 2018 (r341827) @@ -523,7 +523,7 @@ tmpfs_write(struct vop_write_args *v) node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | TMPFS_NODE_CHANGED; if (node->tn_mode & (S_ISUID | S_ISGID)) { - if (priv_check_cred(v->a_cred, PRIV_VFS_RETAINSUGID, 0)) + if (priv_check_cred(v->a_cred, PRIV_VFS_RETAINSUGID)) node->tn_mode &= ~(S_ISUID | S_ISGID); } if (error != 0) Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/kern_exec.c Tue Dec 11 19:32:16 2018 (r341827) @@ -786,7 +786,7 @@ interpret: #ifdef KTRACE if (p->p_tracecred != NULL && - priv_check_cred(p->p_tracecred, PRIV_DEBUG_DIFFCRED, 0)) + priv_check_cred(p->p_tracecred, PRIV_DEBUG_DIFFCRED)) ktrprocexec(p, &tracecred, &tracevp); #endif /* Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/kern_fork.c Tue Dec 11 19:32:16 2018 (r341827) @@ -838,8 +838,7 @@ fork1(struct thread *td, struct fork_req *fr) * processes; don't let root exceed the limit. */ nprocs_new = atomic_fetchadd_int(&nprocs, 1) + 1; - if ((nprocs_new >= maxproc - 10 && priv_check_cred(td->td_ucred, - PRIV_MAXPROC, 0) != 0) || nprocs_new >= maxproc) { + if ((nprocs_new >= maxproc - 10 && priv_check_cred(td->td_ucred, PRIV_MAXPROC) != 0) || nprocs_new >= maxproc) { error = EAGAIN; sx_xlock(&allproc_lock); if (ppsratecheck(&lastfail, &curfail, 1)) { @@ -936,7 +935,7 @@ fork1(struct thread *td, struct fork_req *fr) * * XXXRW: Can we avoid privilege here if it's not needed? */ - error = priv_check_cred(td->td_ucred, PRIV_PROC_LIMIT, 0); + error = priv_check_cred(td->td_ucred, PRIV_PROC_LIMIT); if (error == 0) ok = chgproccnt(td->td_ucred->cr_ruidinfo, 1, 0); else { Modified: head/sys/kern/kern_priv.c ============================================================================== --- head/sys/kern/kern_priv.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/kern_priv.c Tue Dec 11 19:32:16 2018 (r341827) @@ -76,7 +76,7 @@ SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv__err, * only a few to grant it. */ int -priv_check_cred(struct ucred *cred, int priv, int flags) +priv_check_cred(struct ucred *cred, int priv) { int error; @@ -207,5 +207,5 @@ priv_check(struct thread *td, int priv) KASSERT(td == curthread, ("priv_check: td != curthread")); - return (priv_check_cred(td->td_ucred, priv, 0)); + return (priv_check_cred(td->td_ucred, priv)); } Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/kern_prot.c Tue Dec 11 19:32:16 2018 (r341827) @@ -518,7 +518,7 @@ sys_setuid(struct thread *td, struct setuid_args *uap) #ifdef POSIX_APPENDIX_B_4_2_2 /* Use BSD-compat clause from B.4.2.2 */ uid != oldcred->cr_uid && /* allow setuid(geteuid()) */ #endif - (error = priv_check_cred(oldcred, PRIV_CRED_SETUID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETUID)) != 0) goto fail; #ifdef _POSIX_SAVED_IDS @@ -531,7 +531,7 @@ sys_setuid(struct thread *td, struct setuid_args *uap) uid == oldcred->cr_uid || #endif /* We are using privs. */ - priv_check_cred(oldcred, PRIV_CRED_SETUID, 0) == 0) + priv_check_cred(oldcred, PRIV_CRED_SETUID) == 0) #endif { /* @@ -615,7 +615,7 @@ sys_seteuid(struct thread *td, struct seteuid_args *ua if (euid != oldcred->cr_ruid && /* allow seteuid(getuid()) */ euid != oldcred->cr_svuid && /* allow seteuid(saved uid) */ - (error = priv_check_cred(oldcred, PRIV_CRED_SETEUID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETEUID)) != 0) goto fail; /* @@ -682,7 +682,7 @@ sys_setgid(struct thread *td, struct setgid_args *uap) #ifdef POSIX_APPENDIX_B_4_2_2 /* Use BSD-compat clause from B.4.2.2 */ gid != oldcred->cr_groups[0] && /* allow setgid(getegid()) */ #endif - (error = priv_check_cred(oldcred, PRIV_CRED_SETGID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETGID)) != 0) goto fail; #ifdef _POSIX_SAVED_IDS @@ -695,7 +695,7 @@ sys_setgid(struct thread *td, struct setgid_args *uap) gid == oldcred->cr_groups[0] || #endif /* We are using privs. */ - priv_check_cred(oldcred, PRIV_CRED_SETGID, 0) == 0) + priv_check_cred(oldcred, PRIV_CRED_SETGID) == 0) #endif { /* @@ -764,7 +764,7 @@ sys_setegid(struct thread *td, struct setegid_args *ua if (egid != oldcred->cr_rgid && /* allow setegid(getgid()) */ egid != oldcred->cr_svgid && /* allow setegid(saved gid) */ - (error = priv_check_cred(oldcred, PRIV_CRED_SETEGID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETEGID)) != 0) goto fail; if (oldcred->cr_groups[0] != egid) { @@ -835,7 +835,7 @@ kern_setgroups(struct thread *td, u_int ngrp, gid_t *g goto fail; #endif - error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS, 0); + error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS); if (error) goto fail; @@ -898,7 +898,7 @@ sys_setreuid(struct thread *td, struct setreuid_args * ruid != oldcred->cr_svuid) || (euid != (uid_t)-1 && euid != oldcred->cr_uid && euid != oldcred->cr_ruid && euid != oldcred->cr_svuid)) && - (error = priv_check_cred(oldcred, PRIV_CRED_SETREUID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETREUID)) != 0) goto fail; if (euid != (uid_t)-1 && oldcred->cr_uid != euid) { @@ -970,7 +970,7 @@ sys_setregid(struct thread *td, struct setregid_args * rgid != oldcred->cr_svgid) || (egid != (gid_t)-1 && egid != oldcred->cr_groups[0] && egid != oldcred->cr_rgid && egid != oldcred->cr_svgid)) && - (error = priv_check_cred(oldcred, PRIV_CRED_SETREGID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETREGID)) != 0) goto fail; if (egid != (gid_t)-1 && oldcred->cr_groups[0] != egid) { @@ -1045,7 +1045,7 @@ sys_setresuid(struct thread *td, struct setresuid_args (suid != (uid_t)-1 && suid != oldcred->cr_ruid && suid != oldcred->cr_svuid && suid != oldcred->cr_uid)) && - (error = priv_check_cred(oldcred, PRIV_CRED_SETRESUID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETRESUID)) != 0) goto fail; if (euid != (uid_t)-1 && oldcred->cr_uid != euid) { @@ -1129,7 +1129,7 @@ sys_setresgid(struct thread *td, struct setresgid_args (sgid != (gid_t)-1 && sgid != oldcred->cr_rgid && sgid != oldcred->cr_svgid && sgid != oldcred->cr_groups[0])) && - (error = priv_check_cred(oldcred, PRIV_CRED_SETRESGID, 0)) != 0) + (error = priv_check_cred(oldcred, PRIV_CRED_SETRESGID)) != 0) goto fail; if (egid != (gid_t)-1 && oldcred->cr_groups[0] != egid) { @@ -1343,7 +1343,7 @@ cr_canseeotheruids(struct ucred *u1, struct ucred *u2) { if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) { - if (priv_check_cred(u1, PRIV_SEEOTHERUIDS, 0) != 0) + if (priv_check_cred(u1, PRIV_SEEOTHERUIDS) != 0) return (ESRCH); } return (0); @@ -1382,7 +1382,7 @@ cr_canseeothergids(struct ucred *u1, struct ucred *u2) break; } if (!match) { - if (priv_check_cred(u1, PRIV_SEEOTHERGIDS, 0) != 0) + if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) return (ESRCH); } } @@ -1530,7 +1530,7 @@ cr_cansignal(struct ucred *cred, struct proc *proc, in break; default: /* Not permitted without privilege. */ - error = priv_check_cred(cred, PRIV_SIGNAL_SUGID, 0); + error = priv_check_cred(cred, PRIV_SIGNAL_SUGID); if (error) return (error); } @@ -1544,7 +1544,7 @@ cr_cansignal(struct ucred *cred, struct proc *proc, in cred->cr_ruid != proc->p_ucred->cr_svuid && cred->cr_uid != proc->p_ucred->cr_ruid && cred->cr_uid != proc->p_ucred->cr_svuid) { - error = priv_check_cred(cred, PRIV_SIGNAL_DIFFCRED, 0); + error = priv_check_cred(cred, PRIV_SIGNAL_DIFFCRED); if (error) return (error); } Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/subr_acl_nfs4.c Tue Dec 11 19:32:16 2018 (r341827) @@ -259,8 +259,7 @@ vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_ * No match. Try to use privileges, if there are any. */ if (is_directory) { - if ((accmode & VEXEC) && !priv_check_cred(cred, - PRIV_VFS_LOOKUP, 0)) + if ((accmode & VEXEC) && !priv_check_cred(cred, PRIV_VFS_LOOKUP)) priv_granted |= VEXEC; } else { /* @@ -270,23 +269,23 @@ vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_ */ if ((accmode & VEXEC) && (file_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0 && - !priv_check_cred(cred, PRIV_VFS_EXEC, 0)) + !priv_check_cred(cred, PRIV_VFS_EXEC)) priv_granted |= VEXEC; } - if ((accmode & VREAD) && !priv_check_cred(cred, PRIV_VFS_READ, 0)) + if ((accmode & VREAD) && !priv_check_cred(cred, PRIV_VFS_READ)) priv_granted |= VREAD; if ((accmode & (VWRITE | VAPPEND | VDELETE_CHILD)) && - !priv_check_cred(cred, PRIV_VFS_WRITE, 0)) + !priv_check_cred(cred, PRIV_VFS_WRITE)) priv_granted |= (VWRITE | VAPPEND | VDELETE_CHILD); if ((accmode & VADMIN_PERMS) && - !priv_check_cred(cred, PRIV_VFS_ADMIN, 0)) + !priv_check_cred(cred, PRIV_VFS_ADMIN)) priv_granted |= VADMIN_PERMS; if ((accmode & VSTAT_PERMS) && - !priv_check_cred(cred, PRIV_VFS_STAT, 0)) + !priv_check_cred(cred, PRIV_VFS_STAT)) priv_granted |= VSTAT_PERMS; if ((accmode & priv_granted) == accmode) { Modified: head/sys/kern/subr_acl_posix1e.c ============================================================================== --- head/sys/kern/subr_acl_posix1e.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/subr_acl_posix1e.c Tue Dec 11 19:32:16 2018 (r341827) @@ -90,8 +90,7 @@ vaccess_acl_posix1e(enum vtype type, uid_t file_uid, g priv_granted = 0; if (type == VDIR) { - if ((accmode & VEXEC) && !priv_check_cred(cred, - PRIV_VFS_LOOKUP, 0)) + if ((accmode & VEXEC) && !priv_check_cred(cred, PRIV_VFS_LOOKUP)) priv_granted |= VEXEC; } else { /* @@ -101,18 +100,18 @@ vaccess_acl_posix1e(enum vtype type, uid_t file_uid, g */ if ((accmode & VEXEC) && (acl_posix1e_acl_to_mode(acl) & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0 && - !priv_check_cred(cred, PRIV_VFS_EXEC, 0)) + !priv_check_cred(cred, PRIV_VFS_EXEC)) priv_granted |= VEXEC; } - if ((accmode & VREAD) && !priv_check_cred(cred, PRIV_VFS_READ, 0)) + if ((accmode & VREAD) && !priv_check_cred(cred, PRIV_VFS_READ)) priv_granted |= VREAD; if (((accmode & VWRITE) || (accmode & VAPPEND)) && - !priv_check_cred(cred, PRIV_VFS_WRITE, 0)) + !priv_check_cred(cred, PRIV_VFS_WRITE)) priv_granted |= (VWRITE | VAPPEND); - if ((accmode & VADMIN) && !priv_check_cred(cred, PRIV_VFS_ADMIN, 0)) + if ((accmode & VADMIN) && !priv_check_cred(cred, PRIV_VFS_ADMIN)) priv_granted |= VADMIN; /* Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/uipc_mqueue.c Tue Dec 11 19:32:16 2018 (r341827) @@ -1032,7 +1032,7 @@ int do_unlink(struct mqfs_node *pn, struct ucred *ucre sx_assert(&pn->mn_info->mi_lock, SX_LOCKED); if (ucred->cr_uid != pn->mn_uid && - (error = priv_check_cred(ucred, PRIV_MQ_ADMIN, 0)) != 0) + (error = priv_check_cred(ucred, PRIV_MQ_ADMIN)) != 0) error = EACCES; else if (!pn->mn_deleted) { parent = pn->mn_parent; @@ -2581,7 +2581,7 @@ mqf_chown(struct file *fp, uid_t uid, gid_t gid, struc gid = pn->mn_gid; if (((uid != pn->mn_uid && uid != active_cred->cr_uid) || (gid != pn->mn_gid && !groupmember(gid, active_cred))) && - (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN, 0))) + (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN))) goto out; pn->mn_uid = uid; pn->mn_gid = gid; Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/uipc_sem.c Tue Dec 11 19:32:16 2018 (r341827) @@ -242,7 +242,7 @@ ksem_chown(struct file *fp, uid_t uid, gid_t gid, stru gid = ks->ks_gid; if (((uid != ks->ks_uid && uid != active_cred->cr_uid) || (gid != ks->ks_gid && !groupmember(gid, active_cred))) && - (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN, 0))) + (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN))) goto out; ks->ks_uid = uid; ks->ks_gid = gid; @@ -364,7 +364,7 @@ ksem_access(struct ksem *ks, struct ucred *ucred) error = vaccess(VREG, ks->ks_mode, ks->ks_uid, ks->ks_gid, VREAD | VWRITE, ucred, NULL); if (error) - error = priv_check_cred(ucred, PRIV_SEM_WRITE, 0); + error = priv_check_cred(ucred, PRIV_SEM_WRITE); return (error); } Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/uipc_shm.c Tue Dec 11 19:32:16 2018 (r341827) @@ -968,7 +968,7 @@ shm_chown(struct file *fp, uid_t uid, gid_t gid, struc gid = shmfd->shm_gid; if (((uid != shmfd->shm_uid && uid != active_cred->cr_uid) || (gid != shmfd->shm_gid && !groupmember(gid, active_cred))) && - (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN, 0))) + (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN))) goto out; shmfd->shm_uid = uid; shmfd->shm_gid = gid; Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/vfs_mount.c Tue Dec 11 19:32:16 2018 (r341827) @@ -862,7 +862,7 @@ vfs_domount_first( */ error = VOP_GETATTR(vp, &va, td->td_ucred); if (error == 0 && va.va_uid != td->td_ucred->cr_uid) - error = priv_check_cred(td->td_ucred, PRIV_VFS_ADMIN, 0); + error = priv_check_cred(td->td_ucred, PRIV_VFS_ADMIN); if (error == 0) error = vinvalbuf(vp, V_SAVE, 0, 0); if (error == 0 && vp->v_type != VDIR) Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/vfs_subr.c Tue Dec 11 19:32:16 2018 (r341827) @@ -4469,7 +4469,7 @@ privcheck: * requests, instead of PRIV_VFS_EXEC. */ if ((accmode & VEXEC) && ((dac_granted & VEXEC) == 0) && - !priv_check_cred(cred, PRIV_VFS_LOOKUP, 0)) + !priv_check_cred(cred, PRIV_VFS_LOOKUP)) priv_granted |= VEXEC; } else { /* @@ -4479,20 +4479,20 @@ privcheck: */ if ((accmode & VEXEC) && ((dac_granted & VEXEC) == 0) && (file_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0 && - !priv_check_cred(cred, PRIV_VFS_EXEC, 0)) + !priv_check_cred(cred, PRIV_VFS_EXEC)) priv_granted |= VEXEC; } if ((accmode & VREAD) && ((dac_granted & VREAD) == 0) && - !priv_check_cred(cred, PRIV_VFS_READ, 0)) + !priv_check_cred(cred, PRIV_VFS_READ)) priv_granted |= VREAD; if ((accmode & VWRITE) && ((dac_granted & VWRITE) == 0) && - !priv_check_cred(cred, PRIV_VFS_WRITE, 0)) + !priv_check_cred(cred, PRIV_VFS_WRITE)) priv_granted |= (VWRITE | VAPPEND); if ((accmode & VADMIN) && ((dac_granted & VADMIN) == 0) && - !priv_check_cred(cred, PRIV_VFS_ADMIN, 0)) + !priv_check_cred(cred, PRIV_VFS_ADMIN)) priv_granted |= VADMIN; if ((accmode & (priv_granted | dac_granted)) == accmode) { @@ -4527,7 +4527,7 @@ extattr_check_cred(struct vnode *vp, int attrnamespace switch (attrnamespace) { case EXTATTR_NAMESPACE_SYSTEM: /* Potentially should be: return (EPERM); */ - return (priv_check_cred(cred, PRIV_VFS_EXTATTR_SYSTEM, 0)); + return (priv_check_cred(cred, PRIV_VFS_EXTATTR_SYSTEM)); case EXTATTR_NAMESPACE_USER: return (VOP_ACCESS(vp, accmode, cred, td)); default: Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/kern/vfs_syscalls.c Tue Dec 11 19:32:16 2018 (r341827) @@ -1484,13 +1484,13 @@ can_hardlink(struct vnode *vp, struct ucred *cred) return (error); if (hardlink_check_uid && cred->cr_uid != va.va_uid) { - error = priv_check_cred(cred, PRIV_VFS_LINK, 0); + error = priv_check_cred(cred, PRIV_VFS_LINK); if (error != 0) return (error); } if (hardlink_check_gid && !groupmember(va.va_gid, cred)) { - error = priv_check_cred(cred, PRIV_VFS_LINK, 0); + error = priv_check_cred(cred, PRIV_VFS_LINK); if (error != 0) return (error); } Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/net/if_tap.c Tue Dec 11 19:32:16 2018 (r341827) @@ -346,7 +346,7 @@ tapclone(void *arg, struct ucred *cred, char *name, in return; if (!tapdclone || - (!tapuopen && priv_check_cred(cred, PRIV_NET_IFCREATE, 0) != 0)) + (!tapuopen && priv_check_cred(cred, PRIV_NET_IFCREATE) != 0)) return; unit = 0; Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/net/if_tun.c Tue Dec 11 19:32:16 2018 (r341827) @@ -204,7 +204,7 @@ tunclone(void *arg, struct ucred *cred, char *name, in * If tun cloning is enabled, only the superuser can create an * interface. */ - if (!tundclone || priv_check_cred(cred, PRIV_NET_IFCREATE, 0) != 0) + if (!tundclone || priv_check_cred(cred, PRIV_NET_IFCREATE) != 0) return; if (strcmp(name, tunname) == 0) { Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/netinet/in_pcb.c Tue Dec 11 19:32:16 2018 (r341827) @@ -622,7 +622,7 @@ in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp last = V_ipport_hilastauto; lastport = &pcbinfo->ipi_lasthi; } else if (inp->inp_flags & INP_LOWPORT) { - error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, 0); + error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT); if (error) return (error); first = V_ipport_lowfirstauto; /* 1023 */ @@ -866,12 +866,10 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *n /* GROSS */ if (ntohs(lport) <= V_ipport_reservedhigh && ntohs(lport) >= V_ipport_reservedlow && - priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, - 0)) + priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT)) return (EACCES); if (!IN_MULTICAST(ntohl(sin->sin_addr.s_addr)) && - priv_check_cred(inp->inp_cred, - PRIV_NETINET_REUSEPORT, 0) != 0) { + priv_check_cred(inp->inp_cred, PRIV_NETINET_REUSEPORT) != 0) { t = in_pcblookup_local(pcbinfo, sin->sin_addr, lport, INPLOOKUP_WILDCARD, cred); /* Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Tue Dec 11 19:12:44 2018 (r341826) +++ head/sys/netinet6/in6_pcb.c Tue Dec 11 19:32:16 2018 (r341827) @@ -212,12 +212,10 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr *nam, /* GROSS */ if (ntohs(lport) <= V_ipport_reservedhigh && ntohs(lport) >= V_ipport_reservedlow && *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 11 19:34:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 205FF131139D; Tue, 11 Dec 2018 19:34:26 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBF6E69A2C; Tue, 11 Dec 2018 19:34:25 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CCE9479F; Tue, 11 Dec 2018 19:34:25 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBJYPw1070061; Tue, 11 Dec 2018 19:34:25 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBJYP8i070060; Tue, 11 Dec 2018 19:34:25 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201812111934.wBBJYP8i070060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 11 Dec 2018 19:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341828 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 341828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BBF6E69A2C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.54 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.54)[-0.541,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 19:34:26 -0000 Author: allanjude Date: Tue Dec 11 19:34:25 2018 New Revision: 341828 URL: https://svnweb.freebsd.org/changeset/base/341828 Log: MFC: r339289: Resolve a hang in ZFS during vnode reclaimation This is caused by a deadlock between zil_commit() and zfs_zget() Add a way for zfs_zget() to break out of the retry loop in the common case PR: 229614, 231117 Reported by: grembo, jhb, Andreas Sommer, others Relnotes: yes Sponsored by: Klara Systems Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Dec 11 19:32:16 2018 (r341827) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Dec 11 19:34:25 2018 (r341828) @@ -1155,15 +1155,27 @@ again: */ ASSERT3P(zp, !=, NULL); ASSERT3U(zp->z_id, ==, obj_num); - *zpp = zp; - vp = ZTOV(zp); + if (zp->z_unlinked) { + err = SET_ERROR(ENOENT); + } else { + vp = ZTOV(zp); + /* + * Don't let the vnode disappear after + * ZFS_OBJ_HOLD_EXIT. + */ + VN_HOLD(vp); + *zpp = zp; + err = 0; + } - /* Don't let the vnode disappear after ZFS_OBJ_HOLD_EXIT. */ - VN_HOLD(vp); - sa_buf_rele(db, NULL); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + if (err) { + getnewvnode_drop_reserve(); + return (err); + } + locked = VOP_ISLOCKED(vp); VI_LOCK(vp); if ((vp->v_iflag & VI_DOOMED) != 0 && @@ -1196,7 +1208,7 @@ again: } VI_UNLOCK(vp); getnewvnode_drop_reserve(); - return (0); + return (err); } /* From owner-svn-src-all@freebsd.org Tue Dec 11 19:34:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 466A113113D8; Tue, 11 Dec 2018 19:34:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85BD169AC1; Tue, 11 Dec 2018 19:34:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f48.google.com with SMTP id l14so12789448ioj.5; Tue, 11 Dec 2018 11:34:33 -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:reply-to :from:date:message-id:subject:to:cc; bh=ccFktZfQ6RKD+dfvN1UvWNkZydaBL8Qz5cWvjTpVU4E=; b=aCuEomZY9KL/vA4D/HzdIFkJ0eHo2EWhWu+MUYf3UmeXUtxvKAXCHR4It/8CErvbIY V5GSmDYAaGa6uZLwt24U31ifDFDYDrNg4W+8SDORBQ6MKNQZI0kZBPYT4UrzYmcNhEyI 1Ia9nOSHrKhVng9IqLpRCW3R/KCYjlbVfay7MPluQjn92h3prYp6thHLAjNcR2+5Rgo7 23pggSkB9puDOmmEXvuR76qvt+0RlkK1PPofrUl5E6d8kTFOajTvBTA6j/N3GYiWOalF b64UM3QDpGh29oTlJlyREMuxgrffrV3hcwa5ooyS5260okc+6b/8vbuFjfvkj+dNPm/B qZyw== X-Gm-Message-State: AA+aEWYYOUWv6fgkv2NfKxfNW9rMBECarDBQl34WPrfwo85uE9K7y1Eh 9GuOUagjiIjJlef8Ny/XXVBY9Vz9 X-Google-Smtp-Source: AFSGD/V9P+ME3XyJMKRtC47nmKyMNY51ENaAEyGK9q3yGAFTXUE65OKKjY5MNpEeSYRGnBPMhW8I3Q== X-Received: by 2002:a6b:919:: with SMTP id t25mr13726828ioi.207.1544556533422; Tue, 11 Dec 2018 11:28:53 -0800 (PST) Received: from mail-it1-f173.google.com (mail-it1-f173.google.com. [209.85.166.173]) by smtp.gmail.com with ESMTPSA id e68sm2432592ite.7.2018.12.11.11.28.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 11:28:53 -0800 (PST) Received: by mail-it1-f173.google.com with SMTP id z7so5392917iti.0; Tue, 11 Dec 2018 11:28:52 -0800 (PST) X-Received: by 2002:a24:5411:: with SMTP id t17mr3233212ita.32.1544556532832; Tue, 11 Dec 2018 11:28:52 -0800 (PST) MIME-Version: 1.0 References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> In-Reply-To: <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 11 Dec 2018 11:28:41 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r341803 - head/libexec/rc To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 85BD169AC1 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.48 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-3.92 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; RCVD_IN_DNSWL_NONE(0.00)[48.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.92)[ip: (-9.72), ipnet: 209.85.128.0/17(-3.54), asn: 15169(-1.27), country: US(-0.09)]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 19:34:34 -0000 On Tue, Dec 11, 2018 at 9:24 AM John Baldwin wrote: > list_vars is rarely used outside of > 'netif', so it probably doesn't make a measurable difference on bare metal. To clarify: It likely doesn't make a measurable difference *to boot times* on bare metal, but even on amd64 bare metal the time of list_vars itself is readily measurable; the 71% reduction quoted in the commit log was measured on amd64. Best, Conrad From owner-svn-src-all@freebsd.org Tue Dec 11 19:58:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D5331311F9B; Tue, 11 Dec 2018 19:58:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f194.google.com (mail-it1-f194.google.com [209.85.166.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA58C6A87B; Tue, 11 Dec 2018 19:58:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f194.google.com with SMTP id x124so11714217itd.1; Tue, 11 Dec 2018 11:58:08 -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:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=aEuwPC4FaunwQxgn0m+1EYcxN1LUBEKhv5IUiHJ/LM4=; b=SKsSXp1uitwzOya4kCW0pPihm4qqRA2WlE8elI1ilKq9nBj87bE9nn+tvaPkRQCZ55 z9rassUZs7eUYyFuIspGsp+yqYS0WIVCkTNpMw+12S5X157+OuihTjjqq8L71Izrf+2q sSP/sHweCNypGFt5R+9bxizjB0Gv+hX8cVUNwYjPHFA9bQgSD77/nS2fXso49SwgzUrh xNRJ/DjqOhgKoheooZtjS9JYJgwY0//Sm90a5sIOynG3RELm4Cu8nU8AojChIQmTQu4k siV858/QugEuO5qXf0pj88G9ef5fr3HScoupsxbvYr6YWhA9YAoODFJOYNX/ipS/kNkg et0Q== X-Gm-Message-State: AA+aEWYaPplj6074v+U6Q2twpyaStKgH1owpuRkx4f2ESzYLM11ibF+M Lnvl+h3MAvSv9pYfbiAy/JBy8l3y X-Google-Smtp-Source: AFSGD/X49iJgxcjvbOk9syKGm7dDbh4yXzXoyAoLzUIatyQ5a4jKu/rRahAUk5ESXY18H6xKlI+22g== X-Received: by 2002:a02:c88:: with SMTP id 8mr16529490jan.87.1544558287383; Tue, 11 Dec 2018 11:58:07 -0800 (PST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com. [209.85.166.49]) by smtp.gmail.com with ESMTPSA id t194sm9368852iof.3.2018.12.11.11.58.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 11:58:06 -0800 (PST) Received: by mail-io1-f49.google.com with SMTP id x6so12836190ioa.9; Tue, 11 Dec 2018 11:58:06 -0800 (PST) X-Received: by 2002:a6b:ee16:: with SMTP id i22mr13739435ioh.124.1544558286416; Tue, 11 Dec 2018 11:58:06 -0800 (PST) MIME-Version: 1.0 References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 11 Dec 2018 11:57:55 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r341803 - head/libexec/rc To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: BA58C6A87B X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.194 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-1.95 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; IP_SCORE(-0.98)[ipnet: 209.85.128.0/17(-3.54), asn: 15169(-1.27), country: US(-0.09)]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; RCVD_IN_DNSWL_NONE(0.00)[194.166.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[194.166.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 19:58:09 -0000 On Tue, Dec 11, 2018 at 10:04 AM Warner Losh wrote: > On Tue, Dec 11, 2018, 9:55 AM John Baldwin > >> The 'read' builtin in sh can't use buffering, so it is always going to b= e slow > > It can't use it because of pipes. The example from the parts of this that= was on IRC was basically: > > foo | (read bar; baz) > > Which reads one line into the bar variable and then sends the rest to the= bar command. It can't trivially, but it's not impossible. sh could play games and buffer its own use of stdin, and then open a fresh pipe for stdin of subsequent non-builtins, writing out unused portions of the buffer.[A] Some other alternatives that would require kernel support but are things we've talked about doing in the kernel before anyway: * If we had something like eBPF programs attached to IO, maybe sh's read built-in could push a small eBPF program into the kernel that determined how many bytes could be read from the pipe in a single syscall without reading too far. It's fairly trivial. Simply returning a number of bytes up to and including the first '\n' would be a fine, if sometimes conservative amount. (Input lines can be continued with a trailing backslash, except in -r mode, but as a first-cut approximation, reading-until-newline is probably good enough.)[B] * Heck, even just a read_until_newline(2) syscall would work and probably be more broadly useful than just sh(1). I don't think it passes the sniff test =E2=80=94 not general enough, and probably not someth= ing you want beginners stumbling across instead of fgets(3) =E2=80=94 but it'd = be fine, and there are other pipe-abusing programs that care about reading ASCII text lines without overconsuming input than just sh(1).[C] * If we had something like Linux's tee(2) system call (which is as it sounds =E2=80=94 tee(1) for pipes), sh(1)'s read built-in could tee(2) for buffering without impacting stdin, and read(2) stdin only when it knew how many bytes were consumed (or when the pipe buffer became full).[D] I suspect (C) would be the easiest to implement correctly, followed by (D). (B) is requires some architectural design and bikeshedding and the details on the kernel side are tricky. (A) would be a little tricky and probably require extensive changes to sh(1) itself, which is a risk to the base system. But it would not impact the kernel. Is there any interest in a tee(2)-like syscall? Thanks, Conrad From owner-svn-src-all@freebsd.org Tue Dec 11 20:35:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E12E13136DA; Tue, 11 Dec 2018 20:35:50 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F6B46C14F; Tue, 11 Dec 2018 20:35:50 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [76.77.180.168] (port=62566 helo=eskarina.lan) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1gWoku-000Eqn-4N; Tue, 11 Dec 2018 12:35:48 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r341803 - head/libexec/rc From: Devin Teske In-Reply-To: Date: Tue, 11 Dec 2018 12:35:46 -0800 Cc: Devin Teske , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> To: cem@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 3F6B46C14F X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.98 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.979,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 20:35:51 -0000 > On Dec 11, 2018, at 11:57 AM, Conrad Meyer wrote: >=20 > On Tue, Dec 11, 2018 at 10:04 AM Warner Losh wrote: >> On Tue, Dec 11, 2018, 9:55 AM John Baldwin >>=20 >>> The 'read' builtin in sh can't use buffering, so it is always going = to be slow >>=20 >> It can't use it because of pipes. The example from the parts of this = that was on IRC was basically: >>=20 >> foo | (read bar; baz) >>=20 >> Which reads one line into the bar variable and then sends the rest to = the bar command. >=20 > It can't trivially, but it's not impossible. sh could play games and > buffer its own use of stdin, and then open a fresh pipe for stdin of > subsequent non-builtins, writing out unused portions of the buffer.[A] >=20 > Some other alternatives that would require kernel support but are > things we've talked about doing in the kernel before anyway: >=20 > * If we had something like eBPF programs attached to IO, maybe sh's > read built-in could push a small eBPF program into the kernel that > determined how many bytes could be read from the pipe in a single > syscall without reading too far. It's fairly trivial. Simply > returning a number of bytes up to and including the first '\n' would > be a fine, if sometimes conservative amount. (Input lines can be > continued with a trailing backslash, except in -r mode, but as a > first-cut approximation, reading-until-newline is probably good > enough.)[B] >=20 > * Heck, even just a read_until_newline(2) syscall would work and > probably be more broadly useful than just sh(1). I don't think it > passes the sniff test =E2=80=94 not general enough, and probably not = something > you want beginners stumbling across instead of fgets(3) =E2=80=94 but = it'd be > fine, and there are other pipe-abusing programs that care about > reading ASCII text lines without overconsuming input than just > sh(1).[C] >=20 > * If we had something like Linux's tee(2) system call (which is as it > sounds =E2=80=94 tee(1) for pipes), sh(1)'s read built-in could tee(2) = for > buffering without impacting stdin, and read(2) stdin only when it knew > how many bytes were consumed (or when the pipe buffer became full).[D] >=20 > I suspect (C) would be the easiest to implement correctly, followed by > (D). (B) is requires some architectural design and bikeshedding and > the details on the kernel side are tricky. (A) would be a little > tricky and probably require extensive changes to sh(1) itself, which > is a risk to the base system. But it would not impact the kernel. >=20 > Is there any interest in a tee(2)-like syscall? >=20 Linux has vmsplice(2). I know jmg@ also expressed interest in having a vmsplice in FreeBSD. As for sh not being able to read more than a single byte at a time = because it could be reading from a pipe, what if it read into a buffer and = returned a line from the buffer. A subsequent read would return more data from = the buffer, ad nauseam until the buffer runs out -- in which case another = chunk is read to augment the data. This buffer could be expunged when stdin collapses (e.g., when the sub- shell completes. --=20 Devin= From owner-svn-src-all@freebsd.org Tue Dec 11 20:47:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC8611313DA9; Tue, 11 Dec 2018 20:47:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 741136C962; Tue, 11 Dec 2018 20:47:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 568B353BC; Tue, 11 Dec 2018 20:47:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBKl1ih007489; Tue, 11 Dec 2018 20:47:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBKl1aB007487; Tue, 11 Dec 2018 20:47:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201812112047.wBBKl1aB007487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Dec 2018 20:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341829 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 341829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 741136C962 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.75 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.75)[-0.747,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 20:47:02 -0000 Author: mav Date: Tue Dec 11 20:47:00 2018 New Revision: 341829 URL: https://svnweb.freebsd.org/changeset/base/341829 Log: Allow CTL device specification in bhyve virtio-scsi. There was a large refactoring done in CTL to allow multiple ioctl frontend ports (and respective devices) to be created, particularly for bhyve. Unfortunately, respective part of bhyve functionality got lost somehow from the original virtio-scsi commit. This change allows wanted device path to be specified in either of two ways: -s 6,virtio-scsi,/dev/cam/ctl1.1 -s 6,virtio-scsi,dev=/dev/cam/ctl2.3 If neither is specified, the default /dev/cam/ctl device is used. While there, remove per-queue CTL device opening, which makes no sense at this point. Reported by: wg Reviewed by: araujo MFC after: 3 days Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D18504 Modified: head/usr.sbin/bhyve/bhyve.8 head/usr.sbin/bhyve/pci_virtio_scsi.c Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Tue Dec 11 19:34:25 2018 (r341828) +++ head/usr.sbin/bhyve/bhyve.8 Tue Dec 11 20:47:00 2018 (r341829) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2018 +.Dd December 11, 2018 .Dt BHYVE 8 .Os .Sh NAME @@ -298,7 +298,16 @@ if not explicitly specified. .Pp SCSI devices: .Bl -tag -width 10n -.It Pa /dev/cam/ Ns Oo , Ns Ar port and initiator_id Oc +.It Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ns Oo , Ns Ar scsi-device-options Oc +.El +.Pp +The +.Ar scsi-device-options +are: +.Bl -tag -width 10n +.It Li iid= Ns Ar IID +Initiator ID to use when sending requests to specified CTL port. +The default value is 0. .El .Pp TTY devices: Modified: head/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_scsi.c Tue Dec 11 19:34:25 2018 (r341828) +++ head/usr.sbin/bhyve/pci_virtio_scsi.c Tue Dec 11 20:47:00 2018 (r341829) @@ -105,7 +105,6 @@ struct pci_vtscsi_config { struct pci_vtscsi_queue { struct pci_vtscsi_softc * vsq_sc; struct vqueue_info * vsq_vq; - int vsq_ctl_fd; pthread_mutex_t vsq_mtx; pthread_mutex_t vsq_qmtx; pthread_cond_t vsq_cv; @@ -529,7 +528,7 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, sbuf_delete(sb); } - err = ioctl(q->vsq_ctl_fd, CTL_IO, io); + err = ioctl(sc->vss_ctl_fd, CTL_IO, io); if (err != 0) { WPRINTF(("CTL_IO: err=%d (%s)\n", errno, strerror(errno))); cmd_wr->response = VIRTIO_SCSI_S_FAILURE; @@ -639,14 +638,8 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, int i; queue->vsq_sc = sc; - queue->vsq_ctl_fd = open("/dev/cam/ctl", O_RDWR); queue->vsq_vq = &sc->vss_vq[num + 2]; - if (queue->vsq_ctl_fd < 0) { - WPRINTF(("cannot open /dev/cam/ctl: %s\n", strerror(errno))); - return (-1); - } - pthread_mutex_init(&queue->vsq_mtx, NULL); pthread_mutex_init(&queue->vsq_qmtx, NULL); pthread_cond_init(&queue->vsq_cv, NULL); @@ -672,24 +665,34 @@ static int pci_vtscsi_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { struct pci_vtscsi_softc *sc; - char *optname = NULL; - char *opt; - int i; + char *opt, *optname; + const char *devname; + int i, optidx = 0; sc = calloc(1, sizeof(struct pci_vtscsi_softc)); - sc->vss_ctl_fd = open("/dev/cam/ctl", O_RDWR); + devname = "/dev/cam/ctl"; + while ((opt = strsep(&opts, ",")) != NULL) { + optname = strsep(&opt, "="); + if (opt == NULL && optidx == 0) { + if (optname[0] != 0) + devname = optname; + } else if (strcmp(optname, "dev") == 0 && opt != NULL) { + devname = opt; + } else if (strcmp(optname, "iid") == 0 && opt != NULL) { + sc->vss_iid = strtoul(opt, NULL, 10); + } else { + fprintf(stderr, "Invalid option %s\n", optname); + free(sc); + return (1); + } + optidx++; + } + sc->vss_ctl_fd = open(devname, O_RDWR); if (sc->vss_ctl_fd < 0) { - WPRINTF(("cannot open /dev/cam/ctl: %s\n", strerror(errno))); + WPRINTF(("cannot open %s: %s\n", devname, strerror(errno))); + free(sc); return (1); - } - - while ((opt = strsep(&opts, ",")) != NULL) { - if ((optname = strsep(&opt, "=")) != NULL) { - if (strcmp(optname, "iid") == 0) { - sc->vss_iid = strtoul(opt, NULL, 10); - } - } } vi_softc_linkup(&sc->vss_vs, &vtscsi_vi_consts, sc, pi, sc->vss_vq); From owner-svn-src-all@freebsd.org Tue Dec 11 20:56:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A2811314273; Tue, 11 Dec 2018 20:56:06 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2108A6D004; Tue, 11 Dec 2018 20:56:06 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 021C25588; Tue, 11 Dec 2018 20:56:06 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBKu5Vi012670; Tue, 11 Dec 2018 20:56:05 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBKu5fF012669; Tue, 11 Dec 2018 20:56:05 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201812112056.wBBKu5fF012669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Tue, 11 Dec 2018 20:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341830 - stable/12/sys/powerpc/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: stable/12/sys/powerpc/conf X-SVN-Commit-Revision: 341830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2108A6D004 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.75 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.75)[-0.753,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 20:56:06 -0000 Author: zeising (doc,ports committer) Date: Tue Dec 11 20:56:05 2018 New Revision: 341830 URL: https://svnweb.freebsd.org/changeset/base/341830 Log: MFC 340632 Enable evdev on ppc64 Enable evdev on ppc64 as well, similar to what was done for amd64 and i386 in r340387. Evdev can be used by X and is used by wayland to handle input devices. Approved by: mmacy Modified: stable/12/sys/powerpc/conf/GENERIC64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/12/sys/powerpc/conf/GENERIC64 Tue Dec 11 20:47:00 2018 (r341829) +++ stable/12/sys/powerpc/conf/GENERIC64 Tue Dec 11 20:56:05 2018 (r341830) @@ -227,3 +227,7 @@ device sound # Generic sound driver (required) device snd_ai2s # Apple I2S audio device snd_uaudio # USB Audio +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev From owner-svn-src-all@freebsd.org Tue Dec 11 21:01:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBE3F1314812; Tue, 11 Dec 2018 21:01:39 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83CCB6D572; Tue, 11 Dec 2018 21:01:39 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65C9755E9; Tue, 11 Dec 2018 21:01:39 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBL1djL013703; Tue, 11 Dec 2018 21:01:39 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBL1dwB013702; Tue, 11 Dec 2018 21:01:39 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201812112101.wBBL1dwB013702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Tue, 11 Dec 2018 21:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341831 - stable/12/sys/powerpc/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: stable/12/sys/powerpc/conf X-SVN-Commit-Revision: 341831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 83CCB6D572 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.75 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.75)[-0.753,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:01:40 -0000 Author: zeising (doc,ports committer) Date: Tue Dec 11 21:01:38 2018 New Revision: 341831 URL: https://svnweb.freebsd.org/changeset/base/341831 Log: MFC 340694: Enable evdev on ppc32 Enable evdev on ppc32 as well, similar to what was done i386 and amd64 in r340387 and ppc64 in r340632. Evdev can be used by X and is used by wayland to handle input devices. Approved by: jhibbits Modified: stable/12/sys/powerpc/conf/GENERIC Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/conf/GENERIC ============================================================================== --- stable/12/sys/powerpc/conf/GENERIC Tue Dec 11 20:56:05 2018 (r341830) +++ stable/12/sys/powerpc/conf/GENERIC Tue Dec 11 21:01:38 2018 (r341831) @@ -219,3 +219,8 @@ device sound # Generic sound driver (required) device snd_ai2s # Apple I2S audio device snd_davbus # Apple DAVBUS audio device snd_uaudio # USB Audio + +# evdev interface +options EVDEV_SUPPORT # evdev support in legacy drivers +device evdev # input event device support +device uinput # install /dev/uinput cdev From owner-svn-src-all@freebsd.org Tue Dec 11 21:07:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D52D1314CFC; Tue, 11 Dec 2018 21:07:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id CFEAF6DB29; Tue, 11 Dec 2018 21:07:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id F29151058798; Wed, 12 Dec 2018 08:07:47 +1100 (AEDT) Date: Wed, 12 Dec 2018 08:07:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Devin Teske , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r341803 - head/libexec/rc In-Reply-To: Message-ID: <20181212071210.L826@besplex.bde.org> References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=2YV7UqY5TkSZ53OTWUUA:9 a=KOuUgUcxiEPbkqpa:21 a=mwZBcAdhYNl40Ij3:21 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: CFEAF6DB29 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of brde@optusnet.com.au designates 211.29.132.249 as permitted sender) smtp.mailfrom=brde@optusnet.com.au X-Spamd-Result: default: False [-4.56 / 15.00]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:211.29.132.0/23]; FREEMAIL_FROM(0.00)[optusnet.com.au]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[optusnet.com.au]; RCPT_COUNT_FIVE(0.00)[6]; IP_SCORE(-3.27)[ip: (-8.70), ipnet: 211.28.0.0/14(-4.23), asn: 4804(-3.39), country: AU(-0.04)]; MX_GOOD(-0.01)[cached: extmail.optusnet.com.au]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; RCVD_NO_TLS_LAST(0.10)[]; RCVD_IN_DNSWL_LOW(-0.10)[249.132.29.211.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[optusnet.com.au]; ASN(0.00)[asn:4804, ipnet:211.28.0.0/14, country:AU]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:07:59 -0000 On Tue, 11 Dec 2018, John Baldwin wrote: > On 12/11/18 9:40 AM, Devin Teske wrote: >> ... >> Thank you for the background which was lost by the time I got to the phab. >> >> I can't help but ask though,... >> >> If it was noticed that read(2) processes the stream one byte at a time, >> why not just optimize read(2)? >> >> I'm afraid of the prospect of having to hunt down every instance of while-read, >> but if we can fix the underlying read(2) inefficiency then we make while-read OK. > > It's a system call. A CPU emulator has to do a lot of work for a system call > because it involves two mode switches (user -> kernel and back again). You > can't "fix" that as it's just a part of the CPU architecture. There's a reason > that stdio uses buffering by default, it's because system calls have overhead. > The 'read' builtin in sh can't use buffering, so it is always going to be > inefficient. Syscalls have always been well known to be slow, but slowness is relative. CPUs are thousands of times slower that in 1980, so systems should be able to crunch through a few MB of data read 1 byte at a time fast enough that no one notices the slowness, even when emulated. But software bloat is now outrunning CPU speed increases. Some bandwidths for reading 1 byte at a time run today on the same 2GHz CPU i386 UP hardware linux-2.1.128 kernel built in 1998: 2500k/sec linux-2.4.0t8 kernel built in 2000: 1720k/sec linux-2.6.10 kernel built in 2004: 1540k/sec FreeBSD-4 kernel built in 2007: 680k/sec FreeBSD-~5.2 kernel built in 2018: 700k/sec FreeBSD-11 kernel built in 2018: 720k/sec (SMP kernel) FreeBSD-pre12 kernel built in 2018: 540k/sec (SMP kernel) FreeBSD-13 kernel built in 2018: 170k/sec (SMP kernel) This is with all recent security-related pessimizations like ibrs turned off, except the main one for i386 is using separate address spaces for the kernel and userland and this cannot be turned off. This is what gives most of the recent slowdown factor of more than 3. This slowdown factor is close to 3 for large block sizes, since read() is so slow that it takes about the same time for all block sizes below a few hundred bytes. Network bandwidth has similar slowdowns for small packets starting in FreeBSD-4 (the old Linuxes have low enough syscall overhead for the NIC to saturate at 640 kpps before the CPU or 1 Gbps ethernet saturates). amd64 doesn't have the 3-fold slowdown from separate address spaces. Optimizing syscalls is not very important, but it is convenient for applications with bad buffering to not be very slow, and it is annoying to lose benchmarks by a factor of 2 in 1998 and 10 now. Bruce From owner-svn-src-all@freebsd.org Tue Dec 11 21:16:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28C7D131527C; Tue, 11 Dec 2018 21:16:10 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4D5F6E11A; Tue, 11 Dec 2018 21:16:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C07758F8; Tue, 11 Dec 2018 21:16:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBLG9NN023110; Tue, 11 Dec 2018 21:16:09 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBLG9a9023109; Tue, 11 Dec 2018 21:16:09 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201812112116.wBBLG9a9023109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 11 Dec 2018 21:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341832 - head/tools/build/options X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/tools/build/options X-SVN-Commit-Revision: 341832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4D5F6E11A X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.75 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.75)[-0.747,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:16:10 -0000 Author: bz Date: Tue Dec 11 21:16:09 2018 New Revision: 341832 URL: https://svnweb.freebsd.org/changeset/base/341832 Log: Remove a dead file. CVS was removed in r251794. Deleted: head/tools/build/options/WITHOUT_CVS From owner-svn-src-all@freebsd.org Tue Dec 11 21:22:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A595613158B1; Tue, 11 Dec 2018 21:22:30 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2CF6E90F; Tue, 11 Dec 2018 21:22:30 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 41AE314867; Tue, 11 Dec 2018 21:22:29 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id wBBLMSX5002323 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 11 Dec 2018 21:22:28 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id wBBLMR88002322; Tue, 11 Dec 2018 21:22:27 GMT (envelope-from phk) To: Bruce Evans cc: John Baldwin , Devin Teske , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r341803 - head/libexec/rc In-reply-to: <20181212071210.L826@besplex.bde.org> From: "Poul-Henning Kamp" References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> <20181212071210.L826@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2320.1544563347.1@critter.freebsd.dk> Date: Tue, 11 Dec 2018 21:22:27 +0000 Message-ID: <2321.1544563347@critter.freebsd.dk> X-Rspamd-Queue-Id: 3A2CF6E90F X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.97 / 15.00]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:22:30 -0000 -------- In message <20181212071210.L826@besplex.bde.org>, Bruce Evans writes: >But software bloat is now outrunning CPU speed increases. Some bandwidths >for reading 1 byte at a time run today on the same 2GHz CPU i386 UP hardware > >linux-2.1.128 kernel built in 1998: 2500k/sec >linux-2.4.0t8 kernel built in 2000: 1720k/sec >linux-2.6.10 kernel built in 2004: 1540k/sec >FreeBSD-4 kernel built in 2007: 680k/sec >FreeBSD-~5.2 kernel built in 2018: 700k/sec >FreeBSD-11 kernel built in 2018: 720k/sec (SMP kernel) >FreeBSD-pre12 kernel built in 2018: 540k/sec (SMP kernel) >FreeBSD-13 kernel built in 2018: 170k/sec (SMP kernel) It is not just software bloat, it is also caused by the deeper and deeper pile of kludges between what goes for a "CPU" these days and what counts as "RAM". -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-all@freebsd.org Tue Dec 11 21:44:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CB191316D8B; Tue, 11 Dec 2018 21:44:40 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23B6D6FC4C; Tue, 11 Dec 2018 21:44:40 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04F185E2F; Tue, 11 Dec 2018 21:44:40 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBLidrU038811; Tue, 11 Dec 2018 21:44:39 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBLidco038810; Tue, 11 Dec 2018 21:44:39 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812112144.wBBLidco038810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 11 Dec 2018 21:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341833 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 341833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 23B6D6FC4C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.75 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.75)[-0.747,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:44:40 -0000 Author: kp Date: Tue Dec 11 21:44:39 2018 New Revision: 341833 URL: https://svnweb.freebsd.org/changeset/base/341833 Log: pf: Prevent integer overflow in PF when calculating the adaptive timeout. Mainly states of established TCP connections would be affected resulting in immediate state removal once the number of states is bigger than adaptive.start. Disabling adaptive timeouts is a workaround to avoid this bug. Issue found and initial diff by Mathieu Blanc (mathieu.blanc at cea dot fr) Reported by: Andreas Longwitz Obtained from: OpenBSD MFC after: 2 weeks Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Dec 11 21:16:09 2018 (r341832) +++ head/sys/netpfil/pf/pf.c Tue Dec 11 21:44:39 2018 (r341833) @@ -1567,9 +1567,11 @@ pf_state_expires(const struct pf_state *state) states = V_pf_status.states; } if (end && states > start && start < end) { - if (states < end) - return (state->expire + timeout * (end - states) / - (end - start)); + if (states < end) { + timeout = (u_int64_t)timeout * (end - states) / + (end - start); + return (state->expire + timeout); + } else return (time_uptime); } From owner-svn-src-all@freebsd.org Tue Dec 11 21:45:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDD711316E3F; Tue, 11 Dec 2018 21:45:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A09D6FDD6; Tue, 11 Dec 2018 21:45:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B00C5E31; Tue, 11 Dec 2018 21:45:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBLjvgG038920; Tue, 11 Dec 2018 21:45:57 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBLjvcE038919; Tue, 11 Dec 2018 21:45:57 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812112145.wBBLjvcE038919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 11 Dec 2018 21:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341834 - head/tests/sys/netpfil/pf/ioctl X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf/ioctl X-SVN-Commit-Revision: 341834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6A09D6FDD6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.75 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.75)[-0.747,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:45:58 -0000 Author: kp Date: Tue Dec 11 21:45:56 2018 New Revision: 341834 URL: https://svnweb.freebsd.org/changeset/base/341834 Log: pf tests: ioctl tests require root rights Explicitly mark these tests as requiring root rights. We need to be able to open /dev/pf. Reported by: Marie Helene Kvello-Aune MFC after: 2 weeks Modified: head/tests/sys/netpfil/pf/ioctl/validation.c Modified: head/tests/sys/netpfil/pf/ioctl/validation.c ============================================================================== --- head/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 11 21:44:39 2018 (r341833) +++ head/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 11 21:45:56 2018 (r341834) @@ -61,7 +61,12 @@ common_init_tbl(struct pfr_table *tbl) tbl->pfrt_fback = 0; } -ATF_TC_WITHOUT_HEAD(addtables); +ATF_TC(addtables); +ATF_TC_HEAD(addtables, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(addtables, tc) { struct pfioc_table io; @@ -105,7 +110,12 @@ ATF_TC_BODY(addtables, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(deltables); +ATF_TC(deltables); +ATF_TC_HEAD(deltables, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(deltables, tc) { struct pfioc_table io; @@ -140,7 +150,12 @@ ATF_TC_BODY(deltables, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(gettables); +ATF_TC(gettables); +ATF_TC_HEAD(gettables, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(gettables, tc) { struct pfioc_table io; @@ -170,7 +185,12 @@ ATF_TC_BODY(gettables, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(gettstats); +ATF_TC(gettstats); +ATF_TC_HEAD(gettstats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(gettstats, tc) { struct pfioc_table io; @@ -200,7 +220,12 @@ ATF_TC_BODY(gettstats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(clrtstats); +ATF_TC(clrtstats); +ATF_TC_HEAD(clrtstats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(clrtstats, tc) { struct pfioc_table io; @@ -232,7 +257,12 @@ ATF_TC_BODY(clrtstats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(settflags); +ATF_TC(settflags); +ATF_TC_HEAD(settflags, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(settflags, tc) { struct pfioc_table io; @@ -264,7 +294,12 @@ ATF_TC_BODY(settflags, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(addaddrs); +ATF_TC(addaddrs); +ATF_TC_HEAD(addaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(addaddrs, tc) { struct pfioc_table io; @@ -291,7 +326,12 @@ ATF_TC_BODY(addaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(deladdrs); +ATF_TC(deladdrs); +ATF_TC_HEAD(deladdrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(deladdrs, tc) { struct pfioc_table io; @@ -318,7 +358,12 @@ ATF_TC_BODY(deladdrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(setaddrs); +ATF_TC(setaddrs); +ATF_TC_HEAD(setaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(setaddrs, tc) { struct pfioc_table io; @@ -345,7 +390,12 @@ ATF_TC_BODY(setaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(getaddrs); +ATF_TC(getaddrs); +ATF_TC_HEAD(getaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(getaddrs, tc) { struct pfioc_table io; @@ -374,7 +424,12 @@ ATF_TC_BODY(getaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(getastats); +ATF_TC(getastats); +ATF_TC_HEAD(getastats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(getastats, tc) { struct pfioc_table io; @@ -403,7 +458,12 @@ ATF_TC_BODY(getastats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(clrastats); +ATF_TC(clrastats); +ATF_TC_HEAD(clrastats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(clrastats, tc) { struct pfioc_table io; @@ -432,7 +492,12 @@ ATF_TC_BODY(clrastats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(tstaddrs); +ATF_TC(tstaddrs); +ATF_TC_HEAD(tstaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(tstaddrs, tc) { struct pfioc_table io; @@ -461,7 +526,12 @@ ATF_TC_BODY(tstaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(inadefine); +ATF_TC(inadefine); +ATF_TC_HEAD(inadefine, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(inadefine, tc) { struct pfioc_table io; @@ -490,7 +560,12 @@ ATF_TC_BODY(inadefine, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(igetifaces); +ATF_TC(igetifaces); +ATF_TC_HEAD(igetifaces, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(igetifaces, tc) { struct pfioc_iface io; @@ -516,7 +591,12 @@ ATF_TC_BODY(igetifaces, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(cxbegin); +ATF_TC(cxbegin); +ATF_TC_HEAD(cxbegin, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(cxbegin, tc) { struct pfioc_trans io; @@ -547,7 +627,12 @@ ATF_TC_BODY(cxbegin, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(cxrollback); +ATF_TC(cxrollback); +ATF_TC_HEAD(cxrollback, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(cxrollback, tc) { struct pfioc_trans io; @@ -578,7 +663,12 @@ ATF_TC_BODY(cxrollback, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(commit); +ATF_TC(commit); +ATF_TC_HEAD(commit, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(commit, tc) { struct pfioc_trans io; From owner-svn-src-all@freebsd.org Tue Dec 11 21:49:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E3B21316FB5; Tue, 11 Dec 2018 21:49:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5DCB6FFCF; Tue, 11 Dec 2018 21:49:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A27845E38; Tue, 11 Dec 2018 21:49:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBLnDUp039090; Tue, 11 Dec 2018 21:49:13 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBLnDZI039089; Tue, 11 Dec 2018 21:49:13 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812112149.wBBLnDZI039089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 11 Dec 2018 21:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341835 - head/tests/sys/netpfil/pf/ioctl X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf/ioctl X-SVN-Commit-Revision: 341835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C5DCB6FFCF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.75 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.75)[-0.747,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:49:14 -0000 Author: kp Date: Tue Dec 11 21:49:13 2018 New Revision: 341835 URL: https://svnweb.freebsd.org/changeset/base/341835 Log: pf tests: Use the ATF cleanup infrastructure in the ioctl tests Use ATF_TC_CLEANUP(), because that means the cleanup code will get called even if a test fails. Before it would only be executed if every test within the body succeeded. Reported by: Marie Helene Kvello-Aune MFC after: 2 weeks Modified: head/tests/sys/netpfil/pf/ioctl/validation.c Modified: head/tests/sys/netpfil/pf/ioctl/validation.c ============================================================================== --- head/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 11 21:45:56 2018 (r341834) +++ head/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 11 21:49:13 2018 (r341835) @@ -61,7 +61,7 @@ common_init_tbl(struct pfr_table *tbl) tbl->pfrt_fback = 0; } -ATF_TC(addtables); +ATF_TC_WITH_CLEANUP(addtables); ATF_TC_HEAD(addtables, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -106,11 +106,14 @@ ATF_TC_BODY(addtables, tc) io.pfrio_buffer = &tbls; ioctl(dev, DIOCRADDTABLES, &io); +} +ATF_TC_CLEANUP(addtables, tc) +{ COMMON_CLEANUP(); } -ATF_TC(deltables); +ATF_TC_WITH_CLEANUP(deltables); ATF_TC_HEAD(deltables, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -146,11 +149,14 @@ ATF_TC_BODY(deltables, tc) io.pfrio_buffer = NULL; if (ioctl(dev, DIOCRDELTABLES, &io) == 0) atf_tc_fail("Request with NULL buffer succeeded"); +} +ATF_TC_CLEANUP(deltables, tc) +{ COMMON_CLEANUP(); } -ATF_TC(gettables); +ATF_TC_WITH_CLEANUP(gettables); ATF_TC_HEAD(gettables, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -181,11 +187,14 @@ ATF_TC_BODY(gettables, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRGETTABLES, &io) != 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(gettables, tc) +{ COMMON_CLEANUP(); } -ATF_TC(gettstats); +ATF_TC_WITH_CLEANUP(gettstats); ATF_TC_HEAD(gettstats, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -216,11 +225,14 @@ ATF_TC_BODY(gettstats, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRGETTSTATS, &io) != 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(gettstats, tc) +{ COMMON_CLEANUP(); } -ATF_TC(clrtstats); +ATF_TC_WITH_CLEANUP(clrtstats); ATF_TC_HEAD(clrtstats, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -253,11 +265,14 @@ ATF_TC_BODY(clrtstats, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRCLRTSTATS, &io) != 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(clrtstats, tc) +{ COMMON_CLEANUP(); } -ATF_TC(settflags); +ATF_TC_WITH_CLEANUP(settflags); ATF_TC_HEAD(settflags, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -290,11 +305,14 @@ ATF_TC_BODY(settflags, tc) io.pfrio_size = 1 << 28; if (ioctl(dev, DIOCRSETTFLAGS, &io) != 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(settflags, tc) +{ COMMON_CLEANUP(); } -ATF_TC(addaddrs); +ATF_TC_WITH_CLEANUP(addaddrs); ATF_TC_HEAD(addaddrs, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -322,11 +340,14 @@ ATF_TC_BODY(addaddrs, tc) io.pfrio_size = 1 << 28; if (ioctl(dev, DIOCRADDADDRS, &io) == 0) atf_tc_fail("Reuqest with size 1 << 28 failed"); +} +ATF_TC_CLEANUP(addaddrs, tc) +{ COMMON_CLEANUP(); } -ATF_TC(deladdrs); +ATF_TC_WITH_CLEANUP(deladdrs); ATF_TC_HEAD(deladdrs, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -354,11 +375,14 @@ ATF_TC_BODY(deladdrs, tc) io.pfrio_size = 1 << 28; if (ioctl(dev, DIOCRDELADDRS, &io) == 0) atf_tc_fail("Reuqest with size 1 << 28 failed"); +} +ATF_TC_CLEANUP(deladdrs, tc) +{ COMMON_CLEANUP(); } -ATF_TC(setaddrs); +ATF_TC_WITH_CLEANUP(setaddrs); ATF_TC_HEAD(setaddrs, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -386,11 +410,14 @@ ATF_TC_BODY(setaddrs, tc) io.pfrio_size = 1 << 28; if (ioctl(dev, DIOCRSETADDRS, &io) == 0) atf_tc_fail("Reuqest with size 1 << 28 failed"); +} +ATF_TC_CLEANUP(setaddrs, tc) +{ COMMON_CLEANUP(); } -ATF_TC(getaddrs); +ATF_TC_WITH_CLEANUP(getaddrs); ATF_TC_HEAD(getaddrs, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -420,11 +447,14 @@ ATF_TC_BODY(getaddrs, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRGETADDRS, &io) == 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(getaddrs, tc) +{ COMMON_CLEANUP(); } -ATF_TC(getastats); +ATF_TC_WITH_CLEANUP(getastats); ATF_TC_HEAD(getastats, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -454,11 +484,14 @@ ATF_TC_BODY(getastats, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRGETASTATS, &io) == 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(getastats, tc) +{ COMMON_CLEANUP(); } -ATF_TC(clrastats); +ATF_TC_WITH_CLEANUP(clrastats); ATF_TC_HEAD(clrastats, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -488,11 +521,14 @@ ATF_TC_BODY(clrastats, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRCLRASTATS, &io) == 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(clrastats, tc) +{ COMMON_CLEANUP(); } -ATF_TC(tstaddrs); +ATF_TC_WITH_CLEANUP(tstaddrs); ATF_TC_HEAD(tstaddrs, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -522,11 +558,14 @@ ATF_TC_BODY(tstaddrs, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRTSTADDRS, &io) == 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(tstaddrs, tc) +{ COMMON_CLEANUP(); } -ATF_TC(inadefine); +ATF_TC_WITH_CLEANUP(inadefine); ATF_TC_HEAD(inadefine, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -556,11 +595,14 @@ ATF_TC_BODY(inadefine, tc) io.pfrio_size = 1 << 24; if (ioctl(dev, DIOCRINADEFINE, &io) == 0) atf_tc_fail("Request with size 1 << 24 failed"); +} +ATF_TC_CLEANUP(inadefine, tc) +{ COMMON_CLEANUP(); } -ATF_TC(igetifaces); +ATF_TC_WITH_CLEANUP(igetifaces); ATF_TC_HEAD(igetifaces, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -587,11 +629,14 @@ ATF_TC_BODY(igetifaces, tc) io.pfiio_size = 1 << 31; if (ioctl(dev, DIOCIGETIFACES, &io) == 0) atf_tc_fail("request with size 1 << 31 succeeded"); +} +ATF_TC_CLEANUP(igetifaces, tc) +{ COMMON_CLEANUP(); } -ATF_TC(cxbegin); +ATF_TC_WITH_CLEANUP(cxbegin); ATF_TC_HEAD(cxbegin, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -623,11 +668,14 @@ ATF_TC_BODY(cxbegin, tc) io.array = NULL; if (ioctl(dev, DIOCXBEGIN, &io) == 0) atf_tc_fail("request with size -1 succeeded"); +} +ATF_TC_CLEANUP(cxbegin, tc) +{ COMMON_CLEANUP(); } -ATF_TC(cxrollback); +ATF_TC_WITH_CLEANUP(cxrollback); ATF_TC_HEAD(cxrollback, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -659,11 +707,14 @@ ATF_TC_BODY(cxrollback, tc) io.array = NULL; if (ioctl(dev, DIOCXROLLBACK, &io) == 0) atf_tc_fail("request with size -1 succeeded"); +} +ATF_TC_CLEANUP(cxrollback, tc) +{ COMMON_CLEANUP(); } -ATF_TC(commit); +ATF_TC_WITH_CLEANUP(commit); ATF_TC_HEAD(commit, tc) { atf_tc_set_md_var(tc, "require.user", "root"); @@ -695,7 +746,10 @@ ATF_TC_BODY(commit, tc) io.array = NULL; if (ioctl(dev, DIOCXCOMMIT, &io) == 0) atf_tc_fail("request with size -1 succeeded"); +} +ATF_TC_CLEANUP(commit, tc) +{ COMMON_CLEANUP(); } From owner-svn-src-all@freebsd.org Tue Dec 11 21:55:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7EEC1317368; Tue, 11 Dec 2018 21:55:16 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73B9A704A6; Tue, 11 Dec 2018 21:55:16 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f45.google.com with SMTP id x6so13120801ioa.9; Tue, 11 Dec 2018 13:55:16 -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:reply-to :from:date:message-id:subject:to:cc; bh=oEkqyaJVoWoNFbm0g91ypoDVrptSLeOTu9ol6XZesz4=; b=LzvSb8KkoHVI1gAiGjxv1L/NnmoNC+77fCF1yJp9Twg3UGEwvjVjSqyEGaa3DPvgnN 6KrZfyD3Tjz9CH5kgHDw46z1bSSsyL/gs3F6P84kKlYV8yjVX+8qxT5A7wWBxc/p4ikq dIuFP2LTDW5gjxgR+FD1ZchhLydBR2lJXoSlhfcCiXXlpxPvRBEARR4xXvH9i3RUTXt9 Sp7wkA5pEvx9JjCHBXvNgJotJKGLeKBaxPuixoKHWl9Tx7V12RS5QJcv1IblX3uncmmF Ki3k9fFhhEI4ip5Q4F0vG6d4ftI6M83EDtKuNnZfTj8BP+3Akt34yP94Wx3tu2TKdWMD fO3w== X-Gm-Message-State: AA+aEWaQ22RQJMraS8ueF2nBRWdTx/tbw++IjOaLZZXYX5a4pNbul8uH 4FrosdD6arw7anxfNjm7urI9mXve X-Google-Smtp-Source: AFSGD/XSJQ5N0Ww99KdADvXf00XRVkXLLXiCwwrVIn6sTU4+9o2iDxEt1o8emAmsWCTVkqwPWyQPgQ== X-Received: by 2002:a6b:6111:: with SMTP id v17mr15626902iob.107.1544565309769; Tue, 11 Dec 2018 13:55:09 -0800 (PST) Received: from mail-it1-f180.google.com (mail-it1-f180.google.com. [209.85.166.180]) by smtp.gmail.com with ESMTPSA id 194sm2072768itl.32.2018.12.11.13.55.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 13:55:09 -0800 (PST) Received: by mail-it1-f180.google.com with SMTP id m8so11969805itk.0; Tue, 11 Dec 2018 13:55:09 -0800 (PST) X-Received: by 2002:a24:5411:: with SMTP id t17mr3632243ita.32.1544565309264; Tue, 11 Dec 2018 13:55:09 -0800 (PST) MIME-Version: 1.0 References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 11 Dec 2018 13:54:58 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r341803 - head/libexec/rc To: Devin Teske Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 73B9A704A6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.98 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 21:55:17 -0000 On Tue, Dec 11, 2018 at 12:35 PM Devin Teske wrote: > > On Dec 11, 2018, at 11:57 AM, Conrad Meyer wrote: > > Is there any interest in a tee(2)-like syscall? > > > > Linux has vmsplice(2). I know jmg@ also expressed interest in having a > vmsplice in FreeBSD. Sure; they're related. See also splice(2). But tee(2) is probably the one that would be most useful here. > As for sh not being able to read more than a single byte at a time because > it could be reading from a pipe, what if it read into a buffer and returned > a line from the buffer. A subsequent read would return more data from the > buffer, ad nauseam until the buffer runs out -- in which case another chunk > is read to augment the data. > > This buffer could be expunged when stdin collapses (e.g., when the sub- > shell completes. Yeah, this is basically what "buffered input" means. An example of the problem with the naive solution is the scenario Warner pasted a few emails ago. Take: foo | (read bar; baz) (Where 'baz' is not a built-in.) To implement this correctly with buffered 'read,' you have to somehow flush any input in the buffer beyond the end of the first line to the pipe that will be baz's stdin, as well as with the remaining contents of the pipe from foo (which may be indefinite). That is what I suggested above as (A). One big caveat is that you basically have to spawn a thread or process to keep feeding the input from the first pipe to the magical implicit pipe. This overhead can be avoided readily in most scenarios if only the 'read' command is buffered. Also, the described (read bar; baz) sub-program is a fairly odd construction, and the feeding isn't needed if no non-builtin programs after 'read' will access stdin. If it helps paint a more concrete picture, imagine 'foo' as 'yes' and 'baz' as 'pv > /dev/null' or something (i.e., indefinite data source, indefinite data sink). Best, Conrad From owner-svn-src-all@freebsd.org Tue Dec 11 22:14:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D5A61317D8F; Tue, 11 Dec 2018 22:14:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5B4371048; Tue, 11 Dec 2018 22:14:40 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96AA3637A; Tue, 11 Dec 2018 22:14:40 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBBMEewv054500; Tue, 11 Dec 2018 22:14:40 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBBMEbfA054486; Tue, 11 Dec 2018 22:14:37 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201812112214.wBBMEbfA054486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 11 Dec 2018 22:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341836 - in head: lib/libufs sbin/fsck_ffs sbin/fsirand sbin/newfs sys/sys sys/ufs/ffs sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: lib/libufs sbin/fsck_ffs sbin/fsirand sbin/newfs sys/sys sys/ufs/ffs sys/ufs/ufs X-SVN-Commit-Revision: 341836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5B4371048 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.69 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.69)[-0.692,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 22:14:41 -0000 Author: mckusick Date: Tue Dec 11 22:14:37 2018 New Revision: 341836 URL: https://svnweb.freebsd.org/changeset/base/341836 Log: Continuing efforts to provide hardening of FFS. This change adds a check hash to the filesystem inodes. Access attempts to files associated with an inode with an invalid check hash will fail with EINVAL (Invalid argument). Access is reestablished after an fsck is run to find and validate the inodes with invalid check-hashes. This check avoids a class of filesystem panics related to corrupted inodes. The hash is done using crc32c. Note this check-hash is for the inode itself and not any of its indirect blocks. Check-hash validation may be extended to also cover indirect block pointers, but that will be a separate (and more costly) feature. Check hashes are added only to UFS2 and not to UFS1 as UFS1 is primarily used in embedded systems with small memories and low-powered processors which need as light-weight a filesystem as possible. Reviewed by: kib Tested by: Peter Holm Sponsored by: Netflix Modified: head/lib/libufs/inode.c head/lib/libufs/libufs.h head/sbin/fsck_ffs/inode.c head/sbin/fsck_ffs/main.c head/sbin/fsirand/fsirand.c head/sbin/newfs/mkfs.c head/sys/sys/param.h head/sys/ufs/ffs/ffs_extern.h head/sys/ufs/ffs/ffs_inode.c head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_subr.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/dinode.h Modified: head/lib/libufs/inode.c ============================================================================== --- head/lib/libufs/inode.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/lib/libufs/inode.c Tue Dec 11 22:14:37 2018 (r341836) @@ -90,7 +90,10 @@ gotit: switch (disk->d_ufs) { disk->d_dp.dp2 = &((struct ufs2_dinode *)inoblock)[inum - min]; if (dp != NULL) *dp = disk->d_dp; - return (0); + if (ffs_verify_dinode_ckhash(fs, disk->d_dp.dp2) == 0) + return (0); + ERROR(disk, "check-hash failed for inode read from disk"); + return (-1); default: break; } @@ -108,6 +111,8 @@ putinode(struct uufsd *disk) ERROR(disk, "No inode block allocated"); return (-1); } + if (disk->d_ufs == 2) + ffs_update_dinode_ckhash(fs, disk->d_dp.dp2); if (bwrite(disk, fsbtodb(fs, ino_to_fsba(&disk->d_fs, disk->d_inomin)), disk->d_inoblock, disk->d_fs.fs_bsize) <= 0) return (-1); Modified: head/lib/libufs/libufs.h ============================================================================== --- head/lib/libufs/libufs.h Tue Dec 11 21:49:13 2018 (r341835) +++ head/lib/libufs/libufs.h Tue Dec 11 22:14:37 2018 (r341836) @@ -116,6 +116,8 @@ int ffs_sbget(void *, struct fs **, off_t, char *, int (*)(void *, off_t, void **, int)); int ffs_sbput(void *, struct fs *, off_t, int (*)(void *, off_t, void *, int)); +void ffs_update_dinode_ckhash(struct fs *, struct ufs2_dinode *); +int ffs_verify_dinode_ckhash(struct fs *, struct ufs2_dinode *); /* * Request standard superblock location in ffs_sbget Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sbin/fsck_ffs/inode.c Tue Dec 11 22:14:37 2018 (r341836) @@ -286,6 +286,7 @@ union dinode * ginode(ino_t inumber) { ufs2_daddr_t iblk; + union dinode *dp; if (inumber < UFS_ROOTINO || inumber > maxino) errx(EEXIT, "bad inode number %ju to ginode", @@ -301,7 +302,17 @@ ginode(ino_t inumber) if (sblock.fs_magic == FS_UFS1_MAGIC) return ((union dinode *) &pbp->b_un.b_dinode1[inumber % INOPB(&sblock)]); - return ((union dinode *)&pbp->b_un.b_dinode2[inumber % INOPB(&sblock)]); + dp = (union dinode *)&pbp->b_un.b_dinode2[inumber % INOPB(&sblock)]; + if (ffs_verify_dinode_ckhash(&sblock, (struct ufs2_dinode *)dp) != 0) { + pwarn("INODE CHECK-HASH FAILED"); + prtinode(inumber, dp); + if (preen || reply("FIX") != 0) { + if (preen) + printf(" (FIXED)\n"); + inodirty(dp); + } + } + return (dp); } /* @@ -347,6 +358,21 @@ getnextinode(ino_t inumber, int rebuildcg) nextinop += sizeof(struct ufs1_dinode); else nextinop += sizeof(struct ufs2_dinode); + if ((ckhashadd & CK_INODE) != 0) { + ffs_update_dinode_ckhash(&sblock, (struct ufs2_dinode *)dp); + dirty(&inobuf); + } + if (ffs_verify_dinode_ckhash(&sblock, (struct ufs2_dinode *)dp) != 0) { + pwarn("INODE CHECK-HASH FAILED"); + prtinode(inumber, dp); + if (preen || reply("FIX") != 0) { + if (preen) + printf(" (FIXED)\n"); + ffs_update_dinode_ckhash(&sblock, + (struct ufs2_dinode *)dp); + dirty(&inobuf); + } + } if (rebuildcg && (char *)dp == inobuf.b_un.b_buf) { /* * Try to determine if we have reached the end of the @@ -522,6 +548,8 @@ void inodirty(union dinode *dp) { + if (sblock.fs_magic == FS_UFS2_MAGIC) + ffs_update_dinode_ckhash(&sblock, (struct ufs2_dinode *)dp); dirty(pbp); } Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sbin/fsck_ffs/main.c Tue Dec 11 22:14:37 2018 (r341836) @@ -468,13 +468,13 @@ checkfilesys(char *filesys) ckhashadd |= CK_SUPERBLOCK; sblock.fs_metackhash |= CK_SUPERBLOCK; } -#ifdef notyet if ((sblock.fs_metackhash & CK_INODE) == 0 && getosreldate() >= P_OSREL_CK_INODE && reply("ADD INODE CHECK-HASH PROTECTION") != 0) { ckhashadd |= CK_INODE; sblock.fs_metackhash |= CK_INODE; } +#ifdef notyet if ((sblock.fs_metackhash & CK_INDIR) == 0 && getosreldate() >= P_OSREL_CK_INDIR && reply("ADD INDIRECT BLOCK CHECK-HASH PROTECTION") != 0) { Modified: head/sbin/fsirand/fsirand.c ============================================================================== --- head/sbin/fsirand/fsirand.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sbin/fsirand/fsirand.c Tue Dec 11 22:14:37 2018 (r341836) @@ -202,6 +202,7 @@ fsirand(char *device) dp1++; } else { dp2->di_gen = arc4random(); + ffs_update_dinode_ckhash(sblock, dp2); dp2++; } } Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sbin/newfs/mkfs.c Tue Dec 11 22:14:37 2018 (r341836) @@ -499,6 +499,8 @@ restart: sblock.fs_metackhash |= CK_CYLGRP; if (getosreldate() >= P_OSREL_CK_SUPERBLOCK) sblock.fs_metackhash |= CK_SUPERBLOCK; + if (getosreldate() >= P_OSREL_CK_INODE) + sblock.fs_metackhash |= CK_INODE; } /* Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/sys/param.h Tue Dec 11 22:14:37 2018 (r341836) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300004 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300005 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, @@ -89,6 +89,7 @@ #define P_OSREL_CK_CYLGRP 1200046 #define P_OSREL_VMTOTAL64 1200054 #define P_OSREL_CK_SUPERBLOCK 1300000 +#define P_OSREL_CK_INODE 1300005 #define P_OSREL_MAJOR(x) ((x) / 100000) #endif Modified: head/sys/ufs/ffs/ffs_extern.h ============================================================================== --- head/sys/ufs/ffs/ffs_extern.h Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/ufs/ffs/ffs_extern.h Tue Dec 11 22:14:37 2018 (r341836) @@ -108,6 +108,8 @@ void ffs_sync_snap(struct mount *, int); int ffs_syncvnode(struct vnode *vp, int waitfor, int flags); int ffs_truncate(struct vnode *, off_t, int, struct ucred *); int ffs_update(struct vnode *, int); +void ffs_update_dinode_ckhash(struct fs *, struct ufs2_dinode *); +int ffs_verify_dinode_ckhash(struct fs *, struct ufs2_dinode *); int ffs_valloc(struct vnode *, int, struct ucred *, struct vnode **); int ffs_vfree(struct vnode *, ino_t, int); vfs_vget_t ffs_vget; Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/ufs/ffs/ffs_inode.c Tue Dec 11 22:14:37 2018 (r341836) @@ -154,6 +154,7 @@ loop: */ random_harvest_queue(&(ip->i_din1), sizeof(ip->i_din1), RANDOM_FS_ATIME); } else { + ffs_update_dinode_ckhash(fs, ip->i_din2); *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2; /* Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/ufs/ffs/ffs_snapshot.c Tue Dec 11 22:14:37 2018 (r341836) @@ -1340,6 +1340,8 @@ expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungety bzero(&dip->di_db[0], (UFS_NDADDR + UFS_NIADDR) * sizeof(ufs2_daddr_t)); if (clearmode || cancelip->i_effnlink == 0) dip->di_mode = 0; + else + ffs_update_dinode_ckhash(fs, dip); bdwrite(bp); /* * Now go through and expunge all the blocks in the file Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Dec 11 22:14:37 2018 (r341836) @@ -6702,6 +6702,7 @@ softdep_journal_freeblocks(ip, cred, length, flags) *((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din1; } else { + ffs_update_dinode_ckhash(fs, ip->i_din2); *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2; } @@ -6957,6 +6958,7 @@ softdep_setup_freeblocks(ip, length, flags) dp2 = ((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)); ip->i_din2->di_freelink = dp2->di_freelink; + ffs_update_dinode_ckhash(fs, ip->i_din2); *dp2 = *ip->i_din2; } /* @@ -9752,6 +9754,7 @@ clear_unlinked_inodedep(inodedep) dip = (struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, pino); dip->di_freelink = nino; + ffs_update_dinode_ckhash(fs, dip); } /* * If the bwrite fails we have no recourse to recover. The @@ -10392,6 +10395,7 @@ initiate_write_inodeblock_ufs2(inodedep, bp) inon = TAILQ_NEXT(inodedep, id_unlinked); dp->di_freelink = inon ? inon->id_ino : 0; + ffs_update_dinode_ckhash(fs, dp); } /* * If the bitmap is not yet written, then the allocated @@ -10553,6 +10557,7 @@ initiate_write_inodeblock_ufs2(inodedep, bp) #endif /* INVARIANTS */ dp->di_ib[i] = 0; } + ffs_update_dinode_ckhash(fs, dp); return; } /* @@ -10581,6 +10586,7 @@ initiate_write_inodeblock_ufs2(inodedep, bp) */ for (; adp; adp = TAILQ_NEXT(adp, ad_next)) dp->di_ib[adp->ad_offset - UFS_NDADDR] = 0; + ffs_update_dinode_ckhash(fs, dp); } /* @@ -11619,8 +11625,11 @@ handle_written_inodeblock(inodedep, bp, flags) * marked dirty so that its will eventually get written back in * its correct form. */ - if (hadchanges) + if (hadchanges) { + if (fstype == UFS2) + ffs_update_dinode_ckhash(inodedep->id_fs, dp2); bdirty(bp); + } bufwait: /* * If the write did not succeed, we have done all the roll-forward Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/ufs/ffs/ffs_subr.c Tue Dec 11 22:14:37 2018 (r341836) @@ -119,6 +119,7 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc { struct ufs1_dinode *dip1; struct ufs2_dinode *dip2; + int error; if (I_IS_UFS1(ip)) { dip1 = ip->i_din1; @@ -142,9 +143,53 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc ip->i_gen = dip2->di_gen; ip->i_uid = dip2->di_uid; ip->i_gid = dip2->di_gid; - return (0); + if ((error = ffs_verify_dinode_ckhash(fs, dip2)) != 0) + printf("Inode %jd: check-hash failed\n", (intmax_t)ino); + return (error); } #endif /* _KERNEL */ + +/* + * Verify an inode check-hash. + */ +int +ffs_verify_dinode_ckhash(struct fs *fs, struct ufs2_dinode *dip) +{ + uint32_t save_ckhash; + + /* + * Return success if unallocated or we are not doing inode check-hash. + */ + if (dip->di_mode == 0 || (fs->fs_metackhash & CK_INODE) == 0) + return (0); + /* + * Exclude di_ckhash from the crc32 calculation, e.g., always use + * a check-hash value of zero when calculating the check-hash. + */ + save_ckhash = dip->di_ckhash; + dip->di_ckhash = 0; + if (save_ckhash != calculate_crc32c(~0L, (void *)dip, sizeof(*dip))) + return (EINVAL); + dip->di_ckhash = save_ckhash; + return (0); +} + +/* + * Update an inode check-hash. + */ +void +ffs_update_dinode_ckhash(struct fs *fs, struct ufs2_dinode *dip) +{ + + if (dip->di_mode == 0 || (fs->fs_metackhash & CK_INODE) == 0) + return; + /* + * Exclude old di_ckhash from the crc32 calculation, e.g., always use + * a check-hash value of zero when calculating the new check-hash. + */ + dip->di_ckhash = 0; + dip->di_ckhash = calculate_crc32c(~0L, (void *)dip, sizeof(*dip)); +} /* * These are the low-level functions that actually read and write Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/ufs/ffs/ffs_vfsops.c Tue Dec 11 22:14:37 2018 (r341836) @@ -817,7 +817,7 @@ ffs_mountfs(devvp, mp, td) if ((error = ffs_sbget(devvp, &fs, loc, M_UFSMNT, ffs_use_bread)) != 0) goto out; /* none of these types of check-hashes are maintained by this kernel */ - fs->fs_metackhash &= ~(CK_INODE | CK_INDIR | CK_DIR); + fs->fs_metackhash &= ~(CK_INDIR | CK_DIR); /* no support for any undefined flags */ fs->fs_flags &= FS_SUPPORTED; fs->fs_flags &= ~FS_UNCLEAN; Modified: head/sys/ufs/ufs/dinode.h ============================================================================== --- head/sys/ufs/ufs/dinode.h Tue Dec 11 21:49:13 2018 (r341835) +++ head/sys/ufs/ufs/dinode.h Tue Dec 11 22:14:37 2018 (r341836) @@ -149,7 +149,8 @@ struct ufs2_dinode { ufs2_daddr_t di_ib[UFS_NIADDR]; /* 208: Indirect disk blocks. */ u_int64_t di_modrev; /* 232: i_modrev for NFSv4 */ uint32_t di_freelink; /* 240: SUJ: Next unlinked inode. */ - uint32_t di_spare[3]; /* 244: Reserved; currently unused */ + uint32_t di_ckhash; /* 244: if CK_INODE, its check-hash */ + uint32_t di_spare[2]; /* 248: Reserved; currently unused */ }; /* From owner-svn-src-all@freebsd.org Tue Dec 11 22:42:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23DF41318B33; Tue, 11 Dec 2018 22:42:05 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB8997219E; Tue, 11 Dec 2018 22:42:04 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [76.77.180.168] (port=64831 helo=eskarina.lan) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1gWqj5-000Gl2-JF; Tue, 11 Dec 2018 14:42:03 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r341803 - head/libexec/rc From: Devin Teske In-Reply-To: Date: Tue, 11 Dec 2018 14:42:02 -0800 Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <917251B0-00E0-47E2-B6FB-568EDB9ED781@FreeBSD.org> References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> To: cem@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: BB8997219E X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.98 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.977,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 22:42:05 -0000 > On Dec 11, 2018, at 1:54 PM, Conrad Meyer wrote: >=20 > On Tue, Dec 11, 2018 at 12:35 PM Devin Teske = wrote: >>> On Dec 11, 2018, at 11:57 AM, Conrad Meyer wrote: >>> Is there any interest in a tee(2)-like syscall? >>>=20 >>=20 >> Linux has vmsplice(2). I know jmg@ also expressed interest in having = a >> vmsplice in FreeBSD. >=20 > Sure; they're related. See also splice(2). But tee(2) is probably > the one that would be most useful here. >=20 >> As for sh not being able to read more than a single byte at a time = because >> it could be reading from a pipe, what if it read into a buffer and = returned >> a line from the buffer. A subsequent read would return more data from = the >> buffer, ad nauseam until the buffer runs out -- in which case another = chunk >> is read to augment the data. >>=20 >> This buffer could be expunged when stdin collapses (e.g., when the = sub- >> shell completes. >=20 > Yeah, this is basically what "buffered input" means. An example of > the problem with the naive solution is the scenario Warner pasted a > few emails ago. Take: >=20 > foo | (read bar; baz) >=20 > (Where 'baz' is not a built-in.) To implement this correctly with > buffered 'read,' you have to somehow flush any input in the buffer > beyond the end of the first line to the pipe that will be baz's stdin, > as well as with the remaining contents of the pipe from foo (which > may be indefinite). That is what I suggested above as (A). >=20 > One big caveat is that you basically have to spawn a thread or process > to keep feeding the input from the first pipe to the magical implicit > pipe. This overhead can be avoided readily in most scenarios if only > the 'read' command is buffered. Also, the described (read bar; baz) > sub-program is a fairly odd construction, and the feeding isn't needed > if no non-builtin programs after 'read' will access stdin. >=20 > If it helps paint a more concrete picture, imagine 'foo' as 'yes' and > 'baz' as 'pv > /dev/null' or something (i.e., indefinite data source, > indefinite data sink). Thanks, this definitely illustrates the trouble. In that case, would it be appropriate to say that: blah | while read x; do ...; done Is always more efficiently written as: IFS=3D$'\n' for x in $( blah ); do ...; done ? --=20 Devin= From owner-svn-src-all@freebsd.org Wed Dec 12 01:00:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F71C13253C6; Wed, 12 Dec 2018 01:00:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E8D16A5F6; Wed, 12 Dec 2018 01:00:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f43.google.com with SMTP id r200so13431466iod.11; Tue, 11 Dec 2018 17:00:33 -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:reply-to :from:date:message-id:subject:to:cc; bh=gXtL2gOlKYyLaoFBhSA+J5ooSXf4b90E0Lx0oVfz0Yw=; b=uGeRnspVG5RgKzNWzE8AZTGHYZ21urcvs8UdKQjnDBHMVyBRxYAVz1qITiKJxMReNK ZcceFQ1yqWkW3SvxdPFY8W4ALiKMmpgffjq8MK0QdFMFJ2BFPPjT6NOdukTdHmk5iSVz 1JbXdHpsLL1/hCfQTTwm2lb+M0fuFmPa8Z/lGiQweRwwn8p7h8tFBZCZwkfRXeH52mcK 853irzYWidDgpM8NMuJvfAVXtsOkLWw4vLbpAOc+Qy2KPfl25rQPy4fxWcXju6tfWCXq jUC1MIPpaq2OzWOfWEqf+fise0paaaDMJtDwOxtv4F+tidjjB9jeHqHuAc0iTnHc1pVk 1Kig== X-Gm-Message-State: AA+aEWZw3IkXWMKC1sAfYBuJndMa0D/PJsHZdeuYONFTz6AZIQoxIPDs LS6vzGCKw+7tht2zvz2jEEQM9h2L X-Google-Smtp-Source: AFSGD/V2a9c8beExcZT31rFWg6kdrDdL5odUNBXWLYI8L64VXl+9SkqBwglB2YcY0Bgs4yywSh4qYg== X-Received: by 2002:a5d:8989:: with SMTP id m9mr15535302iol.216.1544576427378; Tue, 11 Dec 2018 17:00:27 -0800 (PST) Received: from mail-it1-f180.google.com (mail-it1-f180.google.com. [209.85.166.180]) by smtp.gmail.com with ESMTPSA id x99sm2104412ita.23.2018.12.11.17.00.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 17:00:26 -0800 (PST) Received: by mail-it1-f180.google.com with SMTP id z7so6629267iti.0; Tue, 11 Dec 2018 17:00:26 -0800 (PST) X-Received: by 2002:a02:c88:: with SMTP id 8mr17341359jan.87.1544576426488; Tue, 11 Dec 2018 17:00:26 -0800 (PST) MIME-Version: 1.0 References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> <917251B0-00E0-47E2-B6FB-568EDB9ED781@FreeBSD.org> In-Reply-To: <917251B0-00E0-47E2-B6FB-568EDB9ED781@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 11 Dec 2018 17:00:15 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r341803 - head/libexec/rc To: Devin Teske Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9E8D16A5F6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.93 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.926,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 01:00:34 -0000 On Tue, Dec 11, 2018 at 2:42 PM Devin Teske wrote: > In that case, would it be appropriate to say that: > > blah | while read x; do ...; done > > Is always more efficiently written as: > > IFS=$'\n' > for x in $( blah ); do ...; done I don't know. The suggestion came from jilles@, who is much more familiar with sh(1) than I am. My understanding is that it's important that 'set -o noglob' is set, or else 'blah' lines that include globs may be evaluated against the filesystem. There is also a caveat if 'blah' is the 'set' command, or similar, in that IFS' own value itself will be split across multiple for loop iteration 'x' values ("IFS='", "'"). I would hesitate to say "always" given my limited understanding of the shell, but it might be true. Best, Conrad From owner-svn-src-all@freebsd.org Tue Dec 11 20:47:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 913B81313DCC; Tue, 11 Dec 2018 20:47:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA2C96CA5C; Tue, 11 Dec 2018 20:47:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wBBKkulk072930 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 11 Dec 2018 22:46:59 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wBBKkulk072930 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wBBKkt1T072929; Tue, 11 Dec 2018 22:46:55 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 11 Dec 2018 22:46:55 +0200 From: Konstantin Belousov To: Scott Long Cc: John Baldwin , Warner Losh , Kevin Bowling , Mateusz Guzik , Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , scottl@freebsd.org Subject: Re: svn commit: r341682 - head/sys/sys Message-ID: <20181211204655.GF60291@kib.kiev.ua> References: <201812071205.wB7C5BvA038350@repo.freebsd.org> <1544206201.1860.288.camel@freebsd.org> <45f85061-2633-852c-3cc0-41f64d51e4f0@FreeBSD.org> <20181210234754.GD60291@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-Spam-Status: No, score=0.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM,FREEMAIL_REPLY, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Mailman-Approved-At: Wed, 12 Dec 2018 01:21:49 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 20:47:16 -0000 On Mon, Dec 10, 2018 at 09:57:08PM -0700, Scott Long wrote: > > > > On Dec 10, 2018, at 4:47 PM, Konstantin Belousov wrote: > > > > On Mon, Dec 10, 2018 at 02:15:20PM -0800, John Baldwin wrote: > >> On 12/8/18 7:43 PM, Warner Losh wrote: > >>> > >>> > >>> On Sat, Dec 8, 2018, 8:36 PM Kevin Bowling wrote: > >>> > >>> On Sat, Dec 8, 2018 at 12:09 AM Mateusz Guzik > wrote: > >>> > >>>> > >>>> Fully satisfying solution would be that all architectures get 64-bit > >>>> ops, even if in the worst case they end up taking a lock. Then > >>>> subsystems would not have to ifdef on anything. However, there > >>>> was some opposition to this proposal and I don't think this is > >>>> important enough to push. > >>> > >>> Mateusz, > >>> > >>> Who is opposing this particular polyfill solution? Scott Long brought > >>> up a situation in driver development where this would be useful as > >>> well. The polyfills lower the cognitive load and #ifdef soup which > >>> are the right call here regardless of performance on toy ports. > >>> > >>> > >>> I don't recall seeing the opposition either. It would have to be a global lock for all 64bit atomics.... but I think it would only be 2 atomics on those architectures. > >> > >> It would have to be a spin lock, so in the case of unrl you would be trading > >> an operation on one of N regular mutexes for a single spin lock that was > >> also contested by other things. This would be pretty crappy. For drivers > >> that aren't actually used on platforms without 32-bit atomics we can simply > >> not build them in sys/modules/Makefile or not put them in GENERIC. For > >> something in the core kernel like unrl I think we will have to do what > >> Mateusz has done here. > > > > It is worse. All atomics that acess the same location must use the same > > lock. Otherwise, you could observe torn writes and out of thin air > > values. Since you cannot know in advance which locations are acceses > > by the locked variant, all freebsd atomics ops have to be switched to > > locked variant on the architecture. > > 64bit atomics on I486 already suffer the risk of torn reads; the implementation > merely does a CLI to protect against local preemption (though you could still > get unlucky with an NMI). I suppose you could argue that SMP isn’t really > viable on I486 and therefore this fact is irrelevant, but it does illustrate > precedence for having API completeness in a platform. 64bit atomics on 486 are fine, because we only support SMP on machines which have cmpxchg8b. Even then, I am not sure that we really support the kind of SMP configurations from the Pentium times, at least I am certain that this was not exercised for quite long time. > > Really, this isn’t that hard. Part of the existing contract of using atomics is > that you carefully evaluate all uses of the variable and decide when to use > an atomic instruction. Arguing that we can’t make this process automatic > and foolproof for 64bit quantities, especially for a subset of subset of > platforms/architectures, and therefore we should be even more of a difficult > landmine, is not…. I don’t know what to say… sensical? > > 64bit operations are a reality for MI code in a modern OS, and I’m tired of > having to tip-toe around them due to incomplete MD implementations. The > instructions have been available on Intel CPUs for 25 years! My > very strong preference is to have a complete and functional implementation > of atomic.h for any architecture that is hooked up to the build. We can then > tackle the details of optimization and edge case refinement, just like we do > with every other API and service that we work on. It doesn’t have to be > perfect to be useful, and at this point we’re providing neither perfection nor > utility, just “buts†and “what ifsâ€. I do not understand this rant. Provide working implementation for 64bit atomics on the arches which lack them, everybody will be happy. My point is that implementing e.g. only atomic_add_64() using lock is not a solution. Exactly because it makes inconsistent KPI which does not satisfy basic guarantees which are provided on other arches, heavily relied upon in FreeBSD code, and documented in atomic(9) in the free prose, with further references to C11. I.e. instead of the cross-arch KPI such implementation would require consumers to know arch pecularities. Isn't this complete failure of the goals ? BTW, this is why C11 standard provides lockless predicate for atomic types and not for atomic ops. If one atomic op is locked, all of them must be. > > Going forward, I’m going to start using 64bit atomics where they’re prudent, > instead of avoiding them due to this niche 32bit argument. If that means > more and more of what I do no longer compiles on a mips or a ppc32, then > that’s a sacrifice that is fine with me. It still creates extra development work, > and having a uniformly available implementation would be much nicer. > > Scott > From owner-svn-src-all@freebsd.org Wed Dec 12 02:07:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57DB7132729D; Wed, 12 Dec 2018 02:07:39 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C9526C5F9; Wed, 12 Dec 2018 02:07:38 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108162.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wBC25DS3010418; Tue, 11 Dec 2018 18:07:32 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : date : message-id; s=PPS1017; bh=D0y/PRgvWGmybYlFhv0q2JflkvDycKClc52M+TKGjpQ=; b=IXYVGaeNrQFx/IGMjg60/Ao4+BhN+5+tW/2cp3vNIU2jRtm8Gt4T/aoSi37EnKotZGPH gCZ7gE6PibkSpKezuTXD+cEXKWWjoJjz5Avg+dSituuQ4EOQjxYWbgVwpJd4u0SM5t9H ec41xYlaZzi80DmEbG208Pj7bZBoV91JyF8OgRLWrGbB+NsL13drCaOFeZ0esOEai1dC lpvMkLHdgn0P5r1nKpOh9aqNM+1RYzqXSk0PgsTe7pcu4KSa5/l8nhZpAL4iKq1rWXHX ep0BMeOzdXQlUdqfJNltm73LNN+ZveXDXAQbQ7iNhjKfY43yLBh0VHTp0px6y0U2J6Um QA== Received: from nam03-by2-obe.outbound.protection.outlook.com (mail-by2nam03lp2056.outbound.protection.outlook.com [104.47.42.56]) by mx0b-00273201.pphosted.com with ESMTP id 2pap9k0862-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 11 Dec 2018 18:07:32 -0800 Received: from CO2PR05CA0086.namprd05.prod.outlook.com (2603:10b6:104:1::12) by DM5PR05MB3273.namprd05.prod.outlook.com (2603:10b6:3:c8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.10; Wed, 12 Dec 2018 02:07:29 +0000 Received: from DM3NAM05FT063.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::205) by CO2PR05CA0086.outlook.office365.com (2603:10b6:104:1::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.8 via Frontend Transport; Wed, 12 Dec 2018 02:07:29 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by DM3NAM05FT063.mail.protection.outlook.com (10.152.98.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1446.5 via Frontend Transport; Wed, 12 Dec 2018 02:07:28 +0000 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 11 Dec 2018 18:07:27 -0800 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 11 Dec 2018 18:07:27 -0800 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.50.162]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id wBC27QqW024125; Tue, 11 Dec 2018 18:07:27 -0800 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id C044E14AF0; Tue, 11 Dec 2018 18:07:26 -0800 (PST) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id BE90D14AEF; Tue, 11 Dec 2018 18:07:26 -0800 (PST) To: CC: Devin Teske , src-committers , , , Subject: Re: svn commit: r341803 - head/libexec/rc In-Reply-To: References: <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> <917251B0-00E0-47E2-B6FB-568EDB9ED781@FreeBSD.org> Comments: In-reply-to: Conrad Meyer message dated "Tue, 11 Dec 2018 17:00:15 -0800." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <43931.1544580446.1@kaos.jnpr.net> Date: Tue, 11 Dec 2018 18:07:26 -0800 Message-ID: <46440.1544580446@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(376002)(346002)(396003)(39860400002)(136003)(2980300002)(189003)(199004)(97736004)(97876018)(2906002)(69596002)(356004)(2351001)(305945005)(6916009)(55016002)(336012)(46406003)(107886003)(186003)(23726003)(6346003)(117636001)(77096007)(53546011)(76176011)(50466002)(7696005)(6266002)(5660300001)(53936002)(6246003)(68736007)(97756001)(90966002)(26005)(14444005)(9686003)(450100002)(8676002)(93886005)(486006)(4326008)(478600001)(76506005)(229853002)(81166006)(81156014)(16586007)(53416004)(11346002)(7126003)(316002)(50226002)(54906003)(126002)(476003)(86362001)(446003)(47776003)(8936002)(106466001)(105596002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR05MB3273; H:P-EXFEND-EQX-01.jnpr.net; FPR:; SPF:SoftFail; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM05FT063; 1:oDOQrmLJbBEu5OM/uZr/CTKNa/+GG/CNGhfp9R0gmVa3t1ttIvzFqScE7XzV+tdIMss/87C6Raq9VqycJMieWUtp8VOmhJghfBYyQBJbzONFqV3V0J/4uLdQIyS0eST4 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb944139-0081-45d7-b303-08d65fd691af X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060); SRVR:DM5PR05MB3273; X-Microsoft-Exchange-Diagnostics: 1; DM5PR05MB3273; 3:9W3suadTZvLZQL6/5TGfZBfPQE67TP3b93Pkw3EfOnQ4ef02/JN8ewH8AVOz+hyrO/H4lYd6Cs1wW3+HBeobK3/6EZ7a/mpJAdeNR4Hh+MeF29eEb3kW8W34NTSmbknRBz97T354qfV2wJQIkM02Gn89+UjiJoOnDdV+V0XCVPvOio1ec/JZBYPTcTm9KuBLPB/5z4+vGXTl/Fdjptign264I29r26oha9TexeHg2Kf0wRljkFU4vOIWCGbo+Eqnwho2eOysqe+iuS9xnIyAC719KbYNYFomUOqrB4eKSgtOk2ferhoDq5I+AkJz8/PZEnFXhpX88a66JDPwmIP0lcjolXZV1xh5M/skRCT+C6o=; 25:gZblNdg5CTwDdTvLZfDyKGlitgVR74Fq6vXu/8s5rjG4pWJrQ3AXoLwhdo3BCLqc3rCvZIuUtwUAuCaMcW81s1QtXlgu/vTlNQjfb6PbEzPbhuj62eVXJ/vPj8IvP+qBVzgND/xD4KyAUoZahadcIaphOkj19GJvQW9IDT6oq5Xa1aDMFEJlozztWIvm2KatnzEE7ZPck6VdoAPuxMf21lbI4RmW52dHZZ1H2MLOalxlvUnwUN+mJdyV0dU4XH8boCnchgbWQ7FJmpe8EkcMuzSIOcp0VEbg9YJeXZ5dX70LoXRYJEfYghdgwWbt0oUXZb/Xanjqy/2HbwYUMRahqg== X-MS-TrafficTypeDiagnostic: DM5PR05MB3273: X-Microsoft-Exchange-Diagnostics: 1; DM5PR05MB3273; 31:xai0DMOPHhyYy5PbMnLTf65URiQICXUBmED9Rijhu99s9J6lLcs6EaiPJYhNlXzrktQT83xtUA+S6nYEPhu/O0HzXfjUBeJG6EPiGGusSc46ciEr7Oo1zGsYQ9QH3weHuFyYG/cAaZV1FenVsjYFA/rq0mc6hBd1rD1FlltuBXyMjsaPZquewX3diSJwFNsWItuQnhk5mV8rjNcDsmO3L4zttTcAF7Uiw41yZhbhOv0=; 20:J4CpnK3j4HEqCPrzkmWiYOPkIjq+a6l+LAUH8o5hEzt2aEAExiBzcU33C5KGOcDpiNWX45cR3NkDa0vf6rCKYu9Jn+GEzcfTEZAVxVWzWesG5pFwwOFz2BAZs+NSc3pv/++q8j8F5q102a6REmpEcIxIRhSV+Ws8zaGJEb94lGcXzDlWpM+afU6letDkWCvwIMdf/rwWxno3qn25DAOCHLbhQ9QordUlAbG9xdjgZgScnymsMlLjpjpgWyX5R2lJLADVj8VaSWZapqn2Ns0fYOer9N7CHhT2QVO8ydTdIMdGDO86NLWrnUHw2dcGRq1XjX4QVxRAAeHCa+oIjmmG5iToJrxAfeIImPIyspi5NB5t5BgCCccPEdLNJb+UXB2dUxJAFo3z41t1lkl0l1mgO8xBRxuxVCZ/QDC9/gZn+rZwepIuowNJgFfX2S6NTbRTjRQ5ZtTZQhkGD6wScsMKVPNyGOMriz64OU7VPe8Z9UN3E77thKjqGKwTWarmZIQs X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(3230017)(999002)(6040522)(2401047)(5005006)(8121501046)(3231472)(944501520)(52105112)(93006095)(93003095)(10201501046)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:DM5PR05MB3273; BCL:0; PCL:0; RULEID:; SRVR:DM5PR05MB3273; X-Microsoft-Exchange-Diagnostics: 1; DM5PR05MB3273; 4:IjPhE6ASGMGN1qGrGryS7AkRHxR9ISkVWjgL9MztsHsqk0LtRUCSH8l84JnKykIZY98ya/KmVyCjiHkYgQdTn6AxLwPBB4YLBxuC6yP0Z15CK40fMpj1xmkGLch+it0MIbhQgw1ND12STU9qMYJGWn4jTjRKGm0IiGe/EC0HGSIxyXqNvUlj9kJMCFJpDDaDWGTww/PP55mjh04A+iz7BB1cCDD2T3gzM6LyV+oQEg6UN5BypLH2jj6HI0LV7pB2Zh4MqcIiqdtm5qDB2wgdGg== X-Forefront-PRVS: 0884AAA693 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR05MB3273; 23:0yJH0SqdJzl2Qm3AE0UjrRlW0k28agyqe+UXOPxrS?= =?us-ascii?Q?D176dMU/VZ1aBFcty5cqBSD84G8EAmqTX+P1XFmUiDT7um2Ew2wQJlPPgu3T?= =?us-ascii?Q?1FoiTHySPdfACf2MW5qO2VoebNEyldWrwYVaIGUPFtLpRsEN41oP+VTB+TvI?= =?us-ascii?Q?H+i4aovSCb0n147Cq3D+ky3k2xtZ6ru6fKwXELyk97Fb1S8nidVBSvO/N0+K?= =?us-ascii?Q?LTBrlklfKX80TWjMcEQdjua9xpKwjj4jd2z/LxuarTMth1183cJnThtgRBoh?= =?us-ascii?Q?xYfj62P0POM1fYA9uaJ2lRf0WrejNtN/MR9mQKgK3mVIznN60tZEystEt3ap?= =?us-ascii?Q?jr03uulvrL6mxtkUuPoijxFt8l/bmvYlDr7MUqdUlAoD+pwERYCu4d0piUIG?= =?us-ascii?Q?4WLKOSBf5tEU9uLnPho8sUMU2f+0yzSgJk5Z3Tw2fNjOQqApd7oep9wQmvI9?= =?us-ascii?Q?5dglJkmKORPMpKXdY7OuLZ4fxnQut63Ikgjy30ShpAgSqhzTxkY/iW3I1Wlf?= =?us-ascii?Q?mKXk1ZcJC0Vcpd4DDWTRWU42CAqisb5k2JoZSh0bPeGEeZydGmKFlSllE862?= =?us-ascii?Q?LAdNhhV4wjGSJ199+gYIirivUc7hxIkJmnKac+Z5wXVNx0bBy0EpuNZFFwmb?= =?us-ascii?Q?cmu9M9CWIMyqypx0X5Y6DONH9puRL3VPmozK2JNxaTQSiCw3eWXIkqcWpRTX?= =?us-ascii?Q?QiX4rYfl4+v5TyWkpBL/m05tCysXukKV5pJ34F4FT4M1b9lFa7drjmZP+kYs?= =?us-ascii?Q?1VCbM2BC8WaS8+4rGDu9om7FN0ZqQc+Kk76rwYJBKm361/A/0O7ZgEGl+GsD?= =?us-ascii?Q?w+O3ZB9ADVxfg++wOwMhj8RlMO4OQCQoTfT9wCUMo0gaVX4ZepoO9UWcGyKN?= =?us-ascii?Q?JDwoxSunchaIlEbiPEK3EZKWAOSYSvHDb8wFpU5/owlDQuueLJJ3aGFht9M7?= =?us-ascii?Q?wNxISKUrkDPJWpfiZ/gdePdbxfNTX74Btm110z2K63gyDH3K/gC08oGKsvti?= =?us-ascii?Q?33TqreR2PO92pRogdb4x26XBCd8tHj1EkRGhId+KQnqf9paf4FfxvWzGoFzq?= =?us-ascii?Q?04mIb5WlPFppr4Z8FxhuQkpz13BvInGFp6j3sET0HvIKFz0hcWQGki/0/Sp9?= =?us-ascii?Q?NCjgAdx6zs0gTIKnqinJVN6+dOJWbRbduIhJ1HTMvcfsfZG+1xl8SH7qLZx1?= =?us-ascii?Q?fIvj+8Jel2qBCSSvvkCRZIr7iVLvH+RzavZNxDYZyn/QjlKtHwyhY8Un88l/?= =?us-ascii?Q?nrDsxl7KbEdiWweSNVBV/EINpGVL8GohqoFdV6AeNBNMOgSFYC8iEZYxVBiz?= =?us-ascii?Q?qSz1seEm+kGTYe/ijEQ75NtQBV3v+KZJd/N3Jwdx1VuqGRD+m2Cz1LPVSqze?= =?us-ascii?Q?PEryX1YkIa+drEmVHec/SrJDpNgPaIBDy8bjGwfsErdaRvV6xHSb9P58S9Na?= =?us-ascii?Q?jJCwePguUm8emUHsb8FAD5m6ZEKoJQ=3D?= X-Microsoft-Antispam-Message-Info: Gif/JTc4RnjlMt6HNJt1MwT5xZ56luGRyXAzk8okGtWhzqq+ebpY5vttFCvlAiJT1xnGzpaR8aDSCzNxJ8SyoslVnSKIuDB+VFC+KUsXUKudk9fiihDNAkBebCfPjwQJ4S4B5Etjxkfj0Rme1qHm+9VkJTDyTFVv1QyQ/df0Ilzrcjc/RFIqcv8oG8/rITQV6FsYK63aQQyhEvOFO+eCQQCR3dKuKry8mUywOl+uxGpq/E2JGbD3xNXM1SbOXMC49o459E/bGI/ijaJCajRfYIN1o2ZA3M3eQH+zTjbjjuYD1gce6ofPzIj5BoJj01Qv X-Microsoft-Exchange-Diagnostics: 1; DM5PR05MB3273; 6:qQ7zcH7H3qZXaXr/uYrhowZnNyEKw0nSFMy9xK9MfWXzIQ1y5RC56spa3orZVs+1e1QX5obo+Vme95wRWyZy487M4NzgjrcDUt78rUoijbPuy0kRjYytQq198zakKecyPGmN0qKozGG+hV10p+WPsi8b1WEFWi92vs4cd3VbwRoYAGRzgSs1ihDH9/6o/F/IQjt/CP1GyIAE5glC04lFSQcnFOyzS14vPA6HA5YoRNtAdTBzpEhee4/B+VWSVvmIvMhsmkTV5OuFI2Ju/NjD0kx2M1sAxpbeQT5eoNVW4GFVAc0b7foGL+bnQkACfC+JTLKDh+mIZSQRv3FpXbSIY/JV8pYsc+LP830uCaLswj0HAilkw+JVYkeD3gMfVy7aKU1ywV6Eozwd86RWWpVFR0o04OdL2P4ZRmJwD3X7CFUWrekvZZofp9cD6QBb2PpI97A93VIioltxt6KdMMBL1w==; 5:GLs3EmberyCaWpq+/cFyOKi4cpr84yYI7FStEMEYHk9MzWyXyv4NoSJGOSX2kPVgtsmvvob2jRGDnKHq3udOGmEsagQMo3Us00PlSqcWmyZ2kRycFVhtPjacopfGQFGXvYZuhRzLIUz0FAg+ikO5VF96j8TSacZzDu2O9JuELUY=; 7:tbv5LLVqDw+zw3SF0Obi1DajGDzaw3oez590cNMYFNdY+jTLMelqhYNCalYO1khLRUuaiitQSMYGyW22xee036xa/VNf2WDZutIECf9/NLeVUOJsMRYiT4CW3yOgIAoQzHHP8D2Rhk9osXCMKx3sCw== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2018 02:07:28.8229 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb944139-0081-45d7-b303-08d65fd691af X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR05MB3273 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-12-11_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=716 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812120014 X-Rspamd-Queue-Id: 9C9526C5F9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.94 / 15.00]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 02:07:39 -0000 Just caught the tail of this thread so sorry for chiming in from the peanut gallery... blah | while read x; do ...; done behaves very differently to the for loop variant in that the body of the loop runs in a sub-shell and thus cannot affect the outer scope. In many cases that's exactly what you want. Sometimes though, it isn't. Conrad Meyer wrote: > On Tue, Dec 11, 2018 at 2:42 PM Devin Teske wrote: > > In that case, would it be appropriate to say that: > > > > blah | while read x; do ...; done > > > > Is always more efficiently written as: > > > > IFS=$'\n' > > for x in $( blah ); do ...; done > > I don't know. The suggestion came from jilles@, who is much more > familiar with sh(1) than I am. > > My understanding is that it's important that 'set -o noglob' is set, > or else 'blah' lines that include globs may be evaluated against the > filesystem. There is also a caveat if 'blah' is the 'set' command, or > similar, in that IFS' own value itself will be split across multiple > for loop iteration 'x' values ("IFS='", "'"). > > I would hesitate to say "always" given my limited understanding of the > shell, but it might be true. From owner-svn-src-all@freebsd.org Wed Dec 12 02:33:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 285461327EE6; Wed, 12 Dec 2018 02:33:02 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 9371C6D4A1; Wed, 12 Dec 2018 02:33:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 894601704; Wed, 12 Dec 2018 02:33:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC2X17D066615; Wed, 12 Dec 2018 02:33:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC2X1pP066614; Wed, 12 Dec 2018 02:33:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812120233.wBC2X1pP066614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 12 Dec 2018 02:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341837 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 341837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9371C6D4A1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.77 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.77)[-0.770,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 02:33:02 -0000 Author: markj Date: Wed Dec 12 02:33:01 2018 New Revision: 341837 URL: https://svnweb.freebsd.org/changeset/base/341837 Log: Use Capsicum helpers in ping(8). Also use caph_cache_catpages() to ensure that strerror() works when run with kern.trap_enotcap=1. Reviewed by: oshogbo MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18514 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Tue Dec 11 22:14:37 2018 (r341836) +++ head/sbin/ping/ping.c Wed Dec 12 02:33:01 2018 (r341837) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #endif /*IPSEC*/ +#include #include #include #include @@ -258,7 +259,6 @@ main(int argc, char *const *argv) policy_in = policy_out = NULL; #endif cap_rights_t rights; - bool cansandbox; /* * Do the stuff that we need root priv's for *first*, and @@ -702,27 +702,20 @@ main(int argc, char *const *argv) ip->ip_dst = to->sin_addr; } - if (options & F_NUMERIC) - cansandbox = true; - else if (capdns != NULL) - cansandbox = CASPER_SUPPORT; - else - cansandbox = false; - /* * Here we enter capability mode. Further down access to global * namespaces (e.g filesystem) is restricted (see capsicum(4)). * We must connect(2) our socket before this point. */ - if (cansandbox && cap_enter() < 0 && errno != ENOSYS) + caph_cache_catpages(); + if (caph_enter() < 0) err(1, "cap_enter"); cap_rights_init(&rights, CAP_RECV, CAP_EVENT, CAP_SETSOCKOPT); - if (cap_rights_limit(srecv, &rights) < 0 && errno != ENOSYS) + if (caph_rights_limit(srecv, &rights) < 0) err(1, "cap_rights_limit srecv"); - cap_rights_init(&rights, CAP_SEND, CAP_SETSOCKOPT); - if (cap_rights_limit(ssend, &rights) < 0 && errno != ENOSYS) + if (caph_rights_limit(ssend, &rights) < 0) err(1, "cap_rights_limit ssend"); /* record route option */ @@ -807,14 +800,14 @@ main(int argc, char *const *argv) sizeof(hold)); /* CAP_SETSOCKOPT removed */ cap_rights_init(&rights, CAP_RECV, CAP_EVENT); - if (cap_rights_limit(srecv, &rights) < 0 && errno != ENOSYS) + if (caph_rights_limit(srecv, &rights) < 0) err(1, "cap_rights_limit srecv setsockopt"); if (uid == 0) (void)setsockopt(ssend, SOL_SOCKET, SO_SNDBUF, (char *)&hold, sizeof(hold)); /* CAP_SETSOCKOPT removed */ cap_rights_init(&rights, CAP_SEND); - if (cap_rights_limit(ssend, &rights) < 0 && errno != ENOSYS) + if (caph_rights_limit(ssend, &rights) < 0) err(1, "cap_rights_limit ssend setsockopt"); if (to->sin_family == AF_INET) { From owner-svn-src-all@freebsd.org Wed Dec 12 04:23:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54ACA132B29E; Wed, 12 Dec 2018 04:23:02 +0000 (UTC) (envelope-from yuripv@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) server-signature RSA-PSS (4096 bits) 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 EA51F70D60; Wed, 12 Dec 2018 04:23:01 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF6BF2A58; Wed, 12 Dec 2018 04:23:01 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC4N1fZ024489; Wed, 12 Dec 2018 04:23:01 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC4N10E024486; Wed, 12 Dec 2018 04:23:01 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201812120423.wBC4N10E024486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Wed, 12 Dec 2018 04:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341838 - in head/lib/libc: regex tests/regex X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: in head/lib/libc: regex tests/regex X-SVN-Commit-Revision: 341838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EA51F70D60 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.82 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.82)[-0.819,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 04:23:02 -0000 Author: yuripv Date: Wed Dec 12 04:23:00 2018 New Revision: 341838 URL: https://svnweb.freebsd.org/changeset/base/341838 Log: regcomp: reduce size of bitmap for multibyte locales This fixes the obscure endless loop seen with case-insensitive patterns containing characters in 128-255 range; originally found running GNU grep test suite. Our regex implementation being kludgy translates the characters in case-insensitive pattern to bracket expression containing both cases for the character and doesn't correctly handle the case when original character is in bitmap and the other case is not, falling into the endless loop going through in p_bracket(), ordinary(), and bothcases(). Reducing the bitmap to 0-127 range for multibyte locales solves this as none of these characters have other case mapping outside of bitmap. We are also safe in the case when the original character outside of bitmap has other case mapping in the bitmap (there are several of those in our current ctype maps having unidirectional mapping into bitmap). Reviewed by: bapt, kevans, pfg Differential revision: https://reviews.freebsd.org/D18302 Modified: head/lib/libc/regex/regcomp.c head/lib/libc/regex/regex2.h head/lib/libc/regex/utils.h head/lib/libc/tests/regex/multibyte.sh Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Wed Dec 12 02:33:01 2018 (r341837) +++ head/lib/libc/regex/regcomp.c Wed Dec 12 04:23:00 2018 (r341838) @@ -1841,21 +1841,29 @@ computejumps(struct parse *p, struct re_guts *g) { int ch; int mindex; + int cmin, cmax; + /* + * For UTF-8 we process only the first 128 characters corresponding to + * the POSIX locale. + */ + cmin = MB_CUR_MAX == 1 ? CHAR_MIN : 0; + cmax = MB_CUR_MAX == 1 ? CHAR_MAX : 127; + /* Avoid making errors worse */ if (p->error != 0) return; - g->charjump = (int*) malloc((NC + 1) * sizeof(int)); + g->charjump = (int *)malloc((cmax - cmin + 1) * sizeof(int)); if (g->charjump == NULL) /* Not a fatal error */ return; /* Adjust for signed chars, if necessary */ - g->charjump = &g->charjump[-(CHAR_MIN)]; + g->charjump = &g->charjump[-(cmin)]; /* If the character does not exist in the pattern, the jump * is equal to the number of characters in the pattern. */ - for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++) + for (ch = cmin; ch < cmax + 1; ch++) g->charjump[ch] = g->mlen; /* If the character does exist, compute the jump that would Modified: head/lib/libc/regex/regex2.h ============================================================================== --- head/lib/libc/regex/regex2.h Wed Dec 12 02:33:01 2018 (r341837) +++ head/lib/libc/regex/regex2.h Wed Dec 12 04:23:00 2018 (r341838) @@ -113,7 +113,7 @@ typedef struct { wint_t max; } crange; typedef struct { - unsigned char bmp[NC / 8]; + unsigned char bmp[NC_MAX / 8]; wctype_t *types; unsigned int ntypes; wint_t *wides; @@ -133,9 +133,14 @@ CHIN1(cset *cs, wint_t ch) if (ch < NC) return (((cs->bmp[ch >> 3] & (1 << (ch & 7))) != 0) ^ cs->invert); - for (i = 0; i < cs->nwides; i++) - if (ch == cs->wides[i]) + for (i = 0; i < cs->nwides; i++) { + if (cs->icase) { + if (ch == towlower(cs->wides[i]) || + ch == towupper(cs->wides[i])) + return (!cs->invert); + } else if (ch == cs->wides[i]) return (!cs->invert); + } for (i = 0; i < cs->nranges; i++) if (cs->ranges[i].min <= ch && ch <= cs->ranges[i].max) return (!cs->invert); Modified: head/lib/libc/regex/utils.h ============================================================================== --- head/lib/libc/regex/utils.h Wed Dec 12 02:33:01 2018 (r341837) +++ head/lib/libc/regex/utils.h Wed Dec 12 04:23:00 2018 (r341838) @@ -39,7 +39,9 @@ /* utility definitions */ #define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ #define INFINITY (DUPMAX + 1) -#define NC (CHAR_MAX - CHAR_MIN + 1) + +#define NC_MAX (CHAR_MAX - CHAR_MIN + 1) +#define NC ((MB_CUR_MAX) == 1 ? (NC_MAX) : (128)) typedef unsigned char uch; /* switch off assertions (if not already off) if no REDEBUG */ Modified: head/lib/libc/tests/regex/multibyte.sh ============================================================================== --- head/lib/libc/tests/regex/multibyte.sh Wed Dec 12 02:33:01 2018 (r341837) +++ head/lib/libc/tests/regex/multibyte.sh Wed Dec 12 04:23:00 2018 (r341838) @@ -1,11 +1,11 @@ # $FreeBSD$ -atf_test_case multibyte -multibyte_head() +atf_test_case bmpat +bmpat_head() { atf_set "descr" "Check matching multibyte characters (PR153502)" } -multibyte_body() +bmpat_body() { export LC_CTYPE="C.UTF-8" @@ -29,7 +29,25 @@ multibyte_body() sed -ne '/.a./p' } +atf_test_case icase +icase_head() +{ + atf_set "descr" "Check case-insensitive matching for characters 128-255" +} +icase_body() +{ + export LC_CTYPE="C.UTF-8" + + a=$(printf '\302\265\n') # U+00B5 + b=$(printf '\316\234\n') # U+039C + c=$(printf '\316\274\n') # U+03BC + + echo $b | atf_check -o "inline:$b\n" sed -ne "/$a/Ip" + echo $c | atf_check -o "inline:$c\n" sed -ne "/$a/Ip" +} + atf_init_test_cases() { - atf_add_test_case multibyte + atf_add_test_case bmpat + atf_add_test_case icase } From owner-svn-src-all@freebsd.org Wed Dec 12 05:09:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 973E4132C512; Wed, 12 Dec 2018 05:09:50 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 3A10C71EED; Wed, 12 Dec 2018 05:09:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F205C2107; Wed, 12 Dec 2018 05:09:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812090645.wB96jnso066329@repo.freebsd.org> From: Jung-uk Kim Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAHNHkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPsLAfQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9zsBNBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAHCwGUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Wed, 12 Dec 2018 00:09:37 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <201812090645.wB96jnso066329@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1WzVlQChcwPiBmKooCiYuMNrbS28KVujs" X-Rspamd-Queue-Id: 3A10C71EED X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.34 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.34)[-0.335,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 05:09:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1WzVlQChcwPiBmKooCiYuMNrbS28KVujs Content-Type: multipart/mixed; boundary="mK5ijTqRdq36SSbJEKLOKtLDhMyjY2IRB"; protected-headers="v1" From: Jung-uk Kim To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... References: <201812090645.wB96jnso066329@repo.freebsd.org> In-Reply-To: <201812090645.wB96jnso066329@repo.freebsd.org> --mK5ijTqRdq36SSbJEKLOKtLDhMyjY2IRB Content-Type: multipart/mixed; boundary="------------875BC694AF1AFD327ADF2704" Content-Language: en-US This is a multi-part message in MIME format. --------------875BC694AF1AFD327ADF2704 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 18. 12. 9., Cy Schubert wrote: > Author: cy > Date: Sun Dec 9 06:45:49 2018 > New Revision: 341759 > URL: https://svnweb.freebsd.org/changeset/base/341759 >=20 > Log: > MFV r341618: > =20 > Update wpa 2.6 --> 2.7. =2E.. This broke my network configuration and I found the following messages from /dev/log/message. =2E.. bge0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=3D0 method=3D25 =2E.. bge0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected =2E.. SSL: SSL3 alert: write (local SSL3 detected an error):fatal:interna= l error =2E.. OpenSSL: openssl_handshake - SSL_connect error:141A90B5:SSL routines:ssl_cipher_list_to_bytes:no ciphers available =2E.. bge0: CTRL-EVENT-EAP-FAILURE EAP authentication failed I tracked it down and found default ciphers were not set because usr.sbin/wpa/Makefile.inc added an empty string, i.e., -DTLS_DEFAULT_CIPHERS=3D\"\". With the attached patch, I got my connection back. Jung-uk Kim --------------875BC694AF1AFD327ADF2704 Content-Type: text/x-patch; name="wpa.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="wpa.diff" Index: usr.sbin/wpa/Makefile.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.sbin/wpa/Makefile.inc (revision 341826) +++ usr.sbin/wpa/Makefile.inc (working copy) @@ -32,6 +32,6 @@ CFLAGS+=3D-I${WPA_DISTDIR}/src/wps CFLAGS+=3D -DCONFIG_CTRL_IFACE CFLAGS+=3D -DCONFIG_CTRL_IFACE_UNIX CFLAGS+=3D -DNEED_AP_MLME -CFLAGS+=3D -DTLS_DEFAULT_CIPHERS=3D\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" +CFLAGS+=3D -DTLS_DEFAULT_CIPHERS=3D\"DEFAULT:!EXP:!LOW\" =20 .include --------------875BC694AF1AFD327ADF2704-- --mK5ijTqRdq36SSbJEKLOKtLDhMyjY2IRB-- --1WzVlQChcwPiBmKooCiYuMNrbS28KVujs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlwQmB0ACgkQfJ+WJvzb 8UZPCQf/fGCa42t3K+WY98wae6F1bhEVVnSqV7/VgsvT35JjiOYD5HsTHRYIauXq Bwi3LSLT7fOgJVGP4qSpNNUuHYY2u+wEYMkDuZhY9MQWg7dCx0B7L/or6ChECMQ0 qybutZ8YcHSEVavpmg8V8n1nT09ja4pe7/GDm9+tsjHBwbl1myOL5kqkALXS9sZl FwCsUKsfOGnishvFydn6Yanlum23NZQ3a+cr4XkJGjtxR8ouI6cgLS5IlgdbcUb2 mzLNkK/MHtxVvQPDw26Y6H2ca0UOy++D0o4nJb7wnj/v1Fan1XczfhqerDA/+Pnr S5IBKd+F0jqi8tV+DlCj3b4hJqfi4A== =3nnk -----END PGP SIGNATURE----- --1WzVlQChcwPiBmKooCiYuMNrbS28KVujs-- From owner-svn-src-all@freebsd.org Wed Dec 12 05:11:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B55DE132C5D2; Wed, 12 Dec 2018 05:11:05 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 542AC720B8; Wed, 12 Dec 2018 05:11:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 2D8812108; Wed, 12 Dec 2018 05:11:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812090645.wB96jnso066329@repo.freebsd.org> From: Jung-uk Kim Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAHNHkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPsLAfQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9zsBNBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAHCwGUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <18c04666-81ac-8610-3373-fac54099f0a0@FreeBSD.org> Date: Wed, 12 Dec 2018 00:11:03 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lsj0ptc2ERzT1TWqrUnhcJ5Dre2luyvj4" X-Rspamd-Queue-Id: 542AC720B8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.89 / 15.00]; NEURAL_HAM_SHORT(-0.89)[-0.894,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 05:11:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lsj0ptc2ERzT1TWqrUnhcJ5Dre2luyvj4 Content-Type: multipart/mixed; boundary="RMFooCOwR8dcSwbC7v9JK1JtTqVdrYEyc"; protected-headers="v1" From: Jung-uk Kim To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <18c04666-81ac-8610-3373-fac54099f0a0@FreeBSD.org> Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... References: <201812090645.wB96jnso066329@repo.freebsd.org> In-Reply-To: --RMFooCOwR8dcSwbC7v9JK1JtTqVdrYEyc Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18. 12. 12., Jung-uk Kim wrote: > On 18. 12. 9., Cy Schubert wrote: >> Author: cy >> Date: Sun Dec 9 06:45:49 2018 >> New Revision: 341759 >> URL: https://svnweb.freebsd.org/changeset/base/341759 >> >> Log: >> MFV r341618: >> =20 >> Update wpa 2.6 --> 2.7. >=20 > ... >=20 > This broke my network configuration and I found the following messages > from /dev/log/message. =2E.. I meant /var/log/message, of course. :-( Jung-uk Kim > ... bge0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=3D0 method=3D25 > ... bge0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected > ... SSL: SSL3 alert: write (local SSL3 detected an error):fatal:interna= l > error > ... OpenSSL: openssl_handshake - SSL_connect error:141A90B5:SSL > routines:ssl_cipher_list_to_bytes:no ciphers available > ... bge0: CTRL-EVENT-EAP-FAILURE EAP authentication failed >=20 > I tracked it down and found default ciphers were not set because > usr.sbin/wpa/Makefile.inc added an empty string, i.e., > -DTLS_DEFAULT_CIPHERS=3D\"\". >=20 > With the attached patch, I got my connection back. >=20 > Jung-uk Kim >=20 --RMFooCOwR8dcSwbC7v9JK1JtTqVdrYEyc-- --lsj0ptc2ERzT1TWqrUnhcJ5Dre2luyvj4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlwQmGcACgkQfJ+WJvzb 8UaC5Af+Igll/CkDktavLJqthBQR4VEXXYtF40tzxNheclfVet9YaOTaVKkJXGrt IuFS9S0zGDnqN86GgOIL+pXFU11KHNj2zrAGXP0zdJOoJ02dzbMtvvdcb5ZDKe6J fH/iQo/5J6oRLidrD0JW4v/LIQUnSsJ2OrNJlNjbfh+iQomv942JnxWCLZAbab5R WO0tHOhi9a0Tm3kluwNBUoumwm+GpsGK1SyKJpF99zi3L1FIDfAttLUdbC2k4zuA HQxec7tu7mgd+kI/WttRSCF9PrvTowQwa5D4or1B28K7Uctq98kmE/hEBOAnIVt6 fy7a11tNx1ZjiCeCvEzVpVjjgRCXnQ== =M4Ig -----END PGP SIGNATURE----- --lsj0ptc2ERzT1TWqrUnhcJ5Dre2luyvj4-- From owner-svn-src-all@freebsd.org Wed Dec 12 05:18:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B430D132C99E; Wed, 12 Dec 2018 05:18:54 +0000 (UTC) (envelope-from cy@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) server-signature RSA-PSS (4096 bits) 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 5590772518; Wed, 12 Dec 2018 05:18:54 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44A5D32E9; Wed, 12 Dec 2018 05:18:54 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC5IslX050511; Wed, 12 Dec 2018 05:18:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC5IstG050510; Wed, 12 Dec 2018 05:18:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812120518.wBC5IstG050510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 12 Dec 2018 05:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341839 - head/usr.sbin/wpa X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/usr.sbin/wpa X-SVN-Commit-Revision: 341839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5590772518 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.81 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 05:18:54 -0000 Author: cy Date: Wed Dec 12 05:18:53 2018 New Revision: 341839 URL: https://svnweb.freebsd.org/changeset/base/341839 Log: Set default ciphers. Submitted by: jkim@ Modified: head/usr.sbin/wpa/Makefile.inc Modified: head/usr.sbin/wpa/Makefile.inc ============================================================================== --- head/usr.sbin/wpa/Makefile.inc Wed Dec 12 04:23:00 2018 (r341838) +++ head/usr.sbin/wpa/Makefile.inc Wed Dec 12 05:18:53 2018 (r341839) @@ -32,6 +32,6 @@ CFLAGS+=-I${WPA_DISTDIR}/src/wps CFLAGS+= -DCONFIG_CTRL_IFACE CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX CFLAGS+= -DNEED_AP_MLME -CFLAGS+= -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" +CFLAGS+= -DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\" .include From owner-svn-src-all@freebsd.org Wed Dec 12 05:19:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98604132CA0E; Wed, 12 Dec 2018 05:19:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6704A7266E; Wed, 12 Dec 2018 05:19:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id WwvsgrZZOjQc4Wwvugbun0; Tue, 11 Dec 2018 22:19:43 -0700 X-Authority-Analysis: v=2.3 cv=bOrH382Z c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=2ur7OfE09M0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=fRmYTVWRwOMxQfEAvpAA:9 a=3eARA4lSvbWh3vOy:21 a=xjCUlXF-SKpJWqBw:21 a=CjuIK1q_8ugA:10 a=c-ay3Q83pGQA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id CFBFA1BE3; Tue, 11 Dec 2018 21:19:39 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id wBC5JdNA013207; Tue, 11 Dec 2018 21:19:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id wBC5Jdd4013204; Tue, 11 Dec 2018 21:19:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201812120519.wBC5Jdd4013204@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jung-uk Kim cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... In-Reply-To: Message from Jung-uk Kim of "Wed, 12 Dec 2018 00:09:37 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 11 Dec 2018 21:19:39 -0800 X-CMAE-Envelope: MS4wfOmbAkKDM/gKMYjGH+TqaJ73AMIusn6F3aholjUZYyStcd2R+vZPZmPUrnSxLiKbsumQS5t14qgngcvQntPRZAiY9mxOz4Vx8A8qElexIy0QI1wCXz4I QNFflDcIYTma1DMUXodqfEu6RCv/GG6eZ2wGv1xu3c9b9jnzqPmi7YgnZoC582/Dc1QLL7QKYRI2LS+jfKTn0Lh0nVRlm0VeYS61NKBAsKxgRoj09MyX/aD4 SGNJA63QW65z76jnql8uYX54Pq8RLD+Unpko+uyV+15bfXnn4HkSpLxHehwjatP82svdvDk5uFm1paMbV8kI8Q== X-Rspamd-Queue-Id: 6704A7266E X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.44 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; LONG_SUBJ(1.52)[203]; RCVD_TLS_LAST(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; REPLYTO_EQ_FROM(0.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; R_SPF_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.31)[ip: (-6.34), ipnet: 64.59.128.0/20(-2.84), asn: 6327(-2.27), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[12.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 05:19:52 -0000 In message , Jung-uk Kim writ es: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --1WzVlQChcwPiBmKooCiYuMNrbS28KVujs > Content-Type: multipart/mixed; boundary="mK5ijTqRdq36SSbJEKLOKtLDhMyjY2IRB"; > protected-headers="v1" > From: Jung-uk Kim > To: Cy Schubert , src-committers@freebsd.org, > svn-src-all@freebsd.org, svn-src-head@freebsd.org > Message-ID: > Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd > contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common > contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... > References: <201812090645.wB96jnso066329@repo.freebsd.org> > In-Reply-To: <201812090645.wB96jnso066329@repo.freebsd.org> > > --mK5ijTqRdq36SSbJEKLOKtLDhMyjY2IRB > Content-Type: multipart/mixed; > boundary="------------875BC694AF1AFD327ADF2704" > Content-Language: en-US > > This is a multi-part message in MIME format. > --------------875BC694AF1AFD327ADF2704 > Content-Type: text/plain; charset=utf-8 > Content-Transfer-Encoding: quoted-printable > > On 18. 12. 9., Cy Schubert wrote: > > Author: cy > > Date: Sun Dec 9 06:45:49 2018 > > New Revision: 341759 > > URL: https://svnweb.freebsd.org/changeset/base/341759 > >=20 > > Log: > > MFV r341618: > > =20 > > Update wpa 2.6 --> 2.7. > > =2E.. > > This broke my network configuration and I found the following messages > from /dev/log/message. > > =2E.. bge0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=3D0 method=3D25 > =2E.. bge0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected > =2E.. SSL: SSL3 alert: write (local SSL3 detected an error):fatal:interna= > l > error > =2E.. OpenSSL: openssl_handshake - SSL_connect error:141A90B5:SSL > routines:ssl_cipher_list_to_bytes:no ciphers available > =2E.. bge0: CTRL-EVENT-EAP-FAILURE EAP authentication failed > > I tracked it down and found default ciphers were not set because > usr.sbin/wpa/Makefile.inc added an empty string, i.e., > -DTLS_DEFAULT_CIPHERS=3D\"\". > > With the attached patch, I got my connection back. > > Jung-uk Kim Thanks for that jkim@. It's in r341839 now. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Dec 12 05:22:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3363132CC5F; Wed, 12 Dec 2018 05:22:07 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 78D3772A0A; Wed, 12 Dec 2018 05:22:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 6317D2339; Wed, 12 Dec 2018 05:22:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r341759 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/src/eap_c... From: Jung-uk Kim To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812090645.wB96jnso066329@repo.freebsd.org> <18c04666-81ac-8610-3373-fac54099f0a0@FreeBSD.org> Message-ID: Date: Wed, 12 Dec 2018 00:22:06 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <18c04666-81ac-8610-3373-fac54099f0a0@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 78D3772A0A X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.87 / 15.00]; NEURAL_HAM_SHORT(-0.87)[-0.865,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 05:22:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 18. 12. 12., Jung-uk Kim wrote: > On 18. 12. 12., Jung-uk Kim wrote: >> On 18. 12. 9., Cy Schubert wrote: >>> Author: cy Date: Sun Dec 9 06:45:49 2018 New Revision: 341759 >>> URL: https://svnweb.freebsd.org/changeset/base/341759 >>> >>> Log: MFV r341618: >>> >>> Update wpa 2.6 --> 2.7. >> >> ... >> >> This broke my network configuration and I found the following >> messages from /dev/log/message. > > ... > > I meant /var/log/message, of course. :-( ... Doh! /var/log/messages Sorry for typos. I guess I need some sleep... Jung-uk Kim -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlwQmvEACgkQfJ+WJvzb 8UaOQgf/YDXVqV7m7EZKISsL0E/2DKsmzoe9vSjZJE5WE2fNEmPwpbt0QU/MexGY F8HrClLDJhQqsvbQB3fjLPDB+v+Qg64eIJ1YwGHPu7qvbRGvsKCYWYT79Eiejh0f 68tAkLj5GKCBb53awug+Jn79sBzfeUC7BPLRPbkfoF4vp7/gWBsEpU8zbIMgPjuk 5r6PM4exKN1mYM9950WSDlkpcJbUku6B3RLneRZKMDJYi68B/POb88KEGtaEkMfQ 2Kv7vi+IBLlceTmUYa8Mm2A5Rtf6g3UuG7hg+YAQZeIR/SPxraVIosUONrz5NIHd e8Baav1oi7sFPnY2VwdtnuOmX18saA== =Am+x -----END PGP SIGNATURE----- From owner-svn-src-all@freebsd.org Wed Dec 12 05:48:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C12A132EB39; Wed, 12 Dec 2018 05:48:28 +0000 (UTC) (envelope-from cem@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) server-signature RSA-PSS (4096 bits) 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 3F3B47363D; Wed, 12 Dec 2018 05:48:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E6E439E6; Wed, 12 Dec 2018 05:48:28 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC5mRc7066448; Wed, 12 Dec 2018 05:48:27 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC5mRZ8066447; Wed, 12 Dec 2018 05:48:27 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201812120548.wBC5mRZ8066447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 12 Dec 2018 05:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341840 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 341840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3F3B47363D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.660,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 05:48:28 -0000 Author: cem Date: Wed Dec 12 05:48:27 2018 New Revision: 341840 URL: https://svnweb.freebsd.org/changeset/base/341840 Log: gmirror: Fix a bug introduced in r341674 r341674 inadvertently introduced a bug where newer mirror components being tasted would clear the high sc_flags that are not controlled by component metadata, such as G_MIRROR_DEVICE_FLAG_TASTING. This could plausibly expose a small window of time during STARTING where device destruction might race with mirror component addition, probably resulting in a crash. Reviewed by: markj X-MFC-With: r341674 Differential Revision: https://reviews.freebsd.org/D18521 Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Wed Dec 12 05:18:53 2018 (r341839) +++ head/sys/geom/mirror/g_mirror.c Wed Dec 12 05:48:27 2018 (r341840) @@ -3061,6 +3061,8 @@ g_mirror_reinit_from_metadata(struct g_mirror_softc *s const struct g_mirror_metadata *md) { + sx_assert(&sc->sc_lock, SX_XLOCKED); + sc->sc_genid = md->md_genid; sc->sc_syncid = md->md_syncid; @@ -3068,7 +3070,8 @@ g_mirror_reinit_from_metadata(struct g_mirror_softc *s sc->sc_balance = md->md_balance; sc->sc_mediasize = md->md_mediasize; sc->sc_ndisks = md->md_all; - sc->sc_flags = md->md_mflags; + sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_MASK; + sc->sc_flags |= (md->md_mflags & G_MIRROR_DEVICE_FLAG_MASK); } struct g_geom * From owner-svn-src-all@freebsd.org Wed Dec 12 08:55:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED8831333540; Wed, 12 Dec 2018 08:55:54 +0000 (UTC) (envelope-from ae@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) server-signature RSA-PSS (4096 bits) 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 93CD180AC8; Wed, 12 Dec 2018 08:55:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 894FE5AB3; Wed, 12 Dec 2018 08:55:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC8ts3i065221; Wed, 12 Dec 2018 08:55:54 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC8tsAd065220; Wed, 12 Dec 2018 08:55:54 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201812120855.wBC8tsAd065220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 12 Dec 2018 08:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341841 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 341841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 93CD180AC8 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.674,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 08:55:55 -0000 Author: ae Date: Wed Dec 12 08:55:54 2018 New Revision: 341841 URL: https://svnweb.freebsd.org/changeset/base/341841 Log: MFC r341469: Add assertion to check that named object has correct type. Modified: stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Dec 12 05:48:27 2018 (r341840) +++ stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Dec 12 08:55:54 2018 (r341841) @@ -708,6 +708,8 @@ dyn_destroy(struct ip_fw_chain *ch, struct named_objec IPFW_UH_WLOCK_ASSERT(ch); + KASSERT(no->etlv == IPFW_TLV_STATE_NAME, + ("%s: wrong object type %u", __func__, no->etlv)); KASSERT(no->refcnt == 1, ("Destroying object '%s' (type %u, idx %u) with refcnt %u", no->name, no->etlv, no->kidx, no->refcnt)); From owner-svn-src-all@freebsd.org Wed Dec 12 08:59:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F98B13336E0; Wed, 12 Dec 2018 08:59:07 +0000 (UTC) (envelope-from ae@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) server-signature RSA-PSS (4096 bits) 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 CBD3880D1F; Wed, 12 Dec 2018 08:59:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C18C65AB9; Wed, 12 Dec 2018 08:59:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC8x6AJ065409; Wed, 12 Dec 2018 08:59:06 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC8x6Lq065408; Wed, 12 Dec 2018 08:59:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201812120859.wBC8x6Lq065408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 12 Dec 2018 08:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341842 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 341842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CBD3880D1F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.674,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 08:59:07 -0000 Author: ae Date: Wed Dec 12 08:59:06 2018 New Revision: 341842 URL: https://svnweb.freebsd.org/changeset/base/341842 Log: MFC r341469: Add assertion to check that named object has correct type. Modified: stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Dec 12 08:55:54 2018 (r341841) +++ stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Dec 12 08:59:06 2018 (r341842) @@ -707,6 +707,8 @@ dyn_destroy(struct ip_fw_chain *ch, struct named_objec IPFW_UH_WLOCK_ASSERT(ch); + KASSERT(no->etlv == IPFW_TLV_STATE_NAME, + ("%s: wrong object type %u", __func__, no->etlv)); KASSERT(no->refcnt == 1, ("Destroying object '%s' (type %u, idx %u) with refcnt %u", no->name, no->etlv, no->kidx, no->refcnt)); From owner-svn-src-all@freebsd.org Wed Dec 12 09:03:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC8991333D0F; Wed, 12 Dec 2018 09:03:12 +0000 (UTC) (envelope-from ae@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) server-signature RSA-PSS (4096 bits) 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 6DEC0812E4; Wed, 12 Dec 2018 09:03:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 455385C72; Wed, 12 Dec 2018 09:03:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC93CE9070371; Wed, 12 Dec 2018 09:03:12 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC93ARa070362; Wed, 12 Dec 2018 09:03:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201812120903.wBC93ARa070362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 12 Dec 2018 09:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341843 - in stable/12: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nptv6 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/12: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nptv6 X-SVN-Commit-Revision: 341843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6DEC0812E4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.68 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.68)[-0.679,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 09:03:13 -0000 Author: ae Date: Wed Dec 12 09:03:10 2018 New Revision: 341843 URL: https://svnweb.freebsd.org/changeset/base/341843 Log: MFC r340360: Add ability to use dynamic external prefix in ipfw_nptv6 module. Now an interface name can be specified for nptv6 instance instead of ext_prefix. The module will track if_addr_ext events and when suitable IPv6 address will be added to specified interface, it will be configured as external prefix. When address disappears instance becomes unusable, i.e. it doesn't match any packets. Reviewed by: 0mp (manpages) Tested by: Dries Michiels Differential Revision: https://reviews.freebsd.org/D17765 Modified: stable/12/sbin/ipfw/ipfw.8 stable/12/sbin/ipfw/ipfw2.h stable/12/sbin/ipfw/nptv6.c stable/12/sys/netinet6/ip_fw_nptv6.h stable/12/sys/netpfil/ipfw/nptv6/nptv6.c stable/12/sys/netpfil/ipfw/nptv6/nptv6.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Wed Dec 12 08:59:06 2018 (r341842) +++ stable/12/sbin/ipfw/ipfw.8 Wed Dec 12 09:03:10 2018 (r341843) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2018 +.Dd November 12, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -3495,6 +3495,15 @@ NPTv6 module translates source address when it matches .It Cm ext_prefix Ar ipv6_prefix IPv6 prefix used in external network. NPTv6 module translates destination address when it matches this prefix. +.It Cm ext_if Ar nic +The NPTv6 module will use first global IPv6 address from interface +.Ar nic +as external prefix. +It can be useful when IPv6 prefix of external network is dynamically obtained. +.Cm ext_prefix +and +.Cm ext_if +options are mutually exclusive. .It Cm prefixlen Ar length The length of specified IPv6 prefixes. It must be in range from 8 to 64. .El Modified: stable/12/sbin/ipfw/ipfw2.h ============================================================================== --- stable/12/sbin/ipfw/ipfw2.h Wed Dec 12 08:59:06 2018 (r341842) +++ stable/12/sbin/ipfw/ipfw2.h Wed Dec 12 09:03:10 2018 (r341843) @@ -294,6 +294,7 @@ enum tokens { TOK_INTPREFIX, TOK_EXTPREFIX, TOK_PREFIXLEN, + TOK_EXTIF, TOK_TCPSETMSS, Modified: stable/12/sbin/ipfw/nptv6.c ============================================================================== --- stable/12/sbin/ipfw/nptv6.c Wed Dec 12 08:59:06 2018 (r341842) +++ stable/12/sbin/ipfw/nptv6.c Wed Dec 12 09:03:10 2018 (r341843) @@ -152,6 +152,7 @@ static struct _s_x nptv6newcmds[] = { { "int_prefix", TOK_INTPREFIX }, { "ext_prefix", TOK_EXTPREFIX }, { "prefixlen", TOK_PREFIXLEN }, + { "ext_if", TOK_EXTIF }, { NULL, 0 } }; @@ -214,6 +215,9 @@ nptv6_create(const char *name, uint8_t set, int ac, ch ac--; av++; break; case TOK_EXTPREFIX: + if (flags & NPTV6_HAS_EXTPREFIX) + errx(EX_USAGE, + "Only one ext_prefix or ext_if allowed"); NEED1("IPv6 prefix required"); nptv6_parse_prefix(*av, &cfg->external, &plen); flags |= NPTV6_HAS_EXTPREFIX; @@ -221,6 +225,18 @@ nptv6_create(const char *name, uint8_t set, int ac, ch goto check_prefix; ac--; av++; break; + case TOK_EXTIF: + if (flags & NPTV6_HAS_EXTPREFIX) + errx(EX_USAGE, + "Only one ext_prefix or ext_if allowed"); + NEED1("Interface name required"); + if (strlen(*av) >= sizeof(cfg->if_name)) + errx(EX_USAGE, "Invalid interface name"); + flags |= NPTV6_HAS_EXTPREFIX; + cfg->flags |= NPTV6_DYNAMIC_PREFIX; + strncpy(cfg->if_name, *av, sizeof(cfg->if_name)); + ac--; av++; + break; case TOK_PREFIXLEN: NEED1("IPv6 prefix length required"); plen = strtol(*av, &p, 10); @@ -245,13 +261,14 @@ check_prefix: if ((flags & NPTV6_HAS_INTPREFIX) != NPTV6_HAS_INTPREFIX) errx(EX_USAGE, "int_prefix required"); if ((flags & NPTV6_HAS_EXTPREFIX) != NPTV6_HAS_EXTPREFIX) - errx(EX_USAGE, "ext_prefix required"); + errx(EX_USAGE, "ext_prefix or ext_if required"); if ((flags & NPTV6_HAS_PREFIXLEN) != NPTV6_HAS_PREFIXLEN) errx(EX_USAGE, "prefixlen required"); n2mask(&mask, cfg->plen); APPLY_MASK(&cfg->internal, &mask); - APPLY_MASK(&cfg->external, &mask); + if ((cfg->flags & NPTV6_DYNAMIC_PREFIX) == 0) + APPLY_MASK(&cfg->external, &mask); olh->count = 1; olh->objsize = sizeof(*cfg); @@ -350,8 +367,13 @@ nptv6_show_cb(ipfw_nptv6_cfg *cfg, const char *name, u printf("set %u ", cfg->set); inet_ntop(AF_INET6, &cfg->internal, abuf, sizeof(abuf)); printf("nptv6 %s int_prefix %s ", cfg->name, abuf); - inet_ntop(AF_INET6, &cfg->external, abuf, sizeof(abuf)); - printf("ext_prefix %s prefixlen %u\n", abuf, cfg->plen); + if (cfg->flags & NPTV6_DYNAMIC_PREFIX) + printf("ext_if %s ", cfg->if_name); + else { + inet_ntop(AF_INET6, &cfg->external, abuf, sizeof(abuf)); + printf("ext_prefix %s ", abuf); + } + printf("prefixlen %u\n", cfg->plen); return (0); } Modified: stable/12/sys/netinet6/ip_fw_nptv6.h ============================================================================== --- stable/12/sys/netinet6/ip_fw_nptv6.h Wed Dec 12 08:59:06 2018 (r341842) +++ stable/12/sys/netinet6/ip_fw_nptv6.h Wed Dec 12 09:03:10 2018 (r341843) @@ -40,11 +40,15 @@ struct ipfw_nptv6_stats { typedef struct _ipfw_nptv6_cfg { char name[64]; /* NPTv6 instance name */ struct in6_addr internal; /* NPTv6 internal prefix */ - struct in6_addr external; /* NPTv6 external prefix */ + union { + struct in6_addr external; /* NPTv6 external prefix */ + char if_name[IF_NAMESIZE]; + }; uint8_t plen; /* Prefix length */ uint8_t set; /* Named instance set [0..31] */ uint8_t spare[2]; uint32_t flags; +#define NPTV6_DYNAMIC_PREFIX 1 /* Use dynamic external prefix */ } ipfw_nptv6_cfg; #endif /* _NETINET6_IP_FW_NPTV6_H_ */ Modified: stable/12/sys/netpfil/ipfw/nptv6/nptv6.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nptv6/nptv6.c Wed Dec 12 08:59:06 2018 (r341842) +++ stable/12/sys/netpfil/ipfw/nptv6/nptv6.c Wed Dec 12 09:03:10 2018 (r341843) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -65,6 +66,8 @@ VNET_DEFINE_STATIC(uint16_t, nptv6_eid) = 0; #define V_nptv6_eid VNET(nptv6_eid) #define IPFW_TLV_NPTV6_NAME IPFW_TLV_EACTION_NAME(V_nptv6_eid) +static eventhandler_tag nptv6_ifaddr_event; + static struct nptv6_cfg *nptv6_alloc_config(const char *name, uint8_t set); static void nptv6_free_config(struct nptv6_cfg *cfg); static struct nptv6_cfg *nptv6_find(struct namedobj_instance *ni, @@ -357,7 +360,8 @@ ipfw_nptv6(struct ip_fw_chain *chain, struct ip_fw_arg if (cmd->opcode != O_EXTERNAL_ACTION || cmd->arg1 != V_nptv6_eid || icmd->opcode != O_EXTERNAL_INSTANCE || - (cfg = NPTV6_LOOKUP(chain, icmd)) == NULL) + (cfg = NPTV6_LOOKUP(chain, icmd)) == NULL || + (cfg->flags & NPTV6_READY) == 0) return (ret); /* * We need act as router, so when forwarding is disabled - @@ -442,7 +446,10 @@ nptv6_export_config(struct ip_fw_chain *ch, struct npt { uc->internal = cfg->internal; - uc->external = cfg->external; + if (cfg->flags & NPTV6_DYNAMIC_PREFIX) + memcpy(uc->if_name, cfg->if_name, IF_NAMESIZE); + else + uc->external = cfg->external; uc->plen = cfg->plen; uc->flags = cfg->flags & NPTV6_FLAGSMASK; uc->set = cfg->no.set; @@ -497,7 +504,141 @@ nptv6_calculate_adjustment(struct nptv6_cfg *cfg) cfg->adjustment = cksum_add(~e, i); } +static int +nptv6_check_prefix(const struct in6_addr *addr) +{ + + if (IN6_IS_ADDR_MULTICAST(addr) || + IN6_IS_ADDR_LINKLOCAL(addr) || + IN6_IS_ADDR_LOOPBACK(addr) || + IN6_IS_ADDR_UNSPECIFIED(addr)) + return (EINVAL); + return (0); +} + +static void +nptv6_set_external(struct nptv6_cfg *cfg, struct in6_addr *addr) +{ + + cfg->external = *addr; + IN6_MASK_ADDR(&cfg->external, &cfg->mask); + nptv6_calculate_adjustment(cfg); + cfg->flags |= NPTV6_READY; +} + /* + * Try to determine what prefix to use as external for + * configured interface name. + */ +static void +nptv6_find_prefix(struct ip_fw_chain *ch, struct nptv6_cfg *cfg, + struct ifnet *ifp) +{ + struct ifaddr *ifa; + struct in6_ifaddr *ia; + + MPASS(cfg->flags & NPTV6_DYNAMIC_PREFIX); + IPFW_UH_WLOCK_ASSERT(ch); + + if (ifp == NULL) { + ifp = ifunit_ref(cfg->if_name); + if (ifp == NULL) + return; + } + if_addr_rlock(ifp); + CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + ia = (struct in6_ifaddr *)ifa; + if (nptv6_check_prefix(&ia->ia_addr.sin6_addr) || + IN6_ARE_MASKED_ADDR_EQUAL(&ia->ia_addr.sin6_addr, + &cfg->internal, &cfg->mask)) + continue; + /* Suitable address is found. */ + nptv6_set_external(cfg, &ia->ia_addr.sin6_addr); + break; + } + if_addr_runlock(ifp); + if_rele(ifp); +} + +struct ifaddr_event_args { + struct ifnet *ifp; + const struct in6_addr *addr; + int event; +}; + +static int +ifaddr_cb(struct namedobj_instance *ni, struct named_object *no, + void *arg) +{ + struct ifaddr_event_args *args; + struct ip_fw_chain *ch; + struct nptv6_cfg *cfg; + + ch = &V_layer3_chain; + cfg = (struct nptv6_cfg *)SRV_OBJECT(ch, no->kidx); + if ((cfg->flags & NPTV6_DYNAMIC_PREFIX) == 0) + return (0); + + args = arg; + /* If interface name doesn't match, ignore */ + if (strncmp(args->ifp->if_xname, cfg->if_name, IF_NAMESIZE)) + return (0); + if (args->ifp->if_flags & IFF_DYING) { /* XXX: is it possible? */ + cfg->flags &= ~NPTV6_READY; + return (0); + } + if (args->event == IFADDR_EVENT_DEL) { + /* If instance is not ready, ignore */ + if ((cfg->flags & NPTV6_READY) == 0) + return (0); + /* If address does not match the external prefix, ignore */ + if (IN6_ARE_MASKED_ADDR_EQUAL(&cfg->external, args->addr, + &cfg->mask) != 0) + return (0); + /* Otherwise clear READY flag */ + cfg->flags &= ~NPTV6_READY; + } else {/* IFADDR_EVENT_ADD */ + /* If instance is already ready, ignore */ + if (cfg->flags & NPTV6_READY) + return (0); + /* If address is not suitable for prefix, ignore */ + if (nptv6_check_prefix(args->addr) || + IN6_ARE_MASKED_ADDR_EQUAL(args->addr, &cfg->internal, + &cfg->mask)) + return (0); + /* FALLTHROUGH */ + } + MPASS(!(cfg->flags & NPTV6_READY)); + /* Try to determine the prefix */ + if_ref(args->ifp); + nptv6_find_prefix(ch, cfg, args->ifp); + return (0); +} + +static void +nptv6_ifaddrevent_handler(void *arg __unused, struct ifnet *ifp, + struct ifaddr *ifa, int event) +{ + struct ifaddr_event_args args; + struct ip_fw_chain *ch; + + if (ifa->ifa_addr->sa_family != AF_INET6) + return; + + args.ifp = ifp; + args.addr = &((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr; + args.event = event; + + ch = &V_layer3_chain; + IPFW_UH_WLOCK(ch); + ipfw_objhash_foreach_type(CHAIN_TO_SRV(ch), ifaddr_cb, &args, + IPFW_TLV_NPTV6_NAME); + IPFW_UH_WUNLOCK(ch); +} + +/* * Creates new NPTv6 instance. * Data layout (v0)(current): * Request: [ ipfw_obj_lheader ipfw_nptv6_cfg ] @@ -523,15 +664,12 @@ nptv6_create(struct ip_fw_chain *ch, ip_fw3_opheader * return (EINVAL); if (uc->plen < 8 || uc->plen > 64 || uc->set >= IPFW_MAX_SETS) return (EINVAL); - if (IN6_IS_ADDR_MULTICAST(&uc->internal) || - IN6_IS_ADDR_MULTICAST(&uc->external) || - IN6_IS_ADDR_UNSPECIFIED(&uc->internal) || - IN6_IS_ADDR_UNSPECIFIED(&uc->external) || - IN6_IS_ADDR_LINKLOCAL(&uc->internal) || - IN6_IS_ADDR_LINKLOCAL(&uc->external)) + if (nptv6_check_prefix(&uc->internal)) return (EINVAL); in6_prefixlen2mask(&mask, uc->plen); - if (IN6_ARE_MASKED_ADDR_EQUAL(&uc->internal, &uc->external, &mask)) + if ((uc->flags & NPTV6_DYNAMIC_PREFIX) == 0 && ( + nptv6_check_prefix(&uc->external) || + IN6_ARE_MASKED_ADDR_EQUAL(&uc->external, &uc->internal, &mask))) return (EINVAL); ni = CHAIN_TO_SRV(ch); @@ -544,15 +682,23 @@ nptv6_create(struct ip_fw_chain *ch, ip_fw3_opheader * cfg = nptv6_alloc_config(uc->name, uc->set); cfg->plen = uc->plen; + cfg->flags = uc->flags & NPTV6_FLAGSMASK; if (cfg->plen <= 48) cfg->flags |= NPTV6_48PLEN; - cfg->internal = uc->internal; - cfg->external = uc->external; cfg->mask = mask; + cfg->internal = uc->internal; IN6_MASK_ADDR(&cfg->internal, &mask); - IN6_MASK_ADDR(&cfg->external, &mask); - nptv6_calculate_adjustment(cfg); + if (cfg->flags & NPTV6_DYNAMIC_PREFIX) + memcpy(cfg->if_name, uc->if_name, IF_NAMESIZE); + else + nptv6_set_external(cfg, &uc->external); + if ((uc->flags & NPTV6_DYNAMIC_PREFIX) != 0 && + nptv6_ifaddr_event == NULL) + nptv6_ifaddr_event = EVENTHANDLER_REGISTER( + ifaddr_event_ext, nptv6_ifaddrevent_handler, NULL, + EVENTHANDLER_PRI_ANY); + IPFW_UH_WLOCK(ch); if (ipfw_objhash_alloc_idx(ni, &cfg->no.kidx) != 0) { IPFW_UH_WUNLOCK(ch); @@ -561,7 +707,10 @@ nptv6_create(struct ip_fw_chain *ch, ip_fw3_opheader * } ipfw_objhash_add(ni, &cfg->no); SRV_OBJECT(ch, cfg->no.kidx) = cfg; + if (cfg->flags & NPTV6_DYNAMIC_PREFIX) + nptv6_find_prefix(ch, cfg, NULL); IPFW_UH_WUNLOCK(ch); + return (0); } @@ -870,6 +1019,8 @@ void nptv6_uninit(struct ip_fw_chain *ch, int last) { + if (last && nptv6_ifaddr_event != NULL) + EVENTHANDLER_DEREGISTER(ifaddr_event_ext, nptv6_ifaddr_event); IPFW_DEL_OBJ_REWRITER(last, opcodes); IPFW_DEL_SOPT_HANDLER(last, scodes); ipfw_del_eaction(ch, V_nptv6_eid); Modified: stable/12/sys/netpfil/ipfw/nptv6/nptv6.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nptv6/nptv6.h Wed Dec 12 08:59:06 2018 (r341842) +++ stable/12/sys/netpfil/ipfw/nptv6/nptv6.h Wed Dec 12 09:03:10 2018 (r341843) @@ -51,11 +51,14 @@ struct nptv6_cfg { uint16_t adjustment; /* Checksum adjustment value */ uint8_t plen; /* Prefix length */ uint8_t flags; /* Flags for internal use */ -#define NPTV6_48PLEN 0x0001 +#define NPTV6_READY 0x80 +#define NPTV6_48PLEN 0x40 + + char if_name[IF_NAMESIZE]; char name[64]; /* Instance name */ counter_u64_t stats[NPTV6STATS]; /* Statistics counters */ }; -#define NPTV6_FLAGSMASK 0 +#define NPTV6_FLAGSMASK (NPTV6_DYNAMIC_PREFIX) int nptv6_init(struct ip_fw_chain *ch, int first); void nptv6_uninit(struct ip_fw_chain *ch, int last); From owner-svn-src-all@freebsd.org Wed Dec 12 09:51:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CD3E1335923; Wed, 12 Dec 2018 09:51:11 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 A7439831B2; Wed, 12 Dec 2018 09:51:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C4036366; Wed, 12 Dec 2018 09:51:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBC9pAIM092590; Wed, 12 Dec 2018 09:51:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBC9pAqx092589; Wed, 12 Dec 2018 09:51:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812120951.wBC9pAqx092589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 09:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341844 - head/contrib/tcpdump X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/contrib/tcpdump X-SVN-Commit-Revision: 341844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7439831B2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.669,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 09:51:11 -0000 Author: hselasky Date: Wed Dec 12 09:51:10 2018 New Revision: 341844 URL: https://svnweb.freebsd.org/changeset/base/341844 Log: Don't register IOCTLs with capsicum when there is no valid file descriptor. This fixes tcpdump when using mlx5_X devices. Differential Revision: https://reviews.freebsd.org/D18499 Reviewed by: kib@, slavash@, oshogbo@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Wed Dec 12 09:03:10 2018 (r341843) +++ head/contrib/tcpdump/tcpdump.c Wed Dec 12 09:51:10 2018 (r341844) @@ -1915,7 +1915,7 @@ main(int argc, char **argv) if (pcap_setfilter(pd, &fcode) < 0) error("%s", pcap_geterr(pd)); #ifdef HAVE_CAPSICUM - if (RFileName == NULL && VFileName == NULL) { + if (RFileName == NULL && VFileName == NULL && pcap_fileno(pd) != -1) { static const unsigned long cmds[] = { BIOCGSTATS, BIOCROTZBUF }; /* From owner-svn-src-all@freebsd.org Wed Dec 12 10:00:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 840501335C04; Wed, 12 Dec 2018 10:00:10 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 0FCF183759; Wed, 12 Dec 2018 10:00:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 003CB64EF; Wed, 12 Dec 2018 10:00:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCA09VR097298; Wed, 12 Dec 2018 10:00:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCA09gm097297; Wed, 12 Dec 2018 10:00:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121000.wBCA09gm097297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341845 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 341845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0FCF183759 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:00:10 -0000 Author: hselasky Date: Wed Dec 12 10:00:09 2018 New Revision: 341845 URL: https://svnweb.freebsd.org/changeset/base/341845 Log: MFC r341517 and r341592: linuxkpi: implement idr_is_empty() and ida_is_empty(). Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/idr.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/idr.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/idr.h Wed Dec 12 09:51:10 2018 (r341844) +++ stable/12/sys/compat/linuxkpi/common/include/linux/idr.h Wed Dec 12 10:00:09 2018 (r341845) @@ -122,7 +122,15 @@ void ida_simple_remove(struct ida *ida, unsigned int i static inline int ida_get_new(struct ida *ida, int *p_id) { + return (ida_get_new_above(ida, 0, p_id)); +} + +static inline bool +ida_is_empty(struct ida *ida) +{ + + return (idr_is_empty(&ida->idr)); } #endif /* _LINUX_IDR_H_ */ From owner-svn-src-all@freebsd.org Wed Dec 12 10:01:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C2321335E81; Wed, 12 Dec 2018 10:01:41 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E616983A97; Wed, 12 Dec 2018 10:01:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBDAD6647; Wed, 12 Dec 2018 10:01:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCA1eDc097430; Wed, 12 Dec 2018 10:01:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCA1elF097429; Wed, 12 Dec 2018 10:01:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121001.wBCA1elF097429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341846 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 341846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E616983A97 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:01:41 -0000 Author: hselasky Date: Wed Dec 12 10:01:40 2018 New Revision: 341846 URL: https://svnweb.freebsd.org/changeset/base/341846 Log: MFC r341517 and r341592: linuxkpi: implement idr_is_empty() and ida_is_empty(). Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/idr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/idr.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/idr.h Wed Dec 12 10:00:09 2018 (r341845) +++ stable/11/sys/compat/linuxkpi/common/include/linux/idr.h Wed Dec 12 10:01:40 2018 (r341846) @@ -122,7 +122,15 @@ void ida_simple_remove(struct ida *ida, unsigned int i static inline int ida_get_new(struct ida *ida, int *p_id) { + return (ida_get_new_above(ida, 0, p_id)); +} + +static inline bool +ida_is_empty(struct ida *ida) +{ + + return (idr_is_empty(&ida->idr)); } #endif /* _LINUX_IDR_H_ */ From owner-svn-src-all@freebsd.org Wed Dec 12 10:04:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF23C1335F5D; Wed, 12 Dec 2018 10:04:35 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 7113D83CDF; Wed, 12 Dec 2018 10:04:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C7906690; Wed, 12 Dec 2018 10:04:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCA4Z5O002538; Wed, 12 Dec 2018 10:04:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCA4ZgO002537; Wed, 12 Dec 2018 10:04:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121004.wBCA4ZgO002537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341847 - stable/12/sys/compat/linuxkpi/common/include/asm X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 341847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7113D83CDF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:04:36 -0000 Author: hselasky Date: Wed Dec 12 10:04:34 2018 New Revision: 341847 URL: https://svnweb.freebsd.org/changeset/base/341847 Log: MFC r341591: Fix build of the atomic long LinuxKPI header file on some platforms. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/asm/atomic-long.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/asm/atomic-long.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/asm/atomic-long.h Wed Dec 12 10:01:40 2018 (r341846) +++ stable/12/sys/compat/linuxkpi/common/include/asm/atomic-long.h Wed Dec 12 10:04:34 2018 (r341847) @@ -78,7 +78,15 @@ atomic_long_dec(atomic_long_t *v) static inline long atomic_long_xchg(atomic_long_t *v, long val) { +#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) return atomic_swap_long(&v->counter, val); +#else + long ret = atomic_long_read(v); + + while (!atomic_fcmpset_long(&v->counter, &ret, val)) + ; + return (ret); +#endif } static inline long From owner-svn-src-all@freebsd.org Wed Dec 12 10:05:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A82D41335FE6; Wed, 12 Dec 2018 10:05:42 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 4D55C83E39; Wed, 12 Dec 2018 10:05:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 410956692; Wed, 12 Dec 2018 10:05:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCA5gSp002654; Wed, 12 Dec 2018 10:05:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCA5gL5002653; Wed, 12 Dec 2018 10:05:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121005.wBCA5gL5002653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341848 - stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 341848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D55C83E39 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:05:42 -0000 Author: hselasky Date: Wed Dec 12 10:05:41 2018 New Revision: 341848 URL: https://svnweb.freebsd.org/changeset/base/341848 Log: MFC r341591: Fix build of the atomic long LinuxKPI header file on some platforms. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Wed Dec 12 10:04:34 2018 (r341847) +++ stable/11/sys/compat/linuxkpi/common/include/asm/atomic-long.h Wed Dec 12 10:05:41 2018 (r341848) @@ -78,7 +78,15 @@ atomic_long_dec(atomic_long_t *v) static inline long atomic_long_xchg(atomic_long_t *v, long val) { +#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) return atomic_swap_long(&v->counter, val); +#else + long ret = atomic_long_read(v); + + while (!atomic_fcmpset_long(&v->counter, &ret, val)) + ; + return (ret); +#endif } static inline long From owner-svn-src-all@freebsd.org Wed Dec 12 10:08:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D7EE1336085; Wed, 12 Dec 2018 10:08:16 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 3F9E983FA4; Wed, 12 Dec 2018 10:08:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 280436693; Wed, 12 Dec 2018 10:08:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCA8F7V002821; Wed, 12 Dec 2018 10:08:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCA8FvP002817; Wed, 12 Dec 2018 10:08:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121008.wBCA8FvP002817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341849 - in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 341849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3F9E983FA4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.668,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:08:16 -0000 Author: hselasky Date: Wed Dec 12 10:08:15 2018 New Revision: 341849 URL: https://svnweb.freebsd.org/changeset/base/341849 Log: MFC r341518: linuxkpi: Fix for use-after-free when tearing down character devices. Make sure we hold a reference on the character device for every opened file to prevent the character device to be freed prematurely. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/cdev.h stable/12/sys/compat/linuxkpi/common/include/linux/fs.h stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/cdev.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/cdev.h Wed Dec 12 10:05:41 2018 (r341848) +++ stable/12/sys/compat/linuxkpi/common/include/linux/cdev.h Wed Dec 12 10:08:15 2018 (r341849) @@ -36,6 +36,8 @@ #include #include +#include + struct file_operations; struct inode; struct module; @@ -50,6 +52,7 @@ struct linux_cdev { struct cdev *cdev; dev_t dev; const struct file_operations *ops; + atomic_long_t refs; }; static inline void @@ -58,6 +61,7 @@ cdev_init(struct linux_cdev *cdev, const struct file_o kobject_init(&cdev->kobj, &linux_cdev_static_ktype); cdev->ops = ops; + atomic_long_set(&cdev->refs, 0); } static inline struct linux_cdev * @@ -130,13 +134,13 @@ cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t return (0); } +void linux_destroy_dev(struct linux_cdev *); + static inline void cdev_del(struct linux_cdev *cdev) { - if (cdev->cdev) { - destroy_dev(cdev->cdev); - cdev->cdev = NULL; - } + + linux_destroy_dev(cdev); kobject_put(&cdev->kobj); } Modified: stable/12/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/fs.h Wed Dec 12 10:05:41 2018 (r341848) +++ stable/12/sys/compat/linuxkpi/common/include/linux/fs.h Wed Dec 12 10:08:15 2018 (r341849) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2018 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,6 +55,7 @@ struct vm_area_struct; struct poll_table_struct; struct files_struct; struct pfs_node; +struct linux_cdev; #define inode vnode #define i_cdev v_rdev @@ -105,6 +106,9 @@ struct linux_file { /* protects f_selinfo.si_note */ spinlock_t f_kqlock; struct linux_file_wait_queue f_wait_queue; + + /* pointer to associated character device, if any */ + struct linux_cdev *f_cdev; }; #define file linux_file Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Wed Dec 12 10:05:41 2018 (r341848) +++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Wed Dec 12 10:08:15 2018 (r341849) @@ -699,12 +699,20 @@ linux_dev_fdopen(struct cdev *dev, int fflags, struct filp->f_flags = file->f_flag; filp->f_vnode = file->f_vnode; filp->_file = file; + filp->f_cdev = ldev; linux_set_current(td); + /* get a reference on the Linux character device */ + if (atomic_long_add_unless(&ldev->refs, 1, -1L) == 0) { + kfree(filp); + return (EINVAL); + } + if (filp->f_op->open) { error = -filp->f_op->open(file->f_vnode, filp); if (error) { + atomic_long_dec(&ldev->refs); kfree(filp); return (error); } @@ -1396,6 +1404,10 @@ linux_file_close(struct file *file, struct thread *td) funsetown(&filp->f_sigio); if (filp->f_vnode != NULL) vdrop(filp->f_vnode); + if (filp->f_cdev != NULL) { + /* put a reference on the Linux character device */ + atomic_long_dec(&filp->f_cdev->refs); + } kfree(filp); return (error); @@ -1947,8 +1959,7 @@ linux_cdev_release(struct kobject *kobj) cdev = container_of(kobj, struct linux_cdev, kobj); parent = kobj->parent; - if (cdev->cdev) - destroy_dev(cdev->cdev); + linux_destroy_dev(cdev); kfree(cdev); kobject_put(parent); } @@ -1961,9 +1972,25 @@ linux_cdev_static_release(struct kobject *kobj) cdev = container_of(kobj, struct linux_cdev, kobj); parent = kobj->parent; - if (cdev->cdev) - destroy_dev(cdev->cdev); + linux_destroy_dev(cdev); kobject_put(parent); +} + +void +linux_destroy_dev(struct linux_cdev *cdev) +{ + + if (cdev->cdev == NULL) + return; + + atomic_long_dec(&cdev->refs); + + /* wait for all open files to be closed */ + while (atomic_long_read(&cdev->refs) != -1L) + pause("ldevdrn", hz); + + destroy_dev(cdev->cdev); + cdev->cdev = NULL; } const struct kobj_type linux_cdev_ktype = { From owner-svn-src-all@freebsd.org Wed Dec 12 10:09:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 950371336111; Wed, 12 Dec 2018 10:09:24 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 3BDCD84106; Wed, 12 Dec 2018 10:09:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D18F6694; Wed, 12 Dec 2018 10:09:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCA9NAu002929; Wed, 12 Dec 2018 10:09:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCA9NYS002927; Wed, 12 Dec 2018 10:09:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121009.wBCA9NYS002927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341850 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 341850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3BDCD84106 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.668,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:09:24 -0000 Author: hselasky Date: Wed Dec 12 10:09:23 2018 New Revision: 341850 URL: https://svnweb.freebsd.org/changeset/base/341850 Log: MFC r341518: linuxkpi: Fix for use-after-free when tearing down character devices. Make sure we hold a reference on the character device for every opened file to prevent the character device to be freed prematurely. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h stable/11/sys/compat/linuxkpi/common/include/linux/fs.h stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h Wed Dec 12 10:08:15 2018 (r341849) +++ stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h Wed Dec 12 10:09:23 2018 (r341850) @@ -36,6 +36,8 @@ #include #include +#include + struct file_operations; struct inode; struct module; @@ -50,6 +52,7 @@ struct linux_cdev { struct cdev *cdev; dev_t dev; const struct file_operations *ops; + atomic_long_t refs; }; static inline void @@ -58,6 +61,7 @@ cdev_init(struct linux_cdev *cdev, const struct file_o kobject_init(&cdev->kobj, &linux_cdev_static_ktype); cdev->ops = ops; + atomic_long_set(&cdev->refs, 0); } static inline struct linux_cdev * @@ -130,13 +134,13 @@ cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t return (0); } +void linux_destroy_dev(struct linux_cdev *); + static inline void cdev_del(struct linux_cdev *cdev) { - if (cdev->cdev) { - destroy_dev(cdev->cdev); - cdev->cdev = NULL; - } + + linux_destroy_dev(cdev); kobject_put(&cdev->kobj); } Modified: stable/11/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/fs.h Wed Dec 12 10:08:15 2018 (r341849) +++ stable/11/sys/compat/linuxkpi/common/include/linux/fs.h Wed Dec 12 10:09:23 2018 (r341850) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2018 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,6 +55,7 @@ struct vm_area_struct; struct poll_table_struct; struct files_struct; struct pfs_node; +struct linux_cdev; #define inode vnode #define i_cdev v_rdev @@ -105,6 +106,9 @@ struct linux_file { /* protects f_selinfo.si_note */ spinlock_t f_kqlock; struct linux_file_wait_queue f_wait_queue; + + /* pointer to associated character device, if any */ + struct linux_cdev *f_cdev; }; #define file linux_file Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Wed Dec 12 10:08:15 2018 (r341849) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Wed Dec 12 10:09:23 2018 (r341850) @@ -699,12 +699,20 @@ linux_dev_fdopen(struct cdev *dev, int fflags, struct filp->f_flags = file->f_flag; filp->f_vnode = file->f_vnode; filp->_file = file; + filp->f_cdev = ldev; linux_set_current(td); + /* get a reference on the Linux character device */ + if (atomic_long_add_unless(&ldev->refs, 1, -1L) == 0) { + kfree(filp); + return (EINVAL); + } + if (filp->f_op->open) { error = -filp->f_op->open(file->f_vnode, filp); if (error) { + atomic_long_dec(&ldev->refs); kfree(filp); return (error); } @@ -1396,6 +1404,10 @@ linux_file_close(struct file *file, struct thread *td) funsetown(&filp->f_sigio); if (filp->f_vnode != NULL) vdrop(filp->f_vnode); + if (filp->f_cdev != NULL) { + /* put a reference on the Linux character device */ + atomic_long_dec(&filp->f_cdev->refs); + } kfree(filp); return (error); @@ -1947,8 +1959,7 @@ linux_cdev_release(struct kobject *kobj) cdev = container_of(kobj, struct linux_cdev, kobj); parent = kobj->parent; - if (cdev->cdev) - destroy_dev(cdev->cdev); + linux_destroy_dev(cdev); kfree(cdev); kobject_put(parent); } @@ -1961,9 +1972,25 @@ linux_cdev_static_release(struct kobject *kobj) cdev = container_of(kobj, struct linux_cdev, kobj); parent = kobj->parent; - if (cdev->cdev) - destroy_dev(cdev->cdev); + linux_destroy_dev(cdev); kobject_put(parent); +} + +void +linux_destroy_dev(struct linux_cdev *cdev) +{ + + if (cdev->cdev == NULL) + return; + + atomic_long_dec(&cdev->refs); + + /* wait for all open files to be closed */ + while (atomic_long_read(&cdev->refs) != -1L) + pause("ldevdrn", hz); + + destroy_dev(cdev->cdev); + cdev->cdev = NULL; } const struct kobj_type linux_cdev_ktype = { From owner-svn-src-all@freebsd.org Wed Dec 12 10:10:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AF9413361C8; Wed, 12 Dec 2018 10:10:57 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 A4C6A842A5; Wed, 12 Dec 2018 10:10:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B9F566B5; Wed, 12 Dec 2018 10:10:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAAufQ003077; Wed, 12 Dec 2018 10:10:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAAud4003076; Wed, 12 Dec 2018 10:10:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121010.wBCAAud4003076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341851 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 341851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A4C6A842A5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:10:57 -0000 Author: hselasky Date: Wed Dec 12 10:10:56 2018 New Revision: 341851 URL: https://svnweb.freebsd.org/changeset/base/341851 Log: MFC r341519: linuxkpi: properly implement netif_carrier_ok(). Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/netdevice.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/netdevice.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/netdevice.h Wed Dec 12 10:09:23 2018 (r341850) +++ stable/12/sys/compat/linuxkpi/common/include/linux/netdevice.h Wed Dec 12 10:10:56 2018 (r341851) @@ -77,7 +77,7 @@ dev_get_by_index(struct vnet *vnet, int if_index) #define netif_running(dev) !!((dev)->if_drv_flags & IFF_DRV_RUNNING) #define netif_oper_up(dev) !!((dev)->if_flags & IFF_UP) -#define netif_carrier_ok(dev) netif_running(dev) +#define netif_carrier_ok(dev) ((dev)->if_link_state == LINK_STATE_UP) static inline void * netdev_priv(const struct net_device *dev) From owner-svn-src-all@freebsd.org Wed Dec 12 10:12:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 596CE1336386; Wed, 12 Dec 2018 10:12:15 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 01589845F4; Wed, 12 Dec 2018 10:12:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E79376718; Wed, 12 Dec 2018 10:12:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCACE41006968; Wed, 12 Dec 2018 10:12:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCACEsM006967; Wed, 12 Dec 2018 10:12:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121012.wBCACEsM006967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341852 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 341852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01589845F4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:12:15 -0000 Author: hselasky Date: Wed Dec 12 10:12:14 2018 New Revision: 341852 URL: https://svnweb.freebsd.org/changeset/base/341852 Log: MFC r341519: linuxkpi: properly implement netif_carrier_ok(). Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/netdevice.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/netdevice.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/netdevice.h Wed Dec 12 10:10:56 2018 (r341851) +++ stable/11/sys/compat/linuxkpi/common/include/linux/netdevice.h Wed Dec 12 10:12:14 2018 (r341852) @@ -77,7 +77,7 @@ dev_get_by_index(struct vnet *vnet, int if_index) #define netif_running(dev) !!((dev)->if_drv_flags & IFF_DRV_RUNNING) #define netif_oper_up(dev) !!((dev)->if_flags & IFF_UP) -#define netif_carrier_ok(dev) netif_running(dev) +#define netif_carrier_ok(dev) ((dev)->if_link_state == LINK_STATE_UP) static inline void * netdev_priv(const struct net_device *dev) From owner-svn-src-all@freebsd.org Wed Dec 12 10:13:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 703AD1336453; Wed, 12 Dec 2018 10:13:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 17C44847C9; Wed, 12 Dec 2018 10:13:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CB85683C; Wed, 12 Dec 2018 10:13:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCADnVq007808; Wed, 12 Dec 2018 10:13:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCADnBK007807; Wed, 12 Dec 2018 10:13:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121013.wBCADnBK007807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341853 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 341853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 17C44847C9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:13:50 -0000 Author: hselasky Date: Wed Dec 12 10:13:49 2018 New Revision: 341853 URL: https://svnweb.freebsd.org/changeset/base/341853 Log: MFC r341520: linuxkpi: Really check if PCI is offline Currently we always return false if for PCI offline query. Try to read PCI config, if the return value if 0xffff probably the PCI is offline. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Wed Dec 12 10:12:14 2018 (r341852) +++ stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Wed Dec 12 10:13:49 2018 (r341853) @@ -601,9 +601,11 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix return (nvec); } -static inline int pci_channel_offline(struct pci_dev *pdev) +static inline int +pci_channel_offline(struct pci_dev *pdev) { - return false; + + return (pci_get_vendor(pdev->dev.bsddev) == 0xffff); } static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) From owner-svn-src-all@freebsd.org Wed Dec 12 10:14:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A693613364C2; Wed, 12 Dec 2018 10:14:53 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 4D1A084920; Wed, 12 Dec 2018 10:14:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4251E683D; Wed, 12 Dec 2018 10:14:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAErJe007908; Wed, 12 Dec 2018 10:14:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAErEl007907; Wed, 12 Dec 2018 10:14:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121014.wBCAErEl007907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341854 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 341854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D1A084920 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:14:53 -0000 Author: hselasky Date: Wed Dec 12 10:14:52 2018 New Revision: 341854 URL: https://svnweb.freebsd.org/changeset/base/341854 Log: MFC r341520: linuxkpi: Really check if PCI is offline Currently we always return false if for PCI offline query. Try to read PCI config, if the return value if 0xffff probably the PCI is offline. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Wed Dec 12 10:13:49 2018 (r341853) +++ stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Wed Dec 12 10:14:52 2018 (r341854) @@ -601,9 +601,11 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix return (nvec); } -static inline int pci_channel_offline(struct pci_dev *pdev) +static inline int +pci_channel_offline(struct pci_dev *pdev) { - return false; + + return (pci_get_vendor(pdev->dev.bsddev) == 0xffff); } static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) From owner-svn-src-all@freebsd.org Wed Dec 12 10:16:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 028EB1336593; Wed, 12 Dec 2018 10:16:36 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9DD0084A98; Wed, 12 Dec 2018 10:16:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DDA56840; Wed, 12 Dec 2018 10:16:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAGZhj008051; Wed, 12 Dec 2018 10:16:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAGZh8008050; Wed, 12 Dec 2018 10:16:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121016.wBCAGZh8008050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341855 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9DD0084A98 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:16:36 -0000 Author: hselasky Date: Wed Dec 12 10:16:35 2018 New Revision: 341855 URL: https://svnweb.freebsd.org/changeset/base/341855 Log: MFC r341521: ibcore: Make sure GID index variable gets initialized. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c Wed Dec 12 10:14:52 2018 (r341854) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c Wed Dec 12 10:16:35 2018 (r341855) @@ -458,7 +458,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po struct ib_ah_attr *ah_attr) { u32 flow_class; - u16 gid_index; + u16 gid_index = 0; int ret; enum rdma_network_type net_type = RDMA_NETWORK_IB; enum ib_gid_type gid_type = IB_GID_TYPE_IB; @@ -524,8 +524,6 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po &gid_index); if (ret) return ret; - } else { - gid_index = 0; } } From owner-svn-src-all@freebsd.org Wed Dec 12 10:17:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F17CA13365F2; Wed, 12 Dec 2018 10:17:36 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9A62484BF7; Wed, 12 Dec 2018 10:17:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D4846843; Wed, 12 Dec 2018 10:17:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAHaS0008154; Wed, 12 Dec 2018 10:17:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAHafT008153; Wed, 12 Dec 2018 10:17:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121017.wBCAHafT008153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341856 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9A62484BF7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:17:37 -0000 Author: hselasky Date: Wed Dec 12 10:17:36 2018 New Revision: 341856 URL: https://svnweb.freebsd.org/changeset/base/341856 Log: MFC r341521: ibcore: Make sure GID index variable gets initialized. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Wed Dec 12 10:16:35 2018 (r341855) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Wed Dec 12 10:17:36 2018 (r341856) @@ -458,7 +458,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po struct ib_ah_attr *ah_attr) { u32 flow_class; - u16 gid_index; + u16 gid_index = 0; int ret; enum rdma_network_type net_type = RDMA_NETWORK_IB; enum ib_gid_type gid_type = IB_GID_TYPE_IB; @@ -524,8 +524,6 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po &gid_index); if (ret) return ret; - } else { - gid_index = 0; } } From owner-svn-src-all@freebsd.org Wed Dec 12 10:18:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5BC313366D4; Wed, 12 Dec 2018 10:18:52 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 8D02E84D70; Wed, 12 Dec 2018 10:18:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EC9B6846; Wed, 12 Dec 2018 10:18:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAIqOc008264; Wed, 12 Dec 2018 10:18:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAIqqn008263; Wed, 12 Dec 2018 10:18:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121018.wBCAIqqn008263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341857 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8D02E84D70 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:18:53 -0000 Author: hselasky Date: Wed Dec 12 10:18:51 2018 New Revision: 341857 URL: https://svnweb.freebsd.org/changeset/base/341857 Log: MFC r341522: ibcore: Discard unused error codes. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_iwcm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_iwcm.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_iwcm.c Wed Dec 12 10:17:36 2018 (r341856) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_iwcm.c Wed Dec 12 10:18:51 2018 (r341857) @@ -308,9 +308,9 @@ int iw_cm_disconnect(struct iw_cm_id *cm_id, int abrup if (qp) { if (abrupt) - ret = iwcm_modify_qp_err(qp); + (void) iwcm_modify_qp_err(qp); else - ret = iwcm_modify_qp_sqd(qp); + (void) iwcm_modify_qp_sqd(qp); /* * If both sides are disconnecting the QP could From owner-svn-src-all@freebsd.org Wed Dec 12 10:19:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8C68133673D; Wed, 12 Dec 2018 10:19:48 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 6B57384EAC; Wed, 12 Dec 2018 10:19:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6235F6847; Wed, 12 Dec 2018 10:19:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAJmXL008361; Wed, 12 Dec 2018 10:19:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAJmfb008360; Wed, 12 Dec 2018 10:19:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121019.wBCAJmfb008360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341858 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B57384EAC X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:19:49 -0000 Author: hselasky Date: Wed Dec 12 10:19:47 2018 New Revision: 341858 URL: https://svnweb.freebsd.org/changeset/base/341858 Log: MFC r341522: ibcore: Discard unused error codes. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_iwcm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_iwcm.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_iwcm.c Wed Dec 12 10:18:51 2018 (r341857) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_iwcm.c Wed Dec 12 10:19:47 2018 (r341858) @@ -308,9 +308,9 @@ int iw_cm_disconnect(struct iw_cm_id *cm_id, int abrup if (qp) { if (abrupt) - ret = iwcm_modify_qp_err(qp); + (void) iwcm_modify_qp_err(qp); else - ret = iwcm_modify_qp_sqd(qp); + (void) iwcm_modify_qp_sqd(qp); /* * If both sides are disconnecting the QP could From owner-svn-src-all@freebsd.org Wed Dec 12 10:21:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75BEE133696E; Wed, 12 Dec 2018 10:21:11 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 1B866850B7; Wed, 12 Dec 2018 10:21:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11132699E; Wed, 12 Dec 2018 10:21:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCALAYN010742; Wed, 12 Dec 2018 10:21:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCALATa010741; Wed, 12 Dec 2018 10:21:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121021.wBCALATa010741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341859 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B866850B7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:21:11 -0000 Author: hselasky Date: Wed Dec 12 10:21:10 2018 New Revision: 341859 URL: https://svnweb.freebsd.org/changeset/base/341859 Log: MFC r341523: ibcore: Don't access invalid port. The port number in the listen_id_priv has been observed to be zero which means no port has been selected. The current code lacks a check for invalid port number. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:19:47 2018 (r341858) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:21:10 2018 (r341859) @@ -621,16 +621,19 @@ static int cma_acquire_dev(struct rdma_id_private *id_ if (listen_id_priv) { cma_dev = listen_id_priv->cma_dev; port = listen_id_priv->id.port_num; - gidp = rdma_protocol_roce(cma_dev->device, port) ? - &iboe_gid : &gid; - ret = cma_validate_port(cma_dev->device, port, - rdma_protocol_ib(cma_dev->device, port) ? - IB_GID_TYPE_IB : - listen_id_priv->gid_type, gidp, dev_addr); - if (!ret) { - id_priv->id.port_num = port; - goto out; + if (rdma_is_port_valid(cma_dev->device, port)) { + gidp = rdma_protocol_roce(cma_dev->device, port) ? + &iboe_gid : &gid; + + ret = cma_validate_port(cma_dev->device, port, + rdma_protocol_ib(cma_dev->device, port) ? + IB_GID_TYPE_IB : + listen_id_priv->gid_type, gidp, dev_addr); + if (!ret) { + id_priv->id.port_num = port; + goto out; + } } } From owner-svn-src-all@freebsd.org Wed Dec 12 10:22:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A134813369DB; Wed, 12 Dec 2018 10:22:11 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 47FE6853C2; Wed, 12 Dec 2018 10:22:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A28369EA; Wed, 12 Dec 2018 10:22:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAMBqC012309; Wed, 12 Dec 2018 10:22:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAMBlV012308; Wed, 12 Dec 2018 10:22:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121022.wBCAMBlV012308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341860 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47FE6853C2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:22:11 -0000 Author: hselasky Date: Wed Dec 12 10:22:10 2018 New Revision: 341860 URL: https://svnweb.freebsd.org/changeset/base/341860 Log: MFC r341523: ibcore: Don't access invalid port. The port number in the listen_id_priv has been observed to be zero which means no port has been selected. The current code lacks a check for invalid port number. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:21:10 2018 (r341859) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:22:10 2018 (r341860) @@ -621,16 +621,19 @@ static int cma_acquire_dev(struct rdma_id_private *id_ if (listen_id_priv) { cma_dev = listen_id_priv->cma_dev; port = listen_id_priv->id.port_num; - gidp = rdma_protocol_roce(cma_dev->device, port) ? - &iboe_gid : &gid; - ret = cma_validate_port(cma_dev->device, port, - rdma_protocol_ib(cma_dev->device, port) ? - IB_GID_TYPE_IB : - listen_id_priv->gid_type, gidp, dev_addr); - if (!ret) { - id_priv->id.port_num = port; - goto out; + if (rdma_is_port_valid(cma_dev->device, port)) { + gidp = rdma_protocol_roce(cma_dev->device, port) ? + &iboe_gid : &gid; + + ret = cma_validate_port(cma_dev->device, port, + rdma_protocol_ib(cma_dev->device, port) ? + IB_GID_TYPE_IB : + listen_id_priv->gid_type, gidp, dev_addr); + if (!ret) { + id_priv->id.port_num = port; + goto out; + } } } From owner-svn-src-all@freebsd.org Wed Dec 12 10:23:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CCF51336AC1; Wed, 12 Dec 2018 10:23:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 42A0D855B0; Wed, 12 Dec 2018 10:23:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37C286A04; Wed, 12 Dec 2018 10:23:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCANocK013231; Wed, 12 Dec 2018 10:23:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCANowX013230; Wed, 12 Dec 2018 10:23:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121023.wBCANowX013230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341861 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 42A0D855B0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:23:50 -0000 Author: hselasky Date: Wed Dec 12 10:23:49 2018 New Revision: 341861 URL: https://svnweb.freebsd.org/changeset/base/341861 Log: MFC r341524: ibcore: Add support for IB_SPEED_HDR in sysfs rate printout. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_sysfs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_sysfs.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_sysfs.c Wed Dec 12 10:22:10 2018 (r341860) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_sysfs.c Wed Dec 12 10:23:49 2018 (r341861) @@ -258,8 +258,13 @@ static ssize_t rate_show(struct ib_port *p, struct por speed = " EDR"; rate = 250; break; + case IB_SPEED_HDR: + speed = " HDR"; + rate = 500; + break; case IB_SPEED_SDR: default: /* default to SDR for invalid rates */ + speed = " SDR"; rate = 25; break; } From owner-svn-src-all@freebsd.org Wed Dec 12 10:24:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A991F1336B71; Wed, 12 Dec 2018 10:24:44 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 4BA7E857D6; Wed, 12 Dec 2018 10:24:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4284A6A07; Wed, 12 Dec 2018 10:24:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAOiWg013436; Wed, 12 Dec 2018 10:24:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAOiN4013435; Wed, 12 Dec 2018 10:24:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121024.wBCAOiN4013435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341862 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4BA7E857D6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:24:44 -0000 Author: hselasky Date: Wed Dec 12 10:24:43 2018 New Revision: 341862 URL: https://svnweb.freebsd.org/changeset/base/341862 Log: MFC r341524: ibcore: Add support for IB_SPEED_HDR in sysfs rate printout. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_sysfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_sysfs.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_sysfs.c Wed Dec 12 10:23:49 2018 (r341861) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_sysfs.c Wed Dec 12 10:24:43 2018 (r341862) @@ -258,8 +258,13 @@ static ssize_t rate_show(struct ib_port *p, struct por speed = " EDR"; rate = 250; break; + case IB_SPEED_HDR: + speed = " HDR"; + rate = 500; + break; case IB_SPEED_SDR: default: /* default to SDR for invalid rates */ + speed = " SDR"; rate = 25; break; } From owner-svn-src-all@freebsd.org Wed Dec 12 10:25:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71E371336C21; Wed, 12 Dec 2018 10:25:56 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 18D5E85957; Wed, 12 Dec 2018 10:25:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F08E6A09; Wed, 12 Dec 2018 10:25:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAPtcE013553; Wed, 12 Dec 2018 10:25:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAPt0s013552; Wed, 12 Dec 2018 10:25:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121025.wBCAPt0s013552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341863 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 18D5E85957 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:25:56 -0000 Author: hselasky Date: Wed Dec 12 10:25:55 2018 New Revision: 341863 URL: https://svnweb.freebsd.org/changeset/base/341863 Log: MFC r341525: ibcore: Check ib_find_pkey() return value. Linux commit: d3a2418ee36a59bc02e9d454723f3175dcf4bfd9 Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_multicast.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_multicast.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_multicast.c Wed Dec 12 10:24:43 2018 (r341862) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_multicast.c Wed Dec 12 10:25:55 2018 (r341863) @@ -525,8 +525,9 @@ static void join_handler(int status, struct ib_sa_mcme process_join_error(group, status); else { int mgids_changed, is_mgid0; - ib_find_pkey(group->port->dev->device, group->port->port_num, - be16_to_cpu(rec->pkey), &pkey_index); + if (ib_find_pkey(group->port->dev->device, group->port->port_num, + be16_to_cpu(rec->pkey), &pkey_index)) + pkey_index = MCAST_INVALID_PKEY_INDEX; spin_lock_irq(&group->port->lock); if (group->state == MCAST_BUSY && From owner-svn-src-all@freebsd.org Wed Dec 12 10:26:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 395171336CBB; Wed, 12 Dec 2018 10:26:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D113985B89; Wed, 12 Dec 2018 10:26:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C67CB6A0B; Wed, 12 Dec 2018 10:26:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAQneQ013649; Wed, 12 Dec 2018 10:26:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAQncg013648; Wed, 12 Dec 2018 10:26:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121026.wBCAQncg013648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341864 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D113985B89 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:26:50 -0000 Author: hselasky Date: Wed Dec 12 10:26:49 2018 New Revision: 341864 URL: https://svnweb.freebsd.org/changeset/base/341864 Log: MFC r341525: ibcore: Check ib_find_pkey() return value. Linux commit: d3a2418ee36a59bc02e9d454723f3175dcf4bfd9 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c Wed Dec 12 10:25:55 2018 (r341863) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c Wed Dec 12 10:26:49 2018 (r341864) @@ -525,8 +525,9 @@ static void join_handler(int status, struct ib_sa_mcme process_join_error(group, status); else { int mgids_changed, is_mgid0; - ib_find_pkey(group->port->dev->device, group->port->port_num, - be16_to_cpu(rec->pkey), &pkey_index); + if (ib_find_pkey(group->port->dev->device, group->port->port_num, + be16_to_cpu(rec->pkey), &pkey_index)) + pkey_index = MCAST_INVALID_PKEY_INDEX; spin_lock_irq(&group->port->lock); if (group->state == MCAST_BUSY && From owner-svn-src-all@freebsd.org Wed Dec 12 10:28:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE74F1336DCB; Wed, 12 Dec 2018 10:28:51 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 51AB885D1F; Wed, 12 Dec 2018 10:28:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C9B46A0C; Wed, 12 Dec 2018 10:28:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCASoOD013784; Wed, 12 Dec 2018 10:28:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCASocE013783; Wed, 12 Dec 2018 10:28:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121028.wBCASocE013783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341865 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 51AB885D1F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:28:51 -0000 Author: hselasky Date: Wed Dec 12 10:28:50 2018 New Revision: 341865 URL: https://svnweb.freebsd.org/changeset/base/341865 Log: MFC r341526: ibcore: Fix an array index check The array ib_mad_mgmt_class_table.method_table has MAX_MGMT_CLASS (80) elements. Hence compare the array index with that value instead of with IB_MGMT_MAX_METHODS (128). This patch avoids that Coverity reports the following: Overrunning array class->method_table of 80 8-byte elements at element index 127 (byte offset 1016) using index convert_mgmt_class(mad_hdr->mgmt_class) (which evaluates to 127). Linux commit: 2fe2f378dd45847d2643638c07a7658822087836 Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_mad.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_mad.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_mad.c Wed Dec 12 10:26:49 2018 (r341864) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_mad.c Wed Dec 12 10:28:50 2018 (r341865) @@ -1753,7 +1753,7 @@ find_mad_agent(struct ib_mad_port_private *port_priv, if (!class) goto out; if (convert_mgmt_class(mad_hdr->mgmt_class) >= - IB_MGMT_MAX_METHODS) + ARRAY_SIZE(class->method_table)) goto out; method = class->method_table[convert_mgmt_class( mad_hdr->mgmt_class)]; From owner-svn-src-all@freebsd.org Wed Dec 12 10:29:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D56E1336E65; Wed, 12 Dec 2018 10:29:49 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 13CC985E76; Wed, 12 Dec 2018 10:29:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07C0C6A0F; Wed, 12 Dec 2018 10:29:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCATmqI013883; Wed, 12 Dec 2018 10:29:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCATmu2013882; Wed, 12 Dec 2018 10:29:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121029.wBCATmu2013882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341866 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 13CC985E76 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:29:49 -0000 Author: hselasky Date: Wed Dec 12 10:29:48 2018 New Revision: 341866 URL: https://svnweb.freebsd.org/changeset/base/341866 Log: MFC r341526: ibcore: Fix an array index check The array ib_mad_mgmt_class_table.method_table has MAX_MGMT_CLASS (80) elements. Hence compare the array index with that value instead of with IB_MGMT_MAX_METHODS (128). This patch avoids that Coverity reports the following: Overrunning array class->method_table of 80 8-byte elements at element index 127 (byte offset 1016) using index convert_mgmt_class(mad_hdr->mgmt_class) (which evaluates to 127). Linux commit: 2fe2f378dd45847d2643638c07a7658822087836 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_mad.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_mad.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_mad.c Wed Dec 12 10:28:50 2018 (r341865) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_mad.c Wed Dec 12 10:29:48 2018 (r341866) @@ -1753,7 +1753,7 @@ find_mad_agent(struct ib_mad_port_private *port_priv, if (!class) goto out; if (convert_mgmt_class(mad_hdr->mgmt_class) >= - IB_MGMT_MAX_METHODS) + ARRAY_SIZE(class->method_table)) goto out; method = class->method_table[convert_mgmt_class( mad_hdr->mgmt_class)]; From owner-svn-src-all@freebsd.org Wed Dec 12 10:30:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6121A1336F1D; Wed, 12 Dec 2018 10:30:55 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 086978602D; Wed, 12 Dec 2018 10:30:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1E946A37; Wed, 12 Dec 2018 10:30:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAUsCl016458; Wed, 12 Dec 2018 10:30:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAUsiT016457; Wed, 12 Dec 2018 10:30:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121030.wBCAUsiT016457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341867 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 086978602D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:30:55 -0000 Author: hselasky Date: Wed Dec 12 10:30:54 2018 New Revision: 341867 URL: https://svnweb.freebsd.org/changeset/base/341867 Log: MFC r341527: ibcore: Add missing check for failure. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:29:48 2018 (r341866) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:30:54 2018 (r341867) @@ -2908,8 +2908,10 @@ static int cm_lap_handler(struct cm_work *work) cm_init_av_for_response(work->port, work->mad_recv_wc->wc, work->mad_recv_wc->recv_buf.grh, &cm_id_priv->av); - cm_init_av_by_path(param->alternate_path, &cm_id_priv->alt_av, - cm_id_priv); + ret = cm_init_av_by_path(param->alternate_path, &cm_id_priv->alt_av, + cm_id_priv); + if (ret) + goto unlock; ret = atomic_inc_and_test(&cm_id_priv->work_count); if (!ret) list_add_tail(&work->list, &cm_id_priv->work_list); From owner-svn-src-all@freebsd.org Wed Dec 12 10:31:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16EE11336FD6; Wed, 12 Dec 2018 10:31:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 B1DD286437; Wed, 12 Dec 2018 10:31:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6CF96B7D; Wed, 12 Dec 2018 10:31:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAVn37017360; Wed, 12 Dec 2018 10:31:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAVnuC017359; Wed, 12 Dec 2018 10:31:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121031.wBCAVnuC017359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341868 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B1DD286437 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:31:50 -0000 Author: hselasky Date: Wed Dec 12 10:31:49 2018 New Revision: 341868 URL: https://svnweb.freebsd.org/changeset/base/341868 Log: MFC r341527: ibcore: Add missing check for failure. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:30:54 2018 (r341867) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:31:49 2018 (r341868) @@ -2908,8 +2908,10 @@ static int cm_lap_handler(struct cm_work *work) cm_init_av_for_response(work->port, work->mad_recv_wc->wc, work->mad_recv_wc->recv_buf.grh, &cm_id_priv->av); - cm_init_av_by_path(param->alternate_path, &cm_id_priv->alt_av, - cm_id_priv); + ret = cm_init_av_by_path(param->alternate_path, &cm_id_priv->alt_av, + cm_id_priv); + if (ret) + goto unlock; ret = atomic_inc_and_test(&cm_id_priv->work_count); if (!ret) list_add_tail(&work->list, &cm_id_priv->work_list); From owner-svn-src-all@freebsd.org Wed Dec 12 10:33:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A566613371B1; Wed, 12 Dec 2018 10:33:00 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 4C95F8660D; Wed, 12 Dec 2018 10:33:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42D0D6BB9; Wed, 12 Dec 2018 10:33:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAX0HI019391; Wed, 12 Dec 2018 10:33:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAWx3p019364; Wed, 12 Dec 2018 10:32:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121032.wBCAWx3p019364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341869 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C95F8660D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.668,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:33:00 -0000 Author: hselasky Date: Wed Dec 12 10:32:59 2018 New Revision: 341869 URL: https://svnweb.freebsd.org/changeset/base/341869 Log: MFC r341528: ibcore: Always check return value from ib_init_ah_from_wc(). This prevents code from accepting RoCEv1 connections when only ROCEv2 is enabled and vice versa. Linux commit: 0c4386ec77cfcd0ccbdbe8c2e67dd3a49b2a4c7f Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c stable/12/sys/ofed/drivers/infiniband/core/ib_user_mad.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:31:49 2018 (r341868) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:32:59 2018 (r341869) @@ -390,13 +390,13 @@ static void cm_set_private_data(struct cm_id_private * cm_id_priv->private_data_len = private_data_len; } -static void cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc, - struct ib_grh *grh, struct cm_av *av) +static int cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc, + struct ib_grh *grh, struct cm_av *av) { av->port = port; av->pkey_index = wc->pkey_index; - ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc, - grh, &av->ah_attr); + return ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc, + grh, &av->ah_attr); } static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av, @@ -1678,9 +1678,11 @@ static int cm_req_handler(struct cm_work *work) cm_id_priv = container_of(cm_id, struct cm_id_private, id); cm_id_priv->id.remote_id = req_msg->local_comm_id; - cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, - &cm_id_priv->av); + ret = cm_init_av_for_response(work->port, work->mad_recv_wc->wc, + work->mad_recv_wc->recv_buf.grh, + &cm_id_priv->av); + if (ret) + goto destroy; cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv-> id.local_id); if (IS_ERR(cm_id_priv->timewait_info)) { @@ -2905,9 +2907,11 @@ static int cm_lap_handler(struct cm_work *work) cm_id_priv->id.lap_state = IB_CM_LAP_RCVD; cm_id_priv->tid = lap_msg->hdr.tid; - cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, - &cm_id_priv->av); + ret = cm_init_av_for_response(work->port, work->mad_recv_wc->wc, + work->mad_recv_wc->recv_buf.grh, + &cm_id_priv->av); + if (ret) + goto unlock; ret = cm_init_av_by_path(param->alternate_path, &cm_id_priv->alt_av, cm_id_priv); if (ret) @@ -3164,6 +3168,7 @@ static int cm_sidr_req_handler(struct cm_work *work) struct cm_id_private *cm_id_priv, *cur_cm_id_priv; struct cm_sidr_req_msg *sidr_req_msg; struct ib_wc *wc; + int ret; cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL); if (IS_ERR(cm_id)) @@ -3176,9 +3181,11 @@ static int cm_sidr_req_handler(struct cm_work *work) wc = work->mad_recv_wc->wc; cm_id_priv->av.dgid.global.subnet_prefix = cpu_to_be64(wc->slid); cm_id_priv->av.dgid.global.interface_id = 0; - cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, - &cm_id_priv->av); + ret = cm_init_av_for_response(work->port, work->mad_recv_wc->wc, + work->mad_recv_wc->recv_buf.grh, + &cm_id_priv->av); + if (ret) + goto out; cm_id_priv->id.remote_id = sidr_req_msg->request_id; cm_id_priv->tid = sidr_req_msg->hdr.tid; atomic_inc(&cm_id_priv->work_count); Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_user_mad.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_user_mad.c Wed Dec 12 10:31:49 2018 (r341868) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_user_mad.c Wed Dec 12 10:32:59 2018 (r341869) @@ -240,10 +240,13 @@ static void recv_handler(struct ib_mad_agent *agent, packet->mad.hdr.grh_present = !!(mad_recv_wc->wc->wc_flags & IB_WC_GRH); if (packet->mad.hdr.grh_present) { struct ib_ah_attr ah_attr; + int ret; - ib_init_ah_from_wc(agent->device, agent->port_num, - mad_recv_wc->wc, mad_recv_wc->recv_buf.grh, - &ah_attr); + ret = ib_init_ah_from_wc(agent->device, agent->port_num, + mad_recv_wc->wc, mad_recv_wc->recv_buf.grh, + &ah_attr); + if (ret) + goto err2; packet->mad.hdr.gid_index = ah_attr.grh.sgid_index; packet->mad.hdr.hop_limit = ah_attr.grh.hop_limit; From owner-svn-src-all@freebsd.org Wed Dec 12 10:34:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBEC61337256; Wed, 12 Dec 2018 10:34:11 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 8E77686778; Wed, 12 Dec 2018 10:34:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 840F06BBB; Wed, 12 Dec 2018 10:34:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAYBTn019497; Wed, 12 Dec 2018 10:34:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAYBYG019495; Wed, 12 Dec 2018 10:34:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121034.wBCAYBYG019495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341870 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E77686778 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.668,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:34:12 -0000 Author: hselasky Date: Wed Dec 12 10:34:10 2018 New Revision: 341870 URL: https://svnweb.freebsd.org/changeset/base/341870 Log: MFC r341528: ibcore: Always check return value from ib_init_ah_from_wc(). This prevents code from accepting RoCEv1 connections when only ROCEv2 is enabled and vice versa. Linux commit: 0c4386ec77cfcd0ccbdbe8c2e67dd3a49b2a4c7f Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c stable/11/sys/ofed/drivers/infiniband/core/ib_user_mad.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:32:59 2018 (r341869) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:34:10 2018 (r341870) @@ -390,13 +390,13 @@ static void cm_set_private_data(struct cm_id_private * cm_id_priv->private_data_len = private_data_len; } -static void cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc, - struct ib_grh *grh, struct cm_av *av) +static int cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc, + struct ib_grh *grh, struct cm_av *av) { av->port = port; av->pkey_index = wc->pkey_index; - ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc, - grh, &av->ah_attr); + return ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc, + grh, &av->ah_attr); } static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av, @@ -1678,9 +1678,11 @@ static int cm_req_handler(struct cm_work *work) cm_id_priv = container_of(cm_id, struct cm_id_private, id); cm_id_priv->id.remote_id = req_msg->local_comm_id; - cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, - &cm_id_priv->av); + ret = cm_init_av_for_response(work->port, work->mad_recv_wc->wc, + work->mad_recv_wc->recv_buf.grh, + &cm_id_priv->av); + if (ret) + goto destroy; cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv-> id.local_id); if (IS_ERR(cm_id_priv->timewait_info)) { @@ -2905,9 +2907,11 @@ static int cm_lap_handler(struct cm_work *work) cm_id_priv->id.lap_state = IB_CM_LAP_RCVD; cm_id_priv->tid = lap_msg->hdr.tid; - cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, - &cm_id_priv->av); + ret = cm_init_av_for_response(work->port, work->mad_recv_wc->wc, + work->mad_recv_wc->recv_buf.grh, + &cm_id_priv->av); + if (ret) + goto unlock; ret = cm_init_av_by_path(param->alternate_path, &cm_id_priv->alt_av, cm_id_priv); if (ret) @@ -3164,6 +3168,7 @@ static int cm_sidr_req_handler(struct cm_work *work) struct cm_id_private *cm_id_priv, *cur_cm_id_priv; struct cm_sidr_req_msg *sidr_req_msg; struct ib_wc *wc; + int ret; cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL); if (IS_ERR(cm_id)) @@ -3176,9 +3181,11 @@ static int cm_sidr_req_handler(struct cm_work *work) wc = work->mad_recv_wc->wc; cm_id_priv->av.dgid.global.subnet_prefix = cpu_to_be64(wc->slid); cm_id_priv->av.dgid.global.interface_id = 0; - cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, - &cm_id_priv->av); + ret = cm_init_av_for_response(work->port, work->mad_recv_wc->wc, + work->mad_recv_wc->recv_buf.grh, + &cm_id_priv->av); + if (ret) + goto out; cm_id_priv->id.remote_id = sidr_req_msg->request_id; cm_id_priv->tid = sidr_req_msg->hdr.tid; atomic_inc(&cm_id_priv->work_count); Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_user_mad.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_user_mad.c Wed Dec 12 10:32:59 2018 (r341869) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_user_mad.c Wed Dec 12 10:34:10 2018 (r341870) @@ -240,10 +240,13 @@ static void recv_handler(struct ib_mad_agent *agent, packet->mad.hdr.grh_present = !!(mad_recv_wc->wc->wc_flags & IB_WC_GRH); if (packet->mad.hdr.grh_present) { struct ib_ah_attr ah_attr; + int ret; - ib_init_ah_from_wc(agent->device, agent->port_num, - mad_recv_wc->wc, mad_recv_wc->recv_buf.grh, - &ah_attr); + ret = ib_init_ah_from_wc(agent->device, agent->port_num, + mad_recv_wc->wc, mad_recv_wc->recv_buf.grh, + &ah_attr); + if (ret) + goto err2; packet->mad.hdr.gid_index = ah_attr.grh.sgid_index; packet->mad.hdr.hop_limit = ah_attr.grh.hop_limit; From owner-svn-src-all@freebsd.org Wed Dec 12 10:49:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F41FE1337AF6; Wed, 12 Dec 2018 10:49:41 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9985786F19; Wed, 12 Dec 2018 10:49:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C87E6D6B; Wed, 12 Dec 2018 10:49:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAnfUu024785; Wed, 12 Dec 2018 10:49:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAnfE5024784; Wed, 12 Dec 2018 10:49:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121049.wBCAnfE5024784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341871 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9985786F19 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:49:42 -0000 Author: hselasky Date: Wed Dec 12 10:49:41 2018 New Revision: 341871 URL: https://svnweb.freebsd.org/changeset/base/341871 Log: MFC r341529: ibcore: Make sure all VNETs are scanned for VLAN interfaces. The master network interface and the VLANs may reside in different VNETs. Make sure that all VNETs are searched when scanning for GID entries. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Wed Dec 12 10:34:10 2018 (r341870) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Wed Dec 12 10:49:41 2018 (r341871) @@ -167,6 +167,7 @@ roce_gid_update_addr_callback(struct ib_device *device #if defined(INET) || defined(INET6) struct ifaddr *ifa; #endif + VNET_ITERATOR_DECL(vnet_iter); struct ib_gid_attr gid_attr; union ib_gid gid; int default_gids; @@ -180,9 +181,11 @@ roce_gid_update_addr_callback(struct ib_device *device /* make sure default GIDs are in */ default_gids = roce_gid_enum_netdev_default(device, port, ndev); - CURVNET_SET(ndev->if_vnet); - IFNET_RLOCK(); - CK_STAILQ_FOREACH(idev, &V_ifnet, if_link) { + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + IFNET_RLOCK(); + CK_STAILQ_FOREACH(idev, &V_ifnet, if_link) { if (idev != ndev) { if (idev->if_type != IFT_L2VLAN) continue; @@ -230,9 +233,11 @@ roce_gid_update_addr_callback(struct ib_device *device } #endif IF_ADDR_RUNLOCK(idev); + } + IFNET_RUNLOCK(); + CURVNET_RESTORE(); } - IFNET_RUNLOCK(); - CURVNET_RESTORE(); + VNET_LIST_RUNLOCK(); /* add missing GIDs, if any */ STAILQ_FOREACH(entry, &ipx_head, entry) { From owner-svn-src-all@freebsd.org Wed Dec 12 10:54:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A46061337D52; Wed, 12 Dec 2018 10:54:42 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 49DEE87359; Wed, 12 Dec 2018 10:54:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D5296F27; Wed, 12 Dec 2018 10:54:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAsgPp029541; Wed, 12 Dec 2018 10:54:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAsgLD029540; Wed, 12 Dec 2018 10:54:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121054.wBCAsgLD029540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341872 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 49DEE87359 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:54:42 -0000 Author: hselasky Date: Wed Dec 12 10:54:41 2018 New Revision: 341872 URL: https://svnweb.freebsd.org/changeset/base/341872 Log: MFC r341529: ibcore: Make sure all VNETs are scanned for VLAN interfaces. The master network interface and the VLANs may reside in different VNETs. Make sure that all VNETs are searched when scanning for GID entries. Submitted by: netapp Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Wed Dec 12 10:49:41 2018 (r341871) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Wed Dec 12 10:54:41 2018 (r341872) @@ -167,6 +167,7 @@ roce_gid_update_addr_callback(struct ib_device *device #if defined(INET) || defined(INET6) struct ifaddr *ifa; #endif + VNET_ITERATOR_DECL(vnet_iter); struct ib_gid_attr gid_attr; union ib_gid gid; int default_gids; @@ -180,9 +181,11 @@ roce_gid_update_addr_callback(struct ib_device *device /* make sure default GIDs are in */ default_gids = roce_gid_enum_netdev_default(device, port, ndev); - CURVNET_SET(ndev->if_vnet); - IFNET_RLOCK(); - TAILQ_FOREACH(idev, &V_ifnet, if_link) { + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + IFNET_RLOCK(); + TAILQ_FOREACH(idev, &V_ifnet, if_link) { if (idev != ndev) { if (idev->if_type != IFT_L2VLAN) continue; @@ -230,9 +233,11 @@ roce_gid_update_addr_callback(struct ib_device *device } #endif IF_ADDR_RUNLOCK(idev); + } + IFNET_RUNLOCK(); + CURVNET_RESTORE(); } - IFNET_RUNLOCK(); - CURVNET_RESTORE(); + VNET_LIST_RUNLOCK(); /* add missing GIDs, if any */ STAILQ_FOREACH(entry, &ipx_head, entry) { From owner-svn-src-all@freebsd.org Wed Dec 12 10:55:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64FD91337DD2; Wed, 12 Dec 2018 10:55:56 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 066C5874B6; Wed, 12 Dec 2018 10:55:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFA806F2A; Wed, 12 Dec 2018 10:55:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAttjd029678; Wed, 12 Dec 2018 10:55:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAttGx029677; Wed, 12 Dec 2018 10:55:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121055.wBCAttGx029677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341873 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 066C5874B6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.668,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:55:56 -0000 Author: hselasky Date: Wed Dec 12 10:55:55 2018 New Revision: 341873 URL: https://svnweb.freebsd.org/changeset/base/341873 Log: MFC r341530: ibcore: Fix loopback with rdma-cm. Trying to validate loopback fails because rtalloc1() resolves system local addresses to the loopback network interface, lo0. Fix this by explicitly checking for loopback during validation of the source and destination network address. If the source address belongs to a local network interface and is equal to the destination address, there is no need to run the destination address through rtalloc1(). Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:54:41 2018 (r341872) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:55:55 2018 (r341873) @@ -1292,6 +1292,12 @@ static bool validate_ipv4_net_dev(struct net_device *n dev_put(dst_dev); /* + * Check for loopback. + */ + if (saddr == daddr) + return true; + + /* * Make sure the socket address length field * is set, else rtalloc1() will fail. */ @@ -1318,12 +1324,12 @@ static bool validate_ipv6_net_dev(struct net_device *n { #ifdef INET6 struct sockaddr_in6 src_tmp = *src_addr; - struct in6_addr in6_addr = dst_addr->sin6_addr; + struct sockaddr_in6 dst_tmp = *dst_addr; struct net_device *dst_dev; struct rtentry *rte; bool ret; - dst_dev = ip6_dev_find(net_dev->if_vnet, in6_addr); + dst_dev = ip6_dev_find(net_dev->if_vnet, dst_tmp.sin6_addr); if (dst_dev != net_dev) { if (dst_dev != NULL) dev_put(dst_dev); @@ -1345,12 +1351,25 @@ static bool validate_ipv6_net_dev(struct net_device *n src_tmp.sin6_scope_id = net_dev->if_index; sa6_embedscope(&src_tmp, 0); - rte = rtalloc1((struct sockaddr *)&src_tmp, 1, 0); - if (rte != NULL) { - ret = (rte->rt_ifp == net_dev); - RTFREE_LOCKED(rte); + dst_tmp.sin6_scope_id = net_dev->if_index; + sa6_embedscope(&dst_tmp, 0); + + /* + * Check for loopback after scope ID + * has been embedded: + */ + if (memcmp(&src_tmp.sin6_addr, &dst_tmp.sin6_addr, + sizeof(dst_tmp.sin6_addr)) == 0) { + ret = true; } else { - ret = false; + /* non-loopback case */ + rte = rtalloc1((struct sockaddr *)&src_tmp, 1, 0); + if (rte != NULL) { + ret = (rte->rt_ifp == net_dev); + RTFREE_LOCKED(rte); + } else { + ret = false; + } } CURVNET_RESTORE(); return ret; From owner-svn-src-all@freebsd.org Wed Dec 12 10:56:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5FB31337E7A; Wed, 12 Dec 2018 10:56:54 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 771C78760E; Wed, 12 Dec 2018 10:56:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53C916F2C; Wed, 12 Dec 2018 10:56:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAus0t029781; Wed, 12 Dec 2018 10:56:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAusvA029780; Wed, 12 Dec 2018 10:56:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121056.wBCAusvA029780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341874 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 771C78760E X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.67 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.67)[-0.668,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:56:55 -0000 Author: hselasky Date: Wed Dec 12 10:56:53 2018 New Revision: 341874 URL: https://svnweb.freebsd.org/changeset/base/341874 Log: MFC r341530: ibcore: Fix loopback with rdma-cm. Trying to validate loopback fails because rtalloc1() resolves system local addresses to the loopback network interface, lo0. Fix this by explicitly checking for loopback during validation of the source and destination network address. If the source address belongs to a local network interface and is equal to the destination address, there is no need to run the destination address through rtalloc1(). Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:55:55 2018 (r341873) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:56:53 2018 (r341874) @@ -1292,6 +1292,12 @@ static bool validate_ipv4_net_dev(struct net_device *n dev_put(dst_dev); /* + * Check for loopback. + */ + if (saddr == daddr) + return true; + + /* * Make sure the socket address length field * is set, else rtalloc1() will fail. */ @@ -1318,12 +1324,12 @@ static bool validate_ipv6_net_dev(struct net_device *n { #ifdef INET6 struct sockaddr_in6 src_tmp = *src_addr; - struct in6_addr in6_addr = dst_addr->sin6_addr; + struct sockaddr_in6 dst_tmp = *dst_addr; struct net_device *dst_dev; struct rtentry *rte; bool ret; - dst_dev = ip6_dev_find(net_dev->if_vnet, in6_addr); + dst_dev = ip6_dev_find(net_dev->if_vnet, dst_tmp.sin6_addr); if (dst_dev != net_dev) { if (dst_dev != NULL) dev_put(dst_dev); @@ -1345,12 +1351,25 @@ static bool validate_ipv6_net_dev(struct net_device *n src_tmp.sin6_scope_id = net_dev->if_index; sa6_embedscope(&src_tmp, 0); - rte = rtalloc1((struct sockaddr *)&src_tmp, 1, 0); - if (rte != NULL) { - ret = (rte->rt_ifp == net_dev); - RTFREE_LOCKED(rte); + dst_tmp.sin6_scope_id = net_dev->if_index; + sa6_embedscope(&dst_tmp, 0); + + /* + * Check for loopback after scope ID + * has been embedded: + */ + if (memcmp(&src_tmp.sin6_addr, &dst_tmp.sin6_addr, + sizeof(dst_tmp.sin6_addr)) == 0) { + ret = true; } else { - ret = false; + /* non-loopback case */ + rte = rtalloc1((struct sockaddr *)&src_tmp, 1, 0); + if (rte != NULL) { + ret = (rte->rt_ifp == net_dev); + RTFREE_LOCKED(rte); + } else { + ret = false; + } } CURVNET_RESTORE(); return ret; From owner-svn-src-all@freebsd.org Wed Dec 12 10:57:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B44911337F24; Wed, 12 Dec 2018 10:57:59 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 5802C878A3; Wed, 12 Dec 2018 10:57:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EA306F2D; Wed, 12 Dec 2018 10:57:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAvxMd029888; Wed, 12 Dec 2018 10:57:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAvxUv029887; Wed, 12 Dec 2018 10:57:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121057.wBCAvxUv029887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341875 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5802C878A3 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:57:59 -0000 Author: hselasky Date: Wed Dec 12 10:57:58 2018 New Revision: 341875 URL: https://svnweb.freebsd.org/changeset/base/341875 Log: MFC r341531: ibcore: Add missing unref of netdevice. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:56:53 2018 (r341874) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:57:58 2018 (r341875) @@ -1335,6 +1335,7 @@ static bool validate_ipv6_net_dev(struct net_device *n dev_put(dst_dev); return false; } + dev_put(dst_dev); CURVNET_SET(net_dev->if_vnet); From owner-svn-src-all@freebsd.org Wed Dec 12 10:58:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D5AB1337F8E; Wed, 12 Dec 2018 10:58:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E7D8487A3C; Wed, 12 Dec 2018 10:58:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD4BB6F2E; Wed, 12 Dec 2018 10:58:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCAwnR5029983; Wed, 12 Dec 2018 10:58:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCAwnVJ029982; Wed, 12 Dec 2018 10:58:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121058.wBCAwnVJ029982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 10:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341876 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E7D8487A3C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.659,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:58:50 -0000 Author: hselasky Date: Wed Dec 12 10:58:49 2018 New Revision: 341876 URL: https://svnweb.freebsd.org/changeset/base/341876 Log: MFC r341531: ibcore: Add missing unref of netdevice. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:57:58 2018 (r341875) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 10:58:49 2018 (r341876) @@ -1335,6 +1335,7 @@ static bool validate_ipv6_net_dev(struct net_device *n dev_put(dst_dev); return false; } + dev_put(dst_dev); CURVNET_SET(net_dev->if_vnet); From owner-svn-src-all@freebsd.org Wed Dec 12 11:00:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CDFE133807E; Wed, 12 Dec 2018 11:00:37 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 A29BE87C06; Wed, 12 Dec 2018 11:00:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91DF16F3A; Wed, 12 Dec 2018 11:00:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCB0ait030184; Wed, 12 Dec 2018 11:00:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCB0aT1030183; Wed, 12 Dec 2018 11:00:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121100.wBCB0aT1030183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341877 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A29BE87C06 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:00:37 -0000 Author: hselasky Date: Wed Dec 12 11:00:36 2018 New Revision: 341877 URL: https://svnweb.freebsd.org/changeset/base/341877 Log: MFC r341532: ibcore: Fix sleeping in atomic when RoCE is used A couple of places in the CM do spin_lock_irq(&cm_id_priv->lock); ... if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) However when the underlying transport is RoCE, this leads to a sleeping function being called with the lock held - the callchain is cm_alloc_response_msg() -> ib_create_ah_from_wc() -> ib_init_ah_from_wc() -> rdma_addr_find_l2_eth_by_grh() -> rdma_resolve_ip() and rdma_resolve_ip() starts out by doing req = kzalloc(sizeof *req, GFP_KERNEL); not to mention rdma_addr_find_l2_eth_by_grh() doing wait_for_completion(&ctx.comp); to wait for the task that rdma_resolve_ip() queues up. Fix this by moving the AH creation out of the lock. Linux commit: c76161181193985087cd716fdf69b5cb6cf9ee85 Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 10:58:49 2018 (r341876) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 11:00:36 2018 (r341877) @@ -332,11 +332,19 @@ out: return ret; } -static int cm_alloc_response_msg(struct cm_port *port, - struct ib_mad_recv_wc *mad_recv_wc, - struct ib_mad_send_buf **msg) +static struct ib_mad_send_buf *cm_alloc_response_msg_no_ah(struct cm_port *port, + struct ib_mad_recv_wc *mad_recv_wc) { - struct ib_mad_send_buf *m; + return ib_create_send_mad(port->mad_agent, 1, mad_recv_wc->wc->pkey_index, + 0, IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, + GFP_ATOMIC, + IB_MGMT_BASE_VERSION); +} + +static int cm_create_response_msg_ah(struct cm_port *port, + struct ib_mad_recv_wc *mad_recv_wc, + struct ib_mad_send_buf *msg) +{ struct ib_ah *ah; ah = ib_create_ah_from_wc(port->mad_agent->qp->pd, mad_recv_wc->wc, @@ -344,27 +352,40 @@ static int cm_alloc_response_msg(struct cm_port *port, if (IS_ERR(ah)) return PTR_ERR(ah); - m = ib_create_send_mad(port->mad_agent, 1, mad_recv_wc->wc->pkey_index, - 0, IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, - GFP_ATOMIC, - IB_MGMT_BASE_VERSION); - if (IS_ERR(m)) { - ib_destroy_ah(ah); - return PTR_ERR(m); - } - m->ah = ah; - *msg = m; + msg->ah = ah; return 0; } static void cm_free_msg(struct ib_mad_send_buf *msg) { - ib_destroy_ah(msg->ah); + if (msg->ah) + ib_destroy_ah(msg->ah); if (msg->context[0]) cm_deref_id(msg->context[0]); ib_free_send_mad(msg); } +static int cm_alloc_response_msg(struct cm_port *port, + struct ib_mad_recv_wc *mad_recv_wc, + struct ib_mad_send_buf **msg) +{ + struct ib_mad_send_buf *m; + int ret; + + m = cm_alloc_response_msg_no_ah(port, mad_recv_wc); + if (IS_ERR(m)) + return PTR_ERR(m); + + ret = cm_create_response_msg_ah(port, mad_recv_wc, m); + if (ret) { + cm_free_msg(m); + return ret; + } + + *msg = m; + return 0; +} + static void * cm_copy_private_data(const void *private_data, u8 private_data_len) { @@ -2331,7 +2352,8 @@ static int cm_dreq_handler(struct cm_work *work) case IB_CM_TIMEWAIT: atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES]. counter[CM_DREQ_COUNTER]); - if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) + msg = cm_alloc_response_msg_no_ah(work->port, work->mad_recv_wc); + if (IS_ERR(msg)) goto unlock; cm_format_drep((struct cm_drep_msg *) msg->mad, cm_id_priv, @@ -2339,7 +2361,8 @@ static int cm_dreq_handler(struct cm_work *work) cm_id_priv->private_data_len); spin_unlock_irq(&cm_id_priv->lock); - if (ib_post_send_mad(msg, NULL)) + if (cm_create_response_msg_ah(work->port, work->mad_recv_wc, msg) || + ib_post_send_mad(msg, NULL)) cm_free_msg(msg); goto deref; case IB_CM_DREQ_RCVD: @@ -2884,7 +2907,8 @@ static int cm_lap_handler(struct cm_work *work) case IB_CM_MRA_LAP_SENT: atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES]. counter[CM_LAP_COUNTER]); - if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) + msg = cm_alloc_response_msg_no_ah(work->port, work->mad_recv_wc); + if (IS_ERR(msg)) goto unlock; cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv, @@ -2894,7 +2918,8 @@ static int cm_lap_handler(struct cm_work *work) cm_id_priv->private_data_len); spin_unlock_irq(&cm_id_priv->lock); - if (ib_post_send_mad(msg, NULL)) + if (cm_create_response_msg_ah(work->port, work->mad_recv_wc, msg) || + ib_post_send_mad(msg, NULL)) cm_free_msg(msg); goto deref; case IB_CM_LAP_RCVD: From owner-svn-src-all@freebsd.org Wed Dec 12 11:01:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C63A13380E2; Wed, 12 Dec 2018 11:01:24 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 22AAE87E3A; Wed, 12 Dec 2018 11:01:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18FBF6F78; Wed, 12 Dec 2018 11:01:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCB1NQe032516; Wed, 12 Dec 2018 11:01:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCB1NP0032515; Wed, 12 Dec 2018 11:01:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121101.wBCB1NP0032515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341878 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 22AAE87E3A X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:01:24 -0000 Author: hselasky Date: Wed Dec 12 11:01:23 2018 New Revision: 341878 URL: https://svnweb.freebsd.org/changeset/base/341878 Log: MFC r341532: ibcore: Fix sleeping in atomic when RoCE is used A couple of places in the CM do spin_lock_irq(&cm_id_priv->lock); ... if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) However when the underlying transport is RoCE, this leads to a sleeping function being called with the lock held - the callchain is cm_alloc_response_msg() -> ib_create_ah_from_wc() -> ib_init_ah_from_wc() -> rdma_addr_find_l2_eth_by_grh() -> rdma_resolve_ip() and rdma_resolve_ip() starts out by doing req = kzalloc(sizeof *req, GFP_KERNEL); not to mention rdma_addr_find_l2_eth_by_grh() doing wait_for_completion(&ctx.comp); to wait for the task that rdma_resolve_ip() queues up. Fix this by moving the AH creation out of the lock. Linux commit: c76161181193985087cd716fdf69b5cb6cf9ee85 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 11:00:36 2018 (r341877) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Dec 12 11:01:23 2018 (r341878) @@ -332,11 +332,19 @@ out: return ret; } -static int cm_alloc_response_msg(struct cm_port *port, - struct ib_mad_recv_wc *mad_recv_wc, - struct ib_mad_send_buf **msg) +static struct ib_mad_send_buf *cm_alloc_response_msg_no_ah(struct cm_port *port, + struct ib_mad_recv_wc *mad_recv_wc) { - struct ib_mad_send_buf *m; + return ib_create_send_mad(port->mad_agent, 1, mad_recv_wc->wc->pkey_index, + 0, IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, + GFP_ATOMIC, + IB_MGMT_BASE_VERSION); +} + +static int cm_create_response_msg_ah(struct cm_port *port, + struct ib_mad_recv_wc *mad_recv_wc, + struct ib_mad_send_buf *msg) +{ struct ib_ah *ah; ah = ib_create_ah_from_wc(port->mad_agent->qp->pd, mad_recv_wc->wc, @@ -344,27 +352,40 @@ static int cm_alloc_response_msg(struct cm_port *port, if (IS_ERR(ah)) return PTR_ERR(ah); - m = ib_create_send_mad(port->mad_agent, 1, mad_recv_wc->wc->pkey_index, - 0, IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, - GFP_ATOMIC, - IB_MGMT_BASE_VERSION); - if (IS_ERR(m)) { - ib_destroy_ah(ah); - return PTR_ERR(m); - } - m->ah = ah; - *msg = m; + msg->ah = ah; return 0; } static void cm_free_msg(struct ib_mad_send_buf *msg) { - ib_destroy_ah(msg->ah); + if (msg->ah) + ib_destroy_ah(msg->ah); if (msg->context[0]) cm_deref_id(msg->context[0]); ib_free_send_mad(msg); } +static int cm_alloc_response_msg(struct cm_port *port, + struct ib_mad_recv_wc *mad_recv_wc, + struct ib_mad_send_buf **msg) +{ + struct ib_mad_send_buf *m; + int ret; + + m = cm_alloc_response_msg_no_ah(port, mad_recv_wc); + if (IS_ERR(m)) + return PTR_ERR(m); + + ret = cm_create_response_msg_ah(port, mad_recv_wc, m); + if (ret) { + cm_free_msg(m); + return ret; + } + + *msg = m; + return 0; +} + static void * cm_copy_private_data(const void *private_data, u8 private_data_len) { @@ -2331,7 +2352,8 @@ static int cm_dreq_handler(struct cm_work *work) case IB_CM_TIMEWAIT: atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES]. counter[CM_DREQ_COUNTER]); - if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) + msg = cm_alloc_response_msg_no_ah(work->port, work->mad_recv_wc); + if (IS_ERR(msg)) goto unlock; cm_format_drep((struct cm_drep_msg *) msg->mad, cm_id_priv, @@ -2339,7 +2361,8 @@ static int cm_dreq_handler(struct cm_work *work) cm_id_priv->private_data_len); spin_unlock_irq(&cm_id_priv->lock); - if (ib_post_send_mad(msg, NULL)) + if (cm_create_response_msg_ah(work->port, work->mad_recv_wc, msg) || + ib_post_send_mad(msg, NULL)) cm_free_msg(msg); goto deref; case IB_CM_DREQ_RCVD: @@ -2884,7 +2907,8 @@ static int cm_lap_handler(struct cm_work *work) case IB_CM_MRA_LAP_SENT: atomic_long_inc(&work->port->counter_group[CM_RECV_DUPLICATES]. counter[CM_LAP_COUNTER]); - if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) + msg = cm_alloc_response_msg_no_ah(work->port, work->mad_recv_wc); + if (IS_ERR(msg)) goto unlock; cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv, @@ -2894,7 +2918,8 @@ static int cm_lap_handler(struct cm_work *work) cm_id_priv->private_data_len); spin_unlock_irq(&cm_id_priv->lock); - if (ib_post_send_mad(msg, NULL)) + if (cm_create_response_msg_ah(work->port, work->mad_recv_wc, msg) || + ib_post_send_mad(msg, NULL)) cm_free_msg(msg); goto deref; case IB_CM_LAP_RCVD: From owner-svn-src-all@freebsd.org Wed Dec 12 11:02:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D64FB133829F; Wed, 12 Dec 2018 11:02:49 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 7CECC881A3; Wed, 12 Dec 2018 11:02:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 730A570D6; Wed, 12 Dec 2018 11:02:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCB2nCo035381; Wed, 12 Dec 2018 11:02:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCB2meE035378; Wed, 12 Dec 2018 11:02:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121102.wBCB2meE035378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341879 - in stable/12/sys: compat/linuxkpi/common/include/linux ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/include/linux ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7CECC881A3 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:02:50 -0000 Author: hselasky Date: Wed Dec 12 11:02:48 2018 New Revision: 341879 URL: https://svnweb.freebsd.org/changeset/base/341879 Log: MFC r341533: ibcore: ip6_dev_find() needs to know the scope ID. Else the wrong network device can be returned for link-local addresses. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/inetdevice.h stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/inetdevice.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed Dec 12 11:01:23 2018 (r341878) +++ stable/12/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed Dec 12 11:02:48 2018 (r341879) @@ -59,37 +59,32 @@ ip_dev_find(struct vnet *vnet, uint32_t addr) } static inline struct net_device * -ip6_dev_find(struct vnet *vnet, struct in6_addr addr) +ip6_dev_find(struct vnet *vnet, struct in6_addr addr, uint16_t scope_id) { struct sockaddr_in6 sin6; - struct ifaddr *ifa = NULL; - struct ifnet *ifp = NULL; - int x; + struct ifaddr *ifa; + struct ifnet *ifp; memset(&sin6, 0, sizeof(sin6)); sin6.sin6_addr = addr; sin6.sin6_len = sizeof(sin6); sin6.sin6_family = AF_INET6; - NET_EPOCH_ENTER(); - CURVNET_SET_QUIET(vnet); if (IN6_IS_SCOPE_LINKLOCAL(&addr) || IN6_IS_ADDR_MC_INTFACELOCAL(&addr)) { - /* XXX need to search all scope ID's */ - for (x = 0; x <= V_if_index && x < 65536; x++) { - sin6.sin6_addr.s6_addr16[1] = htons(x); - ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); - if (ifa != NULL) - break; - } - } else { - ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); + /* embed the IPv6 scope ID */ + sin6.sin6_addr.s6_addr16[1] = htons(scope_id); } + NET_EPOCH_ENTER(); + CURVNET_SET_QUIET(vnet); + ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); + CURVNET_RESTORE(); if (ifa != NULL) { ifp = ifa->ifa_ifp; if_ref(ifp); + } else { + ifp = NULL; } NET_EPOCH_EXIT(); - CURVNET_RESTORE(); return (ifp); } Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:01:23 2018 (r341878) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:02:48 2018 (r341879) @@ -185,7 +185,7 @@ int rdma_translate_ip(const struct sockaddr *addr, #ifdef INET6 case AF_INET6: dev = ip6_dev_find(dev_addr->net, - ((const struct sockaddr_in6 *)addr)->sin6_addr); + ((const struct sockaddr_in6 *)addr)->sin6_addr, 0); break; #endif default: @@ -525,7 +525,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, if (addr->bound_dev_if != 0) { ifp = dev_get_by_index(addr->net, addr->bound_dev_if); } else { - ifp = ip6_dev_find(addr->net, src_in->sin6_addr); + ifp = ip6_dev_find(addr->net, src_in->sin6_addr, 0); } /* check source interface */ Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 11:01:23 2018 (r341878) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 11:02:48 2018 (r341879) @@ -1329,7 +1329,8 @@ static bool validate_ipv6_net_dev(struct net_device *n struct rtentry *rte; bool ret; - dst_dev = ip6_dev_find(net_dev->if_vnet, dst_tmp.sin6_addr); + dst_dev = ip6_dev_find(net_dev->if_vnet, dst_tmp.sin6_addr, + net_dev->if_index); if (dst_dev != net_dev) { if (dst_dev != NULL) dev_put(dst_dev); From owner-svn-src-all@freebsd.org Wed Dec 12 11:14:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D47481338678; Wed, 12 Dec 2018 11:14:53 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 76FAA887ED; Wed, 12 Dec 2018 11:14:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 661067281; Wed, 12 Dec 2018 11:14:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBErTd041058; Wed, 12 Dec 2018 11:14:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBEqLC041056; Wed, 12 Dec 2018 11:14:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121114.wBCBEqLC041056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341880 - in stable/11/sys: compat/linuxkpi/common/include/linux ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: compat/linuxkpi/common/include/linux ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 76FAA887ED X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:14:54 -0000 Author: hselasky Date: Wed Dec 12 11:14:52 2018 New Revision: 341880 URL: https://svnweb.freebsd.org/changeset/base/341880 Log: MFC r341533: ibcore: ip6_dev_find() needs to know the scope ID. Else the wrong network device can be returned for link-local addresses. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/inetdevice.h stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/inetdevice.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed Dec 12 11:02:48 2018 (r341879) +++ stable/11/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed Dec 12 11:14:52 2018 (r341880) @@ -58,36 +58,31 @@ ip_dev_find(struct vnet *vnet, uint32_t addr) } static inline struct net_device * -ip6_dev_find(struct vnet *vnet, struct in6_addr addr) +ip6_dev_find(struct vnet *vnet, struct in6_addr addr, uint16_t scope_id) { struct sockaddr_in6 sin6; - struct ifaddr *ifa = NULL; - struct ifnet *ifp = NULL; - int x; + struct ifaddr *ifa; + struct ifnet *ifp; memset(&sin6, 0, sizeof(sin6)); sin6.sin6_addr = addr; sin6.sin6_len = sizeof(sin6); sin6.sin6_family = AF_INET6; - CURVNET_SET_QUIET(vnet); if (IN6_IS_SCOPE_LINKLOCAL(&addr) || IN6_IS_ADDR_MC_INTFACELOCAL(&addr)) { - /* XXX need to search all scope ID's */ - for (x = 0; x <= V_if_index && x < 65536; x++) { - sin6.sin6_addr.s6_addr16[1] = htons(x); - ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); - if (ifa != NULL) - break; - } - } else { - ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); + /* embed the IPv6 scope ID */ + sin6.sin6_addr.s6_addr16[1] = htons(scope_id); } + CURVNET_SET_QUIET(vnet); + ifa = ifa_ifwithaddr((struct sockaddr *)&sin6); + CURVNET_RESTORE(); if (ifa != NULL) { ifp = ifa->ifa_ifp; if_ref(ifp); ifa_free(ifa); + } else { + ifp = NULL; } - CURVNET_RESTORE(); return (ifp); } Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:02:48 2018 (r341879) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:14:52 2018 (r341880) @@ -185,7 +185,7 @@ int rdma_translate_ip(const struct sockaddr *addr, #ifdef INET6 case AF_INET6: dev = ip6_dev_find(dev_addr->net, - ((const struct sockaddr_in6 *)addr)->sin6_addr); + ((const struct sockaddr_in6 *)addr)->sin6_addr, 0); break; #endif default: @@ -525,7 +525,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, if (addr->bound_dev_if != 0) { ifp = dev_get_by_index(addr->net, addr->bound_dev_if); } else { - ifp = ip6_dev_find(addr->net, src_in->sin6_addr); + ifp = ip6_dev_find(addr->net, src_in->sin6_addr, 0); } /* check source interface */ Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 11:02:48 2018 (r341879) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Dec 12 11:14:52 2018 (r341880) @@ -1329,7 +1329,8 @@ static bool validate_ipv6_net_dev(struct net_device *n struct rtentry *rte; bool ret; - dst_dev = ip6_dev_find(net_dev->if_vnet, dst_tmp.sin6_addr); + dst_dev = ip6_dev_find(net_dev->if_vnet, dst_tmp.sin6_addr, + net_dev->if_index); if (dst_dev != net_dev) { if (dst_dev != NULL) dev_put(dst_dev); From owner-svn-src-all@freebsd.org Wed Dec 12 11:15:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6D9E13386B1; Wed, 12 Dec 2018 11:15:13 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 5D05F88906; Wed, 12 Dec 2018 11:15:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 513177282; Wed, 12 Dec 2018 11:15:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBFDb2041133; Wed, 12 Dec 2018 11:15:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBFDKA041132; Wed, 12 Dec 2018 11:15:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121115.wBCBFDKA041132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341881 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5D05F88906 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:15:13 -0000 Author: hselasky Date: Wed Dec 12 11:15:12 2018 New Revision: 341881 URL: https://svnweb.freebsd.org/changeset/base/341881 Log: MFC r341534: ibcore: Fix clearing of bound device interface. Binding to a loopback device is not allowed. Make sure the destination device address is global by clearing the bound device interface. Only do this conditionally, else link local addresses won't work. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:14:52 2018 (r341880) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:15:12 2018 (r341881) @@ -649,8 +649,13 @@ static int addr_resolve_neigh(struct ifnet *dev, if (dev->if_flags & IFF_LOOPBACK) { int ret; - /* find real device, not loopback one */ - addr->bound_dev_if = 0; + /* + * Binding to a loopback device is not allowed. Make + * sure the destination device address is global by + * clearing the bound device interface: + */ + if (addr->bound_dev_if == dev->if_index) + addr->bound_dev_if = 0; ret = rdma_translate_ip(dst_in, addr); if (ret == 0) { From owner-svn-src-all@freebsd.org Wed Dec 12 11:16:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89FC413387AF; Wed, 12 Dec 2018 11:16:33 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 2BE0A88AB3; Wed, 12 Dec 2018 11:16:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E4E77286; Wed, 12 Dec 2018 11:16:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBGXnS041265; Wed, 12 Dec 2018 11:16:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBGWVw041264; Wed, 12 Dec 2018 11:16:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121116.wBCBGWVw041264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341882 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 341882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BE0A88AB3 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:16:33 -0000 Author: hselasky Date: Wed Dec 12 11:16:32 2018 New Revision: 341882 URL: https://svnweb.freebsd.org/changeset/base/341882 Log: MFC r341534: ibcore: Fix clearing of bound device interface. Binding to a loopback device is not allowed. Make sure the destination device address is global by clearing the bound device interface. Only do this conditionally, else link local addresses won't work. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:15:12 2018 (r341881) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Dec 12 11:16:32 2018 (r341882) @@ -649,8 +649,13 @@ static int addr_resolve_neigh(struct ifnet *dev, if (dev->if_flags & IFF_LOOPBACK) { int ret; - /* find real device, not loopback one */ - addr->bound_dev_if = 0; + /* + * Binding to a loopback device is not allowed. Make + * sure the destination device address is global by + * clearing the bound device interface: + */ + if (addr->bound_dev_if == dev->if_index) + addr->bound_dev_if = 0; ret = rdma_translate_ip(dst_in, addr); if (ret == 0) { From owner-svn-src-all@freebsd.org Wed Dec 12 11:17:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F32EB1338802; Wed, 12 Dec 2018 11:17:16 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 972B188BFE; Wed, 12 Dec 2018 11:17:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B8547288; Wed, 12 Dec 2018 11:17:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBHGLp041342; Wed, 12 Dec 2018 11:17:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBHGLF041340; Wed, 12 Dec 2018 11:17:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121117.wBCBHGLF041340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341883 - stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 972B188BFE X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:17:17 -0000 Author: hselasky Date: Wed Dec 12 11:17:15 2018 New Revision: 341883 URL: https://svnweb.freebsd.org/changeset/base/341883 Log: MFC r341535: ipoib: correct setting MTU from inside ipoib(4). It is not enough to set ifnet->if_mtu to change the interface MTU. System saves the MTU for route in the radix tree, and route cache keeps the interface MTU as well. Since addition of the multicast group causes recalculation of MTU, even bringing the interface up changes MTU from 4042 to 1500, which makes the system configuration inconsistent. Worse, ip_output() prefers route MTU over interface MTU, so large packets are not fragmented and dropped on floor. Fix it for ipoib(4) using the same approach (or hack) as was applied for it_tun/if_tap in r339012. Thanks to bz@ for giving the hint. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:16:32 2018 (r341882) +++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:17:15 2018 (r341883) @@ -518,7 +518,7 @@ void ipoib_path_iter_read(struct ipoib_path_iter *iter struct ipoib_path *path); #endif -int ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu); +int ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu, bool propagate); int ipoib_mcast_attach(struct ipoib_dev_priv *priv, u16 mlid, union ib_gid *mgid, int set_qkey); Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:16:32 2018 (r341882) +++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:17:15 2018 (r341883) @@ -257,10 +257,34 @@ ipoib_stop(struct ipoib_dev_priv *priv) return 0; } +static int +ipoib_propagate_ifnet_mtu(struct ipoib_dev_priv *priv, int new_mtu, + bool propagate) +{ + struct ifnet *ifp; + struct ifreq ifr; + int error; + + ifp = priv->dev; + if (ifp->if_mtu == new_mtu) + return (0); + if (propagate) { + strlcpy(ifr.ifr_name, if_name(ifp), IFNAMSIZ); + ifr.ifr_mtu = new_mtu; + CURVNET_SET(ifp->if_vnet); + error = ifhwioctl(SIOCSIFMTU, ifp, (caddr_t)&ifr, curthread); + CURVNET_RESTORE(); + } else { + ifp->if_mtu = new_mtu; + error = 0; + } + return (error); +} + int -ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu) +ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu, bool propagate) { - struct ifnet *dev = priv->dev; + int error, prev_admin_mtu; /* dev->if_mtu > 2K ==> connected mode */ if (ipoib_cm_admin_enabled(priv)) { @@ -271,20 +295,21 @@ ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_ ipoib_warn(priv, "mtu > %d will cause multicast packet drops.\n", priv->mcast_mtu); - dev->if_mtu = new_mtu; - return 0; + return (ipoib_propagate_ifnet_mtu(priv, new_mtu, propagate)); } if (new_mtu > IPOIB_UD_MTU(priv->max_ib_mtu)) return -EINVAL; + prev_admin_mtu = priv->admin_mtu; priv->admin_mtu = new_mtu; - - dev->if_mtu = min(priv->mcast_mtu, priv->admin_mtu); - - queue_work(ipoib_workqueue, &priv->flush_light); - - return 0; + error = ipoib_propagate_ifnet_mtu(priv, min(priv->mcast_mtu, + priv->admin_mtu), propagate); + if (error == 0) + queue_work(ipoib_workqueue, &priv->flush_light); + else + priv->admin_mtu = prev_admin_mtu; + return (error); } static int @@ -338,7 +363,7 @@ ipoib_ioctl(struct ifnet *ifp, u_long command, caddr_t /* * Set the interface MTU. */ - error = -ipoib_change_mtu(priv, ifr->ifr_mtu); + error = -ipoib_change_mtu(priv, ifr->ifr_mtu, false); break; default: error = EINVAL; Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Wed Dec 12 11:16:32 2018 (r341882) +++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Wed Dec 12 11:17:15 2018 (r341883) @@ -564,7 +564,8 @@ void ipoib_mcast_join_task(struct work_struct *work) spin_unlock_irq(&priv->lock); if (!ipoib_cm_admin_enabled(priv)) - ipoib_change_mtu(priv, min(priv->mcast_mtu, priv->admin_mtu)); + ipoib_change_mtu(priv, min(priv->mcast_mtu, priv->admin_mtu), + true); ipoib_dbg_mcast(priv, "successfully joined all multicast groups\n"); From owner-svn-src-all@freebsd.org Wed Dec 12 11:29:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFF931338B4F; Wed, 12 Dec 2018 11:29:22 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9560C89105; Wed, 12 Dec 2018 11:29:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 849CB742C; Wed, 12 Dec 2018 11:29:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBTMRC046430; Wed, 12 Dec 2018 11:29:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBTLc1046427; Wed, 12 Dec 2018 11:29:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121129.wBCBTLc1046427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341884 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 341884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9560C89105 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:29:23 -0000 Author: hselasky Date: Wed Dec 12 11:29:21 2018 New Revision: 341884 URL: https://svnweb.freebsd.org/changeset/base/341884 Log: MFC r339012: For changing the MTU on tun/tap devices, it should not matter whether it is done via using ifconfig, which uses a SIOCSIFMTU ioctl() command, or doing it using a TUNSIFINFO/TAPSIFINFO ioctl() command. Without this patch, for IPv6 the new MTU is not used when creating routes. Especially, when initiating TCP connections after increasing the MTU, the old MTU is still used to compute the MSS. Thanks to ae@ and bz@ for helping to improve the patch. Reviewed by: ae@, bz@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D17180 Modified: stable/11/sys/net/if.c stable/11/sys/net/if_tap.c stable/11/sys/net/if_tun.c stable/11/sys/net/if_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Wed Dec 12 11:17:15 2018 (r341883) +++ stable/11/sys/net/if.c Wed Dec 12 11:29:21 2018 (r341884) @@ -254,7 +254,6 @@ static int if_setflag(struct ifnet *, int, int, int *, static int if_transmit(struct ifnet *ifp, struct mbuf *m); static void if_unroute(struct ifnet *, int flag, int fam); static void link_rtrequest(int, struct rtentry *, struct rt_addrinfo *); -static int ifhwioctl(u_long, struct ifnet *, caddr_t, struct thread *); static int if_delmulti_locked(struct ifnet *, struct ifmultiaddr *, int); static void do_link_state_change(void *, int); static int if_getgroup(struct ifgroupreq *, struct ifnet *); @@ -2484,7 +2483,7 @@ ifr_data_get_ptr(void *ifrp) /* * Hardware specific interface ioctls. */ -static int +int ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) { struct ifreq *ifr; Modified: stable/11/sys/net/if_tap.c ============================================================================== --- stable/11/sys/net/if_tap.c Wed Dec 12 11:17:15 2018 (r341883) +++ stable/11/sys/net/if_tap.c Wed Dec 12 11:29:21 2018 (r341884) @@ -723,10 +723,12 @@ tapifstart(struct ifnet *ifp) static int tapioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { + struct ifreq ifr; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = tp->tap_ifp; struct tapinfo *tapp = NULL; int f; + int error; #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD4) int ival; @@ -738,7 +740,18 @@ tapioctl(struct cdev *dev, u_long cmd, caddr_t data, i if (ifp->if_type != tapp->type) return (EPROTOTYPE); mtx_lock(&tp->tap_mtx); - ifp->if_mtu = tapp->mtu; + if (ifp->if_mtu != tapp->mtu) { + strncpy(ifr.ifr_name, if_name(ifp), IFNAMSIZ); + ifr.ifr_mtu = tapp->mtu; + CURVNET_SET(ifp->if_vnet); + error = ifhwioctl(SIOCSIFMTU, ifp, + (caddr_t)&ifr, td); + CURVNET_RESTORE(); + if (error) { + mtx_unlock(&tp->tap_mtx); + return (error); + } + } ifp->if_baudrate = tapp->baudrate; mtx_unlock(&tp->tap_mtx); break; Modified: stable/11/sys/net/if_tun.c ============================================================================== --- stable/11/sys/net/if_tun.c Wed Dec 12 11:17:15 2018 (r341883) +++ stable/11/sys/net/if_tun.c Wed Dec 12 11:29:21 2018 (r341884) @@ -662,24 +662,29 @@ static int tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { - int error; + struct ifreq ifr; struct tun_softc *tp = dev->si_drv1; struct tuninfo *tunp; + int error; switch (cmd) { case TUNSIFINFO: tunp = (struct tuninfo *)data; - if (tunp->mtu < IF_MINMTU) - return (EINVAL); - if (TUN2IFP(tp)->if_mtu != tunp->mtu) { - error = priv_check(td, PRIV_NET_SETIFMTU); - if (error) - return (error); - } if (TUN2IFP(tp)->if_type != tunp->type) return (EPROTOTYPE); mtx_lock(&tp->tun_mtx); - TUN2IFP(tp)->if_mtu = tunp->mtu; + if (TUN2IFP(tp)->if_mtu != tunp->mtu) { + strncpy(ifr.ifr_name, if_name(TUN2IFP(tp)), IFNAMSIZ); + ifr.ifr_mtu = tunp->mtu; + CURVNET_SET(TUN2IFP(tp)->if_vnet); + error = ifhwioctl(SIOCSIFMTU, TUN2IFP(tp), + (caddr_t)&ifr, td); + CURVNET_RESTORE(); + if (error) { + mtx_unlock(&tp->tun_mtx); + return (error); + } + } TUN2IFP(tp)->if_baudrate = tunp->baudrate; mtx_unlock(&tp->tun_mtx); break; Modified: stable/11/sys/net/if_var.h ============================================================================== --- stable/11/sys/net/if_var.h Wed Dec 12 11:17:15 2018 (r341883) +++ stable/11/sys/net/if_var.h Wed Dec 12 11:29:21 2018 (r341884) @@ -668,6 +668,8 @@ int if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsom /* accessors for struct ifreq */ void *ifr_data_get_ptr(void *ifrp); +int ifhwioctl(u_long, struct ifnet *, caddr_t, struct thread *); + #ifdef DEVICE_POLLING enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; From owner-svn-src-all@freebsd.org Wed Dec 12 11:30:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 838101338BF3; Wed, 12 Dec 2018 11:30:23 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 6E0F489256; Wed, 12 Dec 2018 11:30:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 582017431; Wed, 12 Dec 2018 11:30:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBUMsX046563; Wed, 12 Dec 2018 11:30:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBULgT046560; Wed, 12 Dec 2018 11:30:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121130.wBCBULgT046560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341885 - stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E0F489256 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:30:23 -0000 Author: hselasky Date: Wed Dec 12 11:30:21 2018 New Revision: 341885 URL: https://svnweb.freebsd.org/changeset/base/341885 Log: MFC r341535: ipoib: correct setting MTU from inside ipoib(4). It is not enough to set ifnet->if_mtu to change the interface MTU. System saves the MTU for route in the radix tree, and route cache keeps the interface MTU as well. Since addition of the multicast group causes recalculation of MTU, even bringing the interface up changes MTU from 4042 to 1500, which makes the system configuration inconsistent. Worse, ip_output() prefers route MTU over interface MTU, so large packets are not fragmented and dropped on floor. Fix it for ipoib(4) using the same approach (or hack) as was applied for it_tun/if_tap in r339012. Thanks to bz@ for giving the hint. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:29:21 2018 (r341884) +++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:30:21 2018 (r341885) @@ -516,7 +516,7 @@ void ipoib_path_iter_read(struct ipoib_path_iter *iter struct ipoib_path *path); #endif -int ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu); +int ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu, bool propagate); int ipoib_mcast_attach(struct ipoib_dev_priv *priv, u16 mlid, union ib_gid *mgid, int set_qkey); Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:29:21 2018 (r341884) +++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:30:21 2018 (r341885) @@ -255,10 +255,34 @@ ipoib_stop(struct ipoib_dev_priv *priv) return 0; } +static int +ipoib_propagate_ifnet_mtu(struct ipoib_dev_priv *priv, int new_mtu, + bool propagate) +{ + struct ifnet *ifp; + struct ifreq ifr; + int error; + + ifp = priv->dev; + if (ifp->if_mtu == new_mtu) + return (0); + if (propagate) { + strlcpy(ifr.ifr_name, if_name(ifp), IFNAMSIZ); + ifr.ifr_mtu = new_mtu; + CURVNET_SET(ifp->if_vnet); + error = ifhwioctl(SIOCSIFMTU, ifp, (caddr_t)&ifr, curthread); + CURVNET_RESTORE(); + } else { + ifp->if_mtu = new_mtu; + error = 0; + } + return (error); +} + int -ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu) +ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_mtu, bool propagate) { - struct ifnet *dev = priv->dev; + int error, prev_admin_mtu; /* dev->if_mtu > 2K ==> connected mode */ if (ipoib_cm_admin_enabled(priv)) { @@ -269,20 +293,21 @@ ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_ ipoib_warn(priv, "mtu > %d will cause multicast packet drops.\n", priv->mcast_mtu); - dev->if_mtu = new_mtu; - return 0; + return (ipoib_propagate_ifnet_mtu(priv, new_mtu, propagate)); } if (new_mtu > IPOIB_UD_MTU(priv->max_ib_mtu)) return -EINVAL; + prev_admin_mtu = priv->admin_mtu; priv->admin_mtu = new_mtu; - - dev->if_mtu = min(priv->mcast_mtu, priv->admin_mtu); - - queue_work(ipoib_workqueue, &priv->flush_light); - - return 0; + error = ipoib_propagate_ifnet_mtu(priv, min(priv->mcast_mtu, + priv->admin_mtu), propagate); + if (error == 0) + queue_work(ipoib_workqueue, &priv->flush_light); + else + priv->admin_mtu = prev_admin_mtu; + return (error); } static int @@ -336,7 +361,7 @@ ipoib_ioctl(struct ifnet *ifp, u_long command, caddr_t /* * Set the interface MTU. */ - error = -ipoib_change_mtu(priv, ifr->ifr_mtu); + error = -ipoib_change_mtu(priv, ifr->ifr_mtu, false); break; default: error = EINVAL; Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Wed Dec 12 11:29:21 2018 (r341884) +++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Wed Dec 12 11:30:21 2018 (r341885) @@ -562,7 +562,8 @@ void ipoib_mcast_join_task(struct work_struct *work) spin_unlock_irq(&priv->lock); if (!ipoib_cm_admin_enabled(priv)) - ipoib_change_mtu(priv, min(priv->mcast_mtu, priv->admin_mtu)); + ipoib_change_mtu(priv, min(priv->mcast_mtu, priv->admin_mtu), + true); ipoib_dbg_mcast(priv, "successfully joined all multicast groups\n"); From owner-svn-src-all@freebsd.org Wed Dec 12 11:30:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 113F71338CA2; Wed, 12 Dec 2018 11:30:47 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 AA211893D9; Wed, 12 Dec 2018 11:30:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79B297460; Wed, 12 Dec 2018 11:30:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBUkdS046622; Wed, 12 Dec 2018 11:30:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBUkdC046621; Wed, 12 Dec 2018 11:30:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121130.wBCBUkdC046621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341886 - stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AA211893D9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:30:47 -0000 Author: hselasky Date: Wed Dec 12 11:30:46 2018 New Revision: 341886 URL: https://svnweb.freebsd.org/changeset/base/341886 Log: MFC r341536: ipoib: Don't do a light flush when MTU is unchanged. When changing the MTU of ibX network interfaces, check that the MTU was really changed before requesting an update of the multicast rules. Else we might go into an infinite loop joining and leaving ibX multicast groups towards the opensm master interface. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:30:21 2018 (r341885) +++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:30:46 2018 (r341886) @@ -305,9 +305,11 @@ ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_ priv->admin_mtu = new_mtu; error = ipoib_propagate_ifnet_mtu(priv, min(priv->mcast_mtu, priv->admin_mtu), propagate); - if (error == 0) - queue_work(ipoib_workqueue, &priv->flush_light); - else + if (error == 0) { + /* check for MTU change to avoid infinite loop */ + if (prev_admin_mtu != new_mtu) + queue_work(ipoib_workqueue, &priv->flush_light); + } else priv->admin_mtu = prev_admin_mtu; return (error); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:31:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95EE01338F6C; Wed, 12 Dec 2018 11:31:55 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 3D62689755; Wed, 12 Dec 2018 11:31:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3301675D9; Wed, 12 Dec 2018 11:31:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBVsrU050395; Wed, 12 Dec 2018 11:31:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBVsMw050394; Wed, 12 Dec 2018 11:31:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121131.wBCBVsMw050394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341887 - stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D62689755 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:31:55 -0000 Author: hselasky Date: Wed Dec 12 11:31:54 2018 New Revision: 341887 URL: https://svnweb.freebsd.org/changeset/base/341887 Log: MFC r341536: ipoib: Don't do a light flush when MTU is unchanged. When changing the MTU of ibX network interfaces, check that the MTU was really changed before requesting an update of the multicast rules. Else we might go into an infinite loop joining and leaving ibX multicast groups towards the opensm master interface. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:30:46 2018 (r341886) +++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Dec 12 11:31:54 2018 (r341887) @@ -303,9 +303,11 @@ ipoib_change_mtu(struct ipoib_dev_priv *priv, int new_ priv->admin_mtu = new_mtu; error = ipoib_propagate_ifnet_mtu(priv, min(priv->mcast_mtu, priv->admin_mtu), propagate); - if (error == 0) - queue_work(ipoib_workqueue, &priv->flush_light); - else + if (error == 0) { + /* check for MTU change to avoid infinite loop */ + if (prev_admin_mtu != new_mtu) + queue_work(ipoib_workqueue, &priv->flush_light); + } else priv->admin_mtu = prev_admin_mtu; return (error); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:32:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AFF61339036; Wed, 12 Dec 2018 11:32:32 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 3D773898FE; Wed, 12 Dec 2018 11:32:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 315AA7608; Wed, 12 Dec 2018 11:32:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBWWVl051298; Wed, 12 Dec 2018 11:32:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBWWal051297; Wed, 12 Dec 2018 11:32:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121132.wBCBWWal051297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341888 - stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D773898FE X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:32:32 -0000 Author: hselasky Date: Wed Dec 12 11:32:31 2018 New Revision: 341888 URL: https://svnweb.freebsd.org/changeset/base/341888 Log: MFC r341537: ipoib: increase the non-cm queue length When a packet needs fragmentation, it might generate more than 3 fragments. With the queue length 3, all fragments are generated faster than the queue is drained, which effectively drops fourth and later fragments on the floor. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:31:54 2018 (r341887) +++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:32:31 2018 (r341888) @@ -133,8 +133,8 @@ enum { IPOIB_NUM_WC = 4, - IPOIB_MAX_PATH_REC_QUEUE = 3, - IPOIB_MAX_MCAST_QUEUE = 3, + IPOIB_MAX_PATH_REC_QUEUE = 16, + IPOIB_MAX_MCAST_QUEUE = 16, IPOIB_FLAG_OPER_UP = 0, IPOIB_FLAG_INITIALIZED = 1, From owner-svn-src-all@freebsd.org Wed Dec 12 11:33:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BD601339102; Wed, 12 Dec 2018 11:33:15 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 3387389A67; Wed, 12 Dec 2018 11:33:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A0DA760B; Wed, 12 Dec 2018 11:33:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBXFqR051422; Wed, 12 Dec 2018 11:33:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBXF5C051421; Wed, 12 Dec 2018 11:33:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121133.wBCBXF5C051421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341889 - stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3387389A67 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:33:15 -0000 Author: hselasky Date: Wed Dec 12 11:33:14 2018 New Revision: 341889 URL: https://svnweb.freebsd.org/changeset/base/341889 Log: MFC r341537: ipoib: increase the non-cm queue length When a packet needs fragmentation, it might generate more than 3 fragments. With the queue length 3, all fragments are generated faster than the queue is drained, which effectively drops fourth and later fragments on the floor. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:32:31 2018 (r341888) +++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Wed Dec 12 11:33:14 2018 (r341889) @@ -131,8 +131,8 @@ enum { IPOIB_NUM_WC = 4, - IPOIB_MAX_PATH_REC_QUEUE = 3, - IPOIB_MAX_MCAST_QUEUE = 3, + IPOIB_MAX_PATH_REC_QUEUE = 16, + IPOIB_MAX_MCAST_QUEUE = 16, IPOIB_FLAG_OPER_UP = 0, IPOIB_FLAG_INITIALIZED = 1, From owner-svn-src-all@freebsd.org Wed Dec 12 11:33:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C111133917C; Wed, 12 Dec 2018 11:33:51 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 421DD89BB0; Wed, 12 Dec 2018 11:33:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 38376760C; Wed, 12 Dec 2018 11:33:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBXp3I051489; Wed, 12 Dec 2018 11:33:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBXpZL051488; Wed, 12 Dec 2018 11:33:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121133.wBCBXpZL051488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341890 - stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 421DD89BB0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:33:51 -0000 Author: hselasky Date: Wed Dec 12 11:33:50 2018 New Revision: 341890 URL: https://svnweb.freebsd.org/changeset/base/341890 Log: MFC r341538: ipoib: Notify on modify QP failure only when relevant Modify QP can fail and it can be acceptable, like when moving from RST to ERR state, all the rest are not acceptable and a message to the log should be printed. The current code prints on all failures and many messages like: "Failed to modify QP to ERROR state" appear, even when supported by the state machine of the QP object. Linux commit: 5dc78ad1904db597bdb4427f3ead437aae86f54c Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Wed Dec 12 11:33:14 2018 (r341889) +++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Wed Dec 12 11:33:50 2018 (r341890) @@ -710,6 +710,30 @@ static int recvs_pending(struct ipoib_dev_priv *priv) return pending; } +static void check_qp_movement_and_print(struct ipoib_dev_priv *priv, + struct ib_qp *qp, + enum ib_qp_state new_state) +{ + struct ib_qp_attr qp_attr; + struct ib_qp_init_attr query_init_attr; + int ret; + + ret = ib_query_qp(qp, &qp_attr, IB_QP_STATE, &query_init_attr); + if (ret) { + ipoib_warn(priv, "%s: Failed to query QP (%d)\n", __func__, ret); + return; + } + + /* print according to the new-state and the previous state */ + if (new_state == IB_QPS_ERR && qp_attr.qp_state == IB_QPS_RESET) { + ipoib_dbg(priv, "Failed to modify QP %d->%d, acceptable\n", + qp_attr.qp_state, new_state); + } else { + ipoib_warn(priv, "Failed to modify QP %d->%d\n", + qp_attr.qp_state, new_state); + } +} + void ipoib_drain_cq(struct ipoib_dev_priv *priv) { int i, n; @@ -761,7 +785,7 @@ int ipoib_ib_dev_stop(struct ipoib_dev_priv *priv, int */ qp_attr.qp_state = IB_QPS_ERR; if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE)) - ipoib_warn(priv, "Failed to modify QP to ERROR state\n"); + check_qp_movement_and_print(priv, priv->qp, IB_QPS_ERR); /* Wait for all sends and receives to complete */ begin = jiffies; From owner-svn-src-all@freebsd.org Wed Dec 12 11:35:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9369D133922D; Wed, 12 Dec 2018 11:35:01 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 363CA89D39; Wed, 12 Dec 2018 11:35:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BE20760E; Wed, 12 Dec 2018 11:35:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBZ0Ys051617; Wed, 12 Dec 2018 11:35:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBZ0g9051615; Wed, 12 Dec 2018 11:35:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121135.wBCBZ0g9051615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341891 - stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 341891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 363CA89D39 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:35:01 -0000 Author: hselasky Date: Wed Dec 12 11:35:00 2018 New Revision: 341891 URL: https://svnweb.freebsd.org/changeset/base/341891 Log: MFC r341538: ipoib: Notify on modify QP failure only when relevant Modify QP can fail and it can be acceptable, like when moving from RST to ERR state, all the rest are not acceptable and a message to the log should be printed. The current code prints on all failures and many messages like: "Failed to modify QP to ERROR state" appear, even when supported by the state machine of the QP object. Linux commit: 5dc78ad1904db597bdb4427f3ead437aae86f54c MFC after: 1 week Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Wed Dec 12 11:33:50 2018 (r341890) +++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Wed Dec 12 11:35:00 2018 (r341891) @@ -708,6 +708,30 @@ static int recvs_pending(struct ipoib_dev_priv *priv) return pending; } +static void check_qp_movement_and_print(struct ipoib_dev_priv *priv, + struct ib_qp *qp, + enum ib_qp_state new_state) +{ + struct ib_qp_attr qp_attr; + struct ib_qp_init_attr query_init_attr; + int ret; + + ret = ib_query_qp(qp, &qp_attr, IB_QP_STATE, &query_init_attr); + if (ret) { + ipoib_warn(priv, "%s: Failed to query QP (%d)\n", __func__, ret); + return; + } + + /* print according to the new-state and the previous state */ + if (new_state == IB_QPS_ERR && qp_attr.qp_state == IB_QPS_RESET) { + ipoib_dbg(priv, "Failed to modify QP %d->%d, acceptable\n", + qp_attr.qp_state, new_state); + } else { + ipoib_warn(priv, "Failed to modify QP %d->%d\n", + qp_attr.qp_state, new_state); + } +} + void ipoib_drain_cq(struct ipoib_dev_priv *priv) { int i, n; @@ -759,7 +783,7 @@ int ipoib_ib_dev_stop(struct ipoib_dev_priv *priv, int */ qp_attr.qp_state = IB_QPS_ERR; if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE)) - ipoib_warn(priv, "Failed to modify QP to ERROR state\n"); + check_qp_movement_and_print(priv, priv->qp, IB_QPS_ERR); /* Wait for all sends and receives to complete */ begin = jiffies; From owner-svn-src-all@freebsd.org Wed Dec 12 11:35:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 725611339294; Wed, 12 Dec 2018 11:35:37 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 1945289E6E; Wed, 12 Dec 2018 11:35:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E9AD760F; Wed, 12 Dec 2018 11:35:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBZa9j051702; Wed, 12 Dec 2018 11:35:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBZaPL051701; Wed, 12 Dec 2018 11:35:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121135.wBCBZaPL051701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341892 - stable/12/sys/contrib/rdma/krping X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/contrib/rdma/krping X-SVN-Commit-Revision: 341892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1945289E6E X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:35:37 -0000 Author: hselasky Date: Wed Dec 12 11:35:36 2018 New Revision: 341892 URL: https://svnweb.freebsd.org/changeset/base/341892 Log: MFC r341539: krping: Fix for memory leak in error case. Sponsored by: Mellanox Technologies Modified: stable/12/sys/contrib/rdma/krping/krping_dev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/contrib/rdma/krping/krping_dev.c ============================================================================== --- stable/12/sys/contrib/rdma/krping/krping_dev.c Wed Dec 12 11:35:00 2018 (r341891) +++ stable/12/sys/contrib/rdma/krping/krping_dev.c Wed Dec 12 11:35:36 2018 (r341892) @@ -187,7 +187,7 @@ krping_write(struct cdev *dev, struct uio *uio, int io err = uiomove(cp, amt, uio); if (err) { uprintf("Write failed: bad address!\n"); - return err; + goto done; } cp += amt; remain -= amt; @@ -195,7 +195,8 @@ krping_write(struct cdev *dev, struct uio *uio, int io if (uio->uio_resid != 0) { uprintf("Message too big. max size is %d!\n", BUFFERSIZE); - return EMSGSIZE; + err = EMSGSIZE; + goto done; } /* null terminate and remove the \n */ @@ -204,6 +205,7 @@ krping_write(struct cdev *dev, struct uio *uio, int io krpingmsg->len = (unsigned long)(cp - krpingmsg->msg); uprintf("krping: write string = |%s|\n", krpingmsg->msg); err = krping_doit(krpingmsg->msg); +done: free(krpingmsg, M_DEVBUF); return(err); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:36:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A88813392EC; Wed, 12 Dec 2018 11:36:04 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 30A4089FAA; Wed, 12 Dec 2018 11:36:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D9D27611; Wed, 12 Dec 2018 11:36:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBa3Ix051771; Wed, 12 Dec 2018 11:36:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBa3nU051770; Wed, 12 Dec 2018 11:36:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121136.wBCBa3nU051770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341893 - stable/11/sys/contrib/rdma/krping X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/contrib/rdma/krping X-SVN-Commit-Revision: 341893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 30A4089FAA X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:36:04 -0000 Author: hselasky Date: Wed Dec 12 11:36:03 2018 New Revision: 341893 URL: https://svnweb.freebsd.org/changeset/base/341893 Log: MFC r341539: krping: Fix for memory leak in error case. Sponsored by: Mellanox Technologies Modified: stable/11/sys/contrib/rdma/krping/krping_dev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/rdma/krping/krping_dev.c ============================================================================== --- stable/11/sys/contrib/rdma/krping/krping_dev.c Wed Dec 12 11:35:36 2018 (r341892) +++ stable/11/sys/contrib/rdma/krping/krping_dev.c Wed Dec 12 11:36:03 2018 (r341893) @@ -187,7 +187,7 @@ krping_write(struct cdev *dev, struct uio *uio, int io err = uiomove(cp, amt, uio); if (err) { uprintf("Write failed: bad address!\n"); - return err; + goto done; } cp += amt; remain -= amt; @@ -195,7 +195,8 @@ krping_write(struct cdev *dev, struct uio *uio, int io if (uio->uio_resid != 0) { uprintf("Message too big. max size is %d!\n", BUFFERSIZE); - return EMSGSIZE; + err = EMSGSIZE; + goto done; } /* null terminate and remove the \n */ @@ -204,6 +205,7 @@ krping_write(struct cdev *dev, struct uio *uio, int io krpingmsg->len = (unsigned long)(cp - krpingmsg->msg); uprintf("krping: write string = |%s|\n", krpingmsg->msg); err = krping_doit(krpingmsg->msg); +done: free(krpingmsg, M_DEVBUF); return(err); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:37:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83E5813393E2; Wed, 12 Dec 2018 11:37:44 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 2C32C8A136; Wed, 12 Dec 2018 11:37:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A4297614; Wed, 12 Dec 2018 11:37:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBbhtL051911; Wed, 12 Dec 2018 11:37:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBbhkJ051910; Wed, 12 Dec 2018 11:37:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121137.wBCBbhkJ051910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341894 - stable/12/contrib/ofed/libibverbs X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/contrib/ofed/libibverbs X-SVN-Commit-Revision: 341894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C32C8A136 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:37:44 -0000 Author: hselasky Date: Wed Dec 12 11:37:43 2018 New Revision: 341894 URL: https://svnweb.freebsd.org/changeset/base/341894 Log: MFC r341540: libibverbs: Fix memory leak in ibv_read_sysfs_file(). Testing packetdrill using valgrind resulted in finding a memory leak in ibv_read_sysfs_file(). The attached patch fixes it. Submitted by: tuexen@ Sponsored by: Mellanox Technologies Modified: stable/12/contrib/ofed/libibverbs/sysfs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/ofed/libibverbs/sysfs.c ============================================================================== --- stable/12/contrib/ofed/libibverbs/sysfs.c Wed Dec 12 11:36:03 2018 (r341893) +++ stable/12/contrib/ofed/libibverbs/sysfs.c Wed Dec 12 11:37:43 2018 (r341894) @@ -79,7 +79,7 @@ int ibv_read_sysfs_file(const char *dir, const char *f char *buf, size_t size) { char *path, *s; - int fd; + int ret; size_t len; if (asprintf(&path, "%s/%s", dir, file) < 0) @@ -89,11 +89,12 @@ int ibv_read_sysfs_file(const char *dir, const char *f if (*s == '/') *s = '.'; - len = size; - if (sysctlbyname(&path[1], buf, &len, NULL, 0) == -1) - return -1; - + len = size; + ret = sysctlbyname(&path[1], buf, &len, NULL, 0); free(path); + + if (ret == -1) + return -1; if (len > 0 && buf[len - 1] == '\n') buf[--len] = '\0'; From owner-svn-src-all@freebsd.org Wed Dec 12 11:38:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 815FD1339437; Wed, 12 Dec 2018 11:38:01 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 279528A248; Wed, 12 Dec 2018 11:38:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E5CE7616; Wed, 12 Dec 2018 11:38:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBc1QY051971; Wed, 12 Dec 2018 11:38:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBc0Sl051970; Wed, 12 Dec 2018 11:38:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121138.wBCBc0Sl051970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341895 - stable/11/contrib/ofed/libibverbs X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/contrib/ofed/libibverbs X-SVN-Commit-Revision: 341895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 279528A248 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:38:01 -0000 Author: hselasky Date: Wed Dec 12 11:38:00 2018 New Revision: 341895 URL: https://svnweb.freebsd.org/changeset/base/341895 Log: MFC r341540: libibverbs: Fix memory leak in ibv_read_sysfs_file(). Testing packetdrill using valgrind resulted in finding a memory leak in ibv_read_sysfs_file(). The attached patch fixes it. Submitted by: tuexen@ Sponsored by: Mellanox Technologies Modified: stable/11/contrib/ofed/libibverbs/sysfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/libibverbs/sysfs.c ============================================================================== --- stable/11/contrib/ofed/libibverbs/sysfs.c Wed Dec 12 11:37:43 2018 (r341894) +++ stable/11/contrib/ofed/libibverbs/sysfs.c Wed Dec 12 11:38:00 2018 (r341895) @@ -79,7 +79,7 @@ int ibv_read_sysfs_file(const char *dir, const char *f char *buf, size_t size) { char *path, *s; - int fd; + int ret; size_t len; if (asprintf(&path, "%s/%s", dir, file) < 0) @@ -89,11 +89,12 @@ int ibv_read_sysfs_file(const char *dir, const char *f if (*s == '/') *s = '.'; - len = size; - if (sysctlbyname(&path[1], buf, &len, NULL, 0) == -1) - return -1; - + len = size; + ret = sysctlbyname(&path[1], buf, &len, NULL, 0); free(path); + + if (ret == -1) + return -1; if (len > 0 && buf[len - 1] == '\n') buf[--len] = '\0'; From owner-svn-src-all@freebsd.org Wed Dec 12 11:39:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0904F133959B; Wed, 12 Dec 2018 11:39:01 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 A473D8A4AB; Wed, 12 Dec 2018 11:39:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99BB87618; Wed, 12 Dec 2018 11:39:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBd0CN052093; Wed, 12 Dec 2018 11:39:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBd0wX052092; Wed, 12 Dec 2018 11:39:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121139.wBCBd0wX052092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341896 - stable/12/contrib/ofed/opensm/opensm X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/contrib/ofed/opensm/opensm X-SVN-Commit-Revision: 341896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A473D8A4AB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:39:01 -0000 Author: hselasky Date: Wed Dec 12 11:39:00 2018 New Revision: 341896 URL: https://svnweb.freebsd.org/changeset/base/341896 Log: MFC r341541: opensm: Use precision specifier for scanf If user input a string larger than the length of buffer, the stack memory will be corrupted. Sponsored by: Mellanox Technologies Modified: stable/12/contrib/ofed/opensm/opensm/main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/ofed/opensm/opensm/main.c ============================================================================== --- stable/12/contrib/ofed/opensm/opensm/main.c Wed Dec 12 11:38:00 2018 (r341895) +++ stable/12/contrib/ofed/opensm/opensm/main.c Wed Dec 12 11:39:00 2018 (r341896) @@ -492,7 +492,7 @@ static ib_net64_t get_port_guid(IN osm_opensm_t * p_os fflush(stdout); if (scanf("%u", &choice) <= 0) { char junk[128]; - if (scanf("%s", junk) <= 0) + if (scanf("%127s", junk) <= 0) printf("\nError: Cannot scan!\n"); } else if (choice == 0) return 0; From owner-svn-src-all@freebsd.org Wed Dec 12 11:39:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF47A13395EB; Wed, 12 Dec 2018 11:39:10 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 86E858A5A7; Wed, 12 Dec 2018 11:39:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D4317619; Wed, 12 Dec 2018 11:39:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBdA74052143; Wed, 12 Dec 2018 11:39:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBdAVR052142; Wed, 12 Dec 2018 11:39:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121139.wBCBdAVR052142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341897 - stable/11/contrib/ofed/opensm/opensm X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/contrib/ofed/opensm/opensm X-SVN-Commit-Revision: 341897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 86E858A5A7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:39:11 -0000 Author: hselasky Date: Wed Dec 12 11:39:09 2018 New Revision: 341897 URL: https://svnweb.freebsd.org/changeset/base/341897 Log: MFC r341541: opensm: Use precision specifier for scanf If user input a string larger than the length of buffer, the stack memory will be corrupted. Sponsored by: Mellanox Technologies Modified: stable/11/contrib/ofed/opensm/opensm/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/opensm/opensm/main.c ============================================================================== --- stable/11/contrib/ofed/opensm/opensm/main.c Wed Dec 12 11:39:00 2018 (r341896) +++ stable/11/contrib/ofed/opensm/opensm/main.c Wed Dec 12 11:39:09 2018 (r341897) @@ -492,7 +492,7 @@ static ib_net64_t get_port_guid(IN osm_opensm_t * p_os fflush(stdout); if (scanf("%u", &choice) <= 0) { char junk[128]; - if (scanf("%s", junk) <= 0) + if (scanf("%127s", junk) <= 0) printf("\nError: Cannot scan!\n"); } else if (choice == 0) return 0; From owner-svn-src-all@freebsd.org Wed Dec 12 11:40:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1124C13396C4; Wed, 12 Dec 2018 11:40:20 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 AC7348A75D; Wed, 12 Dec 2018 11:40:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98ED5761D; Wed, 12 Dec 2018 11:40:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBeJCD052294; Wed, 12 Dec 2018 11:40:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBeJgI052293; Wed, 12 Dec 2018 11:40:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121140.wBCBeJgI052293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341898 - stable/12/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AC7348A75D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:40:20 -0000 Author: hselasky Date: Wed Dec 12 11:40:19 2018 New Revision: 341898 URL: https://svnweb.freebsd.org/changeset/base/341898 Log: MFC r341542: mlx4core: Avoid multiplication overflow by casting multiplication. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_icm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_icm.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_icm.c Wed Dec 12 11:39:09 2018 (r341897) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_icm.c Wed Dec 12 11:40:19 2018 (r341898) @@ -411,7 +411,7 @@ int mlx4_init_icm_table(struct mlx4_dev *dev, struct m size = (u64) nobj * obj_size; for (i = 0; i * MLX4_TABLE_CHUNK_SIZE < reserved * obj_size; ++i) { chunk_size = MLX4_TABLE_CHUNK_SIZE; - if ((i + 1) * MLX4_TABLE_CHUNK_SIZE > size) + if ((u64) (i + 1) * MLX4_TABLE_CHUNK_SIZE > size) chunk_size = PAGE_ALIGN(size - i * MLX4_TABLE_CHUNK_SIZE); From owner-svn-src-all@freebsd.org Wed Dec 12 11:40:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2ED613396F7; Wed, 12 Dec 2018 11:40:24 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 77A398A77F; Wed, 12 Dec 2018 11:40:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A454761E; Wed, 12 Dec 2018 11:40:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBeOxB052344; Wed, 12 Dec 2018 11:40:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBeOgE052343; Wed, 12 Dec 2018 11:40:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121140.wBCBeOgE052343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341899 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 77A398A77F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:40:25 -0000 Author: hselasky Date: Wed Dec 12 11:40:23 2018 New Revision: 341899 URL: https://svnweb.freebsd.org/changeset/base/341899 Log: MFC r341542: mlx4core: Avoid multiplication overflow by casting multiplication. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_icm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_icm.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_icm.c Wed Dec 12 11:40:19 2018 (r341898) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_icm.c Wed Dec 12 11:40:23 2018 (r341899) @@ -411,7 +411,7 @@ int mlx4_init_icm_table(struct mlx4_dev *dev, struct m size = (u64) nobj * obj_size; for (i = 0; i * MLX4_TABLE_CHUNK_SIZE < reserved * obj_size; ++i) { chunk_size = MLX4_TABLE_CHUNK_SIZE; - if ((i + 1) * MLX4_TABLE_CHUNK_SIZE > size) + if ((u64) (i + 1) * MLX4_TABLE_CHUNK_SIZE > size) chunk_size = PAGE_ALIGN(size - i * MLX4_TABLE_CHUNK_SIZE); From owner-svn-src-all@freebsd.org Wed Dec 12 11:41:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EC0713397A8; Wed, 12 Dec 2018 11:41:29 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 0598F8AA84; Wed, 12 Dec 2018 11:41:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E64217665; Wed, 12 Dec 2018 11:41:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBfSPB057144; Wed, 12 Dec 2018 11:41:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBfSsD057143; Wed, 12 Dec 2018 11:41:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121141.wBCBfSsD057143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341900 - stable/12/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0598F8AA84 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:41:29 -0000 Author: hselasky Date: Wed Dec 12 11:41:28 2018 New Revision: 341900 URL: https://svnweb.freebsd.org/changeset/base/341900 Log: MFC r341543: mlx4: Zero initialize device capabilities to avoid use of uninitialized fields. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:40:23 2018 (r341899) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:41:28 2018 (r341900) @@ -2208,7 +2208,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) { struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_adapter adapter; - struct mlx4_dev_cap dev_cap; + struct mlx4_dev_cap dev_cap = {}; struct mlx4_profile profile; struct mlx4_init_hca_param init_hca; u64 icm_size; From owner-svn-src-all@freebsd.org Wed Dec 12 11:41:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8663113397DF; Wed, 12 Dec 2018 11:41:35 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 17E2F8AC0D; Wed, 12 Dec 2018 11:41:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50520766B; Wed, 12 Dec 2018 11:41:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBfYi6057194; Wed, 12 Dec 2018 11:41:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBfYCx057193; Wed, 12 Dec 2018 11:41:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121141.wBCBfYCx057193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341901 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 17E2F8AC0D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:41:35 -0000 Author: hselasky Date: Wed Dec 12 11:41:33 2018 New Revision: 341901 URL: https://svnweb.freebsd.org/changeset/base/341901 Log: MFC r341543: mlx4: Zero initialize device capabilities to avoid use of uninitialized fields. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:41:28 2018 (r341900) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:41:33 2018 (r341901) @@ -2208,7 +2208,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) { struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_adapter adapter; - struct mlx4_dev_cap dev_cap; + struct mlx4_dev_cap dev_cap = {}; struct mlx4_profile profile; struct mlx4_init_hca_param init_hca; u64 icm_size; From owner-svn-src-all@freebsd.org Wed Dec 12 11:42:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DBD91339864; Wed, 12 Dec 2018 11:42:22 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 A4FF98AEA6; Wed, 12 Dec 2018 11:42:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A48B77A5; Wed, 12 Dec 2018 11:42:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBgLuN057303; Wed, 12 Dec 2018 11:42:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBgL1Q057302; Wed, 12 Dec 2018 11:42:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121142.wBCBgL1Q057302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341902 - stable/12/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A4FF98AEA6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:42:22 -0000 Author: hselasky Date: Wed Dec 12 11:42:21 2018 New Revision: 341902 URL: https://svnweb.freebsd.org/changeset/base/341902 Log: MFC r341544: mlx4core: Add checks for invalid port numbers. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Wed Dec 12 11:41:33 2018 (r341901) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Wed Dec 12 11:42:21 2018 (r341902) @@ -961,6 +961,8 @@ static int mlx4_MAD_IFC_wrapper(struct mlx4_dev *dev, if (!err && slave != mlx4_master_func_num(dev)) { u8 *state = outsmp->data + PORT_STATE_OFFSET; + if (port < 1 || port > dev->caps.num_ports) + return -EINVAL; *state = (*state & 0xf0) | vf_port_state(dev, port, slave); slave_cap_mask = priv->mfunc.master.slave_state[slave].ib_cap_mask[port]; memcpy(outsmp->data + PORT_CAPABILITY_LOCATION_IN_SMP, &slave_cap_mask, 4); @@ -968,8 +970,12 @@ static int mlx4_MAD_IFC_wrapper(struct mlx4_dev *dev, return err; } if (smp->attr_id == IB_SMP_ATTR_GUID_INFO) { - __be64 guid = mlx4_get_admin_guid(dev, slave, - port); + __be64 guid; + + if (port < 1 || port > dev->caps.num_ports) + return -EINVAL; + + guid = mlx4_get_admin_guid(dev, slave, port); /* set the PF admin guid to the FW/HW burned * GUID, if it wasn't yet set From owner-svn-src-all@freebsd.org Wed Dec 12 11:42:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADA0F13399FE; Wed, 12 Dec 2018 11:42:39 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 554FA8AFDE; Wed, 12 Dec 2018 11:42:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BC0677BD; Wed, 12 Dec 2018 11:42:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBgdA1057361; Wed, 12 Dec 2018 11:42:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBgdvr057360; Wed, 12 Dec 2018 11:42:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121142.wBCBgdvr057360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341903 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 554FA8AFDE X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:42:39 -0000 Author: hselasky Date: Wed Dec 12 11:42:38 2018 New Revision: 341903 URL: https://svnweb.freebsd.org/changeset/base/341903 Log: MFC r341544: mlx4core: Add checks for invalid port numbers. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Wed Dec 12 11:42:21 2018 (r341902) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Wed Dec 12 11:42:38 2018 (r341903) @@ -961,6 +961,8 @@ static int mlx4_MAD_IFC_wrapper(struct mlx4_dev *dev, if (!err && slave != mlx4_master_func_num(dev)) { u8 *state = outsmp->data + PORT_STATE_OFFSET; + if (port < 1 || port > dev->caps.num_ports) + return -EINVAL; *state = (*state & 0xf0) | vf_port_state(dev, port, slave); slave_cap_mask = priv->mfunc.master.slave_state[slave].ib_cap_mask[port]; memcpy(outsmp->data + PORT_CAPABILITY_LOCATION_IN_SMP, &slave_cap_mask, 4); @@ -968,8 +970,12 @@ static int mlx4_MAD_IFC_wrapper(struct mlx4_dev *dev, return err; } if (smp->attr_id == IB_SMP_ATTR_GUID_INFO) { - __be64 guid = mlx4_get_admin_guid(dev, slave, - port); + __be64 guid; + + if (port < 1 || port > dev->caps.num_ports) + return -EINVAL; + + guid = mlx4_get_admin_guid(dev, slave, port); /* set the PF admin guid to the FW/HW burned * GUID, if it wasn't yet set From owner-svn-src-all@freebsd.org Wed Dec 12 11:43:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 662F51339ABB; Wed, 12 Dec 2018 11:43:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 0D1E68B168; Wed, 12 Dec 2018 11:43:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE56F77BF; Wed, 12 Dec 2018 11:43:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBhnYY057486; Wed, 12 Dec 2018 11:43:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBhnYm057485; Wed, 12 Dec 2018 11:43:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121143.wBCBhnYm057485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341904 - in stable/11/sys/dev/mlx4: . mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx4: . mlx4_core X-SVN-Commit-Revision: 341904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D1E68B168 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:43:50 -0000 Author: hselasky Date: Wed Dec 12 11:43:49 2018 New Revision: 341904 URL: https://svnweb.freebsd.org/changeset/base/341904 Log: MFC r341545: mlx4: Add board identifier and firmware version to sysctl In last mlx4 update (r325841) we lost the sysctl to show the firmware version for mlx4 devices. Add both board identifier and firmware version under: sys.device.mlx4_core0.hw sysctl node. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/device.h stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/device.h ============================================================================== --- stable/11/sys/dev/mlx4/device.h Wed Dec 12 11:42:38 2018 (r341903) +++ stable/11/sys/dev/mlx4/device.h Wed Dec 12 11:43:49 2018 (r341904) @@ -877,6 +877,8 @@ struct mlx4_dev { u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; struct mlx4_vf_dev *dev_vfs; u8 uar_page_shift; + struct sysctl_ctx_list hw_ctx; + char fw_str[64]; }; struct mlx4_clock_params { Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:42:38 2018 (r341903) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:43:49 2018 (r341904) @@ -1893,6 +1893,7 @@ static void unmap_internal_clock(struct mlx4_dev *dev) static void mlx4_close_hca(struct mlx4_dev *dev) { + sysctl_ctx_free(&dev->hw_ctx); unmap_internal_clock(dev); unmap_bf_area(dev); if (mlx4_is_slave(dev)) @@ -3745,10 +3746,14 @@ err_disable_pdev: static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) { - struct mlx4_priv *priv; - struct mlx4_dev *dev; - int ret; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *node; + struct sysctl_oid_list *node_list; + struct mlx4_priv *priv; + struct mlx4_dev *dev; + int ret; + printk_once(KERN_INFO "%s", mlx4_version); priv = kzalloc(sizeof(*priv), GFP_KERNEL); @@ -3773,8 +3778,28 @@ static int mlx4_init_one(struct pci_dev *pdev, const s if (ret) { kfree(dev->persist); kfree(priv); + return ret; } else { pci_save_state(pdev->dev.bsddev); + } + + snprintf(dev->fw_str, sizeof(dev->fw_str), "%d.%d.%d", + (int) (dev->caps.fw_ver >> 32), + (int) (dev->caps.fw_ver >> 16) & 0xffff, + (int) (dev->caps.fw_ver & 0xffff)); + + ctx = &dev->hw_ctx; + sysctl_ctx_init(ctx); + node = SYSCTL_ADD_NODE(ctx,SYSCTL_CHILDREN(pdev->dev.kobj.oidp), + OID_AUTO, "hw" , CTLFLAG_RD, 0, "mlx4 dev hw information"); + if (node != NULL) { + node_list = SYSCTL_CHILDREN(node); + SYSCTL_ADD_STRING(ctx, node_list, OID_AUTO, + "fw_version", CTLFLAG_RD, dev->fw_str, 0, + "Device firmware version"); + SYSCTL_ADD_STRING(ctx, node_list, OID_AUTO, + "board_id", CTLFLAG_RD, dev->board_id, 0, + "Device board identifier"); } return ret; From owner-svn-src-all@freebsd.org Wed Dec 12 11:43:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 602F31339AED; Wed, 12 Dec 2018 11:43:53 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 078D78B16C; Wed, 12 Dec 2018 11:43:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3F8177C0; Wed, 12 Dec 2018 11:43:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBhqqe057535; Wed, 12 Dec 2018 11:43:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBhq2W057534; Wed, 12 Dec 2018 11:43:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121143.wBCBhq2W057534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341905 - in stable/12/sys/dev/mlx4: . mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx4: . mlx4_core X-SVN-Commit-Revision: 341905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 078D78B16C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.709,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:43:53 -0000 Author: hselasky Date: Wed Dec 12 11:43:52 2018 New Revision: 341905 URL: https://svnweb.freebsd.org/changeset/base/341905 Log: MFC r341545: mlx4: Add board identifier and firmware version to sysctl In last mlx4 update (r325841) we lost the sysctl to show the firmware version for mlx4 devices. Add both board identifier and firmware version under: sys.device.mlx4_core0.hw sysctl node. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/device.h stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/device.h ============================================================================== --- stable/12/sys/dev/mlx4/device.h Wed Dec 12 11:43:49 2018 (r341904) +++ stable/12/sys/dev/mlx4/device.h Wed Dec 12 11:43:52 2018 (r341905) @@ -877,6 +877,8 @@ struct mlx4_dev { u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; struct mlx4_vf_dev *dev_vfs; u8 uar_page_shift; + struct sysctl_ctx_list hw_ctx; + char fw_str[64]; }; struct mlx4_clock_params { Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:43:49 2018 (r341904) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:43:52 2018 (r341905) @@ -1893,6 +1893,7 @@ static void unmap_internal_clock(struct mlx4_dev *dev) static void mlx4_close_hca(struct mlx4_dev *dev) { + sysctl_ctx_free(&dev->hw_ctx); unmap_internal_clock(dev); unmap_bf_area(dev); if (mlx4_is_slave(dev)) @@ -3745,10 +3746,14 @@ err_disable_pdev: static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) { - struct mlx4_priv *priv; - struct mlx4_dev *dev; - int ret; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *node; + struct sysctl_oid_list *node_list; + struct mlx4_priv *priv; + struct mlx4_dev *dev; + int ret; + printk_once(KERN_INFO "%s", mlx4_version); priv = kzalloc(sizeof(*priv), GFP_KERNEL); @@ -3773,8 +3778,28 @@ static int mlx4_init_one(struct pci_dev *pdev, const s if (ret) { kfree(dev->persist); kfree(priv); + return ret; } else { pci_save_state(pdev->dev.bsddev); + } + + snprintf(dev->fw_str, sizeof(dev->fw_str), "%d.%d.%d", + (int) (dev->caps.fw_ver >> 32), + (int) (dev->caps.fw_ver >> 16) & 0xffff, + (int) (dev->caps.fw_ver & 0xffff)); + + ctx = &dev->hw_ctx; + sysctl_ctx_init(ctx); + node = SYSCTL_ADD_NODE(ctx,SYSCTL_CHILDREN(pdev->dev.kobj.oidp), + OID_AUTO, "hw" , CTLFLAG_RD, 0, "mlx4 dev hw information"); + if (node != NULL) { + node_list = SYSCTL_CHILDREN(node); + SYSCTL_ADD_STRING(ctx, node_list, OID_AUTO, + "fw_version", CTLFLAG_RD, dev->fw_str, 0, + "Device firmware version"); + SYSCTL_ADD_STRING(ctx, node_list, OID_AUTO, + "board_id", CTLFLAG_RD, dev->board_id, 0, + "Device board identifier"); } return ret; From owner-svn-src-all@freebsd.org Wed Dec 12 11:44:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 634AA1339BBE; Wed, 12 Dec 2018 11:44:57 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 055558B412; Wed, 12 Dec 2018 11:44:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E94A677C3; Wed, 12 Dec 2018 11:44:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBiuMp057672; Wed, 12 Dec 2018 11:44:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBiubQ057671; Wed, 12 Dec 2018 11:44:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121144.wBCBiubQ057671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341906 - stable/12/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 055558B412 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:44:57 -0000 Author: hselasky Date: Wed Dec 12 11:44:56 2018 New Revision: 341906 URL: https://svnweb.freebsd.org/changeset/base/341906 Log: MFC r341546: mlx4en: Add driver version to sysctl desc Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:43:52 2018 (r341905) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:44:56 2018 (r341906) @@ -121,6 +121,9 @@ MODULE_PARM_DESC(enable_4k_uar, #define RESET_PERSIST_MASK_FLAGS (MLX4_FLAG_SRIOV) +static char mlx4_description[] = "Mellanox driver" + " (" DRV_VERSION ")"; + static char mlx4_version[] = DRV_NAME ": Mellanox ConnectX core driver v" DRV_VERSION " (" DRV_RELDATE ")\n"; @@ -3780,6 +3783,7 @@ static int mlx4_init_one(struct pci_dev *pdev, const s kfree(priv); return ret; } else { + device_set_desc(pdev->dev.bsddev, mlx4_description); pci_save_state(pdev->dev.bsddev); } @@ -3907,6 +3911,13 @@ static void mlx4_remove_one(struct pci_dev *pdev) mutex_lock(&persist->interface_state_mutex); persist->interface_state |= MLX4_INTERFACE_STATE_DELETION; mutex_unlock(&persist->interface_state_mutex); + + /* + * Clear the device description to avoid use after free, + * because the bsddev is not destroyed when this module is + * unloaded: + */ + device_set_desc(pdev->dev.bsddev, NULL); /* Disabling SR-IOV is not allowed while there are active vf's */ if (mlx4_is_master(dev) && dev->flags & MLX4_FLAG_SRIOV) { From owner-svn-src-all@freebsd.org Wed Dec 12 11:45:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 649951339BFD; Wed, 12 Dec 2018 11:45:07 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 2BF6F8B507; Wed, 12 Dec 2018 11:45:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FED177C5; Wed, 12 Dec 2018 11:45:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBj6nd057737; Wed, 12 Dec 2018 11:45:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBj6eQ057736; Wed, 12 Dec 2018 11:45:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121145.wBCBj6eQ057736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341907 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BF6F8B507 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.70 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.70)[-0.702,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:45:07 -0000 Author: hselasky Date: Wed Dec 12 11:45:06 2018 New Revision: 341907 URL: https://svnweb.freebsd.org/changeset/base/341907 Log: MFC r341546: mlx4en: Add driver version to sysctl desc Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:44:56 2018 (r341906) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Wed Dec 12 11:45:06 2018 (r341907) @@ -121,6 +121,9 @@ MODULE_PARM_DESC(enable_4k_uar, #define RESET_PERSIST_MASK_FLAGS (MLX4_FLAG_SRIOV) +static char mlx4_description[] = "Mellanox driver" + " (" DRV_VERSION ")"; + static char mlx4_version[] = DRV_NAME ": Mellanox ConnectX core driver v" DRV_VERSION " (" DRV_RELDATE ")\n"; @@ -3780,6 +3783,7 @@ static int mlx4_init_one(struct pci_dev *pdev, const s kfree(priv); return ret; } else { + device_set_desc(pdev->dev.bsddev, mlx4_description); pci_save_state(pdev->dev.bsddev); } @@ -3907,6 +3911,13 @@ static void mlx4_remove_one(struct pci_dev *pdev) mutex_lock(&persist->interface_state_mutex); persist->interface_state |= MLX4_INTERFACE_STATE_DELETION; mutex_unlock(&persist->interface_state_mutex); + + /* + * Clear the device description to avoid use after free, + * because the bsddev is not destroyed when this module is + * unloaded: + */ + device_set_desc(pdev->dev.bsddev, NULL); /* Disabling SR-IOV is not allowed while there are active vf's */ if (mlx4_is_master(dev) && dev->flags & MLX4_FLAG_SRIOV) { From owner-svn-src-all@freebsd.org Wed Dec 12 11:47:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80C0A1339D09; Wed, 12 Dec 2018 11:47:31 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 0A5448B6CB; Wed, 12 Dec 2018 11:47:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2D9277C6; Wed, 12 Dec 2018 11:47:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBlUMJ057914; Wed, 12 Dec 2018 11:47:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBlUIV057909; Wed, 12 Dec 2018 11:47:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121147.wBCBlUIV057909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341908 - stable/12/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A5448B6CB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.715,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:47:31 -0000 Author: hselasky Date: Wed Dec 12 11:47:29 2018 New Revision: 341908 URL: https://svnweb.freebsd.org/changeset/base/341908 Log: MFC r341547: mlx4en: Remove the DRBR and associated logic in the transmit path. The hardware queues are deep enough currently and using the DRBR and associated callbacks only leads to more task switching in the TX path. The is also a race setting the queue_state which can lead to hung TX rings. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_en/en.h stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:45:06 2018 (r341907) +++ stable/12/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:47:29 2018 (r341908) @@ -271,10 +271,8 @@ struct mlx4_en_tx_ring { u32 doorbell_qpn; u8 *buf; u16 poll_cnt; - int blocked; struct mlx4_en_tx_info *tx_info; u8 queue_index; - struct buf_ring *br; u32 last_nr_txbb; struct mlx4_qp qp; struct mlx4_qp_context context; @@ -806,7 +804,6 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring **pring, u32 size, u16 stride); -void mlx4_en_tx_que(void *context, int pending); void mlx4_en_rx_que(void *context, int pending); int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv); void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv, Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c Wed Dec 12 11:45:06 2018 (r341907) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c Wed Dec 12 11:47:29 2018 (r341908) @@ -44,6 +44,10 @@ static void mlx4_en_cq_event(struct mlx4_cq *cq, enum return; } +static void mlx4_en_tx_que(void *arg, int pending) +{ + +} int mlx4_en_create_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq, Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:45:06 2018 (r341907) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:47:29 2018 (r341908) @@ -1574,9 +1574,12 @@ static void mlx4_en_restart(struct work_struct *work) if (priv->blocked == 0 || priv->port_up == 0) return; for (i = 0; i < priv->tx_ring_num; i++) { + int watchdog_time; + ring = priv->tx_ring[i]; - if (ring->blocked && - ring->watchdog_time + MLX4_EN_WATCHDOG_TIMEOUT < ticks) + watchdog_time = READ_ONCE(ring->watchdog_time); + if (watchdog_time != 0 && + time_after(ticks, ring->watchdog_time)) goto reset; } return; Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Wed Dec 12 11:45:06 2018 (r341907) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Wed Dec 12 11:47:29 2018 (r341908) @@ -94,15 +94,6 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, mtx_init(&ring->tx_lock.m, "mlx4 tx", NULL, MTX_DEF); mtx_init(&ring->comp_lock.m, "mlx4 comp", NULL, MTX_DEF); - /* Allocate the buf ring */ - ring->br = buf_ring_alloc(MLX4_EN_DEF_TX_QUEUE_SIZE, M_DEVBUF, - M_WAITOK, &ring->tx_lock.m); - if (ring->br == NULL) { - en_err(priv, "Failed allocating tx_info ring\n"); - err = -ENOMEM; - goto err_free_dma_tag; - } - tmp = size * sizeof(struct mlx4_en_tx_info); ring->tx_info = kzalloc_node(tmp, GFP_KERNEL, node); if (!ring->tx_info) { @@ -190,8 +181,6 @@ err_dma_map: err_info: vfree(ring->tx_info); err_ring: - buf_ring_free(ring->br, M_DEVBUF); -err_free_dma_tag: bus_dma_tag_destroy(ring->dma_tag); done: kfree(ring); @@ -206,7 +195,6 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv uint32_t x; en_dbg(DRV, priv, "Destroying tx ring, qpn: %d\n", ring->qpn); - buf_ring_free(ring->br, M_DEVBUF); if (ring->bf_enabled) mlx4_bf_free(mdev->dev, &ring->bf); mlx4_qp_remove(mdev->dev, &ring->qp); @@ -236,8 +224,8 @@ int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv ring->cons = 0xffffffff; ring->last_nr_txbb = 1; ring->poll_cnt = 0; - ring->blocked = 0; memset(ring->buf, 0, ring->buf_size); + ring->watchdog_time = 0; ring->qp_state = MLX4_QP_STATE_RST; ring->doorbell_qpn = ring->qp.qpn << 8; @@ -429,14 +417,6 @@ static int mlx4_en_process_tx_cq(struct net_device *de wmb(); ring->cons += txbbs_skipped; - /* Wakeup Tx queue if it was stopped and ring is not full */ - if (unlikely(ring->blocked) && !mlx4_en_tx_ring_is_full(ring)) { - ring->blocked = 0; - if (atomic_fetchadd_int(&priv->blocked, -1) == 1) - atomic_clear_int(&dev->if_drv_flags ,IFF_DRV_OACTIVE); - priv->port_stats.wake_queue++; - ring->wake_queue++; - } return (0); } @@ -682,15 +662,6 @@ static int mlx4_en_xmit(struct mlx4_en_priv *priv, int /* check if TX ring is full */ if (unlikely(mlx4_en_tx_ring_is_full(ring))) { - /* every full native Tx ring stops queue */ - if (ring->blocked == 0) - atomic_add_int(&priv->blocked, 1); - /* Set HW-queue-is-full flag */ - atomic_set_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); - priv->port_stats.queue_stopped++; - ring->blocked = 1; - ring->queue_stopped++; - /* Use interrupts to find out when queue opened */ mlx4_en_arm_cq(priv, priv->tx_cq[tx_ind]); return (ENOBUFS); @@ -956,81 +927,35 @@ tx_drop: } static int -mlx4_en_transmit_locked(struct ifnet *dev, int tx_ind, struct mbuf *m) +mlx4_en_transmit_locked(struct ifnet *ifp, int tx_ind, struct mbuf *mb) { - struct mlx4_en_priv *priv = netdev_priv(dev); - struct mlx4_en_tx_ring *ring; - struct mbuf *next; - int enqueued, err = 0; + struct mlx4_en_priv *priv = netdev_priv(ifp); + struct mlx4_en_tx_ring *ring = priv->tx_ring[tx_ind]; + int err = 0; - ring = priv->tx_ring[tx_ind]; - if ((dev->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || priv->port_up == 0) { - if (m != NULL) - err = drbr_enqueue(dev, ring->br, m); - return (err); + if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + READ_ONCE(priv->port_up) == 0)) { + m_freem(mb); + return (ENETDOWN); } - enqueued = 0; - if (m != NULL) - /* - * If we can't insert mbuf into drbr, try to xmit anyway. - * We keep the error we got so we could return that after xmit. - */ - err = drbr_enqueue(dev, ring->br, m); - - /* Process the queue */ - while ((next = drbr_peek(dev, ring->br)) != NULL) { - if (mlx4_en_xmit(priv, tx_ind, &next) != 0) { - if (next == NULL) { - drbr_advance(dev, ring->br); - } else { - drbr_putback(dev, ring->br, next); - } - break; - } - drbr_advance(dev, ring->br); - enqueued++; - if ((dev->if_drv_flags & IFF_DRV_RUNNING) == 0) - break; + if (mlx4_en_xmit(priv, tx_ind, &mb) != 0) { + /* NOTE: m_freem() is NULL safe */ + m_freem(mb); + err = ENOBUFS; + if (ring->watchdog_time == 0) + ring->watchdog_time = ticks + MLX4_EN_WATCHDOG_TIMEOUT; + } else { + ring->watchdog_time = 0; } - - if (enqueued > 0) - ring->watchdog_time = ticks; - return (err); } -void -mlx4_en_tx_que(void *context, int pending) -{ - struct mlx4_en_tx_ring *ring; - struct mlx4_en_priv *priv; - struct net_device *dev; - struct mlx4_en_cq *cq; - int tx_ind; - cq = context; - dev = cq->dev; - priv = dev->if_softc; - tx_ind = cq->ring; - ring = priv->tx_ring[tx_ind]; - - if (priv->port_up != 0 && - (dev->if_drv_flags & IFF_DRV_RUNNING) != 0) { - mlx4_en_xmit_poll(priv, tx_ind); - spin_lock(&ring->tx_lock); - if (!drbr_empty(dev, ring->br)) - mlx4_en_transmit_locked(dev, tx_ind, NULL); - spin_unlock(&ring->tx_lock); - } -} - int mlx4_en_transmit(struct ifnet *dev, struct mbuf *m) { struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_en_tx_ring *ring; - struct mlx4_en_cq *cq; int i, err = 0; if (priv->port_up == 0) { @@ -1047,17 +972,15 @@ mlx4_en_transmit(struct ifnet *dev, struct mbuf *m) } ring = priv->tx_ring[i]; - if (spin_trylock(&ring->tx_lock)) { - err = mlx4_en_transmit_locked(dev, i, m); - spin_unlock(&ring->tx_lock); - /* Poll CQ here */ - mlx4_en_xmit_poll(priv, i); - } else { - err = drbr_enqueue(dev, ring->br, m); - cq = priv->tx_cq[i]; - taskqueue_enqueue(cq->tq, &cq->cq_task); - } + spin_lock(&ring->tx_lock); + + err = mlx4_en_transmit_locked(dev, i, m); + spin_unlock(&ring->tx_lock); + + /* Poll CQ here */ + mlx4_en_xmit_poll(priv, i); + #if __FreeBSD_version >= 1100000 if (unlikely(err != 0)) if_inc_counter(dev, IFCOUNTER_IQDROPS, 1); @@ -1072,18 +995,9 @@ void mlx4_en_qflush(struct ifnet *dev) { struct mlx4_en_priv *priv = netdev_priv(dev); - struct mlx4_en_tx_ring *ring; - struct mbuf *m; if (priv->port_up == 0) return; - for (int i = 0; i < priv->tx_ring_num; i++) { - ring = priv->tx_ring[i]; - spin_lock(&ring->tx_lock); - while ((m = buf_ring_dequeue_sc(ring->br)) != NULL) - m_freem(m); - spin_unlock(&ring->tx_lock); - } if_qflush(dev); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:47:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B88561339D3F; Wed, 12 Dec 2018 11:47:41 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 5DB7A8B7B6; Wed, 12 Dec 2018 11:47:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB35277C7; Wed, 12 Dec 2018 11:47:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBlejj057967; Wed, 12 Dec 2018 11:47:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBldfe057963; Wed, 12 Dec 2018 11:47:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121147.wBCBldfe057963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341909 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DB7A8B7B6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.71 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.71)[-0.715,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:47:42 -0000 Author: hselasky Date: Wed Dec 12 11:47:39 2018 New Revision: 341909 URL: https://svnweb.freebsd.org/changeset/base/341909 Log: MFC r341547: mlx4en: Remove the DRBR and associated logic in the transmit path. The hardware queues are deep enough currently and using the DRBR and associated callbacks only leads to more task switching in the TX path. The is also a race setting the queue_state which can lead to hung TX rings. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/en.h stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:47:29 2018 (r341908) +++ stable/11/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:47:39 2018 (r341909) @@ -271,10 +271,8 @@ struct mlx4_en_tx_ring { u32 doorbell_qpn; u8 *buf; u16 poll_cnt; - int blocked; struct mlx4_en_tx_info *tx_info; u8 queue_index; - struct buf_ring *br; u32 last_nr_txbb; struct mlx4_qp qp; struct mlx4_qp_context context; @@ -806,7 +804,6 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring **pring, u32 size, u16 stride); -void mlx4_en_tx_que(void *context, int pending); void mlx4_en_rx_que(void *context, int pending); int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv); void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv, Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c Wed Dec 12 11:47:29 2018 (r341908) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c Wed Dec 12 11:47:39 2018 (r341909) @@ -44,6 +44,10 @@ static void mlx4_en_cq_event(struct mlx4_cq *cq, enum return; } +static void mlx4_en_tx_que(void *arg, int pending) +{ + +} int mlx4_en_create_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq, Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:47:29 2018 (r341908) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:47:39 2018 (r341909) @@ -1574,9 +1574,12 @@ static void mlx4_en_restart(struct work_struct *work) if (priv->blocked == 0 || priv->port_up == 0) return; for (i = 0; i < priv->tx_ring_num; i++) { + int watchdog_time; + ring = priv->tx_ring[i]; - if (ring->blocked && - ring->watchdog_time + MLX4_EN_WATCHDOG_TIMEOUT < ticks) + watchdog_time = READ_ONCE(ring->watchdog_time); + if (watchdog_time != 0 && + time_after(ticks, ring->watchdog_time)) goto reset; } return; Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Wed Dec 12 11:47:29 2018 (r341908) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Wed Dec 12 11:47:39 2018 (r341909) @@ -94,15 +94,6 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, mtx_init(&ring->tx_lock.m, "mlx4 tx", NULL, MTX_DEF); mtx_init(&ring->comp_lock.m, "mlx4 comp", NULL, MTX_DEF); - /* Allocate the buf ring */ - ring->br = buf_ring_alloc(MLX4_EN_DEF_TX_QUEUE_SIZE, M_DEVBUF, - M_WAITOK, &ring->tx_lock.m); - if (ring->br == NULL) { - en_err(priv, "Failed allocating tx_info ring\n"); - err = -ENOMEM; - goto err_free_dma_tag; - } - tmp = size * sizeof(struct mlx4_en_tx_info); ring->tx_info = kzalloc_node(tmp, GFP_KERNEL, node); if (!ring->tx_info) { @@ -190,8 +181,6 @@ err_dma_map: err_info: vfree(ring->tx_info); err_ring: - buf_ring_free(ring->br, M_DEVBUF); -err_free_dma_tag: bus_dma_tag_destroy(ring->dma_tag); done: kfree(ring); @@ -206,7 +195,6 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv uint32_t x; en_dbg(DRV, priv, "Destroying tx ring, qpn: %d\n", ring->qpn); - buf_ring_free(ring->br, M_DEVBUF); if (ring->bf_enabled) mlx4_bf_free(mdev->dev, &ring->bf); mlx4_qp_remove(mdev->dev, &ring->qp); @@ -236,8 +224,8 @@ int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv ring->cons = 0xffffffff; ring->last_nr_txbb = 1; ring->poll_cnt = 0; - ring->blocked = 0; memset(ring->buf, 0, ring->buf_size); + ring->watchdog_time = 0; ring->qp_state = MLX4_QP_STATE_RST; ring->doorbell_qpn = ring->qp.qpn << 8; @@ -429,14 +417,6 @@ static int mlx4_en_process_tx_cq(struct net_device *de wmb(); ring->cons += txbbs_skipped; - /* Wakeup Tx queue if it was stopped and ring is not full */ - if (unlikely(ring->blocked) && !mlx4_en_tx_ring_is_full(ring)) { - ring->blocked = 0; - if (atomic_fetchadd_int(&priv->blocked, -1) == 1) - atomic_clear_int(&dev->if_drv_flags ,IFF_DRV_OACTIVE); - priv->port_stats.wake_queue++; - ring->wake_queue++; - } return (0); } @@ -682,15 +662,6 @@ static int mlx4_en_xmit(struct mlx4_en_priv *priv, int /* check if TX ring is full */ if (unlikely(mlx4_en_tx_ring_is_full(ring))) { - /* every full native Tx ring stops queue */ - if (ring->blocked == 0) - atomic_add_int(&priv->blocked, 1); - /* Set HW-queue-is-full flag */ - atomic_set_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); - priv->port_stats.queue_stopped++; - ring->blocked = 1; - ring->queue_stopped++; - /* Use interrupts to find out when queue opened */ mlx4_en_arm_cq(priv, priv->tx_cq[tx_ind]); return (ENOBUFS); @@ -956,81 +927,35 @@ tx_drop: } static int -mlx4_en_transmit_locked(struct ifnet *dev, int tx_ind, struct mbuf *m) +mlx4_en_transmit_locked(struct ifnet *ifp, int tx_ind, struct mbuf *mb) { - struct mlx4_en_priv *priv = netdev_priv(dev); - struct mlx4_en_tx_ring *ring; - struct mbuf *next; - int enqueued, err = 0; + struct mlx4_en_priv *priv = netdev_priv(ifp); + struct mlx4_en_tx_ring *ring = priv->tx_ring[tx_ind]; + int err = 0; - ring = priv->tx_ring[tx_ind]; - if ((dev->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || priv->port_up == 0) { - if (m != NULL) - err = drbr_enqueue(dev, ring->br, m); - return (err); + if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + READ_ONCE(priv->port_up) == 0)) { + m_freem(mb); + return (ENETDOWN); } - enqueued = 0; - if (m != NULL) - /* - * If we can't insert mbuf into drbr, try to xmit anyway. - * We keep the error we got so we could return that after xmit. - */ - err = drbr_enqueue(dev, ring->br, m); - - /* Process the queue */ - while ((next = drbr_peek(dev, ring->br)) != NULL) { - if (mlx4_en_xmit(priv, tx_ind, &next) != 0) { - if (next == NULL) { - drbr_advance(dev, ring->br); - } else { - drbr_putback(dev, ring->br, next); - } - break; - } - drbr_advance(dev, ring->br); - enqueued++; - if ((dev->if_drv_flags & IFF_DRV_RUNNING) == 0) - break; + if (mlx4_en_xmit(priv, tx_ind, &mb) != 0) { + /* NOTE: m_freem() is NULL safe */ + m_freem(mb); + err = ENOBUFS; + if (ring->watchdog_time == 0) + ring->watchdog_time = ticks + MLX4_EN_WATCHDOG_TIMEOUT; + } else { + ring->watchdog_time = 0; } - - if (enqueued > 0) - ring->watchdog_time = ticks; - return (err); } -void -mlx4_en_tx_que(void *context, int pending) -{ - struct mlx4_en_tx_ring *ring; - struct mlx4_en_priv *priv; - struct net_device *dev; - struct mlx4_en_cq *cq; - int tx_ind; - cq = context; - dev = cq->dev; - priv = dev->if_softc; - tx_ind = cq->ring; - ring = priv->tx_ring[tx_ind]; - - if (priv->port_up != 0 && - (dev->if_drv_flags & IFF_DRV_RUNNING) != 0) { - mlx4_en_xmit_poll(priv, tx_ind); - spin_lock(&ring->tx_lock); - if (!drbr_empty(dev, ring->br)) - mlx4_en_transmit_locked(dev, tx_ind, NULL); - spin_unlock(&ring->tx_lock); - } -} - int mlx4_en_transmit(struct ifnet *dev, struct mbuf *m) { struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_en_tx_ring *ring; - struct mlx4_en_cq *cq; int i, err = 0; if (priv->port_up == 0) { @@ -1047,17 +972,15 @@ mlx4_en_transmit(struct ifnet *dev, struct mbuf *m) } ring = priv->tx_ring[i]; - if (spin_trylock(&ring->tx_lock)) { - err = mlx4_en_transmit_locked(dev, i, m); - spin_unlock(&ring->tx_lock); - /* Poll CQ here */ - mlx4_en_xmit_poll(priv, i); - } else { - err = drbr_enqueue(dev, ring->br, m); - cq = priv->tx_cq[i]; - taskqueue_enqueue(cq->tq, &cq->cq_task); - } + spin_lock(&ring->tx_lock); + + err = mlx4_en_transmit_locked(dev, i, m); + spin_unlock(&ring->tx_lock); + + /* Poll CQ here */ + mlx4_en_xmit_poll(priv, i); + #if __FreeBSD_version >= 1100000 if (unlikely(err != 0)) if_inc_counter(dev, IFCOUNTER_IQDROPS, 1); @@ -1072,18 +995,9 @@ void mlx4_en_qflush(struct ifnet *dev) { struct mlx4_en_priv *priv = netdev_priv(dev); - struct mlx4_en_tx_ring *ring; - struct mbuf *m; if (priv->port_up == 0) return; - for (int i = 0; i < priv->tx_ring_num; i++) { - ring = priv->tx_ring[i]; - spin_lock(&ring->tx_lock); - while ((m = buf_ring_dequeue_sc(ring->br)) != NULL) - m_freem(m); - spin_unlock(&ring->tx_lock); - } if_qflush(dev); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:51:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A6A61339E9A; Wed, 12 Dec 2018 11:51:08 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 A65638BB41; Wed, 12 Dec 2018 11:51:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C47A78F6; Wed, 12 Dec 2018 11:51:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBp7P0059102; Wed, 12 Dec 2018 11:51:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBp6rk059097; Wed, 12 Dec 2018 11:51:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121151.wBCBp6rk059097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341910 - in stable/12/sys/dev/mlx4: . mlx4_core mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx4: . mlx4_core mlx4_en X-SVN-Commit-Revision: 341910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A65638BB41 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:51:08 -0000 Author: hselasky Date: Wed Dec 12 11:51:06 2018 New Revision: 341910 URL: https://svnweb.freebsd.org/changeset/base/341910 Log: MFC r341548: mlx4en: Add support for netdump. Implement the needed callback functions and support for polling the driver. Differential Revision: https://reviews.freebsd.org/D15259 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/driver.h stable/12/sys/dev/mlx4/mlx4_core/mlx4_eq.c stable/12/sys/dev/mlx4/mlx4_en/en.h stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/driver.h ============================================================================== --- stable/12/sys/dev/mlx4/driver.h Wed Dec 12 11:47:39 2018 (r341909) +++ stable/12/sys/dev/mlx4/driver.h Wed Dec 12 11:51:06 2018 (r341910) @@ -101,4 +101,7 @@ static inline u64 mlx4_mac_to_u64(const u8 *addr) return mac; } +void mlx4_disable_interrupts(struct mlx4_dev *); +void mlx4_poll_interrupts(struct mlx4_dev *); + #endif /* MLX4_DRIVER_H */ Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_eq.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_eq.c Wed Dec 12 11:47:39 2018 (r341909) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_eq.c Wed Dec 12 11:51:06 2018 (r341910) @@ -1535,3 +1535,34 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec) } EXPORT_SYMBOL(mlx4_release_eq); +void +mlx4_disable_interrupts(struct mlx4_dev *dev) +{ + struct mlx4_priv *priv = container_of(dev, struct mlx4_priv, dev); + int i; + + if (dev->flags & MLX4_FLAG_MSI_X) { + for (i = 0; i < (dev->caps.num_comp_vectors + 1); ++i) + disable_irq(priv->eq_table.eq[i].irq); + } else { + disable_irq(dev->persist->pdev->irq); + } +} +EXPORT_SYMBOL(mlx4_disable_interrupts); + +void +mlx4_poll_interrupts(struct mlx4_dev *dev) +{ + struct mlx4_priv *priv = container_of(dev, struct mlx4_priv, dev); + int i; + + if (dev->flags & MLX4_FLAG_MSI_X) { + for (i = 0; i < (dev->caps.num_comp_vectors + 1); ++i) { + mlx4_msi_x_interrupt(priv->eq_table.eq[i].irq, + priv->eq_table.eq + i); + } + } else { + mlx4_interrupt(dev->persist->pdev->irq, dev); + } +} +EXPORT_SYMBOL(mlx4_poll_interrupts); Modified: stable/12/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:47:39 2018 (r341909) +++ stable/12/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:51:06 2018 (r341910) @@ -54,6 +54,7 @@ #include #include +#include #include "en_port.h" #include @@ -784,6 +785,7 @@ int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct m void mlx4_en_tx_irq(struct mlx4_cq *mcq); u16 mlx4_en_select_queue(struct net_device *dev, struct mbuf *mb); +int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp); int mlx4_en_transmit(struct ifnet *dev, struct mbuf *m); int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring **pring, Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:47:39 2018 (r341909) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:51:06 2018 (r341910) @@ -53,6 +53,8 @@ #include "en.h" #include "en_port.h" +NETDUMP_DEFINE(mlx4_en); + static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv); @@ -2311,6 +2313,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO); + NETDUMP_SET(dev, mlx4_en); + en_warn(priv, "Using %d TX rings\n", prof->tx_ring_num); en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); @@ -2892,3 +2896,54 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *p CTLFLAG_RD, &rx_ring->errors, 0, "RX soft errors"); } } + +#ifdef NETDUMP +static void +mlx4_en_netdump_init(struct ifnet *dev, int *nrxr, int *ncl, int *clsize) +{ + struct mlx4_en_priv *priv; + + priv = if_getsoftc(dev); + mutex_lock(&priv->mdev->state_lock); + *nrxr = priv->rx_ring_num; + *ncl = NETDUMP_MAX_IN_FLIGHT; + *clsize = priv->rx_mb_size; + mutex_unlock(&priv->mdev->state_lock); +} + +static void +mlx4_en_netdump_event(struct ifnet *dev, enum netdump_ev event) +{ +} + +static int +mlx4_en_netdump_transmit(struct ifnet *dev, struct mbuf *m) +{ + struct mlx4_en_priv *priv; + int err; + + priv = if_getsoftc(dev); + if ((if_getdrvflags(dev) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING || !priv->link_state) + return (ENOENT); + + err = mlx4_en_xmit(priv, 0, &m); + if (err != 0 && m != NULL) + m_freem(m); + return (err); +} + +static int +mlx4_en_netdump_poll(struct ifnet *dev, int count) +{ + struct mlx4_en_priv *priv; + + priv = if_getsoftc(dev); + if ((if_getdrvflags(dev) & IFF_DRV_RUNNING) == 0 || !priv->link_state) + return (ENOENT); + + mlx4_poll_interrupts(priv->mdev->dev); + + return (0); +} +#endif /* NETDUMP */ Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Wed Dec 12 11:47:39 2018 (r341909) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Wed Dec 12 11:51:06 2018 (r341910) @@ -628,7 +628,7 @@ static void mlx4_bf_copy(void __iomem *dst, volatile u __iowrite64_copy(dst, __DEVOLATILE(void *, src), bytecnt / 8); } -static int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp) +int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp) { enum { DS_FACT = TXBB_SIZE / DS_SIZE_ALIGNMENT, From owner-svn-src-all@freebsd.org Wed Dec 12 11:52:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78C87133A067; Wed, 12 Dec 2018 11:52:49 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 281218BDA7; Wed, 12 Dec 2018 11:52:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DC0A796D; Wed, 12 Dec 2018 11:52:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBqnl0063381; Wed, 12 Dec 2018 11:52:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBqmJu063379; Wed, 12 Dec 2018 11:52:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121152.wBCBqmJu063379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341911 - stable/12/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 281218BDA7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.62 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.62)[-0.615,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:52:49 -0000 Author: hselasky Date: Wed Dec 12 11:52:48 2018 New Revision: 341911 URL: https://svnweb.freebsd.org/changeset/base/341911 Log: MFC r341549: mlx4en: Add support for receiving all data using one or more MCLBYTES sized mbufs. Also when the MTU is greater than MCLBYTES. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_en/en.h stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:51:06 2018 (r341910) +++ stable/12/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:52:48 2018 (r341911) @@ -75,6 +75,15 @@ #define MAX_RX_RINGS 128 #define MIN_RX_RINGS 4 #define TXBB_SIZE 64 + +#ifndef MLX4_EN_MAX_RX_SEGS +#define MLX4_EN_MAX_RX_SEGS 1 /* or 8 */ +#endif + +#ifndef MLX4_EN_MAX_RX_BYTES +#define MLX4_EN_MAX_RX_BYTES MCLBYTES +#endif + #define HEADROOM (2048 / TXBB_SIZE + 1) #define INIT_OWNER_BIT 0xffffffff #define STAMP_STRIDE 64 @@ -297,10 +306,12 @@ struct mlx4_en_tx_ring { }; struct mlx4_en_rx_desc { - /* actual number of entries depends on rx ring stride */ - struct mlx4_wqe_data_seg data[0]; + struct mlx4_wqe_data_seg data[MLX4_EN_MAX_RX_SEGS]; }; +/* the size of the structure above must be power of two */ +CTASSERT(powerof2(sizeof(struct mlx4_en_rx_desc))); + struct mlx4_en_rx_mbuf { bus_dmamap_t dma_map; struct mbuf *mbuf; @@ -309,7 +320,7 @@ struct mlx4_en_rx_mbuf { struct mlx4_en_rx_spare { bus_dmamap_t dma_map; struct mbuf *mbuf; - u64 paddr_be; + bus_dma_segment_t segs[MLX4_EN_MAX_RX_SEGS]; }; struct mlx4_en_rx_ring { @@ -319,7 +330,6 @@ struct mlx4_en_rx_ring { u32 size ; /* number of Rx descs*/ u32 actual_size; u32 size_mask; - u16 stride; u16 log_stride; u16 cqn; /* index of port CQ associated with this ring */ u32 prod; @@ -327,6 +337,7 @@ struct mlx4_en_rx_ring { u32 buf_size; u8 fcs_del; u32 rx_mb_size; + u32 rx_mr_key_be; int qpn; u8 *buf; struct mlx4_en_rx_mbuf *mbuf; @@ -559,7 +570,6 @@ struct mlx4_en_priv { int registered; int gone; int allocated; - int stride; unsigned char current_mac[ETH_ALEN + 2]; u64 mac; int mac_index; @@ -805,7 +815,7 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, u32 size, int node); void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring **pring, - u32 size, u16 stride); + u32 size); void mlx4_en_rx_que(void *context, int pending); int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv); void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv, Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:51:06 2018 (r341910) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:52:48 2018 (r341911) @@ -1683,7 +1683,7 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv) for (i = 0; i < priv->rx_ring_num; i++) { if (priv->rx_ring[i]) mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i], - priv->prof->rx_ring_size, priv->stride); + priv->prof->rx_ring_size); if (priv->rx_cq[i]) mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } @@ -1734,8 +1734,7 @@ err: for (i = 0; i < priv->rx_ring_num; i++) { if (priv->rx_ring[i]) mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i], - prof->rx_ring_size, - priv->stride); + prof->rx_ring_size); if (priv->rx_cq[i]) mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } @@ -2236,9 +2235,6 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int err = -EINVAL; goto out; } - - priv->stride = roundup_pow_of_two(sizeof(struct mlx4_en_rx_desc) + - DS_SIZE); mlx4_en_sysctl_conf(priv); Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:51:06 2018 (r341910) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:52:48 2018 (r341911) @@ -44,14 +44,13 @@ #include "en.h" - +#if (MLX4_EN_MAX_RX_SEGS == 1) static void mlx4_en_init_rx_desc(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, int index) { - struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (ring->stride * index)); - int possible_frags; + struct mlx4_en_rx_desc *rx_desc = + ((struct mlx4_en_rx_desc *)ring->buf) + index; int i; /* Set size and memtype fields */ @@ -63,38 +62,75 @@ static void mlx4_en_init_rx_desc(struct mlx4_en_priv * * stride, remaining (unused) fragments must be padded with * null address/size and a special memory key: */ - possible_frags = (ring->stride - sizeof(struct mlx4_en_rx_desc)) / DS_SIZE; - for (i = 1; i < possible_frags; i++) { + for (i = 1; i < MLX4_EN_MAX_RX_SEGS; i++) { rx_desc->data[i].byte_count = 0; rx_desc->data[i].lkey = cpu_to_be32(MLX4_EN_MEMTYPE_PAD); rx_desc->data[i].addr = 0; } } +#endif +static inline struct mbuf * +mlx4_en_alloc_mbuf(struct mlx4_en_rx_ring *ring) +{ + struct mbuf *mb; + +#if (MLX4_EN_MAX_RX_SEGS == 1) + mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + if (likely(mb != NULL)) + mb->m_pkthdr.len = mb->m_len = ring->rx_mb_size; +#else + mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MLX4_EN_MAX_RX_BYTES); + if (likely(mb != NULL)) { + struct mbuf *mb_head = mb; + int i; + + mb->m_len = MLX4_EN_MAX_RX_BYTES; + mb->m_pkthdr.len = MLX4_EN_MAX_RX_BYTES; + + for (i = 1; i != MLX4_EN_MAX_RX_SEGS; i++) { + if (mb_head->m_pkthdr.len >= ring->rx_mb_size) + break; + mb = (mb->m_next = m_getjcl(M_NOWAIT, MT_DATA, 0, MLX4_EN_MAX_RX_BYTES)); + if (unlikely(mb == NULL)) { + m_freem(mb_head); + return (NULL); + } + mb->m_len = MLX4_EN_MAX_RX_BYTES; + mb_head->m_pkthdr.len += MLX4_EN_MAX_RX_BYTES; + } + /* rewind to first mbuf in chain */ + mb = mb_head; + } +#endif + return (mb); +} + static int -mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, - __be64 *pdma, struct mlx4_en_rx_mbuf *mb_list) +mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, struct mlx4_en_rx_desc *rx_desc, + struct mlx4_en_rx_mbuf *mb_list) { - bus_dma_segment_t segs[1]; + bus_dma_segment_t segs[MLX4_EN_MAX_RX_SEGS]; bus_dmamap_t map; struct mbuf *mb; int nsegs; int err; +#if (MLX4_EN_MAX_RX_SEGS != 1) + int i; +#endif /* try to allocate a new spare mbuf */ if (unlikely(ring->spare.mbuf == NULL)) { - mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + mb = mlx4_en_alloc_mbuf(ring); if (unlikely(mb == NULL)) return (-ENOMEM); - /* setup correct length */ - mb->m_pkthdr.len = mb->m_len = ring->rx_mb_size; /* make sure IP header gets aligned */ m_adj(mb, MLX4_NET_IP_ALIGN); /* load spare mbuf into BUSDMA */ err = -bus_dmamap_load_mbuf_sg(ring->dma_tag, ring->spare.dma_map, - mb, segs, &nsegs, BUS_DMA_NOWAIT); + mb, ring->spare.segs, &nsegs, BUS_DMA_NOWAIT); if (unlikely(err != 0)) { m_freem(mb); return (err); @@ -102,8 +138,14 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, /* store spare info */ ring->spare.mbuf = mb; - ring->spare.paddr_be = cpu_to_be64(segs[0].ds_addr); +#if (MLX4_EN_MAX_RX_SEGS != 1) + /* zero remaining segs */ + for (i = nsegs; i != MLX4_EN_MAX_RX_SEGS; i++) { + ring->spare.segs[i].ds_addr = 0; + ring->spare.segs[i].ds_len = 0; + } +#endif bus_dmamap_sync(ring->dma_tag, ring->spare.dma_map, BUS_DMASYNC_PREREAD); } @@ -115,13 +157,10 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, bus_dmamap_unload(ring->dma_tag, mb_list->dma_map); } - mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + mb = mlx4_en_alloc_mbuf(ring); if (unlikely(mb == NULL)) goto use_spare; - /* setup correct length */ - mb->m_pkthdr.len = mb->m_len = ring->rx_mb_size; - /* make sure IP header gets aligned */ m_adj(mb, MLX4_NET_IP_ALIGN); @@ -132,7 +171,20 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, goto use_spare; } - *pdma = cpu_to_be64(segs[0].ds_addr); +#if (MLX4_EN_MAX_RX_SEGS == 1) + rx_desc->data[0].addr = cpu_to_be64(segs[0].ds_addr); +#else + for (i = 0; i != nsegs; i++) { + rx_desc->data[i].byte_count = cpu_to_be32(segs[i].ds_len); + rx_desc->data[i].lkey = ring->rx_mr_key_be; + rx_desc->data[i].addr = cpu_to_be64(segs[i].ds_addr); + } + for (; i != MLX4_EN_MAX_RX_SEGS; i++) { + rx_desc->data[i].byte_count = 0; + rx_desc->data[i].lkey = cpu_to_be32(MLX4_EN_MEMTYPE_PAD); + rx_desc->data[i].addr = 0; + } +#endif mb_list->mbuf = mb; bus_dmamap_sync(ring->dma_tag, mb_list->dma_map, BUS_DMASYNC_PREREAD); @@ -149,7 +201,21 @@ use_spare: ring->spare.mbuf = NULL; /* store physical address */ - *pdma = ring->spare.paddr_be; +#if (MLX4_EN_MAX_RX_SEGS == 1) + rx_desc->data[0].addr = cpu_to_be64(ring->spare.segs[0].ds_addr); +#else + for (i = 0; i != MLX4_EN_MAX_RX_SEGS; i++) { + if (ring->spare.segs[i].ds_len != 0) { + rx_desc->data[i].byte_count = cpu_to_be32(ring->spare.segs[i].ds_len); + rx_desc->data[i].lkey = ring->rx_mr_key_be; + rx_desc->data[i].addr = cpu_to_be64(ring->spare.segs[i].ds_addr); + } else { + rx_desc->data[i].byte_count = 0; + rx_desc->data[i].lkey = cpu_to_be32(MLX4_EN_MEMTYPE_PAD); + rx_desc->data[i].addr = 0; + } + } +#endif return (0); } @@ -167,13 +233,13 @@ static int mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, int index) { - struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (index * ring->stride)); + struct mlx4_en_rx_desc *rx_desc = + ((struct mlx4_en_rx_desc *)ring->buf) + index; struct mlx4_en_rx_mbuf *mb_list = ring->mbuf + index; mb_list->mbuf = NULL; - if (mlx4_en_alloc_buf(ring, &rx_desc->data[0].addr, mb_list)) { + if (mlx4_en_alloc_buf(ring, rx_desc, mb_list)) { priv->port_stats.rx_alloc_failed++; return (-ENOMEM); } @@ -321,7 +387,7 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ MJUM16BYTES, /* maxsize */ - 1, /* nsegments */ + MLX4_EN_MAX_RX_SEGS, /* nsegments */ MJUM16BYTES, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockfuncarg */ @@ -334,11 +400,10 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, ring->cons = 0; ring->size = size; ring->size_mask = size - 1; - ring->stride = roundup_pow_of_two( - sizeof(struct mlx4_en_rx_desc) + DS_SIZE); - ring->log_stride = ffs(ring->stride) - 1; - ring->buf_size = ring->size * ring->stride + TXBB_SIZE; + ring->log_stride = ilog2(sizeof(struct mlx4_en_rx_desc)); + ring->buf_size = (ring->size * sizeof(struct mlx4_en_rx_desc)) + TXBB_SIZE; + tmp = size * sizeof(struct mlx4_en_rx_mbuf); ring->mbuf = kzalloc(tmp, GFP_KERNEL); @@ -398,11 +463,11 @@ err_ring: int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) { struct mlx4_en_rx_ring *ring; +#if (MLX4_EN_MAX_RX_SEGS == 1) int i; +#endif int ring_ind; int err; - int stride = roundup_pow_of_two( - sizeof(struct mlx4_en_rx_desc) + DS_SIZE); for (ring_ind = 0; ring_ind < priv->rx_ring_num; ring_ind++) { ring = priv->rx_ring[ring_ind]; @@ -413,8 +478,7 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *pri ring->cqn = priv->rx_cq[ring_ind]->mcq.cqn; ring->rx_mb_size = priv->rx_mb_size; - ring->stride = stride; - if (ring->stride <= TXBB_SIZE) { + if (sizeof(struct mlx4_en_rx_desc) <= TXBB_SIZE) { /* Stamp first unused send wqe */ __be32 *ptr = (__be32 *)ring->buf; __be32 stamp = cpu_to_be32(1 << STAMP_SHIFT); @@ -423,15 +487,18 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *pri ring->buf += TXBB_SIZE; } - ring->log_stride = ffs(ring->stride) - 1; - ring->buf_size = ring->size * ring->stride; + ring->log_stride = ilog2(sizeof(struct mlx4_en_rx_desc)); + ring->buf_size = ring->size * sizeof(struct mlx4_en_rx_desc); memset(ring->buf, 0, ring->buf_size); mlx4_en_update_rx_prod_db(ring); +#if (MLX4_EN_MAX_RX_SEGS == 1) /* Initialize all descriptors */ for (i = 0; i < ring->size; i++) mlx4_en_init_rx_desc(priv, ring, i); +#endif + ring->rx_mr_key_be = cpu_to_be32(priv->mdev->mr.key); #ifdef INET /* Configure lro mngr */ @@ -466,7 +533,7 @@ err_buffers: while (ring_ind >= 0) { ring = priv->rx_ring[ring_ind]; - if (ring->stride <= TXBB_SIZE) + if (sizeof(struct mlx4_en_rx_desc) <= TXBB_SIZE) ring->buf -= TXBB_SIZE; ring_ind--; } @@ -477,14 +544,14 @@ err_buffers: void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring **pring, - u32 size, u16 stride) + u32 size) { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_rx_ring *ring = *pring; uint32_t x; mlx4_en_unmap_buffer(&ring->wqres.buf); - mlx4_free_hwq_res(mdev->dev, &ring->wqres, size * stride + TXBB_SIZE); + mlx4_free_hwq_res(mdev->dev, &ring->wqres, size * sizeof(struct mlx4_en_rx_desc) + TXBB_SIZE); for (x = 0; x != size; x++) bus_dmamap_destroy(ring->dma_tag, ring->mbuf[x].dma_map); /* free spare mbuf, if any */ @@ -511,7 +578,7 @@ void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *p tcp_lro_free(&ring->lro); #endif mlx4_en_free_rx_buf(priv, ring); - if (ring->stride <= TXBB_SIZE) + if (sizeof(struct mlx4_en_rx_desc) <= TXBB_SIZE) ring->buf -= TXBB_SIZE; } @@ -557,21 +624,43 @@ mlx4_en_rx_mb(struct mlx4_en_priv *priv, struct mlx4_e struct mlx4_en_rx_desc *rx_desc, struct mlx4_en_rx_mbuf *mb_list, int length) { +#if (MLX4_EN_MAX_RX_SEGS != 1) + struct mbuf *mb_head; +#endif struct mbuf *mb; /* get mbuf */ mb = mb_list->mbuf; /* collect used fragment while atomically replacing it */ - if (mlx4_en_alloc_buf(ring, &rx_desc->data[0].addr, mb_list)) + if (mlx4_en_alloc_buf(ring, rx_desc, mb_list)) return (NULL); /* range check hardware computed value */ - if (unlikely(length > mb->m_len)) - length = mb->m_len; + if (unlikely(length > mb->m_pkthdr.len)) + length = mb->m_pkthdr.len; +#if (MLX4_EN_MAX_RX_SEGS == 1) /* update total packet length in packet header */ mb->m_len = mb->m_pkthdr.len = length; +#else + mb->m_pkthdr.len = length; + for (mb_head = mb; mb != NULL; mb = mb->m_next) { + if (mb->m_len > length) + mb->m_len = length; + length -= mb->m_len; + if (likely(length == 0)) { + if (likely(mb->m_next != NULL)) { + /* trim off empty mbufs */ + m_freem(mb->m_next); + mb->m_next = NULL; + } + break; + } + } + /* rewind to first mbuf in chain */ + mb = mb_head; +#endif return (mb); } @@ -660,8 +749,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, stru while (XNOR(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK, cons_index & size)) { mb_list = ring->mbuf + index; - rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (index << ring->log_stride)); + rx_desc = ((struct mlx4_en_rx_desc *)ring->buf) + index; /* * make sure we read the CQE after we read the ownership bit @@ -830,7 +918,7 @@ static int mlx4_en_config_rss_qp(struct mlx4_en_priv * qp->event = mlx4_en_sqp_event; memset(context, 0, sizeof *context); - mlx4_en_fill_qp_context(priv, ring->actual_size, ring->stride, 0, 0, + mlx4_en_fill_qp_context(priv, ring->actual_size, sizeof(struct mlx4_en_rx_desc), 0, 0, qpn, ring->cqn, -1, context); context->db_rec_addr = cpu_to_be64(ring->wqres.db.dma); From owner-svn-src-all@freebsd.org Wed Dec 12 11:52:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4506133A0BE; Wed, 12 Dec 2018 11:52:59 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 55C0B8BE9B; Wed, 12 Dec 2018 11:52:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32F92796E; Wed, 12 Dec 2018 11:52:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBqxc4063433; Wed, 12 Dec 2018 11:52:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBqwXl063430; Wed, 12 Dec 2018 11:52:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121152.wBCBqwXl063430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341912 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 55C0B8BE9B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.62 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.62)[-0.615,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:53:00 -0000 Author: hselasky Date: Wed Dec 12 11:52:58 2018 New Revision: 341912 URL: https://svnweb.freebsd.org/changeset/base/341912 Log: MFC r341549: mlx4en: Add support for receiving all data using one or more MCLBYTES sized mbufs. Also when the MTU is greater than MCLBYTES. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/en.h stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:52:48 2018 (r341911) +++ stable/11/sys/dev/mlx4/mlx4_en/en.h Wed Dec 12 11:52:58 2018 (r341912) @@ -74,6 +74,15 @@ #define MAX_RX_RINGS 128 #define MIN_RX_RINGS 4 #define TXBB_SIZE 64 + +#ifndef MLX4_EN_MAX_RX_SEGS +#define MLX4_EN_MAX_RX_SEGS 1 /* or 8 */ +#endif + +#ifndef MLX4_EN_MAX_RX_BYTES +#define MLX4_EN_MAX_RX_BYTES MCLBYTES +#endif + #define HEADROOM (2048 / TXBB_SIZE + 1) #define INIT_OWNER_BIT 0xffffffff #define STAMP_STRIDE 64 @@ -296,10 +305,12 @@ struct mlx4_en_tx_ring { }; struct mlx4_en_rx_desc { - /* actual number of entries depends on rx ring stride */ - struct mlx4_wqe_data_seg data[0]; + struct mlx4_wqe_data_seg data[MLX4_EN_MAX_RX_SEGS]; }; +/* the size of the structure above must be power of two */ +CTASSERT(powerof2(sizeof(struct mlx4_en_rx_desc))); + struct mlx4_en_rx_mbuf { bus_dmamap_t dma_map; struct mbuf *mbuf; @@ -308,7 +319,7 @@ struct mlx4_en_rx_mbuf { struct mlx4_en_rx_spare { bus_dmamap_t dma_map; struct mbuf *mbuf; - u64 paddr_be; + bus_dma_segment_t segs[MLX4_EN_MAX_RX_SEGS]; }; struct mlx4_en_rx_ring { @@ -318,7 +329,6 @@ struct mlx4_en_rx_ring { u32 size ; /* number of Rx descs*/ u32 actual_size; u32 size_mask; - u16 stride; u16 log_stride; u16 cqn; /* index of port CQ associated with this ring */ u32 prod; @@ -326,6 +336,7 @@ struct mlx4_en_rx_ring { u32 buf_size; u8 fcs_del; u32 rx_mb_size; + u32 rx_mr_key_be; int qpn; u8 *buf; struct mlx4_en_rx_mbuf *mbuf; @@ -558,7 +569,6 @@ struct mlx4_en_priv { int registered; int gone; int allocated; - int stride; unsigned char current_mac[ETH_ALEN + 2]; u64 mac; int mac_index; @@ -803,7 +813,7 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, u32 size, int node); void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring **pring, - u32 size, u16 stride); + u32 size); void mlx4_en_rx_que(void *context, int pending); int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv); void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv, Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:52:48 2018 (r341911) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Dec 12 11:52:58 2018 (r341912) @@ -1681,7 +1681,7 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv) for (i = 0; i < priv->rx_ring_num; i++) { if (priv->rx_ring[i]) mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i], - priv->prof->rx_ring_size, priv->stride); + priv->prof->rx_ring_size); if (priv->rx_cq[i]) mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } @@ -1732,8 +1732,7 @@ err: for (i = 0; i < priv->rx_ring_num; i++) { if (priv->rx_ring[i]) mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i], - prof->rx_ring_size, - priv->stride); + prof->rx_ring_size); if (priv->rx_cq[i]) mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } @@ -2234,9 +2233,6 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int err = -EINVAL; goto out; } - - priv->stride = roundup_pow_of_two(sizeof(struct mlx4_en_rx_desc) + - DS_SIZE); mlx4_en_sysctl_conf(priv); Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:52:48 2018 (r341911) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:52:58 2018 (r341912) @@ -44,14 +44,13 @@ #include "en.h" - +#if (MLX4_EN_MAX_RX_SEGS == 1) static void mlx4_en_init_rx_desc(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, int index) { - struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (ring->stride * index)); - int possible_frags; + struct mlx4_en_rx_desc *rx_desc = + ((struct mlx4_en_rx_desc *)ring->buf) + index; int i; /* Set size and memtype fields */ @@ -63,38 +62,75 @@ static void mlx4_en_init_rx_desc(struct mlx4_en_priv * * stride, remaining (unused) fragments must be padded with * null address/size and a special memory key: */ - possible_frags = (ring->stride - sizeof(struct mlx4_en_rx_desc)) / DS_SIZE; - for (i = 1; i < possible_frags; i++) { + for (i = 1; i < MLX4_EN_MAX_RX_SEGS; i++) { rx_desc->data[i].byte_count = 0; rx_desc->data[i].lkey = cpu_to_be32(MLX4_EN_MEMTYPE_PAD); rx_desc->data[i].addr = 0; } } +#endif +static inline struct mbuf * +mlx4_en_alloc_mbuf(struct mlx4_en_rx_ring *ring) +{ + struct mbuf *mb; + +#if (MLX4_EN_MAX_RX_SEGS == 1) + mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + if (likely(mb != NULL)) + mb->m_pkthdr.len = mb->m_len = ring->rx_mb_size; +#else + mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MLX4_EN_MAX_RX_BYTES); + if (likely(mb != NULL)) { + struct mbuf *mb_head = mb; + int i; + + mb->m_len = MLX4_EN_MAX_RX_BYTES; + mb->m_pkthdr.len = MLX4_EN_MAX_RX_BYTES; + + for (i = 1; i != MLX4_EN_MAX_RX_SEGS; i++) { + if (mb_head->m_pkthdr.len >= ring->rx_mb_size) + break; + mb = (mb->m_next = m_getjcl(M_NOWAIT, MT_DATA, 0, MLX4_EN_MAX_RX_BYTES)); + if (unlikely(mb == NULL)) { + m_freem(mb_head); + return (NULL); + } + mb->m_len = MLX4_EN_MAX_RX_BYTES; + mb_head->m_pkthdr.len += MLX4_EN_MAX_RX_BYTES; + } + /* rewind to first mbuf in chain */ + mb = mb_head; + } +#endif + return (mb); +} + static int -mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, - __be64 *pdma, struct mlx4_en_rx_mbuf *mb_list) +mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, struct mlx4_en_rx_desc *rx_desc, + struct mlx4_en_rx_mbuf *mb_list) { - bus_dma_segment_t segs[1]; + bus_dma_segment_t segs[MLX4_EN_MAX_RX_SEGS]; bus_dmamap_t map; struct mbuf *mb; int nsegs; int err; +#if (MLX4_EN_MAX_RX_SEGS != 1) + int i; +#endif /* try to allocate a new spare mbuf */ if (unlikely(ring->spare.mbuf == NULL)) { - mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + mb = mlx4_en_alloc_mbuf(ring); if (unlikely(mb == NULL)) return (-ENOMEM); - /* setup correct length */ - mb->m_pkthdr.len = mb->m_len = ring->rx_mb_size; /* make sure IP header gets aligned */ m_adj(mb, MLX4_NET_IP_ALIGN); /* load spare mbuf into BUSDMA */ err = -bus_dmamap_load_mbuf_sg(ring->dma_tag, ring->spare.dma_map, - mb, segs, &nsegs, BUS_DMA_NOWAIT); + mb, ring->spare.segs, &nsegs, BUS_DMA_NOWAIT); if (unlikely(err != 0)) { m_freem(mb); return (err); @@ -102,8 +138,14 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, /* store spare info */ ring->spare.mbuf = mb; - ring->spare.paddr_be = cpu_to_be64(segs[0].ds_addr); +#if (MLX4_EN_MAX_RX_SEGS != 1) + /* zero remaining segs */ + for (i = nsegs; i != MLX4_EN_MAX_RX_SEGS; i++) { + ring->spare.segs[i].ds_addr = 0; + ring->spare.segs[i].ds_len = 0; + } +#endif bus_dmamap_sync(ring->dma_tag, ring->spare.dma_map, BUS_DMASYNC_PREREAD); } @@ -115,13 +157,10 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, bus_dmamap_unload(ring->dma_tag, mb_list->dma_map); } - mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + mb = mlx4_en_alloc_mbuf(ring); if (unlikely(mb == NULL)) goto use_spare; - /* setup correct length */ - mb->m_pkthdr.len = mb->m_len = ring->rx_mb_size; - /* make sure IP header gets aligned */ m_adj(mb, MLX4_NET_IP_ALIGN); @@ -132,7 +171,20 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, goto use_spare; } - *pdma = cpu_to_be64(segs[0].ds_addr); +#if (MLX4_EN_MAX_RX_SEGS == 1) + rx_desc->data[0].addr = cpu_to_be64(segs[0].ds_addr); +#else + for (i = 0; i != nsegs; i++) { + rx_desc->data[i].byte_count = cpu_to_be32(segs[i].ds_len); + rx_desc->data[i].lkey = ring->rx_mr_key_be; + rx_desc->data[i].addr = cpu_to_be64(segs[i].ds_addr); + } + for (; i != MLX4_EN_MAX_RX_SEGS; i++) { + rx_desc->data[i].byte_count = 0; + rx_desc->data[i].lkey = cpu_to_be32(MLX4_EN_MEMTYPE_PAD); + rx_desc->data[i].addr = 0; + } +#endif mb_list->mbuf = mb; bus_dmamap_sync(ring->dma_tag, mb_list->dma_map, BUS_DMASYNC_PREREAD); @@ -149,7 +201,21 @@ use_spare: ring->spare.mbuf = NULL; /* store physical address */ - *pdma = ring->spare.paddr_be; +#if (MLX4_EN_MAX_RX_SEGS == 1) + rx_desc->data[0].addr = cpu_to_be64(ring->spare.segs[0].ds_addr); +#else + for (i = 0; i != MLX4_EN_MAX_RX_SEGS; i++) { + if (ring->spare.segs[i].ds_len != 0) { + rx_desc->data[i].byte_count = cpu_to_be32(ring->spare.segs[i].ds_len); + rx_desc->data[i].lkey = ring->rx_mr_key_be; + rx_desc->data[i].addr = cpu_to_be64(ring->spare.segs[i].ds_addr); + } else { + rx_desc->data[i].byte_count = 0; + rx_desc->data[i].lkey = cpu_to_be32(MLX4_EN_MEMTYPE_PAD); + rx_desc->data[i].addr = 0; + } + } +#endif return (0); } @@ -167,13 +233,13 @@ static int mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, int index) { - struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (index * ring->stride)); + struct mlx4_en_rx_desc *rx_desc = + ((struct mlx4_en_rx_desc *)ring->buf) + index; struct mlx4_en_rx_mbuf *mb_list = ring->mbuf + index; mb_list->mbuf = NULL; - if (mlx4_en_alloc_buf(ring, &rx_desc->data[0].addr, mb_list)) { + if (mlx4_en_alloc_buf(ring, rx_desc, mb_list)) { priv->port_stats.rx_alloc_failed++; return (-ENOMEM); } @@ -321,7 +387,7 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ MJUM16BYTES, /* maxsize */ - 1, /* nsegments */ + MLX4_EN_MAX_RX_SEGS, /* nsegments */ MJUM16BYTES, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockfuncarg */ @@ -334,11 +400,10 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, ring->cons = 0; ring->size = size; ring->size_mask = size - 1; - ring->stride = roundup_pow_of_two( - sizeof(struct mlx4_en_rx_desc) + DS_SIZE); - ring->log_stride = ffs(ring->stride) - 1; - ring->buf_size = ring->size * ring->stride + TXBB_SIZE; + ring->log_stride = ilog2(sizeof(struct mlx4_en_rx_desc)); + ring->buf_size = (ring->size * sizeof(struct mlx4_en_rx_desc)) + TXBB_SIZE; + tmp = size * sizeof(struct mlx4_en_rx_mbuf); ring->mbuf = kzalloc(tmp, GFP_KERNEL); @@ -398,11 +463,11 @@ err_ring: int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) { struct mlx4_en_rx_ring *ring; +#if (MLX4_EN_MAX_RX_SEGS == 1) int i; +#endif int ring_ind; int err; - int stride = roundup_pow_of_two( - sizeof(struct mlx4_en_rx_desc) + DS_SIZE); for (ring_ind = 0; ring_ind < priv->rx_ring_num; ring_ind++) { ring = priv->rx_ring[ring_ind]; @@ -413,8 +478,7 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *pri ring->cqn = priv->rx_cq[ring_ind]->mcq.cqn; ring->rx_mb_size = priv->rx_mb_size; - ring->stride = stride; - if (ring->stride <= TXBB_SIZE) { + if (sizeof(struct mlx4_en_rx_desc) <= TXBB_SIZE) { /* Stamp first unused send wqe */ __be32 *ptr = (__be32 *)ring->buf; __be32 stamp = cpu_to_be32(1 << STAMP_SHIFT); @@ -423,15 +487,18 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *pri ring->buf += TXBB_SIZE; } - ring->log_stride = ffs(ring->stride) - 1; - ring->buf_size = ring->size * ring->stride; + ring->log_stride = ilog2(sizeof(struct mlx4_en_rx_desc)); + ring->buf_size = ring->size * sizeof(struct mlx4_en_rx_desc); memset(ring->buf, 0, ring->buf_size); mlx4_en_update_rx_prod_db(ring); +#if (MLX4_EN_MAX_RX_SEGS == 1) /* Initialize all descriptors */ for (i = 0; i < ring->size; i++) mlx4_en_init_rx_desc(priv, ring, i); +#endif + ring->rx_mr_key_be = cpu_to_be32(priv->mdev->mr.key); #ifdef INET /* Configure lro mngr */ @@ -466,7 +533,7 @@ err_buffers: while (ring_ind >= 0) { ring = priv->rx_ring[ring_ind]; - if (ring->stride <= TXBB_SIZE) + if (sizeof(struct mlx4_en_rx_desc) <= TXBB_SIZE) ring->buf -= TXBB_SIZE; ring_ind--; } @@ -477,14 +544,14 @@ err_buffers: void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring **pring, - u32 size, u16 stride) + u32 size) { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_rx_ring *ring = *pring; uint32_t x; mlx4_en_unmap_buffer(&ring->wqres.buf); - mlx4_free_hwq_res(mdev->dev, &ring->wqres, size * stride + TXBB_SIZE); + mlx4_free_hwq_res(mdev->dev, &ring->wqres, size * sizeof(struct mlx4_en_rx_desc) + TXBB_SIZE); for (x = 0; x != size; x++) bus_dmamap_destroy(ring->dma_tag, ring->mbuf[x].dma_map); /* free spare mbuf, if any */ @@ -511,7 +578,7 @@ void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *p tcp_lro_free(&ring->lro); #endif mlx4_en_free_rx_buf(priv, ring); - if (ring->stride <= TXBB_SIZE) + if (sizeof(struct mlx4_en_rx_desc) <= TXBB_SIZE) ring->buf -= TXBB_SIZE; } @@ -557,21 +624,43 @@ mlx4_en_rx_mb(struct mlx4_en_priv *priv, struct mlx4_e struct mlx4_en_rx_desc *rx_desc, struct mlx4_en_rx_mbuf *mb_list, int length) { +#if (MLX4_EN_MAX_RX_SEGS != 1) + struct mbuf *mb_head; +#endif struct mbuf *mb; /* get mbuf */ mb = mb_list->mbuf; /* collect used fragment while atomically replacing it */ - if (mlx4_en_alloc_buf(ring, &rx_desc->data[0].addr, mb_list)) + if (mlx4_en_alloc_buf(ring, rx_desc, mb_list)) return (NULL); /* range check hardware computed value */ - if (unlikely(length > mb->m_len)) - length = mb->m_len; + if (unlikely(length > mb->m_pkthdr.len)) + length = mb->m_pkthdr.len; +#if (MLX4_EN_MAX_RX_SEGS == 1) /* update total packet length in packet header */ mb->m_len = mb->m_pkthdr.len = length; +#else + mb->m_pkthdr.len = length; + for (mb_head = mb; mb != NULL; mb = mb->m_next) { + if (mb->m_len > length) + mb->m_len = length; + length -= mb->m_len; + if (likely(length == 0)) { + if (likely(mb->m_next != NULL)) { + /* trim off empty mbufs */ + m_freem(mb->m_next); + mb->m_next = NULL; + } + break; + } + } + /* rewind to first mbuf in chain */ + mb = mb_head; +#endif return (mb); } @@ -660,8 +749,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, stru while (XNOR(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK, cons_index & size)) { mb_list = ring->mbuf + index; - rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (index << ring->log_stride)); + rx_desc = ((struct mlx4_en_rx_desc *)ring->buf) + index; /* * make sure we read the CQE after we read the ownership bit @@ -830,7 +918,7 @@ static int mlx4_en_config_rss_qp(struct mlx4_en_priv * qp->event = mlx4_en_sqp_event; memset(context, 0, sizeof *context); - mlx4_en_fill_qp_context(priv, ring->actual_size, ring->stride, 0, 0, + mlx4_en_fill_qp_context(priv, ring->actual_size, sizeof(struct mlx4_en_rx_desc), 0, 0, qpn, ring->cqn, -1, context); context->db_rec_addr = cpu_to_be64(ring->wqres.db.dma); From owner-svn-src-all@freebsd.org Wed Dec 12 11:54:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB1D2133A1C3; Wed, 12 Dec 2018 11:54:14 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 7CFB78C09D; Wed, 12 Dec 2018 11:54:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72E2C796F; Wed, 12 Dec 2018 11:54:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBsEAR063561; Wed, 12 Dec 2018 11:54:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBsECs063560; Wed, 12 Dec 2018 11:54:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121154.wBCBsECs063560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341913 - stable/12/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7CFB78C09D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:54:15 -0000 Author: hselasky Date: Wed Dec 12 11:54:14 2018 New Revision: 341913 URL: https://svnweb.freebsd.org/changeset/base/341913 Log: MFC r341550: mlx4en: Remove duplicate statistics variable assignment. The "priv->pkstats.rx_dropped" is written twice in a row. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_port.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_port.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_port.c Wed Dec 12 11:52:58 2018 (r341912) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_port.c Wed Dec 12 11:54:14 2018 (r341913) @@ -256,7 +256,6 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u priv->pkstats.rx_length_errors = be32_to_cpu(mlx4_en_stats->RdropLength); priv->pkstats.rx_over_errors = be32_to_cpu(mlx4_en_stats->RdropOvflw); priv->pkstats.rx_crc_errors = be32_to_cpu(mlx4_en_stats->RCRC); - priv->pkstats.rx_dropped = be32_to_cpu(mlx4_en_stats->RdropOvflw); priv->pkstats.tx_dropped = be32_to_cpu(mlx4_en_stats->TDROP); /* RX stats */ From owner-svn-src-all@freebsd.org Wed Dec 12 11:54:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8333133A20A; Wed, 12 Dec 2018 11:54:28 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 6D0EF8C19D; Wed, 12 Dec 2018 11:54:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 590357970; Wed, 12 Dec 2018 11:54:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBsSQS063620; Wed, 12 Dec 2018 11:54:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBsSrt063619; Wed, 12 Dec 2018 11:54:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121154.wBCBsSrt063619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341914 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6D0EF8C19D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:54:29 -0000 Author: hselasky Date: Wed Dec 12 11:54:27 2018 New Revision: 341914 URL: https://svnweb.freebsd.org/changeset/base/341914 Log: MFC r341550: mlx4en: Remove duplicate statistics variable assignment. The "priv->pkstats.rx_dropped" is written twice in a row. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_port.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_port.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_port.c Wed Dec 12 11:54:14 2018 (r341913) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_port.c Wed Dec 12 11:54:27 2018 (r341914) @@ -256,7 +256,6 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u priv->pkstats.rx_length_errors = be32_to_cpu(mlx4_en_stats->RdropLength); priv->pkstats.rx_over_errors = be32_to_cpu(mlx4_en_stats->RdropOvflw); priv->pkstats.rx_crc_errors = be32_to_cpu(mlx4_en_stats->RCRC); - priv->pkstats.rx_dropped = be32_to_cpu(mlx4_en_stats->RdropOvflw); priv->pkstats.tx_dropped = be32_to_cpu(mlx4_en_stats->TDROP); /* RX stats */ From owner-svn-src-all@freebsd.org Wed Dec 12 11:55:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 670B1133A331; Wed, 12 Dec 2018 11:55:42 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 0F2D08C35F; Wed, 12 Dec 2018 11:55:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 052227972; Wed, 12 Dec 2018 11:55:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBtfVZ063777; Wed, 12 Dec 2018 11:55:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBtfWG063776; Wed, 12 Dec 2018 11:55:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121155.wBCBtfWG063776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341915 - stable/12/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F2D08C35F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:55:42 -0000 Author: hselasky Date: Wed Dec 12 11:55:41 2018 New Revision: 341915 URL: https://svnweb.freebsd.org/changeset/base/341915 Log: MFC r341551: mlx4: Make sure default VNET is set when adding a new interface. Adding an interface might be done outside the device_attach() routine and will then cause a panic, due to the VNET not being defined. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_intf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4_intf.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4_intf.c Wed Dec 12 11:54:27 2018 (r341914) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4_intf.c Wed Dec 12 11:55:41 2018 (r341915) @@ -62,8 +62,11 @@ static void mlx4_add_device(struct mlx4_interface *int spin_lock_irq(&priv->ctx_lock); list_add_tail(&dev_ctx->list, &priv->ctx_list); spin_unlock_irq(&priv->ctx_lock); - if (intf->activate) + if (intf->activate) { + CURVNET_SET_QUIET(vnet0); intf->activate(&priv->dev, dev_ctx->context); + CURVNET_RESTORE(); + } } else kfree(dev_ctx); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:55:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 480EE133A344; Wed, 12 Dec 2018 11:55:44 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E36898C364; Wed, 12 Dec 2018 11:55:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7C897973; Wed, 12 Dec 2018 11:55:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBthF6063824; Wed, 12 Dec 2018 11:55:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBth02063823; Wed, 12 Dec 2018 11:55:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121155.wBCBth02063823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341916 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 341916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E36898C364 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:55:44 -0000 Author: hselasky Date: Wed Dec 12 11:55:43 2018 New Revision: 341916 URL: https://svnweb.freebsd.org/changeset/base/341916 Log: MFC r341551: mlx4: Make sure default VNET is set when adding a new interface. Adding an interface might be done outside the device_attach() routine and will then cause a panic, due to the VNET not being defined. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_intf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_intf.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_intf.c Wed Dec 12 11:55:41 2018 (r341915) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_intf.c Wed Dec 12 11:55:43 2018 (r341916) @@ -62,8 +62,11 @@ static void mlx4_add_device(struct mlx4_interface *int spin_lock_irq(&priv->ctx_lock); list_add_tail(&dev_ctx->list, &priv->ctx_list); spin_unlock_irq(&priv->ctx_lock); - if (intf->activate) + if (intf->activate) { + CURVNET_SET_QUIET(vnet0); intf->activate(&priv->dev, dev_ctx->context); + CURVNET_RESTORE(); + } } else kfree(dev_ctx); } From owner-svn-src-all@freebsd.org Wed Dec 12 11:57:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E0C1133A6AD; Wed, 12 Dec 2018 11:57:26 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 43C548C76D; Wed, 12 Dec 2018 11:57:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05FBA7978; Wed, 12 Dec 2018 11:57:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBvPwF063975; Wed, 12 Dec 2018 11:57:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBvPBS063974; Wed, 12 Dec 2018 11:57:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121157.wBCBvPBS063974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341917 - stable/12/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 43C548C76D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:57:26 -0000 Author: hselasky Date: Wed Dec 12 11:57:25 2018 New Revision: 341917 URL: https://svnweb.freebsd.org/changeset/base/341917 Log: MFC r341552: mlx4en: Optimise reception of small packets. Copy small packets like TCP ACKs into a new mbuf reusing the existing mbuf to receive a new ethernet frame. This avoids wasting buffer space for small sized packets. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:55:43 2018 (r341916) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:57:25 2018 (r341917) @@ -629,6 +629,24 @@ mlx4_en_rx_mb(struct mlx4_en_priv *priv, struct mlx4_e #endif struct mbuf *mb; + /* optimise reception of small packets */ + if (length <= (MHLEN - MLX4_NET_IP_ALIGN) && + (mb = m_gethdr(M_NOWAIT, MT_DATA)) != NULL) { + + /* set packet length */ + mb->m_pkthdr.len = mb->m_len = length; + + /* make sure IP header gets aligned */ + mb->m_data += MLX4_NET_IP_ALIGN; + + bus_dmamap_sync(ring->dma_tag, mb_list->dma_map, + BUS_DMASYNC_POSTREAD); + + bcopy(mtod(mb_list->mbuf, caddr_t), mtod(mb, caddr_t), length); + + return (mb); + } + /* get mbuf */ mb = mb_list->mbuf; From owner-svn-src-all@freebsd.org Wed Dec 12 11:57:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA38F133A6C9; Wed, 12 Dec 2018 11:57:28 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 6625E8C772; Wed, 12 Dec 2018 11:57:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D1957979; Wed, 12 Dec 2018 11:57:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCBvS9s064020; Wed, 12 Dec 2018 11:57:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCBvSuI064019; Wed, 12 Dec 2018 11:57:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121157.wBCBvSuI064019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 11:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341918 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 341918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6625E8C772 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 11:57:29 -0000 Author: hselasky Date: Wed Dec 12 11:57:27 2018 New Revision: 341918 URL: https://svnweb.freebsd.org/changeset/base/341918 Log: MFC r341552: mlx4en: Optimise reception of small packets. Copy small packets like TCP ACKs into a new mbuf reusing the existing mbuf to receive a new ethernet frame. This avoids wasting buffer space for small sized packets. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:57:25 2018 (r341917) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Wed Dec 12 11:57:27 2018 (r341918) @@ -629,6 +629,24 @@ mlx4_en_rx_mb(struct mlx4_en_priv *priv, struct mlx4_e #endif struct mbuf *mb; + /* optimise reception of small packets */ + if (length <= (MHLEN - MLX4_NET_IP_ALIGN) && + (mb = m_gethdr(M_NOWAIT, MT_DATA)) != NULL) { + + /* set packet length */ + mb->m_pkthdr.len = mb->m_len = length; + + /* make sure IP header gets aligned */ + mb->m_data += MLX4_NET_IP_ALIGN; + + bus_dmamap_sync(ring->dma_tag, mb_list->dma_map, + BUS_DMASYNC_POSTREAD); + + bcopy(mtod(mb_list->mbuf, caddr_t), mtod(mb, caddr_t), length); + + return (mb); + } + /* get mbuf */ mb = mb_list->mbuf; From owner-svn-src-all@freebsd.org Wed Dec 12 12:00:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 573EB133AD32; Wed, 12 Dec 2018 12:00:35 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9A4268CC28; Wed, 12 Dec 2018 12:00:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86C927983; Wed, 12 Dec 2018 12:00:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC0Y4G064281; Wed, 12 Dec 2018 12:00:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC0YOc064280; Wed, 12 Dec 2018 12:00:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121200.wBCC0YOc064280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341919 - stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9A4268CC28 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:00:35 -0000 Author: hselasky Date: Wed Dec 12 12:00:34 2018 New Revision: 341919 URL: https://svnweb.freebsd.org/changeset/base/341919 Log: MFC r341553: mlx5: Fix integer overflow while resizing CQ The user can provide very large cqe_size which will cause to integer overflow. Linux commit: 28e9091e3119933c38933cb8fc48d5618eb784c8 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Wed Dec 12 11:57:27 2018 (r341918) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Wed Dec 12 12:00:34 2018 (r341919) @@ -1124,7 +1124,12 @@ static int resize_user(struct mlx5_ib_dev *dev, struct if (ucmd.reserved0 || ucmd.reserved1) return -EINVAL; - umem = ib_umem_get(context, ucmd.buf_addr, entries * ucmd.cqe_size, + /* check multiplication overflow */ + if (ucmd.cqe_size && SIZE_MAX / ucmd.cqe_size <= entries - 1) + return -EINVAL; + + umem = ib_umem_get(context, ucmd.buf_addr, + (size_t)ucmd.cqe_size * entries, IB_ACCESS_LOCAL_WRITE, 1); if (IS_ERR(umem)) { err = PTR_ERR(umem); From owner-svn-src-all@freebsd.org Wed Dec 12 12:00:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72A89133AD90; Wed, 12 Dec 2018 12:00:52 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 963088CD78; Wed, 12 Dec 2018 12:00:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BF567999; Wed, 12 Dec 2018 12:00:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC0pJ2064334; Wed, 12 Dec 2018 12:00:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC0pSf064333; Wed, 12 Dec 2018 12:00:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121200.wBCC0pSf064333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341920 - stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 963088CD78 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:00:52 -0000 Author: hselasky Date: Wed Dec 12 12:00:51 2018 New Revision: 341920 URL: https://svnweb.freebsd.org/changeset/base/341920 Log: MFC r341553: mlx5: Fix integer overflow while resizing CQ The user can provide very large cqe_size which will cause to integer overflow. Linux commit: 28e9091e3119933c38933cb8fc48d5618eb784c8 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Wed Dec 12 12:00:34 2018 (r341919) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Wed Dec 12 12:00:51 2018 (r341920) @@ -1124,7 +1124,12 @@ static int resize_user(struct mlx5_ib_dev *dev, struct if (ucmd.reserved0 || ucmd.reserved1) return -EINVAL; - umem = ib_umem_get(context, ucmd.buf_addr, entries * ucmd.cqe_size, + /* check multiplication overflow */ + if (ucmd.cqe_size && SIZE_MAX / ucmd.cqe_size <= entries - 1) + return -EINVAL; + + umem = ib_umem_get(context, ucmd.buf_addr, + (size_t)ucmd.cqe_size * entries, IB_ACCESS_LOCAL_WRITE, 1); if (IS_ERR(umem)) { err = PTR_ERR(umem); From owner-svn-src-all@freebsd.org Wed Dec 12 12:01:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74C7F133AF07; Wed, 12 Dec 2018 12:01:43 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 1D5738CFCD; Wed, 12 Dec 2018 12:01:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11D217ADE; Wed, 12 Dec 2018 12:01:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC1gNF066682; Wed, 12 Dec 2018 12:01:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC1gbd066680; Wed, 12 Dec 2018 12:01:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121201.wBCC1gbd066680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341921 - in stable/12/sys/dev/mlx5: mlx5_core mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: mlx5_core mlx5_ib X-SVN-Commit-Revision: 341921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1D5738CFCD X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:01:43 -0000 Author: hselasky Date: Wed Dec 12 12:01:42 2018 New Revision: 341921 URL: https://svnweb.freebsd.org/changeset/base/341921 Log: MFC r341554: mlx5: Raise fatal IB event when sys error occurs All other mlx5_events report the port number as 1 based, which is how FW reports it in the port event EQE. Reporting 0 for this event causes mlx5_ib to not raise a fatal event notification to registered clients due to a seemingly invalid port. All switch cases in mlx5_ib_event that go through the port check are supposed to set the port now, so just do it once at variable declaration. Linux commit: aba462134634b502d720e15b23154f21cfa277e5 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:00:51 2018 (r341920) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:01:42 2018 (r341921) @@ -269,7 +269,7 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, mlx5_core_err(dev, "system error event triggered\n"); err_state_done: - mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 0); + mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 1); mutex_unlock(&dev->intf_state_mutex); } Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:00:51 2018 (r341920) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:01:42 2018 (r341921) @@ -2335,7 +2335,7 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v struct mlx5_ib_dev *ibdev = (struct mlx5_ib_dev *)context; struct ib_event ibev; bool fatal = false; - u8 port = 0; + u8 port = (u8)param; switch (event) { case MLX5_DEV_EVENT_SYS_ERROR: @@ -2347,8 +2347,6 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v case MLX5_DEV_EVENT_PORT_UP: case MLX5_DEV_EVENT_PORT_DOWN: case MLX5_DEV_EVENT_PORT_INITIALIZED: - port = (u8)param; - /* In RoCE, port up/down events are handled in * mlx5_netdev_event(). */ @@ -2362,24 +2360,20 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v case MLX5_DEV_EVENT_LID_CHANGE: ibev.event = IB_EVENT_LID_CHANGE; - port = (u8)param; break; case MLX5_DEV_EVENT_PKEY_CHANGE: ibev.event = IB_EVENT_PKEY_CHANGE; - port = (u8)param; schedule_work(&ibdev->devr.ports[port - 1].pkey_change_work); break; case MLX5_DEV_EVENT_GUID_CHANGE: ibev.event = IB_EVENT_GID_CHANGE; - port = (u8)param; break; case MLX5_DEV_EVENT_CLIENT_REREG: ibev.event = IB_EVENT_CLIENT_REREGISTER; - port = (u8)param; break; default: @@ -2390,7 +2384,7 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v ibev.device = &ibdev->ib_dev; ibev.element.port_num = port; - if (port < 1 || port > ibdev->num_ports) { + if (!rdma_is_port_valid(&ibdev->ib_dev, port)) { mlx5_ib_warn(ibdev, "warning: event(%d) on port %d\n", event, port); return; } From owner-svn-src-all@freebsd.org Wed Dec 12 12:02:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE8DF130A101; Wed, 12 Dec 2018 12:02:07 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 571288D27B; Wed, 12 Dec 2018 12:02:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D2A37B00; Wed, 12 Dec 2018 12:02:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC270F067472; Wed, 12 Dec 2018 12:02:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC26pX067470; Wed, 12 Dec 2018 12:02:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121202.wBCC26pX067470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341922 - in stable/11/sys/dev/mlx5: mlx5_core mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: mlx5_core mlx5_ib X-SVN-Commit-Revision: 341922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 571288D27B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:02:08 -0000 Author: hselasky Date: Wed Dec 12 12:02:06 2018 New Revision: 341922 URL: https://svnweb.freebsd.org/changeset/base/341922 Log: MFC r341554: mlx5: Raise fatal IB event when sys error occurs All other mlx5_events report the port number as 1 based, which is how FW reports it in the port event EQE. Reporting 0 for this event causes mlx5_ib to not raise a fatal event notification to registered clients due to a seemingly invalid port. All switch cases in mlx5_ib_event that go through the port check are supposed to set the port now, so just do it once at variable declaration. Linux commit: aba462134634b502d720e15b23154f21cfa277e5 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:01:42 2018 (r341921) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:02:06 2018 (r341922) @@ -269,7 +269,7 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, mlx5_core_err(dev, "system error event triggered\n"); err_state_done: - mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 0); + mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 1); mutex_unlock(&dev->intf_state_mutex); } Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:01:42 2018 (r341921) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:02:06 2018 (r341922) @@ -2335,7 +2335,7 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v struct mlx5_ib_dev *ibdev = (struct mlx5_ib_dev *)context; struct ib_event ibev; bool fatal = false; - u8 port = 0; + u8 port = (u8)param; switch (event) { case MLX5_DEV_EVENT_SYS_ERROR: @@ -2347,8 +2347,6 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v case MLX5_DEV_EVENT_PORT_UP: case MLX5_DEV_EVENT_PORT_DOWN: case MLX5_DEV_EVENT_PORT_INITIALIZED: - port = (u8)param; - /* In RoCE, port up/down events are handled in * mlx5_netdev_event(). */ @@ -2362,24 +2360,20 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v case MLX5_DEV_EVENT_LID_CHANGE: ibev.event = IB_EVENT_LID_CHANGE; - port = (u8)param; break; case MLX5_DEV_EVENT_PKEY_CHANGE: ibev.event = IB_EVENT_PKEY_CHANGE; - port = (u8)param; schedule_work(&ibdev->devr.ports[port - 1].pkey_change_work); break; case MLX5_DEV_EVENT_GUID_CHANGE: ibev.event = IB_EVENT_GID_CHANGE; - port = (u8)param; break; case MLX5_DEV_EVENT_CLIENT_REREG: ibev.event = IB_EVENT_CLIENT_REREGISTER; - port = (u8)param; break; default: @@ -2390,7 +2384,7 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v ibev.device = &ibdev->ib_dev; ibev.element.port_num = port; - if (port < 1 || port > ibdev->num_ports) { + if (!rdma_is_port_valid(&ibdev->ib_dev, port)) { mlx5_ib_warn(ibdev, "warning: event(%d) on port %d\n", event, port); return; } From owner-svn-src-all@freebsd.org Wed Dec 12 12:03:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 628AD130A415; Wed, 12 Dec 2018 12:03:34 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 ED9F78D5EF; Wed, 12 Dec 2018 12:03:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2AEC7B20; Wed, 12 Dec 2018 12:03:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC3XW5069131; Wed, 12 Dec 2018 12:03:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC3XQU069129; Wed, 12 Dec 2018 12:03:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121203.wBCC3XQU069129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341923 - in stable/12/sys/dev/mlx5: mlx5_core mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: mlx5_core mlx5_en X-SVN-Commit-Revision: 341923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ED9F78D5EF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:03:34 -0000 Author: hselasky Date: Wed Dec 12 12:03:33 2018 New Revision: 341923 URL: https://svnweb.freebsd.org/changeset/base/341923 Log: MFC r341555: mlx5: Discard unused return values. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:02:06 2018 (r341922) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:03:33 2018 (r341923) @@ -128,7 +128,7 @@ mlx5_fwp_alloc(struct mlx5_core_dev *dev, gfp_t flags, /* load memory into DMA */ MLX5_DMA_LOCK(dev); - err = bus_dmamap_load( + (void) bus_dmamap_load( dev->cmd.dma_tag, fwp[x].dma_map, fwp[x].virt_addr, MLX5_ADAPTER_PAGE_SIZE, &mlx5_fwp_load_mem_cb, fwp + x, BUS_DMA_WAITOK | BUS_DMA_COHERENT); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 12:02:06 2018 (r341922) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 12:03:33 2018 (r341923) @@ -421,7 +421,6 @@ mlx5e_rlw_channel_set_rate_locked(struct mlx5e_rl_work if (rate == 0) { /* rate doesn't exist, fallback to unlimited */ - error = EINVAL; index = 0; rate = 0; atomic_add_64(&rlw->priv->rl.stats.tx_modify_rate_failure, 1ULL); From owner-svn-src-all@freebsd.org Wed Dec 12 12:04:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F80130A6AD; Wed, 12 Dec 2018 12:04:57 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 0C9658D845; Wed, 12 Dec 2018 12:04:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02C3E7B23; Wed, 12 Dec 2018 12:04:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC4uLU069228; Wed, 12 Dec 2018 12:04:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC4uWg069227; Wed, 12 Dec 2018 12:04:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121204.wBCC4uWg069227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341924 - stable/11/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0C9658D845 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:04:57 -0000 Author: hselasky Date: Wed Dec 12 12:04:56 2018 New Revision: 341924 URL: https://svnweb.freebsd.org/changeset/base/341924 Log: MFC r341555: mlx5: Discard unused return values. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:03:33 2018 (r341923) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:04:56 2018 (r341924) @@ -128,7 +128,7 @@ mlx5_fwp_alloc(struct mlx5_core_dev *dev, gfp_t flags, /* load memory into DMA */ MLX5_DMA_LOCK(dev); - err = bus_dmamap_load( + (void) bus_dmamap_load( dev->cmd.dma_tag, fwp[x].dma_map, fwp[x].virt_addr, MLX5_ADAPTER_PAGE_SIZE, &mlx5_fwp_load_mem_cb, fwp + x, BUS_DMA_WAITOK | BUS_DMA_COHERENT); From owner-svn-src-all@freebsd.org Wed Dec 12 12:06:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C1A1130A96C; Wed, 12 Dec 2018 12:06:22 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 C4AEA8DAD4; Wed, 12 Dec 2018 12:06:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FB1E7B25; Wed, 12 Dec 2018 12:06:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC6LrB069371; Wed, 12 Dec 2018 12:06:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC6KSR069368; Wed, 12 Dec 2018 12:06:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121206.wBCC6KSR069368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341925 - stable/12/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4AEA8DAD4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:06:22 -0000 Author: hselasky Date: Wed Dec 12 12:06:20 2018 New Revision: 341925 URL: https://svnweb.freebsd.org/changeset/base/341925 Log: MFC r341556: mlx5: Fix for potential memory leaks. Make sure allocated data gets freed in error cases. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c Wed Dec 12 12:04:56 2018 (r341924) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c Wed Dec 12 12:06:20 2018 (r341925) @@ -1601,9 +1601,10 @@ static char *get_dest_name(struct mlx5_flow_destinatio case MLX5_FLOW_CONTEXT_DEST_TYPE_TIR: snprintf(name, 20, "dest_%s_%u", "tir", dest->tir_num); return name; + default: + kfree(name); + return NULL; } - - return NULL; } /* assumed fg is locked */ Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:04:56 2018 (r341924) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:06:20 2018 (r341925) @@ -153,6 +153,7 @@ failure: bus_dmamem_free(dev->cmd.dma_tag, fwp[x].virt_addr, fwp[x].dma_map); } sx_xunlock(&dev->cmd.dma_sx); + kfree(fwp); return (NULL); } Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 12:04:56 2018 (r341924) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 12:06:20 2018 (r341925) @@ -1597,8 +1597,8 @@ int mlx5_query_vport_counter(struct mlx5_core_dev *dev err = mlx5_cmd_exec(dev, in, in_sz, out, out_size); - kvfree(in); ex: + kvfree(in); return err; } EXPORT_SYMBOL_GPL(mlx5_query_vport_counter); From owner-svn-src-all@freebsd.org Wed Dec 12 12:06:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DC00130A9C0; Wed, 12 Dec 2018 12:06:27 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 324348DB12; Wed, 12 Dec 2018 12:06:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83F707B26; Wed, 12 Dec 2018 12:06:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC6QUB069423; Wed, 12 Dec 2018 12:06:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC6PPG069420; Wed, 12 Dec 2018 12:06:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121206.wBCC6PPG069420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341926 - stable/11/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 324348DB12 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:06:27 -0000 Author: hselasky Date: Wed Dec 12 12:06:25 2018 New Revision: 341926 URL: https://svnweb.freebsd.org/changeset/base/341926 Log: MFC r341556: mlx5: Fix for potential memory leaks. Make sure allocated data gets freed in error cases. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c Wed Dec 12 12:06:20 2018 (r341925) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c Wed Dec 12 12:06:25 2018 (r341926) @@ -1601,9 +1601,10 @@ static char *get_dest_name(struct mlx5_flow_destinatio case MLX5_FLOW_CONTEXT_DEST_TYPE_TIR: snprintf(name, 20, "dest_%s_%u", "tir", dest->tir_num); return name; + default: + kfree(name); + return NULL; } - - return NULL; } /* assumed fg is locked */ Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:06:20 2018 (r341925) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Wed Dec 12 12:06:25 2018 (r341926) @@ -153,6 +153,7 @@ failure: bus_dmamem_free(dev->cmd.dma_tag, fwp[x].virt_addr, fwp[x].dma_map); } sx_xunlock(&dev->cmd.dma_sx); + kfree(fwp); return (NULL); } Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 12:06:20 2018 (r341925) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 12:06:25 2018 (r341926) @@ -1597,8 +1597,8 @@ int mlx5_query_vport_counter(struct mlx5_core_dev *dev err = mlx5_cmd_exec(dev, in, in_sz, out, out_size); - kvfree(in); ex: + kvfree(in); return err; } EXPORT_SYMBOL_GPL(mlx5_query_vport_counter); From owner-svn-src-all@freebsd.org Wed Dec 12 12:07:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B887130AB2F; Wed, 12 Dec 2018 12:07:22 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 DA1A88DDB5; Wed, 12 Dec 2018 12:07:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0DC57B27; Wed, 12 Dec 2018 12:07:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC7LKf069539; Wed, 12 Dec 2018 12:07:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC7LKn069537; Wed, 12 Dec 2018 12:07:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121207.wBCC7LKn069537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341927 - in stable/12/sys/dev/mlx5: . mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_ib X-SVN-Commit-Revision: 341927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DA1A88DDB5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:07:22 -0000 Author: hselasky Date: Wed Dec 12 12:07:21 2018 New Revision: 341927 URL: https://svnweb.freebsd.org/changeset/base/341927 Log: MFC r341557: mlx5: Add SRQ fixes from Linux Combine multiple fixes from Linux to SRQ. Linux commits: c73b791 IB/mlx5: Assign SRQ type earlier 0fd27a8 IB/mlx5: Fix out-of-bound access c2b37f7 IB/mlx5: Fix integer overflows in mlx5_ib_create_srq d63c467 RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/driver.h stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/driver.h ============================================================================== --- stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:06:25 2018 (r341926) +++ stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:07:21 2018 (r341927) @@ -462,8 +462,8 @@ struct mlx5_core_srq { struct mlx5_core_rsc_common common; /* must be first */ u32 srqn; int max; - int max_gs; - int max_avail_gather; + size_t max_gs; + size_t max_avail_gather; int wqe_shift; void (*event)(struct mlx5_core_srq *, int); atomic_t refcount; Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:06:25 2018 (r341926) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:07:21 2018 (r341927) @@ -159,8 +159,6 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, int err; int i; struct mlx5_wqe_srq_next_seg *next; - int page_shift; - int npages; err = mlx5_db_alloc(dev->mdev, &srq->db); if (err) { @@ -173,7 +171,6 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, err = -ENOMEM; goto err_db; } - page_shift = srq->buf.page_shift; srq->head = 0; srq->tail = srq->msrq.max - 1; @@ -185,10 +182,8 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, cpu_to_be16((i + 1) & (srq->msrq.max - 1)); } - npages = DIV_ROUND_UP(srq->buf.npages, 1 << (page_shift - PAGE_SHIFT)); - mlx5_ib_dbg(dev, "buf_size %d, page_shift %d, npages %d, calc npages %d\n", - buf_size, page_shift, srq->buf.npages, npages); - in->pas = mlx5_vzalloc(sizeof(*in->pas) * npages); + mlx5_ib_dbg(dev, "srq->buf.page_shift = %d\n", srq->buf.page_shift); + in->pas = mlx5_vzalloc(sizeof(*in->pas) * srq->buf.npages); if (!in->pas) { err = -ENOMEM; goto err_buf; @@ -204,7 +199,7 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, } srq->wq_sig = !!srq_signature; - in->log_page_size = page_shift - MLX5_ADAPTER_PAGE_SHIFT; + in->log_page_size = srq->buf.page_shift - MLX5_ADAPTER_PAGE_SHIFT; if (MLX5_CAP_GEN(dev->mdev, cqe_version) == MLX5_CQE_VERSION_V1 && in->type == IB_SRQT_XRC) in->user_index = MLX5_IB_DEFAULT_UIDX; @@ -242,8 +237,8 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, { struct mlx5_ib_dev *dev = to_mdev(pd->device); struct mlx5_ib_srq *srq; - int desc_size; - int buf_size; + size_t desc_size; + size_t buf_size; int err; struct mlx5_srq_attr in = {0}; __u32 max_srq_wqes = 1 << MLX5_CAP_GEN(dev->mdev, log_max_srq_sz); @@ -267,15 +262,25 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, desc_size = sizeof(struct mlx5_wqe_srq_next_seg) + srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg); + if (desc_size == 0 || srq->msrq.max_gs > desc_size) { + err = -EINVAL; + goto err_srq; + } desc_size = roundup_pow_of_two(desc_size); - desc_size = max_t(int, 32, desc_size); + desc_size = max_t(size_t, 32, desc_size); + if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg)) { + err = -EINVAL; + goto err_srq; + } srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) / sizeof(struct mlx5_wqe_data_seg); srq->msrq.wqe_shift = ilog2(desc_size); buf_size = srq->msrq.max * desc_size; - mlx5_ib_dbg(dev, "desc_size 0x%x, req wr 0x%x, srq size 0x%x, max_gs 0x%x, max_avail_gather 0x%x\n", - desc_size, init_attr->attr.max_wr, srq->msrq.max, srq->msrq.max_gs, - srq->msrq.max_avail_gather); + if (buf_size < desc_size) { + err = -EINVAL; + goto err_srq; + } + in.type = init_attr->srq_type; if (pd->uobject) err = create_srq_user(pd, srq, &in, udata, buf_size); @@ -288,7 +293,6 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, goto err_srq; } - in.type = init_attr->srq_type; in.log_size = ilog2(srq->msrq.max); in.wqe_shift = srq->msrq.wqe_shift - 4; if (srq->wq_sig) From owner-svn-src-all@freebsd.org Wed Dec 12 12:07:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44909130ABEB; Wed, 12 Dec 2018 12:07:41 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 2C9248DED4; Wed, 12 Dec 2018 12:07:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 208BF7B28; Wed, 12 Dec 2018 12:07:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC7eMs069597; Wed, 12 Dec 2018 12:07:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC7dHS069594; Wed, 12 Dec 2018 12:07:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121207.wBCC7dHS069594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341928 - in stable/11/sys/dev/mlx5: . mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_ib X-SVN-Commit-Revision: 341928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C9248DED4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:07:42 -0000 Author: hselasky Date: Wed Dec 12 12:07:39 2018 New Revision: 341928 URL: https://svnweb.freebsd.org/changeset/base/341928 Log: MFC r341557: mlx5: Add SRQ fixes from Linux Combine multiple fixes from Linux to SRQ. Linux commits: c73b791 IB/mlx5: Assign SRQ type earlier 0fd27a8 IB/mlx5: Fix out-of-bound access c2b37f7 IB/mlx5: Fix integer overflows in mlx5_ib_create_srq d63c467 RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:07:21 2018 (r341927) +++ stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:07:39 2018 (r341928) @@ -460,8 +460,8 @@ struct mlx5_core_srq { struct mlx5_core_rsc_common common; /* must be first */ u32 srqn; int max; - int max_gs; - int max_avail_gather; + size_t max_gs; + size_t max_avail_gather; int wqe_shift; void (*event)(struct mlx5_core_srq *, int); atomic_t refcount; Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:07:21 2018 (r341927) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:07:39 2018 (r341928) @@ -159,8 +159,6 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, int err; int i; struct mlx5_wqe_srq_next_seg *next; - int page_shift; - int npages; err = mlx5_db_alloc(dev->mdev, &srq->db); if (err) { @@ -173,7 +171,6 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, err = -ENOMEM; goto err_db; } - page_shift = srq->buf.page_shift; srq->head = 0; srq->tail = srq->msrq.max - 1; @@ -185,10 +182,8 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, cpu_to_be16((i + 1) & (srq->msrq.max - 1)); } - npages = DIV_ROUND_UP(srq->buf.npages, 1 << (page_shift - PAGE_SHIFT)); - mlx5_ib_dbg(dev, "buf_size %d, page_shift %d, npages %d, calc npages %d\n", - buf_size, page_shift, srq->buf.npages, npages); - in->pas = mlx5_vzalloc(sizeof(*in->pas) * npages); + mlx5_ib_dbg(dev, "srq->buf.page_shift = %d\n", srq->buf.page_shift); + in->pas = mlx5_vzalloc(sizeof(*in->pas) * srq->buf.npages); if (!in->pas) { err = -ENOMEM; goto err_buf; @@ -204,7 +199,7 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, } srq->wq_sig = !!srq_signature; - in->log_page_size = page_shift - MLX5_ADAPTER_PAGE_SHIFT; + in->log_page_size = srq->buf.page_shift - MLX5_ADAPTER_PAGE_SHIFT; if (MLX5_CAP_GEN(dev->mdev, cqe_version) == MLX5_CQE_VERSION_V1 && in->type == IB_SRQT_XRC) in->user_index = MLX5_IB_DEFAULT_UIDX; @@ -242,8 +237,8 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, { struct mlx5_ib_dev *dev = to_mdev(pd->device); struct mlx5_ib_srq *srq; - int desc_size; - int buf_size; + size_t desc_size; + size_t buf_size; int err; struct mlx5_srq_attr in = {0}; __u32 max_srq_wqes = 1 << MLX5_CAP_GEN(dev->mdev, log_max_srq_sz); @@ -267,15 +262,25 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, desc_size = sizeof(struct mlx5_wqe_srq_next_seg) + srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg); + if (desc_size == 0 || srq->msrq.max_gs > desc_size) { + err = -EINVAL; + goto err_srq; + } desc_size = roundup_pow_of_two(desc_size); - desc_size = max_t(int, 32, desc_size); + desc_size = max_t(size_t, 32, desc_size); + if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg)) { + err = -EINVAL; + goto err_srq; + } srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) / sizeof(struct mlx5_wqe_data_seg); srq->msrq.wqe_shift = ilog2(desc_size); buf_size = srq->msrq.max * desc_size; - mlx5_ib_dbg(dev, "desc_size 0x%x, req wr 0x%x, srq size 0x%x, max_gs 0x%x, max_avail_gather 0x%x\n", - desc_size, init_attr->attr.max_wr, srq->msrq.max, srq->msrq.max_gs, - srq->msrq.max_avail_gather); + if (buf_size < desc_size) { + err = -EINVAL; + goto err_srq; + } + in.type = init_attr->srq_type; if (pd->uobject) err = create_srq_user(pd, srq, &in, udata, buf_size); @@ -288,7 +293,6 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, goto err_srq; } - in.type = init_attr->srq_type; in.log_size = ilog2(srq->msrq.max); in.wqe_shift = srq->msrq.wqe_shift - 4; if (srq->wq_sig) From owner-svn-src-all@freebsd.org Wed Dec 12 12:08:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59CB4130AD63; Wed, 12 Dec 2018 12:08:49 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 BE2698E114; Wed, 12 Dec 2018 12:08:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B45DC7B2A; Wed, 12 Dec 2018 12:08:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC8mtM069723; Wed, 12 Dec 2018 12:08:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC8mk9069722; Wed, 12 Dec 2018 12:08:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121208.wBCC8mk9069722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341929 - stable/12/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BE2698E114 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:08:49 -0000 Author: hselasky Date: Wed Dec 12 12:08:48 2018 New Revision: 341929 URL: https://svnweb.freebsd.org/changeset/base/341929 Log: MFC r341558: mlx5: Convert some spaces into tabs and use device_printf() instead of printf(). Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:07:39 2018 (r341928) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:08:48 2018 (r341929) @@ -1211,7 +1211,7 @@ static int init_one(struct pci_dev *pdev, priv->pci_dev_data = id->driver_data; if (prof_sel < 0 || prof_sel >= ARRAY_SIZE(profiles)) { - printf("mlx5_core: WARN: ""selected profile out of range, selecting default (%d)\n", MLX5_DEFAULT_PROF); + device_printf(bsddev, "WARN: selected profile out of range, selecting default (%d)\n", MLX5_DEFAULT_PROF); prof_sel = MLX5_DEFAULT_PROF; } dev->profile = &profiles[prof_sel]; @@ -1226,38 +1226,38 @@ static int init_one(struct pci_dev *pdev, INIT_LIST_HEAD(&priv->ctx_list); spin_lock_init(&priv->ctx_lock); - mutex_init(&dev->pci_status_mutex); - mutex_init(&dev->intf_state_mutex); + mutex_init(&dev->pci_status_mutex); + mutex_init(&dev->intf_state_mutex); err = mlx5_pci_init(dev, priv); if (err) { - device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_pci_init failed %d\n", err); + device_printf(bsddev, "ERR: mlx5_pci_init failed %d\n", err); goto clean_dev; } - err = mlx5_health_init(dev); - if (err) { - device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_health_init failed %d\n", err); - goto close_pci; - } + err = mlx5_health_init(dev); + if (err) { + device_printf(bsddev, "ERR: mlx5_health_init failed %d\n", err); + goto close_pci; + } mlx5_pagealloc_init(dev); err = mlx5_load_one(dev, priv, true); if (err) { - device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_register_device failed %d\n", err); + device_printf(bsddev, "ERR: mlx5_load_one failed %d\n", err); goto clean_health; } mlx5_fwdump_prep(dev); - pci_save_state(pdev->dev.bsddev); + pci_save_state(bsddev); return 0; clean_health: mlx5_pagealloc_cleanup(dev); - mlx5_health_cleanup(dev); + mlx5_health_cleanup(dev); close_pci: - mlx5_pci_close(dev, priv); + mlx5_pci_close(dev, priv); clean_dev: sysctl_ctx_free(&dev->sysctl_ctx); kfree(dev); From owner-svn-src-all@freebsd.org Wed Dec 12 12:08:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00EB4130AD8A; Wed, 12 Dec 2018 12:08:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 089478E11F; Wed, 12 Dec 2018 12:08:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9F887B2B; Wed, 12 Dec 2018 12:08:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCC8noe069766; Wed, 12 Dec 2018 12:08:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCC8n0Z069765; Wed, 12 Dec 2018 12:08:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121208.wBCC8n0Z069765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341930 - stable/11/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 089478E11F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:08:51 -0000 Author: hselasky Date: Wed Dec 12 12:08:49 2018 New Revision: 341930 URL: https://svnweb.freebsd.org/changeset/base/341930 Log: MFC r341558: mlx5: Convert some spaces into tabs and use device_printf() instead of printf(). Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:08:48 2018 (r341929) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:08:49 2018 (r341930) @@ -1193,7 +1193,7 @@ static int init_one(struct pci_dev *pdev, priv->pci_dev_data = id->driver_data; if (prof_sel < 0 || prof_sel >= ARRAY_SIZE(profiles)) { - printf("mlx5_core: WARN: ""selected profile out of range, selecting default (%d)\n", MLX5_DEFAULT_PROF); + device_printf(bsddev, "WARN: selected profile out of range, selecting default (%d)\n", MLX5_DEFAULT_PROF); prof_sel = MLX5_DEFAULT_PROF; } dev->profile = &profiles[prof_sel]; @@ -1208,38 +1208,38 @@ static int init_one(struct pci_dev *pdev, INIT_LIST_HEAD(&priv->ctx_list); spin_lock_init(&priv->ctx_lock); - mutex_init(&dev->pci_status_mutex); - mutex_init(&dev->intf_state_mutex); + mutex_init(&dev->pci_status_mutex); + mutex_init(&dev->intf_state_mutex); err = mlx5_pci_init(dev, priv); if (err) { - device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_pci_init failed %d\n", err); + device_printf(bsddev, "ERR: mlx5_pci_init failed %d\n", err); goto clean_dev; } - err = mlx5_health_init(dev); - if (err) { - device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_health_init failed %d\n", err); - goto close_pci; - } + err = mlx5_health_init(dev); + if (err) { + device_printf(bsddev, "ERR: mlx5_health_init failed %d\n", err); + goto close_pci; + } mlx5_pagealloc_init(dev); err = mlx5_load_one(dev, priv, true); if (err) { - device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_register_device failed %d\n", err); + device_printf(bsddev, "ERR: mlx5_load_one failed %d\n", err); goto clean_health; } mlx5_fwdump_prep(dev); - pci_save_state(pdev->dev.bsddev); + pci_save_state(bsddev); return 0; clean_health: mlx5_pagealloc_cleanup(dev); - mlx5_health_cleanup(dev); + mlx5_health_cleanup(dev); close_pci: - mlx5_pci_close(dev, priv); + mlx5_pci_close(dev, priv); clean_dev: sysctl_ctx_free(&dev->sysctl_ctx); kfree(dev); From owner-svn-src-all@freebsd.org Wed Dec 12 12:19:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BE9E130B2C0; Wed, 12 Dec 2018 12:19:51 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 C71728E7DD; Wed, 12 Dec 2018 12:19:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB9587CE7; Wed, 12 Dec 2018 12:19:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCJoB6074859; Wed, 12 Dec 2018 12:19:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCJoHr074856; Wed, 12 Dec 2018 12:19:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121219.wBCCJoHr074856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341932 - in stable/12/sys/dev/mlx5: mlx5_core mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: mlx5_core mlx5_en X-SVN-Commit-Revision: 341932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C71728E7DD X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:19:51 -0000 Author: hselasky Date: Wed Dec 12 12:19:49 2018 New Revision: 341932 URL: https://svnweb.freebsd.org/changeset/base/341932 Log: MFC r341559 and r341645: mlx5: Move hw.mlx5 node definition to mlx5_core. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:19:49 2018 (r341931) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:19:49 2018 (r341932) @@ -103,4 +103,6 @@ struct mlx5_crspace_regmap { extern struct pci_driver mlx5_core_driver; +SYSCTL_DECL(_hw_mlx5); + #endif /* __MLX5_CORE_H__ */ Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:19:49 2018 (r341931) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:19:49 2018 (r341932) @@ -61,6 +61,8 @@ static int prof_sel = MLX5_DEFAULT_PROF; module_param_named(prof_sel, prof_sel, int, 0444); MODULE_PARM_DESC(prof_sel, "profile selector. Valid range 0 - 2"); +SYSCTL_NODE(_hw, OID_AUTO, mlx5, CTLFLAG_RW, 0, "mlx5 HW controls"); + #define NUMA_NO_NODE -1 static LIST_HEAD(intf_list); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:19:49 2018 (r341931) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:19:49 2018 (r341932) @@ -159,8 +159,6 @@ static const struct { MALLOC_DEFINE(M_MLX5EN, "MLX5EN", "MLX5 Ethernet"); -static SYSCTL_NODE(_hw, OID_AUTO, mlx5, CTLFLAG_RW, 0, "MLX5 driver parameters"); - static void mlx5e_update_carrier(struct mlx5e_priv *priv) { From owner-svn-src-all@freebsd.org Wed Dec 12 12:19:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B276F130B2B7; Wed, 12 Dec 2018 12:19:50 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 554798E7DC; Wed, 12 Dec 2018 12:19:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BB987CE6; Wed, 12 Dec 2018 12:19:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCJo5N074847; Wed, 12 Dec 2018 12:19:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCJn6J074836; Wed, 12 Dec 2018 12:19:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121219.wBCCJn6J074836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341931 - stable/11/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 554798E7DC X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:19:50 -0000 Author: hselasky Date: Wed Dec 12 12:19:49 2018 New Revision: 341931 URL: https://svnweb.freebsd.org/changeset/base/341931 Log: MFC r341559 and r341645: mlx5: Move hw.mlx5 node definition to mlx5_core. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:08:49 2018 (r341930) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:19:49 2018 (r341931) @@ -103,4 +103,6 @@ struct mlx5_crspace_regmap { extern struct pci_driver mlx5_core_driver; +SYSCTL_DECL(_hw_mlx5); + #endif /* __MLX5_CORE_H__ */ Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:08:49 2018 (r341930) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:19:49 2018 (r341931) @@ -61,6 +61,8 @@ static int prof_sel = MLX5_DEFAULT_PROF; module_param_named(prof_sel, prof_sel, int, 0444); MODULE_PARM_DESC(prof_sel, "profile selector. Valid range 0 - 2"); +SYSCTL_NODE(_hw, OID_AUTO, mlx5, CTLFLAG_RW, 0, "mlx5 HW controls"); + #define NUMA_NO_NODE -1 static LIST_HEAD(intf_list); From owner-svn-src-all@freebsd.org Wed Dec 12 12:22:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F132A130B65B; Wed, 12 Dec 2018 12:22:29 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 991248EDC3; Wed, 12 Dec 2018 12:22:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FF377E84; Wed, 12 Dec 2018 12:22:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCMTkb080000; Wed, 12 Dec 2018 12:22:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCMTuH079997; Wed, 12 Dec 2018 12:22:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121222.wBCCMTuH079997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341933 - in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 991248EDC3 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:22:30 -0000 Author: hselasky Date: Wed Dec 12 12:22:28 2018 New Revision: 341933 URL: https://svnweb.freebsd.org/changeset/base/341933 Log: MFC r341560: mlx5: Fix use-after-free in self-healing flow When the mlx5 health mechanism detects a problem while the driver is in the middle of init_one or remove_one, the driver needs to prevent the health mechanism from scheduling future work; if future work is scheduled, there is a problem with use-after-free: the system WQ tries to run the work item (which has been freed) at the scheduled future time. Prevent this by disabling work item scheduling in the health mechanism when the driver is in the middle of init_one() or remove_one(). Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/driver.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/driver.h ============================================================================== --- stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:19:49 2018 (r341932) +++ stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:22:28 2018 (r341933) @@ -923,7 +923,7 @@ void mlx5_unmap_free_uar(struct mlx5_core_dev *mdev, s void mlx5_health_cleanup(struct mlx5_core_dev *dev); int mlx5_health_init(struct mlx5_core_dev *dev); void mlx5_start_health_poll(struct mlx5_core_dev *dev); -void mlx5_stop_health_poll(struct mlx5_core_dev *dev); +void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health); void mlx5_drain_health_wq(struct mlx5_core_dev *dev); void mlx5_drain_health_recovery(struct mlx5_core_dev *dev); void mlx5_trigger_health_work(struct mlx5_core_dev *dev); Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:19:49 2018 (r341932) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:22:28 2018 (r341933) @@ -516,9 +516,17 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev) round_jiffies(jiffies + MLX5_HEALTH_POLL_INTERVAL)); } -void mlx5_stop_health_poll(struct mlx5_core_dev *dev) +void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health) { struct mlx5_core_health *health = &dev->priv.health; + unsigned long flags; + + if (disable_health) { + spin_lock_irqsave(&health->wq_lock, flags); + set_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags); + set_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags); + spin_unlock_irqrestore(&health->wq_lock, flags); + } del_timer_sync(&health->timer); } Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:19:49 2018 (r341932) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:22:28 2018 (r341933) @@ -1107,7 +1107,7 @@ err_cleanup_once: mlx5_cleanup_once(dev); err_stop_poll: - mlx5_stop_health_poll(dev); + mlx5_stop_health_poll(dev, boot); if (mlx5_cmd_teardown_hca(dev)) { device_printf((&dev->pdev->dev)->bsddev, "ERR: ""tear_down_hca failed, skip cleanup\n"); goto out_err; @@ -1159,7 +1159,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, mlx5_disable_msix(dev); if (cleanup) mlx5_cleanup_once(dev); - mlx5_stop_health_poll(dev); + mlx5_stop_health_poll(dev, cleanup); err = mlx5_cmd_teardown_hca(dev); if (err) { device_printf((&dev->pdev->dev)->bsddev, "ERR: ""tear_down_hca failed, skip cleanup\n"); @@ -1405,6 +1405,12 @@ static int mlx5_try_fast_unload(struct mlx5_core_dev * mlx5_core_dbg(dev, "Device in internal error state, giving up\n"); return -EAGAIN; } + + /* Panic tear down fw command will stop the PCI bus communication + * with the HCA, so the health polll is no longer needed. + */ + mlx5_drain_health_wq(dev); + mlx5_stop_health_poll(dev, false); err = mlx5_cmd_force_teardown_hca(dev); if (err) { From owner-svn-src-all@freebsd.org Wed Dec 12 12:22:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CD7A130B6B6; Wed, 12 Dec 2018 12:22:41 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 14DD78EECF; Wed, 12 Dec 2018 12:22:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 065C37E89; Wed, 12 Dec 2018 12:22:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCMe61080061; Wed, 12 Dec 2018 12:22:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCMeEv080057; Wed, 12 Dec 2018 12:22:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121222.wBCCMeEv080057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:22:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341934 - in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 14DD78EECF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:22:41 -0000 Author: hselasky Date: Wed Dec 12 12:22:40 2018 New Revision: 341934 URL: https://svnweb.freebsd.org/changeset/base/341934 Log: MFC r341560: mlx5: Fix use-after-free in self-healing flow When the mlx5 health mechanism detects a problem while the driver is in the middle of init_one or remove_one, the driver needs to prevent the health mechanism from scheduling future work; if future work is scheduled, there is a problem with use-after-free: the system WQ tries to run the work item (which has been freed) at the scheduled future time. Prevent this by disabling work item scheduling in the health mechanism when the driver is in the middle of init_one() or remove_one(). Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:22:28 2018 (r341933) +++ stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:22:40 2018 (r341934) @@ -897,7 +897,7 @@ void mlx5_unmap_free_uar(struct mlx5_core_dev *mdev, s void mlx5_health_cleanup(struct mlx5_core_dev *dev); int mlx5_health_init(struct mlx5_core_dev *dev); void mlx5_start_health_poll(struct mlx5_core_dev *dev); -void mlx5_stop_health_poll(struct mlx5_core_dev *dev); +void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health); void mlx5_drain_health_wq(struct mlx5_core_dev *dev); void mlx5_drain_health_recovery(struct mlx5_core_dev *dev); void mlx5_trigger_health_work(struct mlx5_core_dev *dev); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:22:28 2018 (r341933) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:22:40 2018 (r341934) @@ -516,9 +516,17 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev) round_jiffies(jiffies + MLX5_HEALTH_POLL_INTERVAL)); } -void mlx5_stop_health_poll(struct mlx5_core_dev *dev) +void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health) { struct mlx5_core_health *health = &dev->priv.health; + unsigned long flags; + + if (disable_health) { + spin_lock_irqsave(&health->wq_lock, flags); + set_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags); + set_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags); + spin_unlock_irqrestore(&health->wq_lock, flags); + } del_timer_sync(&health->timer); } Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:22:28 2018 (r341933) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:22:40 2018 (r341934) @@ -1089,7 +1089,7 @@ err_cleanup_once: mlx5_cleanup_once(dev); err_stop_poll: - mlx5_stop_health_poll(dev); + mlx5_stop_health_poll(dev, boot); if (mlx5_cmd_teardown_hca(dev)) { device_printf((&dev->pdev->dev)->bsddev, "ERR: ""tear_down_hca failed, skip cleanup\n"); goto out_err; @@ -1141,7 +1141,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, mlx5_disable_msix(dev); if (cleanup) mlx5_cleanup_once(dev); - mlx5_stop_health_poll(dev); + mlx5_stop_health_poll(dev, cleanup); err = mlx5_cmd_teardown_hca(dev); if (err) { device_printf((&dev->pdev->dev)->bsddev, "ERR: ""tear_down_hca failed, skip cleanup\n"); @@ -1387,6 +1387,12 @@ static int mlx5_try_fast_unload(struct mlx5_core_dev * mlx5_core_dbg(dev, "Device in internal error state, giving up\n"); return -EAGAIN; } + + /* Panic tear down fw command will stop the PCI bus communication + * with the HCA, so the health polll is no longer needed. + */ + mlx5_drain_health_wq(dev); + mlx5_stop_health_poll(dev, false); err = mlx5_cmd_force_teardown_hca(dev); if (err) { From owner-svn-src-all@freebsd.org Wed Dec 12 12:23:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAB33130B74A; Wed, 12 Dec 2018 12:23:35 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 91E288F054; Wed, 12 Dec 2018 12:23:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 870A17E8A; Wed, 12 Dec 2018 12:23:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCNZxq080171; Wed, 12 Dec 2018 12:23:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCNZRT080170; Wed, 12 Dec 2018 12:23:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121223.wBCCNZRT080170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341935 - stable/12/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91E288F054 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:23:36 -0000 Author: hselasky Date: Wed Dec 12 12:23:35 2018 New Revision: 341935 URL: https://svnweb.freebsd.org/changeset/base/341935 Log: MFC r341561: mlx5: Add global control to disable firmware reset, for all mlx5 devices. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:22:40 2018 (r341934) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:23:35 2018 (r341935) @@ -59,6 +59,11 @@ enum { MLX5_SENSOR_FW_SYND_RFR = 5, }; +static int mlx5_fw_reset_enable = 1; +SYSCTL_INT(_hw_mlx5, OID_AUTO, fw_reset_enable, CTLFLAG_RWTUN, + &mlx5_fw_reset_enable, 0, + "Enable firmware reset"); + static int lock_sem_sw_reset(struct mlx5_core_dev *dev) { int ret; @@ -180,10 +185,13 @@ static u32 check_fatal_sensors(struct mlx5_core_dev *d static void reset_fw_if_needed(struct mlx5_core_dev *dev) { - bool supported = (ioread32be(&dev->iseg->initializing) >> - MLX5_FW_RESET_SUPPORTED_OFFSET) & 1; + bool supported; u32 cmdq_addr, fatal_error; + if (!mlx5_fw_reset_enable) + return; + supported = (ioread32be(&dev->iseg->initializing) >> + MLX5_FW_RESET_SUPPORTED_OFFSET) & 1; if (!supported) return; From owner-svn-src-all@freebsd.org Wed Dec 12 12:23:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6D99130B7C4; Wed, 12 Dec 2018 12:23:57 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 5D0118F17E; Wed, 12 Dec 2018 12:23:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 529E77E8B; Wed, 12 Dec 2018 12:23:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCNvBb080228; Wed, 12 Dec 2018 12:23:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCNvL3080227; Wed, 12 Dec 2018 12:23:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121223.wBCCNvL3080227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341936 - stable/11/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5D0118F17E X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:23:57 -0000 Author: hselasky Date: Wed Dec 12 12:23:56 2018 New Revision: 341936 URL: https://svnweb.freebsd.org/changeset/base/341936 Log: MFC r341561: mlx5: Add global control to disable firmware reset, for all mlx5 devices. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:23:35 2018 (r341935) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:23:56 2018 (r341936) @@ -59,6 +59,11 @@ enum { MLX5_SENSOR_FW_SYND_RFR = 5, }; +static int mlx5_fw_reset_enable = 1; +SYSCTL_INT(_hw_mlx5, OID_AUTO, fw_reset_enable, CTLFLAG_RWTUN, + &mlx5_fw_reset_enable, 0, + "Enable firmware reset"); + static int lock_sem_sw_reset(struct mlx5_core_dev *dev) { int ret; @@ -180,10 +185,13 @@ static u32 check_fatal_sensors(struct mlx5_core_dev *d static void reset_fw_if_needed(struct mlx5_core_dev *dev) { - bool supported = (ioread32be(&dev->iseg->initializing) >> - MLX5_FW_RESET_SUPPORTED_OFFSET) & 1; + bool supported; u32 cmdq_addr, fatal_error; + if (!mlx5_fw_reset_enable) + return; + supported = (ioread32be(&dev->iseg->initializing) >> + MLX5_FW_RESET_SUPPORTED_OFFSET) & 1; if (!supported) return; From owner-svn-src-all@freebsd.org Wed Dec 12 12:25:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5920C130B896; Wed, 12 Dec 2018 12:25:01 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 F37868F301; Wed, 12 Dec 2018 12:25:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E61AC7E8D; Wed, 12 Dec 2018 12:25:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCP0Lt080359; Wed, 12 Dec 2018 12:25:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCP0E4080358; Wed, 12 Dec 2018 12:25:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121225.wBCCP0E4080358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341937 - in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F37868F301 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:25:01 -0000 Author: hselasky Date: Wed Dec 12 12:25:00 2018 New Revision: 341937 URL: https://svnweb.freebsd.org/changeset/base/341937 Log: MFC r341562: mlx5: Extend vector argument to u64. Else the MLX5_TRIGGERED_CMD_COMP flag will be masked away. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/driver.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/driver.h ============================================================================== --- stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:23:56 2018 (r341936) +++ stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:25:00 2018 (r341937) @@ -984,7 +984,7 @@ void mlx5_cq_completion(struct mlx5_core_dev *dev, u32 void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type); void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type); struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn); -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u32 vector); +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector); void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type); int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, int nent, u64 mask, const char *name, struct mlx5_uar *uar); Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:23:56 2018 (r341936) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:25:00 2018 (r341937) @@ -1179,10 +1179,12 @@ static void free_msg(struct mlx5_core_dev *dev, struct } } -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u32 vector) +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector_flags) { struct mlx5_cmd *cmd = &dev->cmd; struct mlx5_cmd_work_ent *ent; + bool triggered = (vector_flags & MLX5_TRIGGERED_CMD_COMP) ? 1 : 0; + u32 vector = vector_flags; /* discard flags in the upper dword */ int i; /* make sure data gets read from RAM */ @@ -1206,7 +1208,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, else ent->ret = 0; ent->status = ent->lay->status_own >> 1; - if (vector & MLX5_TRIGGERED_CMD_COMP) + if (triggered) ent->status = MLX5_DRIVER_STATUS_ABORTED; else ent->status = ent->lay->status_own >> 1; From owner-svn-src-all@freebsd.org Wed Dec 12 12:25:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43B3E130B8D8; Wed, 12 Dec 2018 12:25:11 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 CE9BA8F3E5; Wed, 12 Dec 2018 12:25:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 316B67E8E; Wed, 12 Dec 2018 12:25:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCP8kq080414; Wed, 12 Dec 2018 12:25:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCP7jS080412; Wed, 12 Dec 2018 12:25:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121225.wBCCP7jS080412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341938 - in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE9BA8F3E5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:25:11 -0000 Author: hselasky Date: Wed Dec 12 12:25:07 2018 New Revision: 341938 URL: https://svnweb.freebsd.org/changeset/base/341938 Log: MFC r341562: mlx5: Extend vector argument to u64. Else the MLX5_TRIGGERED_CMD_COMP flag will be masked away. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:25:00 2018 (r341937) +++ stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:25:07 2018 (r341938) @@ -958,7 +958,7 @@ void mlx5_cq_completion(struct mlx5_core_dev *dev, u32 void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type); void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type); struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn); -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u32 vector); +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector); void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type); int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, int nent, u64 mask, const char *name, struct mlx5_uar *uar); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:25:00 2018 (r341937) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:25:07 2018 (r341938) @@ -1179,10 +1179,12 @@ static void free_msg(struct mlx5_core_dev *dev, struct } } -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u32 vector) +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector_flags) { struct mlx5_cmd *cmd = &dev->cmd; struct mlx5_cmd_work_ent *ent; + bool triggered = (vector_flags & MLX5_TRIGGERED_CMD_COMP) ? 1 : 0; + u32 vector = vector_flags; /* discard flags in the upper dword */ int i; /* make sure data gets read from RAM */ @@ -1206,7 +1208,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, else ent->ret = 0; ent->status = ent->lay->status_own >> 1; - if (vector & MLX5_TRIGGERED_CMD_COMP) + if (triggered) ent->status = MLX5_DRIVER_STATUS_ABORTED; else ent->status = ent->lay->status_own >> 1; From owner-svn-src-all@freebsd.org Wed Dec 12 12:26:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45903130B997; Wed, 12 Dec 2018 12:26:02 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E0BE18F5B0; Wed, 12 Dec 2018 12:26:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6D427E8F; Wed, 12 Dec 2018 12:26:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCQ1ng080523; Wed, 12 Dec 2018 12:26:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCQ1ef080522; Wed, 12 Dec 2018 12:26:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121226.wBCCQ1ef080522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341939 - in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E0BE18F5B0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:26:02 -0000 Author: hselasky Date: Wed Dec 12 12:26:01 2018 New Revision: 341939 URL: https://svnweb.freebsd.org/changeset/base/341939 Log: MFC r341563: mlx5: Implement support for configuring PCIe packet write ordering via a sysctl. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_mr.c stable/12/sys/dev/mlx5/mlx5_ifc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_mr.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_mr.c Wed Dec 12 12:25:07 2018 (r341938) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_mr.c Wed Dec 12 12:26:01 2018 (r341939) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2018, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,6 +30,11 @@ #include #include "mlx5_core.h" +static int mlx5_relaxed_ordering_write; +SYSCTL_INT(_hw_mlx5, OID_AUTO, relaxed_ordering_write, CTLFLAG_RWTUN, + &mlx5_relaxed_ordering_write, 0, + "Set to enable relaxed ordering for PCIe writes"); + void mlx5_init_mr_table(struct mlx5_core_dev *dev) { struct mlx5_mr_table *table = &dev->priv.mr_table; @@ -63,6 +68,14 @@ int mlx5_core_create_mkey_cb(struct mlx5_core_dev *dev mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); MLX5_SET(create_mkey_in, in, opcode, MLX5_CMD_OP_CREATE_MKEY); MLX5_SET(mkc, mkc, mkey_7_0, key); + + if (mlx5_relaxed_ordering_write != 0) { + if (MLX5_CAP_GEN(dev, relaxed_ordering_write)) + MLX5_SET(mkc, mkc, relaxed_ordering_write, 1); + else + return (-EPROTONOSUPPORT); + } + if (callback) return mlx5_cmd_exec_cb(dev, in, inlen, out, outlen, callback, context); Modified: stable/12/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:25:07 2018 (r341938) +++ stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:26:01 2018 (r341939) @@ -933,7 +933,8 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 log_max_cq[0x5]; u8 log_max_eq_sz[0x8]; - u8 reserved_6[0x2]; + u8 relaxed_ordering_write[1]; + u8 reserved_6[0x1]; u8 log_max_mkey[0x6]; u8 reserved_7[0xc]; u8 log_max_eq[0x4]; @@ -2424,9 +2425,13 @@ enum { }; struct mlx5_ifc_mkc_bits { - u8 reserved_0[0x1]; + u8 reserved_at_0[0x1]; u8 free[0x1]; - u8 reserved_1[0xd]; + u8 reserved_at_2[0x1]; + u8 access_mode_4_2[0x3]; + u8 reserved_at_6[0x7]; + u8 relaxed_ordering_write[0x1]; + u8 reserved_at_e[0x1]; u8 small_fence_on_rdma_read_response[0x1]; u8 umr_en[0x1]; u8 a[0x1]; From owner-svn-src-all@freebsd.org Wed Dec 12 12:26:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91193130B9D8; Wed, 12 Dec 2018 12:26:08 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 277468F610; Wed, 12 Dec 2018 12:26:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5516A7E90; Wed, 12 Dec 2018 12:26:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCQ7WN080574; Wed, 12 Dec 2018 12:26:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCQ7HZ080572; Wed, 12 Dec 2018 12:26:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121226.wBCCQ7HZ080572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341940 - in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 277468F610 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:26:08 -0000 Author: hselasky Date: Wed Dec 12 12:26:06 2018 New Revision: 341940 URL: https://svnweb.freebsd.org/changeset/base/341940 Log: MFC r341563: mlx5: Implement support for configuring PCIe packet write ordering via a sysctl. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_mr.c stable/11/sys/dev/mlx5/mlx5_ifc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_mr.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_mr.c Wed Dec 12 12:26:01 2018 (r341939) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_mr.c Wed Dec 12 12:26:06 2018 (r341940) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2018, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,6 +30,11 @@ #include #include "mlx5_core.h" +static int mlx5_relaxed_ordering_write; +SYSCTL_INT(_hw_mlx5, OID_AUTO, relaxed_ordering_write, CTLFLAG_RWTUN, + &mlx5_relaxed_ordering_write, 0, + "Set to enable relaxed ordering for PCIe writes"); + void mlx5_init_mr_table(struct mlx5_core_dev *dev) { struct mlx5_mr_table *table = &dev->priv.mr_table; @@ -63,6 +68,14 @@ int mlx5_core_create_mkey_cb(struct mlx5_core_dev *dev mkc = MLX5_ADDR_OF(create_mkey_in, in, memory_key_mkey_entry); MLX5_SET(create_mkey_in, in, opcode, MLX5_CMD_OP_CREATE_MKEY); MLX5_SET(mkc, mkc, mkey_7_0, key); + + if (mlx5_relaxed_ordering_write != 0) { + if (MLX5_CAP_GEN(dev, relaxed_ordering_write)) + MLX5_SET(mkc, mkc, relaxed_ordering_write, 1); + else + return (-EPROTONOSUPPORT); + } + if (callback) return mlx5_cmd_exec_cb(dev, in, inlen, out, outlen, callback, context); Modified: stable/11/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:26:01 2018 (r341939) +++ stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:26:06 2018 (r341940) @@ -933,7 +933,8 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 log_max_cq[0x5]; u8 log_max_eq_sz[0x8]; - u8 reserved_6[0x2]; + u8 relaxed_ordering_write[1]; + u8 reserved_6[0x1]; u8 log_max_mkey[0x6]; u8 reserved_7[0xc]; u8 log_max_eq[0x4]; @@ -2424,9 +2425,13 @@ enum { }; struct mlx5_ifc_mkc_bits { - u8 reserved_0[0x1]; + u8 reserved_at_0[0x1]; u8 free[0x1]; - u8 reserved_1[0xd]; + u8 reserved_at_2[0x1]; + u8 access_mode_4_2[0x3]; + u8 reserved_at_6[0x7]; + u8 relaxed_ordering_write[0x1]; + u8 reserved_at_e[0x1]; u8 small_fence_on_rdma_read_response[0x1]; u8 umr_en[0x1]; u8 a[0x1]; From owner-svn-src-all@freebsd.org Wed Dec 12 12:27:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FF85130BAF0; Wed, 12 Dec 2018 12:27:01 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9B5298F855; Wed, 12 Dec 2018 12:27:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 112D77E91; Wed, 12 Dec 2018 12:27:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCQxDK080683; Wed, 12 Dec 2018 12:26:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCQxkQ080682; Wed, 12 Dec 2018 12:26:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121226.wBCCQxkQ080682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341941 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9B5298F855 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:27:01 -0000 Author: hselasky Date: Wed Dec 12 12:26:59 2018 New Revision: 341941 URL: https://svnweb.freebsd.org/changeset/base/341941 Log: MFC r341564: mlx5: Add software tx_jumbo_packets counter This counter will represent transmitted packets which has more than 1518 octets. The NIC has multiple hardware counters for counting transmitted packets larger than 1518 octets. Each counter counts the packets in specific range. We accumulate those counters to have a single counter. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:26:06 2018 (r341940) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:26:59 2018 (r341941) @@ -178,7 +178,8 @@ typedef void (mlx5e_cq_comp_t)(struct mlx5_core_cq *); m(+1, u64 tx_csum_offload, "tx_csum_offload", "Transmit checksum offload packets") \ m(+1, u64 tx_queue_dropped, "tx_queue_dropped", "Transmit queue dropped") \ m(+1, u64 tx_defragged, "tx_defragged", "Transmit queue defragged") \ - m(+1, u64 rx_wqe_err, "rx_wqe_err", "Receive WQE errors") + m(+1, u64 rx_wqe_err, "rx_wqe_err", "Receive WQE errors") \ + m(+1, u64 tx_jumbo_packets, "tx_jumbo_packets", "TX packets greater than 1518 octets") #define MLX5E_VPORT_STATS_NUM (0 MLX5E_VPORT_STATS(MLX5E_STATS_COUNT)) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:26:06 2018 (r341940) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:26:59 2018 (r341941) @@ -500,6 +500,12 @@ mlx5e_update_stats_work(struct work_struct *work) } } + s->tx_jumbo_packets = + priv->stats.port_stats_debug.p1519to2047octets + + priv->stats.port_stats_debug.p2048to4095octets + + priv->stats.port_stats_debug.p4096to8191octets + + priv->stats.port_stats_debug.p8192to10239octets; + /* update counters */ s->tso_packets = tso_packets; s->tso_bytes = tso_bytes; From owner-svn-src-all@freebsd.org Wed Dec 12 12:27:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B8AA130BB67; Wed, 12 Dec 2018 12:27:18 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D7C228F963; Wed, 12 Dec 2018 12:27:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAE687E92; Wed, 12 Dec 2018 12:27:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCRH79080746; Wed, 12 Dec 2018 12:27:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCRHEH080745; Wed, 12 Dec 2018 12:27:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121227.wBCCRHEH080745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341942 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D7C228F963 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:27:18 -0000 Author: hselasky Date: Wed Dec 12 12:27:17 2018 New Revision: 341942 URL: https://svnweb.freebsd.org/changeset/base/341942 Log: MFC r341564: mlx5: Add software tx_jumbo_packets counter This counter will represent transmitted packets which has more than 1518 octets. The NIC has multiple hardware counters for counting transmitted packets larger than 1518 octets. Each counter counts the packets in specific range. We accumulate those counters to have a single counter. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:26:59 2018 (r341941) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:27:17 2018 (r341942) @@ -177,7 +177,8 @@ typedef void (mlx5e_cq_comp_t)(struct mlx5_core_cq *); m(+1, u64 tx_csum_offload, "tx_csum_offload", "Transmit checksum offload packets") \ m(+1, u64 tx_queue_dropped, "tx_queue_dropped", "Transmit queue dropped") \ m(+1, u64 tx_defragged, "tx_defragged", "Transmit queue defragged") \ - m(+1, u64 rx_wqe_err, "rx_wqe_err", "Receive WQE errors") + m(+1, u64 rx_wqe_err, "rx_wqe_err", "Receive WQE errors") \ + m(+1, u64 tx_jumbo_packets, "tx_jumbo_packets", "TX packets greater than 1518 octets") #define MLX5E_VPORT_STATS_NUM (0 MLX5E_VPORT_STATS(MLX5E_STATS_COUNT)) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:26:59 2018 (r341941) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:27:17 2018 (r341942) @@ -500,6 +500,12 @@ mlx5e_update_stats_work(struct work_struct *work) } } + s->tx_jumbo_packets = + priv->stats.port_stats_debug.p1519to2047octets + + priv->stats.port_stats_debug.p2048to4095octets + + priv->stats.port_stats_debug.p4096to8191octets + + priv->stats.port_stats_debug.p8192to10239octets; + /* update counters */ s->tso_packets = tso_packets; s->tso_bytes = tso_bytes; From owner-svn-src-all@freebsd.org Wed Dec 12 12:28:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2435B130BC69; Wed, 12 Dec 2018 12:28:17 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 B62938FB0F; Wed, 12 Dec 2018 12:28:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A42657E93; Wed, 12 Dec 2018 12:28:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCSGXL080859; Wed, 12 Dec 2018 12:28:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCSGPE080858; Wed, 12 Dec 2018 12:28:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121228.wBCCSGPE080858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341943 - stable/12/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B62938FB0F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:28:17 -0000 Author: hselasky Date: Wed Dec 12 12:28:16 2018 New Revision: 341943 URL: https://svnweb.freebsd.org/changeset/base/341943 Log: MFC r341565: mlx5: Fix wrong size allocation for QoS ETC TC register The driver allocates wrong size (due to wrong struct name) when issuing a query/set request to NIC's register. Linux commit: d14fcb8d877caf1b8d6bd65d444bf62b21f2070c Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:27:17 2018 (r341942) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:28:16 2018 (r341943) @@ -810,7 +810,7 @@ int mlx5_query_port_cong_params(struct mlx5_core_dev * static int mlx5_query_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *out, int outlen) { - u32 in[MLX5_ST_SZ_DW(qtct_reg)]; + u32 in[MLX5_ST_SZ_DW(qetc_reg)]; if (!MLX5_CAP_GEN(mdev, ets)) return -ENOTSUPP; @@ -831,7 +831,7 @@ EXPORT_SYMBOL_GPL(mlx5_max_tc); static int mlx5_set_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *in, int inlen) { - u32 out[MLX5_ST_SZ_DW(qtct_reg)]; + u32 out[MLX5_ST_SZ_DW(qetc_reg)]; if (!MLX5_CAP_GEN(mdev, ets)) return -ENOTSUPP; From owner-svn-src-all@freebsd.org Wed Dec 12 12:28:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 472DF130BCB7; Wed, 12 Dec 2018 12:28:27 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D284D8FBDF; Wed, 12 Dec 2018 12:28:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 872147E94; Wed, 12 Dec 2018 12:28:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCSOvS080911; Wed, 12 Dec 2018 12:28:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCSOYY080910; Wed, 12 Dec 2018 12:28:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121228.wBCCSOYY080910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341944 - stable/11/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 341944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D284D8FBDF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:28:27 -0000 Author: hselasky Date: Wed Dec 12 12:28:24 2018 New Revision: 341944 URL: https://svnweb.freebsd.org/changeset/base/341944 Log: MFC r341565: mlx5: Fix wrong size allocation for QoS ETC TC register The driver allocates wrong size (due to wrong struct name) when issuing a query/set request to NIC's register. Linux commit: d14fcb8d877caf1b8d6bd65d444bf62b21f2070c Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:28:16 2018 (r341943) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:28:24 2018 (r341944) @@ -810,7 +810,7 @@ int mlx5_query_port_cong_params(struct mlx5_core_dev * static int mlx5_query_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *out, int outlen) { - u32 in[MLX5_ST_SZ_DW(qtct_reg)]; + u32 in[MLX5_ST_SZ_DW(qetc_reg)]; if (!MLX5_CAP_GEN(mdev, ets)) return -ENOTSUPP; @@ -831,7 +831,7 @@ EXPORT_SYMBOL_GPL(mlx5_max_tc); static int mlx5_set_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *in, int inlen) { - u32 out[MLX5_ST_SZ_DW(qtct_reg)]; + u32 out[MLX5_ST_SZ_DW(qetc_reg)]; if (!MLX5_CAP_GEN(mdev, ets)) return -ENOTSUPP; From owner-svn-src-all@freebsd.org Wed Dec 12 12:29:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B8F6130BD9B; Wed, 12 Dec 2018 12:29:24 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 B0D218FD9B; Wed, 12 Dec 2018 12:29:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94FEE7E96; Wed, 12 Dec 2018 12:29:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCTNH3081027; Wed, 12 Dec 2018 12:29:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCTM0S081024; Wed, 12 Dec 2018 12:29:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121229.wBCCTM0S081024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341945 - in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B0D218FD9B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.62 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.62)[-0.615,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:29:24 -0000 Author: hselasky Date: Wed Dec 12 12:29:22 2018 New Revision: 341945 URL: https://svnweb.freebsd.org/changeset/base/341945 Log: MFC r341566: mlx5: Fixes to allow command polling mode to exist alongside event mode. A command is either polling or event driven and the mode cannot change during execution of a command. Make sure the event handler only handle commands which are not polled. This is done by checking the command mode in the command handler before completing commands. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/driver.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/driver.h ============================================================================== --- stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:28:24 2018 (r341944) +++ stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:29:22 2018 (r341945) @@ -327,6 +327,11 @@ struct mlx5_traffic_counter { u64 octets; }; +enum mlx5_cmd_mode { + MLX5_CMD_MODE_POLLING, + MLX5_CMD_MODE_EVENTS +}; + struct mlx5_cmd_stats { u64 sum; u64 n; @@ -370,8 +375,9 @@ struct mlx5_cmd { struct workqueue_struct *wq; struct semaphore sem; struct semaphore pages_sem; - int mode; - struct mlx5_cmd_work_ent *ent_arr[MLX5_MAX_COMMANDS]; + enum mlx5_cmd_mode mode; + struct mlx5_cmd_work_ent * volatile ent_arr[MLX5_MAX_COMMANDS]; + volatile enum mlx5_cmd_mode ent_mode[MLX5_MAX_COMMANDS]; struct mlx5_cmd_debug dbg; struct cmd_msg_cache cache; int checksum_disabled; @@ -984,7 +990,7 @@ void mlx5_cq_completion(struct mlx5_core_dev *dev, u32 void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type); void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type); struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn); -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector); +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector, enum mlx5_cmd_mode mode); void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type); int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, int nent, u64 mask, const char *name, struct mlx5_uar *uar); Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:28:24 2018 (r341944) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:29:22 2018 (r341945) @@ -50,11 +50,6 @@ enum { }; enum { - CMD_MODE_POLLING, - CMD_MODE_EVENTS -}; - -enum { NUM_LONG_LISTS = 2, NUM_MED_LISTS = 64, LONG_LIST_SIZE = (2ULL * 1024 * 1024 * 1024 / PAGE_SIZE) * 8 + 16 + @@ -160,6 +155,8 @@ static int alloc_ent(struct mlx5_cmd_work_ent *ent) ent->busy = 1; ent->idx = ret; clear_bit(ent->idx, &cmd->bitmask); + cmd->ent_mode[ent->idx] = + ent->polling ? MLX5_CMD_MODE_POLLING : MLX5_CMD_MODE_EVENTS; cmd->ent_arr[ent->idx] = ent; } spin_unlock_irqrestore(&cmd->alloc_lock, flags); @@ -172,6 +169,8 @@ static void free_ent(struct mlx5_cmd *cmd, int idx) unsigned long flags; spin_lock_irqsave(&cmd->alloc_lock, flags); + cmd->ent_arr[idx] = NULL; /* safety clear */ + cmd->ent_mode[idx] = MLX5_CMD_MODE_POLLING; /* reset mode */ set_bit(idx, &cmd->bitmask); spin_unlock_irqrestore(&cmd->alloc_lock, flags); } @@ -786,7 +785,7 @@ static void cb_timeout_handler(struct work_struct *wor mlx5_core_warn(dev, "%s(0x%x) timeout. Will cause a leak of a command resource\n", mlx5_command_str(msg_to_opcode(ent->in)), msg_to_opcode(ent->in)); - mlx5_cmd_comp_handler(dev, 1UL << ent->idx); + mlx5_cmd_comp_handler(dev, 1UL << ent->idx, MLX5_CMD_MODE_EVENTS); } static void complete_command(struct mlx5_cmd_work_ent *ent) @@ -897,11 +896,12 @@ static void cmd_work_handler(struct work_struct *work) mlx5_fwp_flush(cmd->cmd_page); iowrite32be(1 << ent->idx, &dev->iseg->cmd_dbell); mmiowb(); - /* if not in polling don't use ent after this point*/ - if (cmd->mode == CMD_MODE_POLLING || poll_cmd) { + + /* if not in polling don't use ent after this point */ + if (poll_cmd) { poll_timeout(ent); /* make sure we read the descriptor after ownership is SW */ - mlx5_cmd_comp_handler(dev, 1U << ent->idx); + mlx5_cmd_comp_handler(dev, 1U << ent->idx, MLX5_CMD_MODE_POLLING); } } @@ -938,15 +938,13 @@ static const char *deliv_status_to_str(u8 status) static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent) { int timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC); - struct mlx5_cmd *cmd = &dev->cmd; int err; - if (cmd->mode == CMD_MODE_POLLING || ent->polling) { + if (ent->polling) { wait_for_completion(&ent->done); - err = ent->ret; } else if (!wait_for_completion_timeout(&ent->done, timeout)) { ent->ret = -ETIMEDOUT; - mlx5_cmd_comp_handler(dev, 1UL << ent->idx); + mlx5_cmd_comp_handler(dev, 1UL << ent->idx, MLX5_CMD_MODE_EVENTS); } err = ent->ret; @@ -988,7 +986,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, if (IS_ERR(ent)) return PTR_ERR(ent); - ent->polling = force_polling; + ent->polling = force_polling || (cmd->mode == MLX5_CMD_MODE_POLLING); if (!callback) init_completion(&ent->done); @@ -1158,12 +1156,12 @@ static void mlx5_cmd_change_mod(struct mlx5_core_dev * void mlx5_cmd_use_events(struct mlx5_core_dev *dev) { - mlx5_cmd_change_mod(dev, CMD_MODE_EVENTS); + mlx5_cmd_change_mod(dev, MLX5_CMD_MODE_EVENTS); } void mlx5_cmd_use_polling(struct mlx5_core_dev *dev) { - mlx5_cmd_change_mod(dev, CMD_MODE_POLLING); + mlx5_cmd_change_mod(dev, MLX5_CMD_MODE_POLLING); } static void free_msg(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *msg) @@ -1179,7 +1177,8 @@ static void free_msg(struct mlx5_core_dev *dev, struct } } -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector_flags) +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector_flags, + enum mlx5_cmd_mode cmd_mode) { struct mlx5_cmd *cmd = &dev->cmd; struct mlx5_cmd_work_ent *ent; @@ -1193,7 +1192,13 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, while (vector != 0) { i = ffs(vector) - 1; vector &= ~(1U << i); + /* check command mode */ + if (cmd->ent_mode[i] != cmd_mode) + continue; ent = cmd->ent_arr[i]; + /* check if command was already handled */ + if (ent == NULL) + continue; if (ent->callback) cancel_delayed_work(&ent->cb_timeout_work); ent->ts2 = ktime_get_ns(); @@ -1545,7 +1550,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev) mlx5_core_dbg(dev, "descriptor at dma 0x%llx\n", (unsigned long long)(cmd->dma)); - cmd->mode = CMD_MODE_POLLING; + cmd->mode = MLX5_CMD_MODE_POLLING; err = create_msg_cache(dev); if (err) { Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Dec 12 12:28:24 2018 (r341944) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Dec 12 12:29:22 2018 (r341945) @@ -254,8 +254,10 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, stru break; case MLX5_EVENT_TYPE_CMD: - if (dev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR) - mlx5_cmd_comp_handler(dev, be32_to_cpu(eqe->data.cmd.vector)); + if (dev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR) { + mlx5_cmd_comp_handler(dev, be32_to_cpu(eqe->data.cmd.vector), + MLX5_CMD_MODE_EVENTS); + } break; case MLX5_EVENT_TYPE_PORT_CHANGE: Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:28:24 2018 (r341944) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:29:22 2018 (r341945) @@ -141,7 +141,7 @@ static void mlx5_trigger_cmd_completions(struct mlx5_c spin_unlock_irqrestore(&dev->cmd.alloc_lock, flags); mlx5_core_dbg(dev, "vector 0x%jx\n", (uintmax_t)vector); - mlx5_cmd_comp_handler(dev, vector); + mlx5_cmd_comp_handler(dev, vector, MLX5_CMD_MODE_EVENTS); return; no_trig: From owner-svn-src-all@freebsd.org Wed Dec 12 12:29:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 422EA130BDF2; Wed, 12 Dec 2018 12:29:30 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 DC18E8FDEB; Wed, 12 Dec 2018 12:29:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EBA67E97; Wed, 12 Dec 2018 12:29:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCTTbb081080; Wed, 12 Dec 2018 12:29:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCTSMO081076; Wed, 12 Dec 2018 12:29:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121229.wBCCTSMO081076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341946 - in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 341946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DC18E8FDEB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.62 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.62)[-0.615,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:29:30 -0000 Author: hselasky Date: Wed Dec 12 12:29:28 2018 New Revision: 341946 URL: https://svnweb.freebsd.org/changeset/base/341946 Log: MFC r341566: mlx5: Fixes to allow command polling mode to exist alongside event mode. A command is either polling or event driven and the mode cannot change during execution of a command. Make sure the event handler only handle commands which are not polled. This is done by checking the command mode in the command handler before completing commands. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:29:22 2018 (r341945) +++ stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:29:28 2018 (r341946) @@ -325,6 +325,11 @@ struct mlx5_traffic_counter { u64 octets; }; +enum mlx5_cmd_mode { + MLX5_CMD_MODE_POLLING, + MLX5_CMD_MODE_EVENTS +}; + struct mlx5_cmd_stats { u64 sum; u64 n; @@ -368,8 +373,9 @@ struct mlx5_cmd { struct workqueue_struct *wq; struct semaphore sem; struct semaphore pages_sem; - int mode; - struct mlx5_cmd_work_ent *ent_arr[MLX5_MAX_COMMANDS]; + enum mlx5_cmd_mode mode; + struct mlx5_cmd_work_ent * volatile ent_arr[MLX5_MAX_COMMANDS]; + volatile enum mlx5_cmd_mode ent_mode[MLX5_MAX_COMMANDS]; struct mlx5_cmd_debug dbg; struct cmd_msg_cache cache; int checksum_disabled; @@ -958,7 +964,7 @@ void mlx5_cq_completion(struct mlx5_core_dev *dev, u32 void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type); void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type); struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn); -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector); +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector, enum mlx5_cmd_mode mode); void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type); int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, int nent, u64 mask, const char *name, struct mlx5_uar *uar); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:29:22 2018 (r341945) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Dec 12 12:29:28 2018 (r341946) @@ -50,11 +50,6 @@ enum { }; enum { - CMD_MODE_POLLING, - CMD_MODE_EVENTS -}; - -enum { NUM_LONG_LISTS = 2, NUM_MED_LISTS = 64, LONG_LIST_SIZE = (2ULL * 1024 * 1024 * 1024 / PAGE_SIZE) * 8 + 16 + @@ -160,6 +155,8 @@ static int alloc_ent(struct mlx5_cmd_work_ent *ent) ent->busy = 1; ent->idx = ret; clear_bit(ent->idx, &cmd->bitmask); + cmd->ent_mode[ent->idx] = + ent->polling ? MLX5_CMD_MODE_POLLING : MLX5_CMD_MODE_EVENTS; cmd->ent_arr[ent->idx] = ent; } spin_unlock_irqrestore(&cmd->alloc_lock, flags); @@ -172,6 +169,8 @@ static void free_ent(struct mlx5_cmd *cmd, int idx) unsigned long flags; spin_lock_irqsave(&cmd->alloc_lock, flags); + cmd->ent_arr[idx] = NULL; /* safety clear */ + cmd->ent_mode[idx] = MLX5_CMD_MODE_POLLING; /* reset mode */ set_bit(idx, &cmd->bitmask); spin_unlock_irqrestore(&cmd->alloc_lock, flags); } @@ -786,7 +785,7 @@ static void cb_timeout_handler(struct work_struct *wor mlx5_core_warn(dev, "%s(0x%x) timeout. Will cause a leak of a command resource\n", mlx5_command_str(msg_to_opcode(ent->in)), msg_to_opcode(ent->in)); - mlx5_cmd_comp_handler(dev, 1UL << ent->idx); + mlx5_cmd_comp_handler(dev, 1UL << ent->idx, MLX5_CMD_MODE_EVENTS); } static void complete_command(struct mlx5_cmd_work_ent *ent) @@ -897,11 +896,12 @@ static void cmd_work_handler(struct work_struct *work) mlx5_fwp_flush(cmd->cmd_page); iowrite32be(1 << ent->idx, &dev->iseg->cmd_dbell); mmiowb(); - /* if not in polling don't use ent after this point*/ - if (cmd->mode == CMD_MODE_POLLING || poll_cmd) { + + /* if not in polling don't use ent after this point */ + if (poll_cmd) { poll_timeout(ent); /* make sure we read the descriptor after ownership is SW */ - mlx5_cmd_comp_handler(dev, 1U << ent->idx); + mlx5_cmd_comp_handler(dev, 1U << ent->idx, MLX5_CMD_MODE_POLLING); } } @@ -938,15 +938,13 @@ static const char *deliv_status_to_str(u8 status) static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent) { int timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC); - struct mlx5_cmd *cmd = &dev->cmd; int err; - if (cmd->mode == CMD_MODE_POLLING || ent->polling) { + if (ent->polling) { wait_for_completion(&ent->done); - err = ent->ret; } else if (!wait_for_completion_timeout(&ent->done, timeout)) { ent->ret = -ETIMEDOUT; - mlx5_cmd_comp_handler(dev, 1UL << ent->idx); + mlx5_cmd_comp_handler(dev, 1UL << ent->idx, MLX5_CMD_MODE_EVENTS); } err = ent->ret; @@ -988,7 +986,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, if (IS_ERR(ent)) return PTR_ERR(ent); - ent->polling = force_polling; + ent->polling = force_polling || (cmd->mode == MLX5_CMD_MODE_POLLING); if (!callback) init_completion(&ent->done); @@ -1158,12 +1156,12 @@ static void mlx5_cmd_change_mod(struct mlx5_core_dev * void mlx5_cmd_use_events(struct mlx5_core_dev *dev) { - mlx5_cmd_change_mod(dev, CMD_MODE_EVENTS); + mlx5_cmd_change_mod(dev, MLX5_CMD_MODE_EVENTS); } void mlx5_cmd_use_polling(struct mlx5_core_dev *dev) { - mlx5_cmd_change_mod(dev, CMD_MODE_POLLING); + mlx5_cmd_change_mod(dev, MLX5_CMD_MODE_POLLING); } static void free_msg(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *msg) @@ -1179,7 +1177,8 @@ static void free_msg(struct mlx5_core_dev *dev, struct } } -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector_flags) +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector_flags, + enum mlx5_cmd_mode cmd_mode) { struct mlx5_cmd *cmd = &dev->cmd; struct mlx5_cmd_work_ent *ent; @@ -1193,7 +1192,13 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, while (vector != 0) { i = ffs(vector) - 1; vector &= ~(1U << i); + /* check command mode */ + if (cmd->ent_mode[i] != cmd_mode) + continue; ent = cmd->ent_arr[i]; + /* check if command was already handled */ + if (ent == NULL) + continue; if (ent->callback) cancel_delayed_work(&ent->cb_timeout_work); ent->ts2 = ktime_get_ns(); @@ -1545,7 +1550,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev) mlx5_core_dbg(dev, "descriptor at dma 0x%llx\n", (unsigned long long)(cmd->dma)); - cmd->mode = CMD_MODE_POLLING; + cmd->mode = MLX5_CMD_MODE_POLLING; err = create_msg_cache(dev); if (err) { Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Dec 12 12:29:22 2018 (r341945) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Dec 12 12:29:28 2018 (r341946) @@ -254,8 +254,10 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, stru break; case MLX5_EVENT_TYPE_CMD: - if (dev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR) - mlx5_cmd_comp_handler(dev, be32_to_cpu(eqe->data.cmd.vector)); + if (dev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR) { + mlx5_cmd_comp_handler(dev, be32_to_cpu(eqe->data.cmd.vector), + MLX5_CMD_MODE_EVENTS); + } break; case MLX5_EVENT_TYPE_PORT_CHANGE: Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:29:22 2018 (r341945) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Dec 12 12:29:28 2018 (r341946) @@ -141,7 +141,7 @@ static void mlx5_trigger_cmd_completions(struct mlx5_c spin_unlock_irqrestore(&dev->cmd.alloc_lock, flags); mlx5_core_dbg(dev, "vector 0x%jx\n", (uintmax_t)vector); - mlx5_cmd_comp_handler(dev, vector); + mlx5_cmd_comp_handler(dev, vector, MLX5_CMD_MODE_EVENTS); return; no_trig: From owner-svn-src-all@freebsd.org Wed Dec 12 12:30:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6678E130BF13; Wed, 12 Dec 2018 12:30:49 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 0832C9008A; Wed, 12 Dec 2018 12:30:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDC817EB0; Wed, 12 Dec 2018 12:30:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCUm2M081245; Wed, 12 Dec 2018 12:30:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCUmLF081239; Wed, 12 Dec 2018 12:30:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121230.wBCCUmLF081239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341947 - in stable/12/sys: compat/linuxkpi/common/src dev/mlx5/mlx5_core dev/mlx5/mlx5_en dev/mlx5/mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/src dev/mlx5/mlx5_core dev/mlx5/mlx5_en dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0832C9008A X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:30:49 -0000 Author: hselasky Date: Wed Dec 12 12:30:47 2018 New Revision: 341947 URL: https://svnweb.freebsd.org/changeset/base/341947 Log: MFC r341567: mlx5: Fix driver version location Driver description should be set by core and not by the Ethernet driver. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/src/linux_pci.c stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_pci.c Wed Dec 12 12:29:28 2018 (r341946) +++ stable/12/sys/compat/linuxkpi/common/src/linux_pci.c Wed Dec 12 12:30:47 2018 (r341947) @@ -199,6 +199,7 @@ linux_pci_detach(device_t dev) spin_lock(&pci_lock); list_del(&pdev->links); spin_unlock(&pci_lock); + device_set_desc(dev, NULL); put_device(&pdev->dev); return (0); Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:29:28 2018 (r341946) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:30:47 2018 (r341947) @@ -44,6 +44,8 @@ #include "mlx5_core.h" #include "fs_core.h" +static const char mlx5_version[] = "Mellanox Core driver " + DRIVER_VERSION " (" DRIVER_RELDATE ")"; MODULE_AUTHOR("Eli Cohen "); MODULE_DESCRIPTION("Mellanox Connect-IB, ConnectX-4 core driver"); MODULE_LICENSE("Dual BSD/GPL"); @@ -1219,6 +1221,9 @@ static int init_one(struct pci_dev *pdev, dev->profile = &profiles[prof_sel]; dev->pdev = pdev; dev->event = mlx5_core_event; + + /* Set desc */ + device_set_desc(bsddev, mlx5_version); sysctl_ctx_init(&dev->sysctl_ctx); SYSCTL_ADD_INT(&dev->sysctl_ctx, Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:29:28 2018 (r341946) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:30:47 2018 (r341947) @@ -34,8 +34,8 @@ #define ETH_DRIVER_VERSION "3.4.2" #endif -char mlx5e_version[] = "Mellanox Ethernet driver" - " (" ETH_DRIVER_VERSION ")"; +static const char mlx5e_version[] = "mlx5en: Mellanox Ethernet driver " + ETH_DRIVER_VERSION " (" DRIVER_RELDATE ")\n"; static int mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs); @@ -3685,9 +3685,6 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) /* set default MTU */ mlx5e_set_dev_port_mtu(ifp, ifp->if_mtu); - /* Set desc */ - device_set_desc(mdev->pdev->dev.bsddev, mlx5e_version); - /* Set default media status */ priv->media_status_last = IFM_AVALID; priv->media_active_last = IFM_ETHER | IFM_AUTO | @@ -3803,13 +3800,6 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp /* don't allow more IOCTLs */ priv->gone = 1; - /* - * Clear the device description to avoid use after free, - * because the bsddev is not destroyed when this module is - * unloaded: - */ - device_set_desc(mdev->pdev->dev.bsddev, NULL); - /* XXX wait a bit to allow IOCTL handlers to complete */ pause("W", hz); @@ -3894,6 +3884,14 @@ mlx5e_cleanup(void) { mlx5_unregister_interface(&mlx5e_interface); } + +static void +mlx5e_show_version(void __unused *arg) +{ + + printf("%s", mlx5e_version); +} +SYSINIT(mlx5e_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5e_show_version, NULL); module_init_order(mlx5e_init, SI_ORDER_THIRD); module_exit_order(mlx5e_cleanup, SI_ORDER_THIRD); Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:29:28 2018 (r341946) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:30:47 2018 (r341947) @@ -50,7 +50,7 @@ #include #include "mlx5_ib.h" -#define DRIVER_NAME "mlx5_ib" +#define DRIVER_NAME "mlx5ib" #ifndef DRIVER_VERSION #define DRIVER_VERSION "3.4.2" #endif @@ -2963,8 +2963,6 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) if ((ll == IB_LINK_LAYER_ETHERNET) && !MLX5_CAP_GEN(mdev, roce)) return NULL; - printk_once(KERN_INFO "%s", mlx5_version); - dev = (struct mlx5_ib_dev *)ib_alloc_device(sizeof(*dev)); if (!dev) return NULL; @@ -3258,6 +3256,14 @@ static void __exit mlx5_ib_cleanup(void) mlx5_unregister_interface(&mlx5_ib_interface); mlx5_ib_odp_cleanup(); } + +static void +mlx5_ib_show_version(void __unused *arg) +{ + + printf("%s", mlx5_version); +} +SYSINIT(mlx5_ib_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5_ib_show_version, NULL); module_init_order(mlx5_ib_init, SI_ORDER_THIRD); module_exit_order(mlx5_ib_cleanup, SI_ORDER_THIRD); From owner-svn-src-all@freebsd.org Wed Dec 12 12:30:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51BFF130BF4C; Wed, 12 Dec 2018 12:30:53 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E9D5A900A1; Wed, 12 Dec 2018 12:30:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAB937EB4; Wed, 12 Dec 2018 12:30:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCUqMY081294; Wed, 12 Dec 2018 12:30:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCUphf081290; Wed, 12 Dec 2018 12:30:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121230.wBCCUphf081290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341948 - in stable/11/sys: compat/linuxkpi/common/src dev/mlx5/mlx5_core dev/mlx5/mlx5_en dev/mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: compat/linuxkpi/common/src dev/mlx5/mlx5_core dev/mlx5/mlx5_en dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E9D5A900A1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.601,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:30:53 -0000 Author: hselasky Date: Wed Dec 12 12:30:51 2018 New Revision: 341948 URL: https://svnweb.freebsd.org/changeset/base/341948 Log: MFC r341567: mlx5: Fix driver version location Driver description should be set by core and not by the Ethernet driver. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/src/linux_pci.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_pci.c Wed Dec 12 12:30:47 2018 (r341947) +++ stable/11/sys/compat/linuxkpi/common/src/linux_pci.c Wed Dec 12 12:30:51 2018 (r341948) @@ -199,6 +199,7 @@ linux_pci_detach(device_t dev) spin_lock(&pci_lock); list_del(&pdev->links); spin_unlock(&pci_lock); + device_set_desc(dev, NULL); put_device(&pdev->dev); return (0); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:30:47 2018 (r341947) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:30:51 2018 (r341948) @@ -44,6 +44,8 @@ #include "mlx5_core.h" #include "fs_core.h" +static const char mlx5_version[] = "Mellanox Core driver " + DRIVER_VERSION " (" DRIVER_RELDATE ")"; MODULE_AUTHOR("Eli Cohen "); MODULE_DESCRIPTION("Mellanox Connect-IB, ConnectX-4 core driver"); MODULE_LICENSE("Dual BSD/GPL"); @@ -1201,6 +1203,9 @@ static int init_one(struct pci_dev *pdev, dev->profile = &profiles[prof_sel]; dev->pdev = pdev; dev->event = mlx5_core_event; + + /* Set desc */ + device_set_desc(bsddev, mlx5_version); sysctl_ctx_init(&dev->sysctl_ctx); SYSCTL_ADD_INT(&dev->sysctl_ctx, Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:30:47 2018 (r341947) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:30:51 2018 (r341948) @@ -34,8 +34,8 @@ #define ETH_DRIVER_VERSION "3.4.2" #endif -char mlx5e_version[] = "Mellanox Ethernet driver" - " (" ETH_DRIVER_VERSION ")"; +static const char mlx5e_version[] = "mlx5en: Mellanox Ethernet driver " + ETH_DRIVER_VERSION " (" DRIVER_RELDATE ")\n"; static int mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs); @@ -3557,9 +3557,6 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) /* set default MTU */ mlx5e_set_dev_port_mtu(ifp, ifp->if_mtu); - /* Set desc */ - device_set_desc(mdev->pdev->dev.bsddev, mlx5e_version); - /* Set default media status */ priv->media_status_last = IFM_AVALID; priv->media_active_last = IFM_ETHER | IFM_AUTO | @@ -3664,13 +3661,6 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp /* don't allow more IOCTLs */ priv->gone = 1; - /* - * Clear the device description to avoid use after free, - * because the bsddev is not destroyed when this module is - * unloaded: - */ - device_set_desc(mdev->pdev->dev.bsddev, NULL); - /* XXX wait a bit to allow IOCTL handlers to complete */ pause("W", hz); @@ -3738,6 +3728,14 @@ mlx5e_cleanup(void) { mlx5_unregister_interface(&mlx5e_interface); } + +static void +mlx5e_show_version(void __unused *arg) +{ + + printf("%s", mlx5e_version); +} +SYSINIT(mlx5e_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5e_show_version, NULL); module_init_order(mlx5e_init, SI_ORDER_THIRD); module_exit_order(mlx5e_cleanup, SI_ORDER_THIRD); Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:30:47 2018 (r341947) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:30:51 2018 (r341948) @@ -50,7 +50,7 @@ #include #include "mlx5_ib.h" -#define DRIVER_NAME "mlx5_ib" +#define DRIVER_NAME "mlx5ib" #ifndef DRIVER_VERSION #define DRIVER_VERSION "3.4.2" #endif @@ -2963,8 +2963,6 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) if ((ll == IB_LINK_LAYER_ETHERNET) && !MLX5_CAP_GEN(mdev, roce)) return NULL; - printk_once(KERN_INFO "%s", mlx5_version); - dev = (struct mlx5_ib_dev *)ib_alloc_device(sizeof(*dev)); if (!dev) return NULL; @@ -3259,6 +3257,14 @@ static void __exit mlx5_ib_cleanup(void) mlx5_unregister_interface(&mlx5_ib_interface); mlx5_ib_odp_cleanup(); } + +static void +mlx5_ib_show_version(void __unused *arg) +{ + + printf("%s", mlx5_version); +} +SYSINIT(mlx5_ib_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5_ib_show_version, NULL); module_init_order(mlx5_ib_init, SI_ORDER_THIRD); module_exit_order(mlx5_ib_cleanup, SI_ORDER_THIRD); From owner-svn-src-all@freebsd.org Wed Dec 12 12:31:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 587DC130C067; Wed, 12 Dec 2018 12:31:58 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 00FE9904F0; Wed, 12 Dec 2018 12:31:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAEDA7F06; Wed, 12 Dec 2018 12:31:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCVvki082359; Wed, 12 Dec 2018 12:31:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCVvCH082358; Wed, 12 Dec 2018 12:31:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121231.wBCCVvCH082358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341949 - stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 00FE9904F0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.59 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.59)[-0.587,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:31:58 -0000 Author: hselasky Date: Wed Dec 12 12:31:57 2018 New Revision: 341949 URL: https://svnweb.freebsd.org/changeset/base/341949 Log: MFC r341568: mlx5ib: Fix sign extension in mlx5_ib_query_device "fw_rev_min(dev->mdev)" with type "unsigned short" (16 bits, unsigned) is promoted in "fw_rev_min(dev->mdev) << 16" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "fw_rev_min(dev->mdev) << 16" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:30:51 2018 (r341948) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:31:57 2018 (r341949) @@ -605,7 +605,7 @@ static int mlx5_ib_query_device(struct ib_device *ibde return err; props->fw_ver = ((u64)fw_rev_maj(dev->mdev) << 32) | - (fw_rev_min(dev->mdev) << 16) | + ((u32)fw_rev_min(dev->mdev) << 16) | fw_rev_sub(dev->mdev); props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | IB_DEVICE_PORT_ACTIVE_EVENT | From owner-svn-src-all@freebsd.org Wed Dec 12 12:32:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C38A9130C0BA; Wed, 12 Dec 2018 12:32:15 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 6AEC490639; Wed, 12 Dec 2018 12:32:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 607DE8029; Wed, 12 Dec 2018 12:32:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCWFeW085634; Wed, 12 Dec 2018 12:32:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCWFN2085633; Wed, 12 Dec 2018 12:32:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121232.wBCCWFN2085633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341950 - stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6AEC490639 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:32:15 -0000 Author: hselasky Date: Wed Dec 12 12:32:14 2018 New Revision: 341950 URL: https://svnweb.freebsd.org/changeset/base/341950 Log: MFC r341568: mlx5ib: Fix sign extension in mlx5_ib_query_device "fw_rev_min(dev->mdev)" with type "unsigned short" (16 bits, unsigned) is promoted in "fw_rev_min(dev->mdev) << 16" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "fw_rev_min(dev->mdev) << 16" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:31:57 2018 (r341949) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:32:14 2018 (r341950) @@ -605,7 +605,7 @@ static int mlx5_ib_query_device(struct ib_device *ibde return err; props->fw_ver = ((u64)fw_rev_maj(dev->mdev) << 32) | - (fw_rev_min(dev->mdev) << 16) | + ((u32)fw_rev_min(dev->mdev) << 16) | fw_rev_sub(dev->mdev); props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | IB_DEVICE_PORT_ACTIVE_EVENT | From owner-svn-src-all@freebsd.org Wed Dec 12 12:33:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D981130C2E4; Wed, 12 Dec 2018 12:33:13 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E86E5907FB; Wed, 12 Dec 2018 12:33:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD57F8044; Wed, 12 Dec 2018 12:33:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCXC8E086584; Wed, 12 Dec 2018 12:33:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCXC3W086583; Wed, 12 Dec 2018 12:33:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121233.wBCCXC3W086583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341951 - stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E86E5907FB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:33:13 -0000 Author: hselasky Date: Wed Dec 12 12:33:12 2018 New Revision: 341951 URL: https://svnweb.freebsd.org/changeset/base/341951 Log: MFC r341569: mlx5ib: Fix null pointer dereference in mlx5_ib_create_srq Although "create_srq_user" does overwrite "in.pas" on some paths, it also contains at least one feasible path which does not overwrite it. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:32:14 2018 (r341950) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:33:12 2018 (r341951) @@ -287,7 +287,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, else err = create_srq_kernel(dev, srq, &in, buf_size); - if (err) { + if (err || !in.pas) { mlx5_ib_warn(dev, "create srq %s failed, err %d\n", pd->uobject ? "user" : "kernel", err); goto err_srq; From owner-svn-src-all@freebsd.org Wed Dec 12 12:33:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DF58130C331; Wed, 12 Dec 2018 12:33:19 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 DB9D490851; Wed, 12 Dec 2018 12:33:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 103588045; Wed, 12 Dec 2018 12:33:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCXHtm086634; Wed, 12 Dec 2018 12:33:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCXHLP086633; Wed, 12 Dec 2018 12:33:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121233.wBCCXHLP086633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341952 - stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DB9D490851 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:33:19 -0000 Author: hselasky Date: Wed Dec 12 12:33:17 2018 New Revision: 341952 URL: https://svnweb.freebsd.org/changeset/base/341952 Log: MFC r341569: mlx5ib: Fix null pointer dereference in mlx5_ib_create_srq Although "create_srq_user" does overwrite "in.pas" on some paths, it also contains at least one feasible path which does not overwrite it. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:33:12 2018 (r341951) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c Wed Dec 12 12:33:17 2018 (r341952) @@ -287,7 +287,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, else err = create_srq_kernel(dev, srq, &in, buf_size); - if (err) { + if (err || !in.pas) { mlx5_ib_warn(dev, "create srq %s failed, err %d\n", pd->uobject ? "user" : "kernel", err); goto err_srq; From owner-svn-src-all@freebsd.org Wed Dec 12 12:34:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82858130C461; Wed, 12 Dec 2018 12:34:31 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 276FC90AAD; Wed, 12 Dec 2018 12:34:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D1698048; Wed, 12 Dec 2018 12:34:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCYUAh086755; Wed, 12 Dec 2018 12:34:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCYUUD086754; Wed, 12 Dec 2018 12:34:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121234.wBCCYUUD086754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341953 - stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 276FC90AAD X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:34:31 -0000 Author: hselasky Date: Wed Dec 12 12:34:30 2018 New Revision: 341953 URL: https://svnweb.freebsd.org/changeset/base/341953 Log: MFC r341570: mlx5ib: Make sure the congestion work timer does not escape the drain procedure. If the mlx5_ib_read_cong_stats() function was running when mlx5ib was unloaded, because this function unconditionally restarts the timer, the timer can still be pending after the delayed work has been cancelled. To fix this simply loop on the delayed work cancel procedure as long as it returns non-zero. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 12 12:33:17 2018 (r341952) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 12 12:34:30 2018 (r341953) @@ -393,7 +393,8 @@ void mlx5_ib_cleanup_congestion(struct mlx5_ib_dev *dev) { - cancel_delayed_work_sync(&dev->congestion.dwork); + while (cancel_delayed_work_sync(&dev->congestion.dwork)) + ; sysctl_ctx_free(&dev->congestion.ctx); sx_destroy(&dev->congestion.lock); } From owner-svn-src-all@freebsd.org Wed Dec 12 12:34:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FE92130C4AE; Wed, 12 Dec 2018 12:34:36 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 4613290ACA; Wed, 12 Dec 2018 12:34:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A963804A; Wed, 12 Dec 2018 12:34:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCYaSu086805; Wed, 12 Dec 2018 12:34:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCYacu086804; Wed, 12 Dec 2018 12:34:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121234.wBCCYacu086804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341954 - stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4613290ACA X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:34:36 -0000 Author: hselasky Date: Wed Dec 12 12:34:35 2018 New Revision: 341954 URL: https://svnweb.freebsd.org/changeset/base/341954 Log: MFC r341570: mlx5ib: Make sure the congestion work timer does not escape the drain procedure. If the mlx5_ib_read_cong_stats() function was running when mlx5ib was unloaded, because this function unconditionally restarts the timer, the timer can still be pending after the delayed work has been cancelled. To fix this simply loop on the delayed work cancel procedure as long as it returns non-zero. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 12 12:34:30 2018 (r341953) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Wed Dec 12 12:34:35 2018 (r341954) @@ -393,7 +393,8 @@ void mlx5_ib_cleanup_congestion(struct mlx5_ib_dev *dev) { - cancel_delayed_work_sync(&dev->congestion.dwork); + while (cancel_delayed_work_sync(&dev->congestion.dwork)) + ; sysctl_ctx_free(&dev->congestion.ctx); sx_destroy(&dev->congestion.lock); } From owner-svn-src-all@freebsd.org Wed Dec 12 12:35:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 991FB130C58E; Wed, 12 Dec 2018 12:35:34 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 4033390D8E; Wed, 12 Dec 2018 12:35:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3613B804B; Wed, 12 Dec 2018 12:35:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCZY4Y086931; Wed, 12 Dec 2018 12:35:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCZYwa086930; Wed, 12 Dec 2018 12:35:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121235.wBCCZYwa086930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341955 - stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4033390D8E X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:35:34 -0000 Author: hselasky Date: Wed Dec 12 12:35:33 2018 New Revision: 341955 URL: https://svnweb.freebsd.org/changeset/base/341955 Log: MFC r341571: mlx5ib: Set default active width and speed when querying port. Make sure the active width and speed is set in case the translate_eth_proto_oper() function doesn't recognize the current port operation mask. Linux commit: 7672ed33c4c15dbe9d56880683baaba4227cf940 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:34:35 2018 (r341954) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:35:33 2018 (r341955) @@ -219,6 +219,8 @@ static int translate_eth_proto_oper(u32 eth_proto_oper *active_speed = IB_SPEED_EDR; break; default: + *active_width = IB_WIDTH_4X; + *active_speed = IB_SPEED_QDR; return -EINVAL; } From owner-svn-src-all@freebsd.org Wed Dec 12 12:35:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A4D4130C622; Wed, 12 Dec 2018 12:35:52 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 3E26F90EDA; Wed, 12 Dec 2018 12:35:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33FBF804D; Wed, 12 Dec 2018 12:35:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCZp65086987; Wed, 12 Dec 2018 12:35:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCZpaH086986; Wed, 12 Dec 2018 12:35:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121235.wBCCZpaH086986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:35:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341956 - stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 341956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E26F90EDA X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:35:52 -0000 Author: hselasky Date: Wed Dec 12 12:35:51 2018 New Revision: 341956 URL: https://svnweb.freebsd.org/changeset/base/341956 Log: MFC r341571: mlx5ib: Set default active width and speed when querying port. Make sure the active width and speed is set in case the translate_eth_proto_oper() function doesn't recognize the current port operation mask. Linux commit: 7672ed33c4c15dbe9d56880683baaba4227cf940 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:35:33 2018 (r341955) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 12:35:51 2018 (r341956) @@ -219,6 +219,8 @@ static int translate_eth_proto_oper(u32 eth_proto_oper *active_speed = IB_SPEED_EDR; break; default: + *active_width = IB_WIDTH_4X; + *active_speed = IB_SPEED_QDR; return -EINVAL; } From owner-svn-src-all@freebsd.org Wed Dec 12 12:46:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 771C6130CBAF; Wed, 12 Dec 2018 12:46:14 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 1AE0A91584; Wed, 12 Dec 2018 12:46:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E572481FA; Wed, 12 Dec 2018 12:46:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCkDvK092148; Wed, 12 Dec 2018 12:46:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCkBT9092100; Wed, 12 Dec 2018 12:46:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121246.wBCCkBT9092100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341957 - in stable/12/sys: conf dev/mlx5 dev/mlx5/mlx5_accel dev/mlx5/mlx5_core dev/mlx5/mlx5_fpga dev/mlx5/mlx5_lib modules/mlx5 modules/mlx5en modules/mlx5ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys: conf dev/mlx5 dev/mlx5/mlx5_accel dev/mlx5/mlx5_core dev/mlx5/mlx5_fpga dev/mlx5/mlx5_lib modules/mlx5 modules/mlx5en modules/mlx5ib X-SVN-Commit-Revision: 341957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1AE0A91584 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:46:14 -0000 Author: hselasky Date: Wed Dec 12 12:46:11 2018 New Revision: 341957 URL: https://svnweb.freebsd.org/changeset/base/341957 Log: MFC r341572 and r341590: mlx5fpga: Initial code import. Submitted by: kib@ Sponsored by: Mellanox Technologies Added: stable/12/sys/dev/mlx5/mlx5_accel/ - copied from r341572, head/sys/dev/mlx5/mlx5_accel/ stable/12/sys/dev/mlx5/mlx5_fpga/ - copied from r341572, head/sys/dev/mlx5/mlx5_fpga/ stable/12/sys/dev/mlx5/mlx5_lib/ - copied from r341572, head/sys/dev/mlx5/mlx5_lib/ Modified: stable/12/sys/conf/files stable/12/sys/dev/mlx5/device.h stable/12/sys/dev/mlx5/driver.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c stable/12/sys/dev/mlx5/mlx5_core/wq.h stable/12/sys/dev/mlx5/mlx5_ifc.h stable/12/sys/dev/mlx5/mlx5io.h stable/12/sys/modules/mlx5/Makefile stable/12/sys/modules/mlx5en/Makefile stable/12/sys/modules/mlx5ib/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/conf/files Wed Dec 12 12:46:11 2018 (r341957) @@ -4792,6 +4792,8 @@ dev/mlx5/mlx5_core/mlx5_vsc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_lib/mlx5_gid.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" Modified: stable/12/sys/dev/mlx5/device.h ============================================================================== --- stable/12/sys/dev/mlx5/device.h Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/dev/mlx5/device.h Wed Dec 12 12:46:11 2018 (r341957) @@ -1034,6 +1034,12 @@ enum mlx5_qcam_feature_groups { #define MLX5_CAP_QCAM_FEATURE(mdev, fld) \ MLX5_GET(qcam_reg, (mdev)->caps.qcam, qos_feature_cap_mask.feature_cap.fld) +#define MLX5_CAP_FPGA(mdev, cap) \ + MLX5_GET(fpga_cap, (mdev)->caps.fpga, cap) + +#define MLX5_CAP64_FPGA(mdev, cap) \ + MLX5_GET64(fpga_cap, (mdev)->caps.fpga, cap) + enum { MLX5_CMD_STAT_OK = 0x0, MLX5_CMD_STAT_INT_ERR = 0x1, Modified: stable/12/sys/dev/mlx5/driver.h ============================================================================== --- stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:46:11 2018 (r341957) @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -131,6 +132,10 @@ enum { MLX5_REG_DCBX_PARAM = 0x4020, MLX5_REG_DCBX_APP = 0x4021, MLX5_REG_PCAP = 0x5001, + MLX5_REG_FPGA_CAP = 0x4022, + MLX5_REG_FPGA_CTRL = 0x4023, + MLX5_REG_FPGA_ACCESS_REG = 0x4024, + MLX5_REG_FPGA_SHELL_CNTR = 0x4025, MLX5_REG_PMTU = 0x5003, MLX5_REG_PTYS = 0x5004, MLX5_REG_PAOS = 0x5006, @@ -404,6 +409,13 @@ struct mlx5_buf { u8 load_done; }; +struct mlx5_frag_buf { + struct mlx5_buf_list *frags; + int npages; + int size; + u8 page_shift; +}; + struct mlx5_eq { struct mlx5_core_dev *dev; __be32 __iomem *doorbell; @@ -442,6 +454,20 @@ struct mlx5_core_sig_ctx { u32 sigerr_count; }; +enum { + MLX5_MKEY_MR = 1, + MLX5_MKEY_MW, + MLX5_MKEY_MR_USER, +}; + +struct mlx5_core_mkey { + u64 iova; + u64 size; + u32 key; + u32 pd; + u32 type; +}; + struct mlx5_core_mr { u64 iova; u64 size; @@ -645,6 +671,14 @@ enum mlx5_pci_status { MLX5_PCI_STATUS_ENABLED, }; +#define MLX5_MAX_RESERVED_GIDS 8 + +struct mlx5_rsvd_gids { + unsigned int start; + unsigned int count; + struct ida ida; +}; + struct mlx5_special_contexts { int resd_lkey; }; @@ -663,6 +697,7 @@ struct mlx5_core_dev { u32 hca_caps_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; struct { u32 qcam[MLX5_ST_SZ_DW(qcam_reg)]; + u32 fpga[MLX5_ST_SZ_DW(fpga_cap)]; } caps; phys_addr_t iseg_base; struct mlx5_init_seg __iomem *iseg; @@ -691,6 +726,14 @@ struct mlx5_core_dev { struct sysctl_ctx_list sysctl_ctx; int msix_eqvec; + + struct { + struct mlx5_rsvd_gids reserved_gids; + atomic_t roce_en; + } roce; +#ifdef CONFIG_MLX5_FPGA + struct mlx5_fpga_device *fpga; +#endif }; enum { @@ -1105,6 +1148,11 @@ struct mlx5_interface { void *mlx5_get_protocol_dev(struct mlx5_core_dev *mdev, int protocol); int mlx5_register_interface(struct mlx5_interface *intf); void mlx5_unregister_interface(struct mlx5_interface *intf); + +unsigned int mlx5_core_reserved_gids_count(struct mlx5_core_dev *dev); +int mlx5_core_roce_gid_set(struct mlx5_core_dev *dev, unsigned int index, + u8 roce_version, u8 roce_l3_type, const u8 *gid, + const u8 *mac, bool vlan, u16 vlan_id); struct mlx5_profile { u64 mask; Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:46:11 2018 (r341957) @@ -85,6 +85,9 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, void mlx5_disable_device(struct mlx5_core_dev *dev); void mlx5_recover_device(struct mlx5_core_dev *dev); +int mlx5_register_device(struct mlx5_core_dev *dev); +void mlx5_unregister_device(struct mlx5_core_dev *dev); + void mlx5e_init(void); void mlx5e_cleanup(void); Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:46:11 2018 (r341957) @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include "mlx5_core.h" #include "fs_core.h" @@ -734,7 +736,8 @@ static void mlx5_remove_device(struct mlx5_interface * } } -static int mlx5_register_device(struct mlx5_core_dev *dev) +int +mlx5_register_device(struct mlx5_core_dev *dev) { struct mlx5_priv *priv = &dev->priv; struct mlx5_interface *intf; @@ -748,7 +751,8 @@ static int mlx5_register_device(struct mlx5_core_dev * return 0; } -static void mlx5_unregister_device(struct mlx5_core_dev *dev) +void +mlx5_unregister_device(struct mlx5_core_dev *dev) { struct mlx5_priv *priv = &dev->priv; struct mlx5_interface *intf; @@ -912,6 +916,9 @@ static int mlx5_init_once(struct mlx5_core_dev *dev, s mlx5_init_srq_table(dev); mlx5_init_mr_table(dev); + mlx5_init_reserved_gids(dev); + mlx5_fpga_init(dev); + #ifdef RATELIMIT err = mlx5_init_rl_table(dev); if (err) { @@ -941,6 +948,8 @@ static void mlx5_cleanup_once(struct mlx5_core_dev *de #ifdef RATELIMIT mlx5_cleanup_rl_table(dev); #endif + mlx5_fpga_cleanup(dev); + mlx5_cleanup_reserved_gids(dev); mlx5_cleanup_mr_table(dev); mlx5_cleanup_srq_table(dev); mlx5_cleanup_qp_table(dev); @@ -1075,6 +1084,12 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, st goto err_free_comp_eqs; } + err = mlx5_fpga_device_start(dev); + if (err) { + dev_err(&pdev->dev, "fpga device start failed %d\n", err); + goto err_fpga_start; + } + err = mlx5_register_device(dev); if (err) { dev_err(&pdev->dev, "mlx5_register_device failed %d\n", err); @@ -1088,6 +1103,7 @@ out: mutex_unlock(&dev->intf_state_mutex); return 0; +err_fpga_start: err_fs: mlx5_cleanup_fs(dev); @@ -1152,6 +1168,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, mlx5_unregister_device(dev); + mlx5_fpga_device_stop(dev); mlx5_cleanup_fs(dev); unmap_bf_area(dev); mlx5_wait_for_reclaim_vfs_pages(dev); Modified: stable/12/sys/dev/mlx5/mlx5_core/wq.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/wq.h Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/dev/mlx5/mlx5_core/wq.h Wed Dec 12 12:46:11 2018 (r341957) @@ -42,11 +42,22 @@ struct mlx5_wq_ctrl { struct mlx5_db db; }; +struct mlx5_frag_wq_ctrl { + struct mlx5_core_dev *mdev; + struct mlx5_frag_buf frag_buf; + struct mlx5_db db; +}; + struct mlx5_wq_cyc { void *buf; __be32 *db; u16 sz_m1; u8 log_stride; +}; + +struct mlx5_wq_qp { + struct mlx5_wq_cyc rq; + struct mlx5_wq_cyc sq; }; struct mlx5_cqwq { Modified: stable/12/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:46:11 2018 (r341957) @@ -28,6 +28,8 @@ #ifndef MLX5_IFC_H #define MLX5_IFC_H +#include + enum { MLX5_EVENT_TYPE_COMP = 0x0, MLX5_EVENT_TYPE_PATH_MIG = 0x1, @@ -58,7 +60,9 @@ enum { MLX5_EVENT_TYPE_DROPPED_PACKET_LOGGED_EVENT = 0x1f, MLX5_EVENT_TYPE_CMD = 0xa, MLX5_EVENT_TYPE_PAGE_REQUEST = 0xb, - MLX5_EVENT_TYPE_NIC_VPORT_CHANGE = 0xd + MLX5_EVENT_TYPE_NIC_VPORT_CHANGE = 0xd, + MLX5_EVENT_TYPE_FPGA_ERROR = 0x20, + MLX5_EVENT_TYPE_FPGA_QP_ERROR = 0x21, }; enum { @@ -242,6 +246,11 @@ enum { MLX5_CMD_OP_MODIFY_FLOW_TABLE = 0x93c, MLX5_CMD_OP_ALLOC_ENCAP_HEADER = 0x93d, MLX5_CMD_OP_DEALLOC_ENCAP_HEADER = 0x93e, + MLX5_CMD_OP_FPGA_CREATE_QP = 0x960, + MLX5_CMD_OP_FPGA_MODIFY_QP = 0x961, + MLX5_CMD_OP_FPGA_QUERY_QP = 0x962, + MLX5_CMD_OP_FPGA_DESTROY_QP = 0x963, + MLX5_CMD_OP_FPGA_QUERY_QP_COUNTERS = 0x964, }; enum { @@ -998,7 +1007,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 max_tc[0x4]; u8 temp_warn_event[0x1]; u8 dcbx[0x1]; - u8 reserved_22[0x4]; + u8 general_notification_event[0x1]; + u8 reserved_at_1d3[0x2]; + u8 fpga[0x1]; u8 rol_s[0x1]; u8 rol_g[0x1]; u8 reserved_23[0x1]; Modified: stable/12/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:46:11 2018 (r341957) @@ -57,4 +57,44 @@ struct mlx5_fwdump_get { #define MLX5_DEV_PATH _PATH_DEV"mlx5ctl" #endif +enum mlx5_fpga_id { + MLX5_FPGA_NEWTON = 0, + MLX5_FPGA_EDISON = 1, + MLX5_FPGA_MORSE = 2, +}; + +enum mlx5_fpga_image { + MLX5_FPGA_IMAGE_USER = 0, + MLX5_FPGA_IMAGE_FACTORY = 1, + MLX5_FPGA_IMAGE_MAX = MLX5_FPGA_IMAGE_FACTORY, + MLX5_FPGA_IMAGE_FACTORY_FAILOVER = 2, +}; + +enum mlx5_fpga_status { + MLX5_FPGA_STATUS_SUCCESS = 0, + MLX5_FPGA_STATUS_FAILURE = 1, + MLX5_FPGA_STATUS_IN_PROGRESS = 2, + MLX5_FPGA_STATUS_DISCONNECTED = 3, +}; + +struct mlx5_fpga_query { + enum mlx5_fpga_image admin_image; + enum mlx5_fpga_image oper_image; + enum mlx5_fpga_status image_status; +}; + +/** + * enum mlx5_fpga_access_type - Enumerated the different methods possible for + * accessing the device memory address space + */ +enum mlx5_fpga_access_type { + /** Use the slow CX-FPGA I2C bus*/ + MLX5_FPGA_ACCESS_TYPE_I2C = 0x0, + /** Use the fast 'shell QP' */ + MLX5_FPGA_ACCESS_TYPE_RDMA, + /** Use the fastest available method */ + MLX5_FPGA_ACCESS_TYPE_DONTCARE, + MLX5_FPGA_ACCESS_TYPE_MAX = MLX5_FPGA_ACCESS_TYPE_DONTCARE, +}; + #endif Modified: stable/12/sys/modules/mlx5/Makefile ============================================================================== --- stable/12/sys/modules/mlx5/Makefile Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/modules/mlx5/Makefile Wed Dec 12 12:46:11 2018 (r341957) @@ -1,5 +1,7 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_core +.PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_core \ + ${SRCTOP}/sys/dev/mlx5/mlx5_lib \ + ${SRCTOP}/sys/dev/mlx5/mlx5_fpga KMOD=mlx5 SRCS= \ @@ -29,11 +31,22 @@ mlx5_uar.c \ mlx5_vport.c \ mlx5_vsc.c \ mlx5_wq.c \ +mlx5_gid.c \ device_if.h bus_if.h vnode_if.h pci_if.h \ opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include + +.if defined(CONFIG_BUILD_FPGA) +SRCS+= \ + mlx5fpga_cmd.c \ + mlx5fpga_core.c \ + mlx5fpga_sdk.c \ + mlx5fpga_trans.c \ + mlx5fpga_xfer.c \ + mlx5fpga_ipsec.c +.endif .include Modified: stable/12/sys/modules/mlx5en/Makefile ============================================================================== --- stable/12/sys/modules/mlx5en/Makefile Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/modules/mlx5en/Makefile Wed Dec 12 12:46:11 2018 (r341957) @@ -21,6 +21,10 @@ CFLAGS+= -DHAVE_PER_CQ_EVENT_PACKET CFLAGS+= -DHAVE_TCP_LRO_RX .endif +.if defined(CONFIG_BUILD_FPGA) +CFLAGS+= -DCONFIG_MLX5_FPGA +.endif + CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include Modified: stable/12/sys/modules/mlx5ib/Makefile ============================================================================== --- stable/12/sys/modules/mlx5ib/Makefile Wed Dec 12 12:35:51 2018 (r341956) +++ stable/12/sys/modules/mlx5ib/Makefile Wed Dec 12 12:46:11 2018 (r341957) @@ -23,6 +23,10 @@ CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM +.if defined(CONFIG_BUILD_FPGA) +CFLAGS+= -DCONFIG_MLX5_FPGA +.endif + .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} From owner-svn-src-all@freebsd.org Wed Dec 12 12:46:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17D7F130CBBD; Wed, 12 Dec 2018 12:46:16 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 B3CE691586; Wed, 12 Dec 2018 12:46:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A3B981FB; Wed, 12 Dec 2018 12:46:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCkF2Q092166; Wed, 12 Dec 2018 12:46:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCkDDp092142; Wed, 12 Dec 2018 12:46:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121246.wBCCkDDp092142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341958 - in stable/11/sys: conf dev/mlx5 dev/mlx5/mlx5_accel dev/mlx5/mlx5_core dev/mlx5/mlx5_fpga dev/mlx5/mlx5_lib modules/mlx5 modules/mlx5en modules/mlx5ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: conf dev/mlx5 dev/mlx5/mlx5_accel dev/mlx5/mlx5_core dev/mlx5/mlx5_fpga dev/mlx5/mlx5_lib modules/mlx5 modules/mlx5en modules/mlx5ib X-SVN-Commit-Revision: 341958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B3CE691586 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:46:16 -0000 Author: hselasky Date: Wed Dec 12 12:46:12 2018 New Revision: 341958 URL: https://svnweb.freebsd.org/changeset/base/341958 Log: MFC r341572 and r341590: mlx5fpga: Initial code import. Submitted by: kib@ Sponsored by: Mellanox Technologies Added: stable/11/sys/dev/mlx5/mlx5_accel/ - copied from r341572, head/sys/dev/mlx5/mlx5_accel/ stable/11/sys/dev/mlx5/mlx5_fpga/ - copied from r341572, head/sys/dev/mlx5/mlx5_fpga/ stable/11/sys/dev/mlx5/mlx5_lib/ - copied from r341572, head/sys/dev/mlx5/mlx5_lib/ Modified: stable/11/sys/conf/files stable/11/sys/dev/mlx5/device.h stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c stable/11/sys/dev/mlx5/mlx5_core/wq.h stable/11/sys/dev/mlx5/mlx5_ifc.h stable/11/sys/dev/mlx5/mlx5io.h stable/11/sys/modules/mlx5/Makefile stable/11/sys/modules/mlx5en/Makefile stable/11/sys/modules/mlx5ib/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/conf/files Wed Dec 12 12:46:12 2018 (r341958) @@ -4591,6 +4591,8 @@ dev/mlx5/mlx5_core/mlx5_vsc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_lib/mlx5_gid.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" Modified: stable/11/sys/dev/mlx5/device.h ============================================================================== --- stable/11/sys/dev/mlx5/device.h Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/dev/mlx5/device.h Wed Dec 12 12:46:12 2018 (r341958) @@ -1032,6 +1032,12 @@ enum mlx5_qcam_feature_groups { #define MLX5_CAP_QCAM_FEATURE(mdev, fld) \ MLX5_GET(qcam_reg, (mdev)->caps.qcam, qos_feature_cap_mask.feature_cap.fld) +#define MLX5_CAP_FPGA(mdev, cap) \ + MLX5_GET(fpga_cap, (mdev)->caps.fpga, cap) + +#define MLX5_CAP64_FPGA(mdev, cap) \ + MLX5_GET64(fpga_cap, (mdev)->caps.fpga, cap) + enum { MLX5_CMD_STAT_OK = 0x0, MLX5_CMD_STAT_INT_ERR = 0x1, Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:46:12 2018 (r341958) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -129,6 +130,10 @@ enum { MLX5_REG_DCBX_PARAM = 0x4020, MLX5_REG_DCBX_APP = 0x4021, MLX5_REG_PCAP = 0x5001, + MLX5_REG_FPGA_CAP = 0x4022, + MLX5_REG_FPGA_CTRL = 0x4023, + MLX5_REG_FPGA_ACCESS_REG = 0x4024, + MLX5_REG_FPGA_SHELL_CNTR = 0x4025, MLX5_REG_PMTU = 0x5003, MLX5_REG_PTYS = 0x5004, MLX5_REG_PAOS = 0x5006, @@ -402,6 +407,13 @@ struct mlx5_buf { u8 load_done; }; +struct mlx5_frag_buf { + struct mlx5_buf_list *frags; + int npages; + int size; + u8 page_shift; +}; + struct mlx5_eq { struct mlx5_core_dev *dev; __be32 __iomem *doorbell; @@ -440,6 +452,20 @@ struct mlx5_core_sig_ctx { u32 sigerr_count; }; +enum { + MLX5_MKEY_MR = 1, + MLX5_MKEY_MW, + MLX5_MKEY_MR_USER, +}; + +struct mlx5_core_mkey { + u64 iova; + u64 size; + u32 key; + u32 pd; + u32 type; +}; + struct mlx5_core_mr { u64 iova; u64 size; @@ -619,6 +645,14 @@ enum mlx5_pci_status { MLX5_PCI_STATUS_ENABLED, }; +#define MLX5_MAX_RESERVED_GIDS 8 + +struct mlx5_rsvd_gids { + unsigned int start; + unsigned int count; + struct ida ida; +}; + struct mlx5_special_contexts { int resd_lkey; }; @@ -637,6 +671,7 @@ struct mlx5_core_dev { u32 hca_caps_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; struct { u32 qcam[MLX5_ST_SZ_DW(qcam_reg)]; + u32 fpga[MLX5_ST_SZ_DW(fpga_cap)]; } caps; phys_addr_t iseg_base; struct mlx5_init_seg __iomem *iseg; @@ -665,6 +700,14 @@ struct mlx5_core_dev { struct sysctl_ctx_list sysctl_ctx; int msix_eqvec; + + struct { + struct mlx5_rsvd_gids reserved_gids; + atomic_t roce_en; + } roce; +#ifdef CONFIG_MLX5_FPGA + struct mlx5_fpga_device *fpga; +#endif }; enum { @@ -1079,6 +1122,11 @@ struct mlx5_interface { void *mlx5_get_protocol_dev(struct mlx5_core_dev *mdev, int protocol); int mlx5_register_interface(struct mlx5_interface *intf); void mlx5_unregister_interface(struct mlx5_interface *intf); + +unsigned int mlx5_core_reserved_gids_count(struct mlx5_core_dev *dev); +int mlx5_core_roce_gid_set(struct mlx5_core_dev *dev, unsigned int index, + u8 roce_version, u8 roce_l3_type, const u8 *gid, + const u8 *mac, bool vlan, u16 vlan_id); struct mlx5_profile { u64 mask; Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 12:46:12 2018 (r341958) @@ -85,6 +85,9 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, void mlx5_disable_device(struct mlx5_core_dev *dev); void mlx5_recover_device(struct mlx5_core_dev *dev); +int mlx5_register_device(struct mlx5_core_dev *dev); +void mlx5_unregister_device(struct mlx5_core_dev *dev); + void mlx5e_init(void); void mlx5e_cleanup(void); Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Dec 12 12:46:12 2018 (r341958) @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include "mlx5_core.h" #include "fs_core.h" @@ -734,7 +736,8 @@ static void mlx5_remove_device(struct mlx5_interface * } } -static int mlx5_register_device(struct mlx5_core_dev *dev) +int +mlx5_register_device(struct mlx5_core_dev *dev) { struct mlx5_priv *priv = &dev->priv; struct mlx5_interface *intf; @@ -748,7 +751,8 @@ static int mlx5_register_device(struct mlx5_core_dev * return 0; } -static void mlx5_unregister_device(struct mlx5_core_dev *dev) +void +mlx5_unregister_device(struct mlx5_core_dev *dev) { struct mlx5_priv *priv = &dev->priv; struct mlx5_interface *intf; @@ -912,6 +916,9 @@ static int mlx5_init_once(struct mlx5_core_dev *dev, s mlx5_init_srq_table(dev); mlx5_init_mr_table(dev); + mlx5_init_reserved_gids(dev); + mlx5_fpga_init(dev); + return 0; err_eq_cleanup: @@ -923,6 +930,8 @@ out: static void mlx5_cleanup_once(struct mlx5_core_dev *dev) { + mlx5_fpga_cleanup(dev); + mlx5_cleanup_reserved_gids(dev); mlx5_cleanup_mr_table(dev); mlx5_cleanup_srq_table(dev); mlx5_cleanup_qp_table(dev); @@ -1057,6 +1066,12 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, st goto err_free_comp_eqs; } + err = mlx5_fpga_device_start(dev); + if (err) { + dev_err(&pdev->dev, "fpga device start failed %d\n", err); + goto err_fpga_start; + } + err = mlx5_register_device(dev); if (err) { dev_err(&pdev->dev, "mlx5_register_device failed %d\n", err); @@ -1070,6 +1085,7 @@ out: mutex_unlock(&dev->intf_state_mutex); return 0; +err_fpga_start: err_fs: mlx5_cleanup_fs(dev); @@ -1134,6 +1150,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, mlx5_unregister_device(dev); + mlx5_fpga_device_stop(dev); mlx5_cleanup_fs(dev); unmap_bf_area(dev); mlx5_wait_for_reclaim_vfs_pages(dev); Modified: stable/11/sys/dev/mlx5/mlx5_core/wq.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/wq.h Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/dev/mlx5/mlx5_core/wq.h Wed Dec 12 12:46:12 2018 (r341958) @@ -42,11 +42,22 @@ struct mlx5_wq_ctrl { struct mlx5_db db; }; +struct mlx5_frag_wq_ctrl { + struct mlx5_core_dev *mdev; + struct mlx5_frag_buf frag_buf; + struct mlx5_db db; +}; + struct mlx5_wq_cyc { void *buf; __be32 *db; u16 sz_m1; u8 log_stride; +}; + +struct mlx5_wq_qp { + struct mlx5_wq_cyc rq; + struct mlx5_wq_cyc sq; }; struct mlx5_cqwq { Modified: stable/11/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:46:12 2018 (r341958) @@ -28,6 +28,8 @@ #ifndef MLX5_IFC_H #define MLX5_IFC_H +#include + enum { MLX5_EVENT_TYPE_COMP = 0x0, MLX5_EVENT_TYPE_PATH_MIG = 0x1, @@ -58,7 +60,9 @@ enum { MLX5_EVENT_TYPE_DROPPED_PACKET_LOGGED_EVENT = 0x1f, MLX5_EVENT_TYPE_CMD = 0xa, MLX5_EVENT_TYPE_PAGE_REQUEST = 0xb, - MLX5_EVENT_TYPE_NIC_VPORT_CHANGE = 0xd + MLX5_EVENT_TYPE_NIC_VPORT_CHANGE = 0xd, + MLX5_EVENT_TYPE_FPGA_ERROR = 0x20, + MLX5_EVENT_TYPE_FPGA_QP_ERROR = 0x21, }; enum { @@ -242,6 +246,11 @@ enum { MLX5_CMD_OP_MODIFY_FLOW_TABLE = 0x93c, MLX5_CMD_OP_ALLOC_ENCAP_HEADER = 0x93d, MLX5_CMD_OP_DEALLOC_ENCAP_HEADER = 0x93e, + MLX5_CMD_OP_FPGA_CREATE_QP = 0x960, + MLX5_CMD_OP_FPGA_MODIFY_QP = 0x961, + MLX5_CMD_OP_FPGA_QUERY_QP = 0x962, + MLX5_CMD_OP_FPGA_DESTROY_QP = 0x963, + MLX5_CMD_OP_FPGA_QUERY_QP_COUNTERS = 0x964, }; enum { @@ -998,7 +1007,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 max_tc[0x4]; u8 temp_warn_event[0x1]; u8 dcbx[0x1]; - u8 reserved_22[0x4]; + u8 general_notification_event[0x1]; + u8 reserved_at_1d3[0x2]; + u8 fpga[0x1]; u8 rol_s[0x1]; u8 rol_g[0x1]; u8 reserved_23[0x1]; Modified: stable/11/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:46:12 2018 (r341958) @@ -57,4 +57,44 @@ struct mlx5_fwdump_get { #define MLX5_DEV_PATH _PATH_DEV"mlx5ctl" #endif +enum mlx5_fpga_id { + MLX5_FPGA_NEWTON = 0, + MLX5_FPGA_EDISON = 1, + MLX5_FPGA_MORSE = 2, +}; + +enum mlx5_fpga_image { + MLX5_FPGA_IMAGE_USER = 0, + MLX5_FPGA_IMAGE_FACTORY = 1, + MLX5_FPGA_IMAGE_MAX = MLX5_FPGA_IMAGE_FACTORY, + MLX5_FPGA_IMAGE_FACTORY_FAILOVER = 2, +}; + +enum mlx5_fpga_status { + MLX5_FPGA_STATUS_SUCCESS = 0, + MLX5_FPGA_STATUS_FAILURE = 1, + MLX5_FPGA_STATUS_IN_PROGRESS = 2, + MLX5_FPGA_STATUS_DISCONNECTED = 3, +}; + +struct mlx5_fpga_query { + enum mlx5_fpga_image admin_image; + enum mlx5_fpga_image oper_image; + enum mlx5_fpga_status image_status; +}; + +/** + * enum mlx5_fpga_access_type - Enumerated the different methods possible for + * accessing the device memory address space + */ +enum mlx5_fpga_access_type { + /** Use the slow CX-FPGA I2C bus*/ + MLX5_FPGA_ACCESS_TYPE_I2C = 0x0, + /** Use the fast 'shell QP' */ + MLX5_FPGA_ACCESS_TYPE_RDMA, + /** Use the fastest available method */ + MLX5_FPGA_ACCESS_TYPE_DONTCARE, + MLX5_FPGA_ACCESS_TYPE_MAX = MLX5_FPGA_ACCESS_TYPE_DONTCARE, +}; + #endif Modified: stable/11/sys/modules/mlx5/Makefile ============================================================================== --- stable/11/sys/modules/mlx5/Makefile Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/modules/mlx5/Makefile Wed Dec 12 12:46:12 2018 (r341958) @@ -1,5 +1,7 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_core +.PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_core \ + ${SRCTOP}/sys/dev/mlx5/mlx5_lib \ + ${SRCTOP}/sys/dev/mlx5/mlx5_fpga KMOD=mlx5 SRCS= \ @@ -28,11 +30,22 @@ mlx5_uar.c \ mlx5_vport.c \ mlx5_vsc.c \ mlx5_wq.c \ +mlx5_gid.c \ device_if.h bus_if.h vnode_if.h pci_if.h \ opt_inet.h opt_inet6.h opt_rss.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include + +.if defined(CONFIG_BUILD_FPGA) +SRCS+= \ + mlx5fpga_cmd.c \ + mlx5fpga_core.c \ + mlx5fpga_sdk.c \ + mlx5fpga_trans.c \ + mlx5fpga_xfer.c \ + mlx5fpga_ipsec.c +.endif .include Modified: stable/11/sys/modules/mlx5en/Makefile ============================================================================== --- stable/11/sys/modules/mlx5en/Makefile Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/modules/mlx5en/Makefile Wed Dec 12 12:46:12 2018 (r341958) @@ -20,6 +20,10 @@ CFLAGS+= -DHAVE_PER_CQ_EVENT_PACKET CFLAGS+= -DHAVE_TCP_LRO_RX .endif +.if defined(CONFIG_BUILD_FPGA) +CFLAGS+= -DCONFIG_MLX5_FPGA +.endif + CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include Modified: stable/11/sys/modules/mlx5ib/Makefile ============================================================================== --- stable/11/sys/modules/mlx5ib/Makefile Wed Dec 12 12:46:11 2018 (r341957) +++ stable/11/sys/modules/mlx5ib/Makefile Wed Dec 12 12:46:12 2018 (r341958) @@ -24,6 +24,10 @@ CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/includ CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET -DINET6 +.if defined(CONFIG_BUILD_FPGA) +CFLAGS+= -DCONFIG_MLX5_FPGA +.endif + .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} From owner-svn-src-all@freebsd.org Wed Dec 12 12:50:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78452130CE24; Wed, 12 Dec 2018 12:50:14 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 1E83F9195D; Wed, 12 Dec 2018 12:50:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1314E8202; Wed, 12 Dec 2018 12:50:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCoDdG092465; Wed, 12 Dec 2018 12:50:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCoDrC092464; Wed, 12 Dec 2018 12:50:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121250.wBCCoDrC092464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341959 - in stable/12/sys: dev/mlx5 dev/mlx5/mlx5_fpga_tools modules/mlx5fpga_tools X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys: dev/mlx5 dev/mlx5/mlx5_fpga_tools modules/mlx5fpga_tools X-SVN-Commit-Revision: 341959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E83F9195D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:50:14 -0000 Author: hselasky Date: Wed Dec 12 12:50:13 2018 New Revision: 341959 URL: https://svnweb.freebsd.org/changeset/base/341959 Log: MFC r341573 and r341643: mlx5fpga_tools initial code import. Submitted by: kib@ Sponsored by: Mellanox Technologies Added: stable/12/sys/dev/mlx5/mlx5_fpga_tools/ - copied from r341573, head/sys/dev/mlx5/mlx5_fpga_tools/ stable/12/sys/modules/mlx5fpga_tools/ - copied from r341573, head/sys/modules/mlx5fpga_tools/ Modified: stable/12/sys/dev/mlx5/mlx5io.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:46:12 2018 (r341958) +++ stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:50:13 2018 (r341959) @@ -97,4 +97,15 @@ enum mlx5_fpga_access_type { MLX5_FPGA_ACCESS_TYPE_MAX = MLX5_FPGA_ACCESS_TYPE_DONTCARE, }; +#define MLX5_FPGA_CAP_ARR_SZ 0x40 + +#define MLX5_FPGA_ACCESS_TYPE _IOWINT('m', 0x80) +#define MLX5_FPGA_LOAD _IOWINT('m', 0x81) +#define MLX5_FPGA_RESET _IO('m', 0x82) +#define MLX5_FPGA_IMAGE_SEL _IOWINT('m', 0x83) +#define MLX5_FPGA_QUERY _IOR('m', 0x84, struct mlx5_fpga_query) +#define MLX5_FPGA_CAP _IOR('m', 0x85, uint32_t[MLX5_FPGA_CAP_ARR_SZ]) + +#define MLX5_FPGA_TOOLS_NAME_SUFFIX "_mlx5_fpga_tools" + #endif From owner-svn-src-all@freebsd.org Wed Dec 12 12:50:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEFEF130CE66; Wed, 12 Dec 2018 12:50:24 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 5BEBE91A4E; Wed, 12 Dec 2018 12:50:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27FF98203; Wed, 12 Dec 2018 12:50:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCoNBQ092515; Wed, 12 Dec 2018 12:50:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCoNIV092514; Wed, 12 Dec 2018 12:50:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121250.wBCCoNIV092514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341960 - in stable/11/sys: dev/mlx5 dev/mlx5/mlx5_fpga_tools modules/mlx5fpga_tools X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: dev/mlx5 dev/mlx5/mlx5_fpga_tools modules/mlx5fpga_tools X-SVN-Commit-Revision: 341960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5BEBE91A4E X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.789,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:50:24 -0000 Author: hselasky Date: Wed Dec 12 12:50:23 2018 New Revision: 341960 URL: https://svnweb.freebsd.org/changeset/base/341960 Log: MFC r341573 amd r341643: mlx5fpga_tools initial code import. Submitted by: kib@ Sponsored by: Mellanox Technologies Added: stable/11/sys/dev/mlx5/mlx5_fpga_tools/ - copied from r341573, head/sys/dev/mlx5/mlx5_fpga_tools/ stable/11/sys/modules/mlx5fpga_tools/ - copied from r341573, head/sys/modules/mlx5fpga_tools/ Modified: stable/11/sys/dev/mlx5/mlx5io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:50:13 2018 (r341959) +++ stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:50:23 2018 (r341960) @@ -97,4 +97,15 @@ enum mlx5_fpga_access_type { MLX5_FPGA_ACCESS_TYPE_MAX = MLX5_FPGA_ACCESS_TYPE_DONTCARE, }; +#define MLX5_FPGA_CAP_ARR_SZ 0x40 + +#define MLX5_FPGA_ACCESS_TYPE _IOWINT('m', 0x80) +#define MLX5_FPGA_LOAD _IOWINT('m', 0x81) +#define MLX5_FPGA_RESET _IO('m', 0x82) +#define MLX5_FPGA_IMAGE_SEL _IOWINT('m', 0x83) +#define MLX5_FPGA_QUERY _IOR('m', 0x84, struct mlx5_fpga_query) +#define MLX5_FPGA_CAP _IOR('m', 0x85, uint32_t[MLX5_FPGA_CAP_ARR_SZ]) + +#define MLX5_FPGA_TOOLS_NAME_SUFFIX "_mlx5_fpga_tools" + #endif From owner-svn-src-all@freebsd.org Wed Dec 12 12:52:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93F8B130D165; Wed, 12 Dec 2018 12:52:11 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 36F6591E8D; Wed, 12 Dec 2018 12:52:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A6468395; Wed, 12 Dec 2018 12:52:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCqBV9097144; Wed, 12 Dec 2018 12:52:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCqAVO097140; Wed, 12 Dec 2018 12:52:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121252.wBCCqAVO097140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341961 - in stable/12/sys/dev/mlx5: . mlx5_fpga X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_fpga X-SVN-Commit-Revision: 341961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36F6591E8D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.794,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:52:11 -0000 Author: hselasky Date: Wed Dec 12 12:52:10 2018 New Revision: 341961 URL: https://svnweb.freebsd.org/changeset/base/341961 Log: MFC r341574: mlx5fpga: Support MorseQ board Added and supported new enum "morseQ = 4" for fpga_id field Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c stable/12/sys/dev/mlx5/mlx5io.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c Wed Dec 12 12:50:23 2018 (r341960) +++ stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c Wed Dec 12 12:52:10 2018 (r341961) @@ -138,6 +138,8 @@ static const char *mlx5_fpga_name(u32 fpga_id) return "Edison"; case MLX5_FPGA_MORSE: return "Morse"; + case MLX5_FPGA_MORSEQ: + return "MorseQ"; } snprintf(ret, sizeof(ret), "Unknown %d", fpga_id); @@ -148,6 +150,7 @@ static int mlx5_fpga_device_load_check(struct mlx5_fpg { struct mlx5_fpga_query query; int err; + u32 fpga_id; err = mlx5_fpga_query(fdev->mdev, &query); if (err) { @@ -162,8 +165,9 @@ static int mlx5_fpga_device_load_check(struct mlx5_fpg mlx5_fpga_info(fdev, "Status %u; Admin image %u; Oper image %u\n", query.image_status, query.admin_image, query.oper_image); - /* For Morse project FPGA has no influence to network functionality */ - if (MLX5_CAP_FPGA(fdev->mdev, fpga_id) == MLX5_FPGA_MORSE) + /* For Morse projects FPGA has no influence to network functionality */ + fpga_id = MLX5_CAP_FPGA(fdev->mdev, fpga_id); + if (fpga_id == MLX5_FPGA_MORSE || fpga_id == MLX5_FPGA_MORSEQ) return 0; if (query.image_status != MLX5_FPGA_STATUS_SUCCESS) { @@ -226,7 +230,7 @@ int mlx5_fpga_device_start(struct mlx5_core_dev *mdev) fpga_id = MLX5_CAP_FPGA(fdev->mdev, fpga_id); mlx5_fpga_info(fdev, "FPGA card %s\n", mlx5_fpga_name(fpga_id)); - if (fpga_id == MLX5_FPGA_MORSE) + if (fpga_id == MLX5_FPGA_MORSE || fpga_id == MLX5_FPGA_MORSEQ) goto out; mlx5_fpga_info(fdev, "%s(%d) image, version %u; SBU %06x:%04x version %d\n", @@ -361,13 +365,16 @@ void mlx5_fpga_device_stop(struct mlx5_core_dev *mdev) unsigned int max_num_qps; unsigned long flags; int err; + u32 fpga_id; if (!fdev) return; - spin_lock_irqsave(&fdev->state_lock, flags); - if (MLX5_CAP_FPGA(mdev, fpga_id) == MLX5_FPGA_MORSE) + fpga_id = MLX5_CAP_FPGA(mdev, fpga_id); + if (fpga_id == MLX5_FPGA_MORSE || fpga_id == MLX5_FPGA_MORSEQ) return; + + spin_lock_irqsave(&fdev->state_lock, flags); if (fdev->fdev_state != MLX5_FDEV_STATE_SUCCESS) { spin_unlock_irqrestore(&fdev->state_lock, flags); Modified: stable/12/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:50:23 2018 (r341960) +++ stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:52:10 2018 (r341961) @@ -61,6 +61,7 @@ enum mlx5_fpga_id { MLX5_FPGA_NEWTON = 0, MLX5_FPGA_EDISON = 1, MLX5_FPGA_MORSE = 2, + MLX5_FPGA_MORSEQ = 3, }; enum mlx5_fpga_image { From owner-svn-src-all@freebsd.org Wed Dec 12 12:52:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FBFE130D1CA; Wed, 12 Dec 2018 12:52:31 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 36DED91FE8; Wed, 12 Dec 2018 12:52:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C1AD83B4; Wed, 12 Dec 2018 12:52:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCqVvA097207; Wed, 12 Dec 2018 12:52:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCqUvi097205; Wed, 12 Dec 2018 12:52:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121252.wBCCqUvi097205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341962 - in stable/11/sys/dev/mlx5: . mlx5_fpga X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_fpga X-SVN-Commit-Revision: 341962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36DED91FE8 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.79)[-0.794,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:52:31 -0000 Author: hselasky Date: Wed Dec 12 12:52:30 2018 New Revision: 341962 URL: https://svnweb.freebsd.org/changeset/base/341962 Log: MFC r341574: mlx5fpga: Support MorseQ board Added and supported new enum "morseQ = 4" for fpga_id field Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c stable/11/sys/dev/mlx5/mlx5io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c Wed Dec 12 12:52:10 2018 (r341961) +++ stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c Wed Dec 12 12:52:30 2018 (r341962) @@ -138,6 +138,8 @@ static const char *mlx5_fpga_name(u32 fpga_id) return "Edison"; case MLX5_FPGA_MORSE: return "Morse"; + case MLX5_FPGA_MORSEQ: + return "MorseQ"; } snprintf(ret, sizeof(ret), "Unknown %d", fpga_id); @@ -148,6 +150,7 @@ static int mlx5_fpga_device_load_check(struct mlx5_fpg { struct mlx5_fpga_query query; int err; + u32 fpga_id; err = mlx5_fpga_query(fdev->mdev, &query); if (err) { @@ -162,8 +165,9 @@ static int mlx5_fpga_device_load_check(struct mlx5_fpg mlx5_fpga_info(fdev, "Status %u; Admin image %u; Oper image %u\n", query.image_status, query.admin_image, query.oper_image); - /* For Morse project FPGA has no influence to network functionality */ - if (MLX5_CAP_FPGA(fdev->mdev, fpga_id) == MLX5_FPGA_MORSE) + /* For Morse projects FPGA has no influence to network functionality */ + fpga_id = MLX5_CAP_FPGA(fdev->mdev, fpga_id); + if (fpga_id == MLX5_FPGA_MORSE || fpga_id == MLX5_FPGA_MORSEQ) return 0; if (query.image_status != MLX5_FPGA_STATUS_SUCCESS) { @@ -226,7 +230,7 @@ int mlx5_fpga_device_start(struct mlx5_core_dev *mdev) fpga_id = MLX5_CAP_FPGA(fdev->mdev, fpga_id); mlx5_fpga_info(fdev, "FPGA card %s\n", mlx5_fpga_name(fpga_id)); - if (fpga_id == MLX5_FPGA_MORSE) + if (fpga_id == MLX5_FPGA_MORSE || fpga_id == MLX5_FPGA_MORSEQ) goto out; mlx5_fpga_info(fdev, "%s(%d) image, version %u; SBU %06x:%04x version %d\n", @@ -361,13 +365,16 @@ void mlx5_fpga_device_stop(struct mlx5_core_dev *mdev) unsigned int max_num_qps; unsigned long flags; int err; + u32 fpga_id; if (!fdev) return; - spin_lock_irqsave(&fdev->state_lock, flags); - if (MLX5_CAP_FPGA(mdev, fpga_id) == MLX5_FPGA_MORSE) + fpga_id = MLX5_CAP_FPGA(mdev, fpga_id); + if (fpga_id == MLX5_FPGA_MORSE || fpga_id == MLX5_FPGA_MORSEQ) return; + + spin_lock_irqsave(&fdev->state_lock, flags); if (fdev->fdev_state != MLX5_FDEV_STATE_SUCCESS) { spin_unlock_irqrestore(&fdev->state_lock, flags); Modified: stable/11/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:52:10 2018 (r341961) +++ stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:52:30 2018 (r341962) @@ -61,6 +61,7 @@ enum mlx5_fpga_id { MLX5_FPGA_NEWTON = 0, MLX5_FPGA_EDISON = 1, MLX5_FPGA_MORSE = 2, + MLX5_FPGA_MORSEQ = 3, }; enum mlx5_fpga_image { From owner-svn-src-all@freebsd.org Wed Dec 12 12:53:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37C4D130D37A; Wed, 12 Dec 2018 12:53:26 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D4EAF92200; Wed, 12 Dec 2018 12:53:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9F7183B7; Wed, 12 Dec 2018 12:53:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCrP0f097320; Wed, 12 Dec 2018 12:53:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCrOUL097312; Wed, 12 Dec 2018 12:53:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121253.wBCCrOUL097312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341963 - in stable/12/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Commit-Revision: 341963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D4EAF92200 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:53:26 -0000 Author: hselasky Date: Wed Dec 12 12:53:23 2018 New Revision: 341963 URL: https://svnweb.freebsd.org/changeset/base/341963 Log: MFC r341575: mlx5fpga: IOCTL for FPGA temperature measurement Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/driver.h stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c stable/12/sys/dev/mlx5/mlx5_ifc.h stable/12/sys/dev/mlx5/mlx5io.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/driver.h ============================================================================== --- stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/driver.h Wed Dec 12 12:53:23 2018 (r341963) @@ -151,6 +151,7 @@ enum { MLX5_REG_PMLP = 0x5002, MLX5_REG_NODE_DESC = 0x6001, MLX5_REG_HOST_ENDIANNESS = 0x7004, + MLX5_REG_MTMP = 0x900a, MLX5_REG_MCIA = 0x9014, MLX5_REG_MPCNT = 0x9051, }; Modified: stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:53:23 2018 (r341963) @@ -60,6 +60,8 @@ struct mlx5_fpga_shell_counters { int mlx5_fpga_caps(struct mlx5_core_dev *dev); int mlx5_fpga_query(struct mlx5_core_dev *dev, struct mlx5_fpga_query *query); +int mlx5_fpga_query_mtmp(struct mlx5_core_dev *dev, + struct mlx5_fpga_temperature *temp); int mlx5_fpga_ctrl_op(struct mlx5_core_dev *dev, u8 op); int mlx5_fpga_access_reg(struct mlx5_core_dev *dev, u8 size, u64 addr, void *buf, bool write); Modified: stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:53:23 2018 (r341963) @@ -164,6 +164,38 @@ int mlx5_fpga_query(struct mlx5_core_dev *dev, struct return 0; } +int mlx5_fpga_query_mtmp(struct mlx5_core_dev *dev, + struct mlx5_fpga_temperature *temp) +{ + u32 in[MLX5_ST_SZ_DW(mtmp_reg)] = {0}; + u32 out[MLX5_ST_SZ_DW(mtmp_reg)] = {0}; + int err; + + MLX5_SET(mtmp_reg, in, sensor_index, temp->index); + MLX5_SET(mtmp_reg, in, i, + ((temp->index < MLX5_FPGA_INTERNAL_SENSORS_LOW) || + (temp->index > MLX5_FPGA_INTERNAL_SENSORS_HIGH)) ? 1 : 0); + + err = mlx5_core_access_reg(dev, in, sizeof(in), out, sizeof(out), + MLX5_REG_MTMP, 0, false); + if (err) + return err; + + temp->index = MLX5_GET(mtmp_reg, out, sensor_index); + temp->temperature = MLX5_GET(mtmp_reg, out, temperature); + temp->mte = MLX5_GET(mtmp_reg, out, mte); + temp->max_temperature = MLX5_GET(mtmp_reg, out, max_temperature); + temp->tee = MLX5_GET(mtmp_reg, out, tee); + temp->temperature_threshold_hi = MLX5_GET(mtmp_reg, out, + temperature_threshold_hi); + temp->temperature_threshold_lo = MLX5_GET(mtmp_reg, out, + temperature_threshold_lo); + memcpy(temp->sensor_name, MLX5_ADDR_OF(mtmp_reg, out, sensor_name), + MLX5_FLD_SZ_BYTES(mtmp_reg, sensor_name)); + + return 0; +} + int mlx5_fpga_create_qp(struct mlx5_core_dev *dev, void *fpga_qpc, u32 *fpga_qpn) { Modified: stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:53:23 2018 (r341963) @@ -442,6 +442,13 @@ int mlx5_fpga_flash_select(struct mlx5_fpga_device *fd } EXPORT_SYMBOL(mlx5_fpga_flash_select); +int mlx5_fpga_temperature(struct mlx5_fpga_device *fdev, + struct mlx5_fpga_temperature *temp) +{ + return mlx5_fpga_query_mtmp(fdev->mdev, temp); +} +EXPORT_SYMBOL(mlx5_fpga_temperature); + struct device *mlx5_fpga_dev(struct mlx5_fpga_device *fdev) { return &fdev->mdev->pdev->dev; Modified: stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:53:23 2018 (r341963) @@ -356,6 +356,16 @@ void mlx5_fpga_device_query(struct mlx5_fpga_device *f struct device *mlx5_fpga_dev(struct mlx5_fpga_device *fdev); /** + * mlx5_fpga_temperature() - Retrieve FPGA sensor of temperature + * @fdev: The FPGA device + + * Return: 0 if successful + * or any other error value otherwise. + */ +int mlx5_fpga_temperature(struct mlx5_fpga_device *fdev, + struct mlx5_fpga_temperature *temp); + +/** * mlx5_fpga_get_cap() - Returns the FPGA cap mailbox from FW without parsing. * @fdev: The FPGA device * @fpga_caps: Is an array with a length of according to the size of Modified: stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:53:23 2018 (r341963) @@ -200,6 +200,7 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t struct tools_context *context; struct mlx5_fpga_device *fdev; struct mlx5_fpga_query query; + struct mlx5_fpga_temperature *temperature; u32 fpga_cap[MLX5_ST_SZ_DW(fpga_cap)] = {0}; int arg, err; @@ -253,6 +254,11 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t mlx5_fpga_get_cap(fdev, fpga_cap); bcopy(&fpga_cap, data, sizeof(fpga_cap)); err = 0; + break; + case MLX5_FPGA_TEMPERATURE: + temperature = (struct mlx5_fpga_temperature *)data; + mlx5_fpga_temperature(fdev, temperature); + err = 0; /* XXXKIB */ break; default: dev_err(mlx5_fpga_dev(fdev), Modified: stable/12/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:53:23 2018 (r341963) @@ -8520,6 +8520,31 @@ struct mlx5_ifc_link_level_retrans_cntr_grp_date_bits u8 reserved_0[0x640]; }; +struct mlx5_ifc_mtmp_reg_bits { + u8 i[0x1]; + u8 reserved_at_1[0x18]; + u8 sensor_index[0x7]; + + u8 reserved_at_20[0x10]; + u8 temperature[0x10]; + + u8 mte[0x1]; + u8 mtr[0x1]; + u8 reserved_at_42[0x0e]; + u8 max_temperature[0x10]; + + u8 tee[0x2]; + u8 reserved_at_62[0x0e]; + u8 temperature_threshold_hi[0x10]; + + u8 reserved_at_80[0x10]; + u8 temperature_threshold_lo[0x10]; + + u8 reserved_at_100[0x20]; + + u8 sensor_name[0x40]; +}; + struct mlx5_ifc_lane_2_module_mapping_bits { u8 reserved_0[0x6]; u8 rx_lane[0x2]; Modified: stable/12/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:52:30 2018 (r341962) +++ stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:53:23 2018 (r341963) @@ -84,6 +84,12 @@ struct mlx5_fpga_query { enum mlx5_fpga_status image_status; }; +enum mlx5_fpga_tee { + MLX5_FPGA_TEE_DISABLE = 0, + MLX5_FPGA_TEE_GENERATE_EVENT = 1, + MLX5_FPGA_TEE_GENERATE_SINGLE_EVENT = 2, +}; + /** * enum mlx5_fpga_access_type - Enumerated the different methods possible for * accessing the device memory address space @@ -98,6 +104,21 @@ enum mlx5_fpga_access_type { MLX5_FPGA_ACCESS_TYPE_MAX = MLX5_FPGA_ACCESS_TYPE_DONTCARE, }; +#define MLX5_FPGA_INTERNAL_SENSORS_LOW 63 +#define MLX5_FPGA_INTERNAL_SENSORS_HIGH 63 + +struct mlx5_fpga_temperature { + uint32_t temperature; + uint32_t index; + uint32_t tee; + uint32_t max_temperature; + uint32_t temperature_threshold_hi; + uint32_t temperature_threshold_lo; + uint32_t mte; + uint32_t mtr; + char sensor_name[16]; +}; + #define MLX5_FPGA_CAP_ARR_SZ 0x40 #define MLX5_FPGA_ACCESS_TYPE _IOWINT('m', 0x80) @@ -106,6 +127,7 @@ enum mlx5_fpga_access_type { #define MLX5_FPGA_IMAGE_SEL _IOWINT('m', 0x83) #define MLX5_FPGA_QUERY _IOR('m', 0x84, struct mlx5_fpga_query) #define MLX5_FPGA_CAP _IOR('m', 0x85, uint32_t[MLX5_FPGA_CAP_ARR_SZ]) +#define MLX5_FPGA_TEMPERATURE _IOWR('m', 0x86, struct mlx5_fpga_temperature) #define MLX5_FPGA_TOOLS_NAME_SUFFIX "_mlx5_fpga_tools" From owner-svn-src-all@freebsd.org Wed Dec 12 12:53:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 201C5130D3FC; Wed, 12 Dec 2018 12:53:36 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 AE355922EA; Wed, 12 Dec 2018 12:53:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69F2383B8; Wed, 12 Dec 2018 12:53:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCrXr5097381; Wed, 12 Dec 2018 12:53:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCrVkU097372; Wed, 12 Dec 2018 12:53:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121253.wBCCrVkU097372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341964 - in stable/11/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Commit-Revision: 341964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE355922EA X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:53:36 -0000 Author: hselasky Date: Wed Dec 12 12:53:31 2018 New Revision: 341964 URL: https://svnweb.freebsd.org/changeset/base/341964 Log: MFC r341575: mlx5fpga: IOCTL for FPGA temperature measurement Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c stable/11/sys/dev/mlx5/mlx5_ifc.h stable/11/sys/dev/mlx5/mlx5io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/driver.h Wed Dec 12 12:53:31 2018 (r341964) @@ -149,6 +149,7 @@ enum { MLX5_REG_PMLP = 0x5002, MLX5_REG_NODE_DESC = 0x6001, MLX5_REG_HOST_ENDIANNESS = 0x7004, + MLX5_REG_MTMP = 0x900a, MLX5_REG_MCIA = 0x9014, MLX5_REG_MPCNT = 0x9051, }; Modified: stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:53:31 2018 (r341964) @@ -60,6 +60,8 @@ struct mlx5_fpga_shell_counters { int mlx5_fpga_caps(struct mlx5_core_dev *dev); int mlx5_fpga_query(struct mlx5_core_dev *dev, struct mlx5_fpga_query *query); +int mlx5_fpga_query_mtmp(struct mlx5_core_dev *dev, + struct mlx5_fpga_temperature *temp); int mlx5_fpga_ctrl_op(struct mlx5_core_dev *dev, u8 op); int mlx5_fpga_access_reg(struct mlx5_core_dev *dev, u8 size, u64 addr, void *buf, bool write); Modified: stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:53:31 2018 (r341964) @@ -164,6 +164,38 @@ int mlx5_fpga_query(struct mlx5_core_dev *dev, struct return 0; } +int mlx5_fpga_query_mtmp(struct mlx5_core_dev *dev, + struct mlx5_fpga_temperature *temp) +{ + u32 in[MLX5_ST_SZ_DW(mtmp_reg)] = {0}; + u32 out[MLX5_ST_SZ_DW(mtmp_reg)] = {0}; + int err; + + MLX5_SET(mtmp_reg, in, sensor_index, temp->index); + MLX5_SET(mtmp_reg, in, i, + ((temp->index < MLX5_FPGA_INTERNAL_SENSORS_LOW) || + (temp->index > MLX5_FPGA_INTERNAL_SENSORS_HIGH)) ? 1 : 0); + + err = mlx5_core_access_reg(dev, in, sizeof(in), out, sizeof(out), + MLX5_REG_MTMP, 0, false); + if (err) + return err; + + temp->index = MLX5_GET(mtmp_reg, out, sensor_index); + temp->temperature = MLX5_GET(mtmp_reg, out, temperature); + temp->mte = MLX5_GET(mtmp_reg, out, mte); + temp->max_temperature = MLX5_GET(mtmp_reg, out, max_temperature); + temp->tee = MLX5_GET(mtmp_reg, out, tee); + temp->temperature_threshold_hi = MLX5_GET(mtmp_reg, out, + temperature_threshold_hi); + temp->temperature_threshold_lo = MLX5_GET(mtmp_reg, out, + temperature_threshold_lo); + memcpy(temp->sensor_name, MLX5_ADDR_OF(mtmp_reg, out, sensor_name), + MLX5_FLD_SZ_BYTES(mtmp_reg, sensor_name)); + + return 0; +} + int mlx5_fpga_create_qp(struct mlx5_core_dev *dev, void *fpga_qpc, u32 *fpga_qpn) { Modified: stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:53:31 2018 (r341964) @@ -442,6 +442,13 @@ int mlx5_fpga_flash_select(struct mlx5_fpga_device *fd } EXPORT_SYMBOL(mlx5_fpga_flash_select); +int mlx5_fpga_temperature(struct mlx5_fpga_device *fdev, + struct mlx5_fpga_temperature *temp) +{ + return mlx5_fpga_query_mtmp(fdev->mdev, temp); +} +EXPORT_SYMBOL(mlx5_fpga_temperature); + struct device *mlx5_fpga_dev(struct mlx5_fpga_device *fdev) { return &fdev->mdev->pdev->dev; Modified: stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:53:31 2018 (r341964) @@ -356,6 +356,16 @@ void mlx5_fpga_device_query(struct mlx5_fpga_device *f struct device *mlx5_fpga_dev(struct mlx5_fpga_device *fdev); /** + * mlx5_fpga_temperature() - Retrieve FPGA sensor of temperature + * @fdev: The FPGA device + + * Return: 0 if successful + * or any other error value otherwise. + */ +int mlx5_fpga_temperature(struct mlx5_fpga_device *fdev, + struct mlx5_fpga_temperature *temp); + +/** * mlx5_fpga_get_cap() - Returns the FPGA cap mailbox from FW without parsing. * @fdev: The FPGA device * @fpga_caps: Is an array with a length of according to the size of Modified: stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:53:31 2018 (r341964) @@ -200,6 +200,7 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t struct tools_context *context; struct mlx5_fpga_device *fdev; struct mlx5_fpga_query query; + struct mlx5_fpga_temperature *temperature; u32 fpga_cap[MLX5_ST_SZ_DW(fpga_cap)] = {0}; int arg, err; @@ -253,6 +254,11 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t mlx5_fpga_get_cap(fdev, fpga_cap); bcopy(&fpga_cap, data, sizeof(fpga_cap)); err = 0; + break; + case MLX5_FPGA_TEMPERATURE: + temperature = (struct mlx5_fpga_temperature *)data; + mlx5_fpga_temperature(fdev, temperature); + err = 0; /* XXXKIB */ break; default: dev_err(mlx5_fpga_dev(fdev), Modified: stable/11/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 12:53:31 2018 (r341964) @@ -8520,6 +8520,31 @@ struct mlx5_ifc_link_level_retrans_cntr_grp_date_bits u8 reserved_0[0x640]; }; +struct mlx5_ifc_mtmp_reg_bits { + u8 i[0x1]; + u8 reserved_at_1[0x18]; + u8 sensor_index[0x7]; + + u8 reserved_at_20[0x10]; + u8 temperature[0x10]; + + u8 mte[0x1]; + u8 mtr[0x1]; + u8 reserved_at_42[0x0e]; + u8 max_temperature[0x10]; + + u8 tee[0x2]; + u8 reserved_at_62[0x0e]; + u8 temperature_threshold_hi[0x10]; + + u8 reserved_at_80[0x10]; + u8 temperature_threshold_lo[0x10]; + + u8 reserved_at_100[0x20]; + + u8 sensor_name[0x40]; +}; + struct mlx5_ifc_lane_2_module_mapping_bits { u8 reserved_0[0x6]; u8 rx_lane[0x2]; Modified: stable/11/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:53:23 2018 (r341963) +++ stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:53:31 2018 (r341964) @@ -84,6 +84,12 @@ struct mlx5_fpga_query { enum mlx5_fpga_status image_status; }; +enum mlx5_fpga_tee { + MLX5_FPGA_TEE_DISABLE = 0, + MLX5_FPGA_TEE_GENERATE_EVENT = 1, + MLX5_FPGA_TEE_GENERATE_SINGLE_EVENT = 2, +}; + /** * enum mlx5_fpga_access_type - Enumerated the different methods possible for * accessing the device memory address space @@ -98,6 +104,21 @@ enum mlx5_fpga_access_type { MLX5_FPGA_ACCESS_TYPE_MAX = MLX5_FPGA_ACCESS_TYPE_DONTCARE, }; +#define MLX5_FPGA_INTERNAL_SENSORS_LOW 63 +#define MLX5_FPGA_INTERNAL_SENSORS_HIGH 63 + +struct mlx5_fpga_temperature { + uint32_t temperature; + uint32_t index; + uint32_t tee; + uint32_t max_temperature; + uint32_t temperature_threshold_hi; + uint32_t temperature_threshold_lo; + uint32_t mte; + uint32_t mtr; + char sensor_name[16]; +}; + #define MLX5_FPGA_CAP_ARR_SZ 0x40 #define MLX5_FPGA_ACCESS_TYPE _IOWINT('m', 0x80) @@ -106,6 +127,7 @@ enum mlx5_fpga_access_type { #define MLX5_FPGA_IMAGE_SEL _IOWINT('m', 0x83) #define MLX5_FPGA_QUERY _IOR('m', 0x84, struct mlx5_fpga_query) #define MLX5_FPGA_CAP _IOR('m', 0x85, uint32_t[MLX5_FPGA_CAP_ARR_SZ]) +#define MLX5_FPGA_TEMPERATURE _IOWR('m', 0x86, struct mlx5_fpga_temperature) #define MLX5_FPGA_TOOLS_NAME_SUFFIX "_mlx5_fpga_tools" From owner-svn-src-all@freebsd.org Wed Dec 12 12:54:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85071130D529; Wed, 12 Dec 2018 12:54:23 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 2B931924D7; Wed, 12 Dec 2018 12:54:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DB0083BA; Wed, 12 Dec 2018 12:54:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCsMTs097496; Wed, 12 Dec 2018 12:54:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCsLYo097488; Wed, 12 Dec 2018 12:54:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121254.wBCCsLYo097488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341965 - in stable/12/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Commit-Revision: 341965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2B931924D7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:54:23 -0000 Author: hselasky Date: Wed Dec 12 12:54:21 2018 New Revision: 341965 URL: https://svnweb.freebsd.org/changeset/base/341965 Log: MFC r341576: mlx5fpga: Add set and query connect/disconnect FPGA Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h stable/12/sys/dev/mlx5/mlx5_fpga/core.h stable/12/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c stable/12/sys/dev/mlx5/mlx5io.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:54:21 2018 (r341965) @@ -69,6 +69,8 @@ int mlx5_fpga_sbu_caps(struct mlx5_core_dev *dev, void int mlx5_fpga_load(struct mlx5_core_dev *dev, enum mlx5_fpga_image image); int mlx5_fpga_image_select(struct mlx5_core_dev *dev, enum mlx5_fpga_image image); +int mlx5_fpga_ctrl_connect(struct mlx5_core_dev *dev, + enum mlx5_fpga_connect *connect); int mlx5_fpga_shell_counters(struct mlx5_core_dev *dev, bool clear, struct mlx5_fpga_shell_counters *data); Modified: stable/12/sys/dev/mlx5/mlx5_fpga/core.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/core.h Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5_fpga/core.h Wed Dec 12 12:54:21 2018 (r341965) @@ -52,6 +52,7 @@ enum mlx5_fdev_state { MLX5_FDEV_STATE_SUCCESS = 0, MLX5_FDEV_STATE_FAILURE = 1, MLX5_FDEV_STATE_IN_PROGRESS = 2, + MLX5_FDEV_STATE_DISCONNECTED = 3, MLX5_FDEV_STATE_NONE = 0xFFFF, }; Modified: stable/12/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h Wed Dec 12 12:54:21 2018 (r341965) @@ -133,6 +133,8 @@ enum { MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON = 0x4, MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_OFF = 0x5, MLX5_FPGA_CTRL_OPERATION_RESET_SANDBOX = 0x6, + MLX5_FPGA_CTRL_OPERATION_DISCONNECT = 0x9, + MLX5_FPGA_CTRL_OPERATION_CONNECT = 0xA, }; struct mlx5_ifc_fpga_ctrl_bits { Modified: stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:54:21 2018 (r341965) @@ -37,6 +37,7 @@ #include #include #include +#include #define MLX5_FPGA_ACCESS_REG_SZ (MLX5_ST_SZ_DW(fpga_access_reg) + \ MLX5_FPGA_ACCESS_REG_SIZE_MAX) @@ -162,6 +163,33 @@ int mlx5_fpga_query(struct mlx5_core_dev *dev, struct query->admin_image = MLX5_GET(fpga_ctrl, out, flash_select_admin); query->oper_image = MLX5_GET(fpga_ctrl, out, flash_select_oper); return 0; +} + +int mlx5_fpga_ctrl_connect(struct mlx5_core_dev *dev, + enum mlx5_fpga_connect *connect) +{ + u32 in[MLX5_ST_SZ_DW(fpga_ctrl)] = {0}; + u32 out[MLX5_ST_SZ_DW(fpga_ctrl)]; + int status; + int err; + + if (*connect == MLX5_FPGA_CONNECT_QUERY) { + err = mlx5_core_access_reg(dev, in, sizeof(in), out, + sizeof(out), MLX5_REG_FPGA_CTRL, + 0, false); + if (err) + return err; + status = MLX5_GET(fpga_ctrl, out, status); + *connect = (status == MLX5_FDEV_STATE_DISCONNECTED) ? + MLX5_FPGA_CONNECT_DISCONNECT : + MLX5_FPGA_CONNECT_CONNECT; + } else { + MLX5_SET(fpga_ctrl, in, operation, *connect); + err = mlx5_core_access_reg(dev, in, sizeof(in), out, + sizeof(out), MLX5_REG_FPGA_CTRL, + 0, true); + } + return err; } int mlx5_fpga_query_mtmp(struct mlx5_core_dev *dev, Modified: stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:54:21 2018 (r341965) @@ -342,6 +342,7 @@ int mlx5_fpga_device_reload(struct mlx5_fpga_device *f break; case MLX5_FDEV_STATE_SUCCESS: case MLX5_FDEV_STATE_FAILURE: + case MLX5_FDEV_STATE_DISCONNECTED: break; } spin_unlock_irqrestore(&fdev->state_lock, flags); @@ -426,6 +427,7 @@ int mlx5_fpga_flash_select(struct mlx5_fpga_device *fd case MLX5_FDEV_STATE_NONE: spin_unlock_irqrestore(&fdev->state_lock, flags); return -ENODEV; + case MLX5_FDEV_STATE_DISCONNECTED: case MLX5_FDEV_STATE_IN_PROGRESS: case MLX5_FDEV_STATE_SUCCESS: case MLX5_FDEV_STATE_FAILURE: @@ -441,6 +443,32 @@ int mlx5_fpga_flash_select(struct mlx5_fpga_device *fd return err; } EXPORT_SYMBOL(mlx5_fpga_flash_select); + +int mlx5_fpga_connectdisconnect(struct mlx5_fpga_device *fdev, + enum mlx5_fpga_connect *connect) +{ + unsigned long flags; + int err; + + spin_lock_irqsave(&fdev->state_lock, flags); + switch (fdev->fdev_state) { + case MLX5_FDEV_STATE_NONE: + spin_unlock_irqrestore(&fdev->state_lock, flags); + return -ENODEV; + case MLX5_FDEV_STATE_IN_PROGRESS: + case MLX5_FDEV_STATE_SUCCESS: + case MLX5_FDEV_STATE_FAILURE: + case MLX5_FDEV_STATE_DISCONNECTED: + break; + } + spin_unlock_irqrestore(&fdev->state_lock, flags); + + err = mlx5_fpga_ctrl_connect(fdev->mdev, connect); + if (err) + mlx5_fpga_err(fdev, "Failed to connect/disconnect: %d\n", err); + return err; +} +EXPORT_SYMBOL(mlx5_fpga_connectdisconnect); int mlx5_fpga_temperature(struct mlx5_fpga_device *fdev, struct mlx5_fpga_temperature *temp) Modified: stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:54:21 2018 (r341965) @@ -366,6 +366,16 @@ int mlx5_fpga_temperature(struct mlx5_fpga_device *fde struct mlx5_fpga_temperature *temp); /** + * mlx5_fpga_connectdisconnect() - Connect/disconnect ConnectX to FPGA + * @fdev: The FPGA device + + * Return: 0 if successful + * or any other error value otherwise. + */ +int mlx5_fpga_connectdisconnect(struct mlx5_fpga_device *fdev, + enum mlx5_fpga_connect *connect); + +/** * mlx5_fpga_get_cap() - Returns the FPGA cap mailbox from FW without parsing. * @fdev: The FPGA device * @fpga_caps: Is an array with a length of according to the size of Modified: stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:54:21 2018 (r341965) @@ -201,6 +201,7 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t struct mlx5_fpga_device *fdev; struct mlx5_fpga_query query; struct mlx5_fpga_temperature *temperature; + enum mlx5_fpga_connect *connect; u32 fpga_cap[MLX5_ST_SZ_DW(fpga_cap)] = {0}; int arg, err; @@ -260,6 +261,11 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t mlx5_fpga_temperature(fdev, temperature); err = 0; /* XXXKIB */ break; + case MLX5_FPGA_CONNECT: + connect = (enum mlx5_fpga_connect *)data; + mlx5_fpga_connectdisconnect(fdev, connect); + err = 0; /* XXXKIB */ + break; default: dev_err(mlx5_fpga_dev(fdev), "unknown ioctl command %#08lx\n", cmd); Modified: stable/12/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:53:31 2018 (r341964) +++ stable/12/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:54:21 2018 (r341965) @@ -90,6 +90,12 @@ enum mlx5_fpga_tee { MLX5_FPGA_TEE_GENERATE_SINGLE_EVENT = 2, }; +enum mlx5_fpga_connect { + MLX5_FPGA_CONNECT_QUERY = 0, + MLX5_FPGA_CONNECT_DISCONNECT = 0x9, + MLX5_FPGA_CONNECT_CONNECT = 0xA, +}; + /** * enum mlx5_fpga_access_type - Enumerated the different methods possible for * accessing the device memory address space @@ -128,6 +134,7 @@ struct mlx5_fpga_temperature { #define MLX5_FPGA_QUERY _IOR('m', 0x84, struct mlx5_fpga_query) #define MLX5_FPGA_CAP _IOR('m', 0x85, uint32_t[MLX5_FPGA_CAP_ARR_SZ]) #define MLX5_FPGA_TEMPERATURE _IOWR('m', 0x86, struct mlx5_fpga_temperature) +#define MLX5_FPGA_CONNECT _IOWR('m', 0x87, enum mlx5_fpga_connect) #define MLX5_FPGA_TOOLS_NAME_SUFFIX "_mlx5_fpga_tools" From owner-svn-src-all@freebsd.org Wed Dec 12 12:54:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1E53130D5E4; Wed, 12 Dec 2018 12:54:45 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 99B7F9264C; Wed, 12 Dec 2018 12:54:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C5BA83BB; Wed, 12 Dec 2018 12:54:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCsjaF097570; Wed, 12 Dec 2018 12:54:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCshA0097556; Wed, 12 Dec 2018 12:54:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121254.wBCCshA0097556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:54:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341966 - in stable/11/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_fpga mlx5_fpga_tools X-SVN-Commit-Revision: 341966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 99B7F9264C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:54:46 -0000 Author: hselasky Date: Wed Dec 12 12:54:43 2018 New Revision: 341966 URL: https://svnweb.freebsd.org/changeset/base/341966 Log: MFC r341576: mlx5fpga: Add set and query connect/disconnect FPGA Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h stable/11/sys/dev/mlx5/mlx5_fpga/core.h stable/11/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c stable/11/sys/dev/mlx5/mlx5io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5_fpga/cmd.h Wed Dec 12 12:54:43 2018 (r341966) @@ -69,6 +69,8 @@ int mlx5_fpga_sbu_caps(struct mlx5_core_dev *dev, void int mlx5_fpga_load(struct mlx5_core_dev *dev, enum mlx5_fpga_image image); int mlx5_fpga_image_select(struct mlx5_core_dev *dev, enum mlx5_fpga_image image); +int mlx5_fpga_ctrl_connect(struct mlx5_core_dev *dev, + enum mlx5_fpga_connect *connect); int mlx5_fpga_shell_counters(struct mlx5_core_dev *dev, bool clear, struct mlx5_fpga_shell_counters *data); Modified: stable/11/sys/dev/mlx5/mlx5_fpga/core.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/core.h Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5_fpga/core.h Wed Dec 12 12:54:43 2018 (r341966) @@ -52,6 +52,7 @@ enum mlx5_fdev_state { MLX5_FDEV_STATE_SUCCESS = 0, MLX5_FDEV_STATE_FAILURE = 1, MLX5_FDEV_STATE_IN_PROGRESS = 2, + MLX5_FDEV_STATE_DISCONNECTED = 3, MLX5_FDEV_STATE_NONE = 0xFFFF, }; Modified: stable/11/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5_fpga/mlx5_ifc_fpga.h Wed Dec 12 12:54:43 2018 (r341966) @@ -133,6 +133,8 @@ enum { MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON = 0x4, MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_OFF = 0x5, MLX5_FPGA_CTRL_OPERATION_RESET_SANDBOX = 0x6, + MLX5_FPGA_CTRL_OPERATION_DISCONNECT = 0x9, + MLX5_FPGA_CTRL_OPERATION_CONNECT = 0xA, }; struct mlx5_ifc_fpga_ctrl_bits { Modified: stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_cmd.c Wed Dec 12 12:54:43 2018 (r341966) @@ -37,6 +37,7 @@ #include #include #include +#include #define MLX5_FPGA_ACCESS_REG_SZ (MLX5_ST_SZ_DW(fpga_access_reg) + \ MLX5_FPGA_ACCESS_REG_SIZE_MAX) @@ -162,6 +163,33 @@ int mlx5_fpga_query(struct mlx5_core_dev *dev, struct query->admin_image = MLX5_GET(fpga_ctrl, out, flash_select_admin); query->oper_image = MLX5_GET(fpga_ctrl, out, flash_select_oper); return 0; +} + +int mlx5_fpga_ctrl_connect(struct mlx5_core_dev *dev, + enum mlx5_fpga_connect *connect) +{ + u32 in[MLX5_ST_SZ_DW(fpga_ctrl)] = {0}; + u32 out[MLX5_ST_SZ_DW(fpga_ctrl)]; + int status; + int err; + + if (*connect == MLX5_FPGA_CONNECT_QUERY) { + err = mlx5_core_access_reg(dev, in, sizeof(in), out, + sizeof(out), MLX5_REG_FPGA_CTRL, + 0, false); + if (err) + return err; + status = MLX5_GET(fpga_ctrl, out, status); + *connect = (status == MLX5_FDEV_STATE_DISCONNECTED) ? + MLX5_FPGA_CONNECT_DISCONNECT : + MLX5_FPGA_CONNECT_CONNECT; + } else { + MLX5_SET(fpga_ctrl, in, operation, *connect); + err = mlx5_core_access_reg(dev, in, sizeof(in), out, + sizeof(out), MLX5_REG_FPGA_CTRL, + 0, true); + } + return err; } int mlx5_fpga_query_mtmp(struct mlx5_core_dev *dev, Modified: stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5_fpga/mlx5fpga_sdk.c Wed Dec 12 12:54:43 2018 (r341966) @@ -342,6 +342,7 @@ int mlx5_fpga_device_reload(struct mlx5_fpga_device *f break; case MLX5_FDEV_STATE_SUCCESS: case MLX5_FDEV_STATE_FAILURE: + case MLX5_FDEV_STATE_DISCONNECTED: break; } spin_unlock_irqrestore(&fdev->state_lock, flags); @@ -426,6 +427,7 @@ int mlx5_fpga_flash_select(struct mlx5_fpga_device *fd case MLX5_FDEV_STATE_NONE: spin_unlock_irqrestore(&fdev->state_lock, flags); return -ENODEV; + case MLX5_FDEV_STATE_DISCONNECTED: case MLX5_FDEV_STATE_IN_PROGRESS: case MLX5_FDEV_STATE_SUCCESS: case MLX5_FDEV_STATE_FAILURE: @@ -441,6 +443,32 @@ int mlx5_fpga_flash_select(struct mlx5_fpga_device *fd return err; } EXPORT_SYMBOL(mlx5_fpga_flash_select); + +int mlx5_fpga_connectdisconnect(struct mlx5_fpga_device *fdev, + enum mlx5_fpga_connect *connect) +{ + unsigned long flags; + int err; + + spin_lock_irqsave(&fdev->state_lock, flags); + switch (fdev->fdev_state) { + case MLX5_FDEV_STATE_NONE: + spin_unlock_irqrestore(&fdev->state_lock, flags); + return -ENODEV; + case MLX5_FDEV_STATE_IN_PROGRESS: + case MLX5_FDEV_STATE_SUCCESS: + case MLX5_FDEV_STATE_FAILURE: + case MLX5_FDEV_STATE_DISCONNECTED: + break; + } + spin_unlock_irqrestore(&fdev->state_lock, flags); + + err = mlx5_fpga_ctrl_connect(fdev->mdev, connect); + if (err) + mlx5_fpga_err(fdev, "Failed to connect/disconnect: %d\n", err); + return err; +} +EXPORT_SYMBOL(mlx5_fpga_connectdisconnect); int mlx5_fpga_temperature(struct mlx5_fpga_device *fdev, struct mlx5_fpga_temperature *temp) Modified: stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5_fpga/sdk.h Wed Dec 12 12:54:43 2018 (r341966) @@ -366,6 +366,16 @@ int mlx5_fpga_temperature(struct mlx5_fpga_device *fde struct mlx5_fpga_temperature *temp); /** + * mlx5_fpga_connectdisconnect() - Connect/disconnect ConnectX to FPGA + * @fdev: The FPGA device + + * Return: 0 if successful + * or any other error value otherwise. + */ +int mlx5_fpga_connectdisconnect(struct mlx5_fpga_device *fdev, + enum mlx5_fpga_connect *connect); + +/** * mlx5_fpga_get_cap() - Returns the FPGA cap mailbox from FW without parsing. * @fdev: The FPGA device * @fpga_caps: Is an array with a length of according to the size of Modified: stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_char.c Wed Dec 12 12:54:43 2018 (r341966) @@ -201,6 +201,7 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t struct mlx5_fpga_device *fdev; struct mlx5_fpga_query query; struct mlx5_fpga_temperature *temperature; + enum mlx5_fpga_connect *connect; u32 fpga_cap[MLX5_ST_SZ_DW(fpga_cap)] = {0}; int arg, err; @@ -260,6 +261,11 @@ tools_char_ioctl(struct cdev *dev, u_long cmd, caddr_t mlx5_fpga_temperature(fdev, temperature); err = 0; /* XXXKIB */ break; + case MLX5_FPGA_CONNECT: + connect = (enum mlx5_fpga_connect *)data; + mlx5_fpga_connectdisconnect(fdev, connect); + err = 0; /* XXXKIB */ + break; default: dev_err(mlx5_fpga_dev(fdev), "unknown ioctl command %#08lx\n", cmd); Modified: stable/11/sys/dev/mlx5/mlx5io.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:54:21 2018 (r341965) +++ stable/11/sys/dev/mlx5/mlx5io.h Wed Dec 12 12:54:43 2018 (r341966) @@ -90,6 +90,12 @@ enum mlx5_fpga_tee { MLX5_FPGA_TEE_GENERATE_SINGLE_EVENT = 2, }; +enum mlx5_fpga_connect { + MLX5_FPGA_CONNECT_QUERY = 0, + MLX5_FPGA_CONNECT_DISCONNECT = 0x9, + MLX5_FPGA_CONNECT_CONNECT = 0xA, +}; + /** * enum mlx5_fpga_access_type - Enumerated the different methods possible for * accessing the device memory address space @@ -128,6 +134,7 @@ struct mlx5_fpga_temperature { #define MLX5_FPGA_QUERY _IOR('m', 0x84, struct mlx5_fpga_query) #define MLX5_FPGA_CAP _IOR('m', 0x85, uint32_t[MLX5_FPGA_CAP_ARR_SZ]) #define MLX5_FPGA_TEMPERATURE _IOWR('m', 0x86, struct mlx5_fpga_temperature) +#define MLX5_FPGA_CONNECT _IOWR('m', 0x87, enum mlx5_fpga_connect) #define MLX5_FPGA_TOOLS_NAME_SUFFIX "_mlx5_fpga_tools" From owner-svn-src-all@freebsd.org Wed Dec 12 12:55:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45DD9130D72C; Wed, 12 Dec 2018 12:55:30 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E08F39281E; Wed, 12 Dec 2018 12:55:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5BE783BD; Wed, 12 Dec 2018 12:55:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCtTT7097744; Wed, 12 Dec 2018 12:55:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCtTuO097738; Wed, 12 Dec 2018 12:55:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121255.wBCCtTuO097738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341967 - in stable/12/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 341967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E08F39281E X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:55:30 -0000 Author: hselasky Date: Wed Dec 12 12:55:28 2018 New Revision: 341967 URL: https://svnweb.freebsd.org/changeset/base/341967 Log: MFC r341577: mlx5en: Implement support for bandwidth limiting in by ratio, ETS. Add support for setting the bandwidth limit as a ratio rather than in bits per second. The ratio must be an integer number between 1 and 100 inclusivly. Implement the needed firmware commands and SYSCTLs through mlx5en(4). Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/12/sys/dev/mlx5/port.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:54:43 2018 (r341966) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:55:28 2018 (r341967) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2018, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -931,6 +931,74 @@ int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, return (err); } EXPORT_SYMBOL_GPL(mlx5_set_port_prio_tc); + +int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, const u8 *tc_group) +{ + u32 in[MLX5_ST_SZ_DW(qetc_reg)] = {}; + int i; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + MLX5_SET(qetc_reg, in, tc_configuration[i].g, 1); + MLX5_SET(qetc_reg, in, tc_configuration[i].group, tc_group[i]); + } + + return mlx5_set_port_qetcr_reg(mdev, in, sizeof(in)); +} +EXPORT_SYMBOL_GPL(mlx5_set_port_tc_group); + +int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev, + u8 tc, u8 *tc_group) +{ + u32 out[MLX5_ST_SZ_DW(qetc_reg)]; + void *ets_tcn_conf; + int err; + + err = mlx5_query_port_qetcr_reg(mdev, out, sizeof(out)); + if (err) + return err; + + ets_tcn_conf = MLX5_ADDR_OF(qetc_reg, out, + tc_configuration[tc]); + + *tc_group = MLX5_GET(ets_tcn_config_reg, ets_tcn_conf, + group); + + return 0; +} +EXPORT_SYMBOL_GPL(mlx5_query_port_tc_group); + +int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, const u8 *tc_bw) +{ + u32 in[MLX5_ST_SZ_DW(qetc_reg)] = {}; + int i; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + MLX5_SET(qetc_reg, in, tc_configuration[i].b, 1); + MLX5_SET(qetc_reg, in, tc_configuration[i].bw_allocation, tc_bw[i]); + } + + return mlx5_set_port_qetcr_reg(mdev, in, sizeof(in)); +} +EXPORT_SYMBOL_GPL(mlx5_set_port_tc_bw_alloc); + +int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *bw_pct) +{ + u32 out[MLX5_ST_SZ_DW(qetc_reg)]; + void *ets_tcn_conf; + int err; + int i; + + err = mlx5_query_port_qetcr_reg(mdev, out, sizeof(out)); + if (err) + return err; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + ets_tcn_conf = MLX5_ADDR_OF(qetc_reg, out, tc_configuration[i]); + bw_pct[i] = MLX5_GET(ets_tcn_config_reg, ets_tcn_conf, bw_allocation); + } + return 0; +} +EXPORT_SYMBOL_GPL(mlx5_query_port_tc_bw_alloc); int mlx5_modify_port_cong_params(struct mlx5_core_dev *mdev, void *in, int in_size) Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:54:43 2018 (r341966) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:55:28 2018 (r341967) @@ -493,6 +493,7 @@ struct mlx5e_params_ethtool { u64 arg [0]; MLX5E_PARAMS(MLX5E_STATS_VAR) u64 max_bw_value[IEEE_8021QAZ_MAX_TCS]; + u8 max_bw_share[IEEE_8021QAZ_MAX_TCS]; u8 prio_tc[IEEE_8021QAZ_MAX_TCS]; u8 dscp2prio[MLX5_MAX_SUPPORTED_DSCP]; u8 trust_state; @@ -844,19 +845,6 @@ struct mlx5e_eeprom { int page_valid; u32 *data; }; - -/* - * This structure contains rate limit extension to the IEEE 802.1Qaz ETS - * managed object. - * Values are 64 bits long and specified in Kbps to enable usage over both - * slow and very fast networks. - * - * @tc_maxrate: maximal tc tx bandwidth indexed by traffic class - */ -struct ieee_maxrate { - __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS]; -}; - #define MLX5E_FLD_MAX(typ, fld) ((1ULL << __mlx5_bit_sz(typ, fld)) - 1ULL) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:54:43 2018 (r341966) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:55:28 2018 (r341967) @@ -121,6 +121,29 @@ done: } static int +mlx5e_get_max_alloc(struct mlx5e_priv *priv) +{ + struct mlx5_core_dev *mdev = priv->mdev; + int err; + int x; + + PRIV_LOCK(priv); + err = -mlx5_query_port_tc_bw_alloc(mdev, priv->params_ethtool.max_bw_share); + if (err == 0) { + /* set default value */ + for (x = 0; x != IEEE_8021QAZ_MAX_TCS; x++) { + priv->params_ethtool.max_bw_share[x] = + 100 / IEEE_8021QAZ_MAX_TCS; + } + err = -mlx5_set_port_tc_bw_alloc(mdev, + priv->params_ethtool.max_bw_share); + } + PRIV_UNLOCK(priv); + + return (err); +} + +static int mlx5e_get_dscp(struct mlx5e_priv *priv) { struct mlx5_core_dev *mdev = priv->mdev; @@ -144,56 +167,119 @@ done: return (err); } +static void +mlx5e_tc_get_parameters(struct mlx5e_priv *priv, + u64 *new_bw_value, u8 *max_bw_value, u8 *max_bw_unit) +{ + const u64 upper_limit_mbps = 255 * MLX5E_100MB; + const u64 upper_limit_gbps = 255 * MLX5E_1GB; + u64 temp; + int i; + + memset(max_bw_value, 0, IEEE_8021QAZ_MAX_TCS); + memset(max_bw_unit, 0, IEEE_8021QAZ_MAX_TCS); + + for (i = 0; i <= mlx5_max_tc(priv->mdev); i++) { + temp = (new_bw_value != NULL) ? + new_bw_value[i] : priv->params_ethtool.max_bw_value[i]; + + if (!temp) { + max_bw_unit[i] = MLX5_BW_NO_LIMIT; + } else if (temp > upper_limit_gbps) { + max_bw_unit[i] = MLX5_BW_NO_LIMIT; + } else if (temp <= upper_limit_mbps) { + max_bw_value[i] = howmany(temp, MLX5E_100MB); + max_bw_unit[i] = MLX5_100_MBPS_UNIT; + } else { + max_bw_value[i] = howmany(temp, MLX5E_1GB); + max_bw_unit[i] = MLX5_GBPS_UNIT; + } + } +} + static int mlx5e_tc_maxrate_handler(SYSCTL_HANDLER_ARGS) { struct mlx5e_priv *priv = arg1; - int prio_index = arg2; struct mlx5_core_dev *mdev = priv->mdev; u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS]; u8 max_bw_value[IEEE_8021QAZ_MAX_TCS]; - int i, err; - u64 bw_val; - u64 result = priv->params_ethtool.max_bw_value[prio_index]; - const u64 upper_limit_mbps = 255 * MLX5E_100MB; - const u64 upper_limit_gbps = 255 * MLX5E_1GB; + u64 new_bw_value[IEEE_8021QAZ_MAX_TCS]; + u8 max_rates = mlx5_max_tc(mdev) + 1; + u8 x; + int err; PRIV_LOCK(priv); - err = sysctl_handle_64(oidp, &result, 0, req); - if (err || !req->newptr || - result == priv->params_ethtool.max_bw_value[prio_index]) + err = SYSCTL_OUT(req, priv->params_ethtool.max_bw_value, + sizeof(priv->params_ethtool.max_bw_value[0]) * max_rates); + if (err || !req->newptr) goto done; - - if (result % MLX5E_100MB) { - err = ERANGE; + err = SYSCTL_IN(req, new_bw_value, + sizeof(new_bw_value[0]) * max_rates); + if (err) goto done; + + /* range check input value */ + for (x = 0; x != max_rates; x++) { + if (new_bw_value[x] % MLX5E_100MB) { + err = ERANGE; + goto done; + } } - memset(max_bw_value, 0, sizeof(max_bw_value)); - memset(max_bw_unit, 0, sizeof(max_bw_unit)); + mlx5e_tc_get_parameters(priv, new_bw_value, max_bw_value, max_bw_unit); - for (i = 0; i <= mlx5_max_tc(mdev); i++) { - bw_val = (i == prio_index) ? result : priv->params_ethtool.max_bw_value[i]; + err = -mlx5_modify_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); + if (err) + goto done; - if (!bw_val) { - max_bw_unit[i] = MLX5_BW_NO_LIMIT; - } else if (bw_val > upper_limit_gbps) { - result = 0; - max_bw_unit[i] = MLX5_BW_NO_LIMIT; - } else if (bw_val <= upper_limit_mbps) { - max_bw_value[i] = howmany(bw_val, MLX5E_100MB); - max_bw_unit[i] = MLX5_100_MBPS_UNIT; - } else { - max_bw_value[i] = howmany(bw_val, MLX5E_1GB); - max_bw_unit[i] = MLX5_GBPS_UNIT; + memcpy(priv->params_ethtool.max_bw_value, new_bw_value, + sizeof(priv->params_ethtool.max_bw_value)); +done: + PRIV_UNLOCK(priv); + return (err); +} + +static int +mlx5e_tc_rate_share_handler(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + struct mlx5_core_dev *mdev = priv->mdev; + u8 max_bw_share[IEEE_8021QAZ_MAX_TCS]; + u8 max_rates = mlx5_max_tc(mdev) + 1; + int i; + int err; + int sum; + + PRIV_LOCK(priv); + err = SYSCTL_OUT(req, priv->params_ethtool.max_bw_share, max_rates); + if (err || !req->newptr) + goto done; + err = SYSCTL_IN(req, max_bw_share, max_rates); + if (err) + goto done; + + /* range check input value */ + for (sum = i = 0; i != max_rates; i++) { + if (max_bw_share[i] < 1 || max_bw_share[i] > 100) { + err = ERANGE; + goto done; } + sum += max_bw_share[i]; } - err = -mlx5_modify_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); + /* sum of values should be as close to 100 as possible */ + if (sum < (100 - max_rates + 1) || sum > 100) { + err = ERANGE; + goto done; + } + + err = -mlx5_set_port_tc_bw_alloc(mdev, max_bw_share); if (err) goto done; - priv->params_ethtool.max_bw_value[prio_index] = result; + memcpy(priv->params_ethtool.max_bw_share, max_bw_share, + sizeof(priv->params_ethtool.max_bw_share)); done: PRIV_UNLOCK(priv); return (err); @@ -217,7 +303,6 @@ mlx5e_get_prio_tc(struct mlx5e_priv *priv) if (err) break; } - PRIV_UNLOCK(priv); return (err); } @@ -229,9 +314,10 @@ mlx5e_prio_to_tc_handler(SYSCTL_HANDLER_ARGS) int prio_index = arg2; struct mlx5_core_dev *mdev = priv->mdev; int err; - uint8_t result = priv->params_ethtool.prio_tc[prio_index]; + uint8_t result; PRIV_LOCK(priv); + result = priv->params_ethtool.prio_tc[prio_index]; err = sysctl_handle_8(oidp, &result, 0, req); if (err || !req->newptr || result == priv->params_ethtool.prio_tc[prio_index]) @@ -1151,33 +1237,37 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) qos_node = SYSCTL_ADD_NODE(&priv->sysctl_ctx, SYSCTL_CHILDREN(node), OID_AUTO, "qos", CTLFLAG_RW, NULL, "Quality Of Service configuration"); - if (node == NULL) + if (qos_node == NULL) return; - /* Prioriry rate limit support */ - if (mlx5e_getmaxrate(priv)) - return; - - for (i = 0; i <= mlx5_max_tc(mdev); i++) { - char name[32]; - snprintf(name, sizeof(name), "tc_%d_max_rate", i); + /* Priority rate limit support */ + if (mlx5e_getmaxrate(priv) == 0) { SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), - OID_AUTO, name, CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, - priv, i, mlx5e_tc_maxrate_handler, "QU", - "Max rate for priority, specified in kilobits, where kilo=1000, \ - max_rate must be divisible by 100000"); + OID_AUTO, "tc_max_rate", CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + priv, 0, mlx5e_tc_maxrate_handler, "QU", + "Max rate for priority, specified in kilobits, where kilo=1000, " + "max_rate must be divisible by 100000"); } - if (mlx5e_get_prio_tc(priv)) - return; - - for (i = 0; i <= mlx5_max_tc(mdev); i++) { - char name[32]; - snprintf(name, sizeof(name), "prio_%d_to_tc", i); + /* Bandwidth limiting by ratio */ + if (mlx5e_get_max_alloc(priv) == 0) { SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), - OID_AUTO, name, CTLTYPE_U8 | CTLFLAG_RW | CTLFLAG_MPSAFE, + OID_AUTO, "tc_rate_share", CTLTYPE_U8 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + priv, 0, mlx5e_tc_rate_share_handler, "QU", + "Specify bandwidth ratio from 1 to 100 " + "for the available traffic classes"); + } + + /* Priority to traffic class mapping */ + if (mlx5e_get_prio_tc(priv) == 0) { + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + char name[32]; + snprintf(name, sizeof(name), "prio_%d_to_tc", i); + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), + OID_AUTO, name, CTLTYPE_U8 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, priv, i, mlx5e_prio_to_tc_handler, "CU", "Set priority to traffic class"); + } } /* DSCP support */ Modified: stable/12/sys/dev/mlx5/port.h ============================================================================== --- stable/12/sys/dev/mlx5/port.h Wed Dec 12 12:54:43 2018 (r341966) +++ stable/12/sys/dev/mlx5/port.h Wed Dec 12 12:55:28 2018 (r341967) @@ -161,6 +161,12 @@ int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev u8 prio, u8 *tc); int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, int prio_index, const u8 prio_tc); +int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, const u8 *tc_group); +int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev, + u8 tc, u8 *tc_group); +int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, const u8 *tc_bw); +int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *bw_pct); + int mlx5_set_trust_state(struct mlx5_core_dev *mdev, u8 trust_state); int mlx5_query_trust_state(struct mlx5_core_dev *mdev, u8 *trust_state); From owner-svn-src-all@freebsd.org Wed Dec 12 12:55:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EB5F130D7BA; Wed, 12 Dec 2018 12:55:55 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 EA51F92960; Wed, 12 Dec 2018 12:55:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D751883C5; Wed, 12 Dec 2018 12:55:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCtshO097808; Wed, 12 Dec 2018 12:55:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCtsOD097805; Wed, 12 Dec 2018 12:55:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121255.wBCCtsOD097805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341968 - in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 341968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EA51F92960 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:55:55 -0000 Author: hselasky Date: Wed Dec 12 12:55:53 2018 New Revision: 341968 URL: https://svnweb.freebsd.org/changeset/base/341968 Log: MFC r341577: mlx5en: Implement support for bandwidth limiting in by ratio, ETS. Add support for setting the bandwidth limit as a ratio rather than in bits per second. The ratio must be an integer number between 1 and 100 inclusivly. Implement the needed firmware commands and SYSCTLs through mlx5en(4). Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/11/sys/dev/mlx5/port.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:55:28 2018 (r341967) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 12:55:53 2018 (r341968) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2018, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -931,6 +931,74 @@ int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, return (err); } EXPORT_SYMBOL_GPL(mlx5_set_port_prio_tc); + +int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, const u8 *tc_group) +{ + u32 in[MLX5_ST_SZ_DW(qetc_reg)] = {}; + int i; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + MLX5_SET(qetc_reg, in, tc_configuration[i].g, 1); + MLX5_SET(qetc_reg, in, tc_configuration[i].group, tc_group[i]); + } + + return mlx5_set_port_qetcr_reg(mdev, in, sizeof(in)); +} +EXPORT_SYMBOL_GPL(mlx5_set_port_tc_group); + +int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev, + u8 tc, u8 *tc_group) +{ + u32 out[MLX5_ST_SZ_DW(qetc_reg)]; + void *ets_tcn_conf; + int err; + + err = mlx5_query_port_qetcr_reg(mdev, out, sizeof(out)); + if (err) + return err; + + ets_tcn_conf = MLX5_ADDR_OF(qetc_reg, out, + tc_configuration[tc]); + + *tc_group = MLX5_GET(ets_tcn_config_reg, ets_tcn_conf, + group); + + return 0; +} +EXPORT_SYMBOL_GPL(mlx5_query_port_tc_group); + +int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, const u8 *tc_bw) +{ + u32 in[MLX5_ST_SZ_DW(qetc_reg)] = {}; + int i; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + MLX5_SET(qetc_reg, in, tc_configuration[i].b, 1); + MLX5_SET(qetc_reg, in, tc_configuration[i].bw_allocation, tc_bw[i]); + } + + return mlx5_set_port_qetcr_reg(mdev, in, sizeof(in)); +} +EXPORT_SYMBOL_GPL(mlx5_set_port_tc_bw_alloc); + +int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *bw_pct) +{ + u32 out[MLX5_ST_SZ_DW(qetc_reg)]; + void *ets_tcn_conf; + int err; + int i; + + err = mlx5_query_port_qetcr_reg(mdev, out, sizeof(out)); + if (err) + return err; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + ets_tcn_conf = MLX5_ADDR_OF(qetc_reg, out, tc_configuration[i]); + bw_pct[i] = MLX5_GET(ets_tcn_config_reg, ets_tcn_conf, bw_allocation); + } + return 0; +} +EXPORT_SYMBOL_GPL(mlx5_query_port_tc_bw_alloc); int mlx5_modify_port_cong_params(struct mlx5_core_dev *mdev, void *in, int in_size) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:55:28 2018 (r341967) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:55:53 2018 (r341968) @@ -492,6 +492,7 @@ struct mlx5e_params_ethtool { u64 arg [0]; MLX5E_PARAMS(MLX5E_STATS_VAR) u64 max_bw_value[IEEE_8021QAZ_MAX_TCS]; + u8 max_bw_share[IEEE_8021QAZ_MAX_TCS]; u8 prio_tc[IEEE_8021QAZ_MAX_TCS]; u8 dscp2prio[MLX5_MAX_SUPPORTED_DSCP]; u8 trust_state; @@ -820,19 +821,6 @@ struct mlx5e_eeprom { int page_valid; u32 *data; }; - -/* - * This structure contains rate limit extension to the IEEE 802.1Qaz ETS - * managed object. - * Values are 64 bits long and specified in Kbps to enable usage over both - * slow and very fast networks. - * - * @tc_maxrate: maximal tc tx bandwidth indexed by traffic class - */ -struct ieee_maxrate { - __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS]; -}; - #define MLX5E_FLD_MAX(typ, fld) ((1ULL << __mlx5_bit_sz(typ, fld)) - 1ULL) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:55:28 2018 (r341967) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:55:53 2018 (r341968) @@ -121,6 +121,29 @@ done: } static int +mlx5e_get_max_alloc(struct mlx5e_priv *priv) +{ + struct mlx5_core_dev *mdev = priv->mdev; + int err; + int x; + + PRIV_LOCK(priv); + err = -mlx5_query_port_tc_bw_alloc(mdev, priv->params_ethtool.max_bw_share); + if (err == 0) { + /* set default value */ + for (x = 0; x != IEEE_8021QAZ_MAX_TCS; x++) { + priv->params_ethtool.max_bw_share[x] = + 100 / IEEE_8021QAZ_MAX_TCS; + } + err = -mlx5_set_port_tc_bw_alloc(mdev, + priv->params_ethtool.max_bw_share); + } + PRIV_UNLOCK(priv); + + return (err); +} + +static int mlx5e_get_dscp(struct mlx5e_priv *priv) { struct mlx5_core_dev *mdev = priv->mdev; @@ -144,56 +167,119 @@ done: return (err); } +static void +mlx5e_tc_get_parameters(struct mlx5e_priv *priv, + u64 *new_bw_value, u8 *max_bw_value, u8 *max_bw_unit) +{ + const u64 upper_limit_mbps = 255 * MLX5E_100MB; + const u64 upper_limit_gbps = 255 * MLX5E_1GB; + u64 temp; + int i; + + memset(max_bw_value, 0, IEEE_8021QAZ_MAX_TCS); + memset(max_bw_unit, 0, IEEE_8021QAZ_MAX_TCS); + + for (i = 0; i <= mlx5_max_tc(priv->mdev); i++) { + temp = (new_bw_value != NULL) ? + new_bw_value[i] : priv->params_ethtool.max_bw_value[i]; + + if (!temp) { + max_bw_unit[i] = MLX5_BW_NO_LIMIT; + } else if (temp > upper_limit_gbps) { + max_bw_unit[i] = MLX5_BW_NO_LIMIT; + } else if (temp <= upper_limit_mbps) { + max_bw_value[i] = howmany(temp, MLX5E_100MB); + max_bw_unit[i] = MLX5_100_MBPS_UNIT; + } else { + max_bw_value[i] = howmany(temp, MLX5E_1GB); + max_bw_unit[i] = MLX5_GBPS_UNIT; + } + } +} + static int mlx5e_tc_maxrate_handler(SYSCTL_HANDLER_ARGS) { struct mlx5e_priv *priv = arg1; - int prio_index = arg2; struct mlx5_core_dev *mdev = priv->mdev; u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS]; u8 max_bw_value[IEEE_8021QAZ_MAX_TCS]; - int i, err; - u64 bw_val; - u64 result = priv->params_ethtool.max_bw_value[prio_index]; - const u64 upper_limit_mbps = 255 * MLX5E_100MB; - const u64 upper_limit_gbps = 255 * MLX5E_1GB; + u64 new_bw_value[IEEE_8021QAZ_MAX_TCS]; + u8 max_rates = mlx5_max_tc(mdev) + 1; + u8 x; + int err; PRIV_LOCK(priv); - err = sysctl_handle_64(oidp, &result, 0, req); - if (err || !req->newptr || - result == priv->params_ethtool.max_bw_value[prio_index]) + err = SYSCTL_OUT(req, priv->params_ethtool.max_bw_value, + sizeof(priv->params_ethtool.max_bw_value[0]) * max_rates); + if (err || !req->newptr) goto done; - - if (result % MLX5E_100MB) { - err = ERANGE; + err = SYSCTL_IN(req, new_bw_value, + sizeof(new_bw_value[0]) * max_rates); + if (err) goto done; + + /* range check input value */ + for (x = 0; x != max_rates; x++) { + if (new_bw_value[x] % MLX5E_100MB) { + err = ERANGE; + goto done; + } } - memset(max_bw_value, 0, sizeof(max_bw_value)); - memset(max_bw_unit, 0, sizeof(max_bw_unit)); + mlx5e_tc_get_parameters(priv, new_bw_value, max_bw_value, max_bw_unit); - for (i = 0; i <= mlx5_max_tc(mdev); i++) { - bw_val = (i == prio_index) ? result : priv->params_ethtool.max_bw_value[i]; + err = -mlx5_modify_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); + if (err) + goto done; - if (!bw_val) { - max_bw_unit[i] = MLX5_BW_NO_LIMIT; - } else if (bw_val > upper_limit_gbps) { - result = 0; - max_bw_unit[i] = MLX5_BW_NO_LIMIT; - } else if (bw_val <= upper_limit_mbps) { - max_bw_value[i] = howmany(bw_val, MLX5E_100MB); - max_bw_unit[i] = MLX5_100_MBPS_UNIT; - } else { - max_bw_value[i] = howmany(bw_val, MLX5E_1GB); - max_bw_unit[i] = MLX5_GBPS_UNIT; + memcpy(priv->params_ethtool.max_bw_value, new_bw_value, + sizeof(priv->params_ethtool.max_bw_value)); +done: + PRIV_UNLOCK(priv); + return (err); +} + +static int +mlx5e_tc_rate_share_handler(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + struct mlx5_core_dev *mdev = priv->mdev; + u8 max_bw_share[IEEE_8021QAZ_MAX_TCS]; + u8 max_rates = mlx5_max_tc(mdev) + 1; + int i; + int err; + int sum; + + PRIV_LOCK(priv); + err = SYSCTL_OUT(req, priv->params_ethtool.max_bw_share, max_rates); + if (err || !req->newptr) + goto done; + err = SYSCTL_IN(req, max_bw_share, max_rates); + if (err) + goto done; + + /* range check input value */ + for (sum = i = 0; i != max_rates; i++) { + if (max_bw_share[i] < 1 || max_bw_share[i] > 100) { + err = ERANGE; + goto done; } + sum += max_bw_share[i]; } - err = -mlx5_modify_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); + /* sum of values should be as close to 100 as possible */ + if (sum < (100 - max_rates + 1) || sum > 100) { + err = ERANGE; + goto done; + } + + err = -mlx5_set_port_tc_bw_alloc(mdev, max_bw_share); if (err) goto done; - priv->params_ethtool.max_bw_value[prio_index] = result; + memcpy(priv->params_ethtool.max_bw_share, max_bw_share, + sizeof(priv->params_ethtool.max_bw_share)); done: PRIV_UNLOCK(priv); return (err); @@ -217,7 +303,6 @@ mlx5e_get_prio_tc(struct mlx5e_priv *priv) if (err) break; } - PRIV_UNLOCK(priv); return (err); } @@ -229,9 +314,10 @@ mlx5e_prio_to_tc_handler(SYSCTL_HANDLER_ARGS) int prio_index = arg2; struct mlx5_core_dev *mdev = priv->mdev; int err; - uint8_t result = priv->params_ethtool.prio_tc[prio_index]; + uint8_t result; PRIV_LOCK(priv); + result = priv->params_ethtool.prio_tc[prio_index]; err = sysctl_handle_8(oidp, &result, 0, req); if (err || !req->newptr || result == priv->params_ethtool.prio_tc[prio_index]) @@ -1151,33 +1237,37 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) qos_node = SYSCTL_ADD_NODE(&priv->sysctl_ctx, SYSCTL_CHILDREN(node), OID_AUTO, "qos", CTLFLAG_RW, NULL, "Quality Of Service configuration"); - if (node == NULL) + if (qos_node == NULL) return; - /* Prioriry rate limit support */ - if (mlx5e_getmaxrate(priv)) - return; - - for (i = 0; i <= mlx5_max_tc(mdev); i++) { - char name[32]; - snprintf(name, sizeof(name), "tc_%d_max_rate", i); + /* Priority rate limit support */ + if (mlx5e_getmaxrate(priv) == 0) { SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), - OID_AUTO, name, CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, - priv, i, mlx5e_tc_maxrate_handler, "QU", - "Max rate for priority, specified in kilobits, where kilo=1000, \ - max_rate must be divisible by 100000"); + OID_AUTO, "tc_max_rate", CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + priv, 0, mlx5e_tc_maxrate_handler, "QU", + "Max rate for priority, specified in kilobits, where kilo=1000, " + "max_rate must be divisible by 100000"); } - if (mlx5e_get_prio_tc(priv)) - return; - - for (i = 0; i <= mlx5_max_tc(mdev); i++) { - char name[32]; - snprintf(name, sizeof(name), "prio_%d_to_tc", i); + /* Bandwidth limiting by ratio */ + if (mlx5e_get_max_alloc(priv) == 0) { SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), - OID_AUTO, name, CTLTYPE_U8 | CTLFLAG_RW | CTLFLAG_MPSAFE, + OID_AUTO, "tc_rate_share", CTLTYPE_U8 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + priv, 0, mlx5e_tc_rate_share_handler, "QU", + "Specify bandwidth ratio from 1 to 100 " + "for the available traffic classes"); + } + + /* Priority to traffic class mapping */ + if (mlx5e_get_prio_tc(priv) == 0) { + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + char name[32]; + snprintf(name, sizeof(name), "prio_%d_to_tc", i); + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), + OID_AUTO, name, CTLTYPE_U8 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, priv, i, mlx5e_prio_to_tc_handler, "CU", "Set priority to traffic class"); + } } /* DSCP support */ Modified: stable/11/sys/dev/mlx5/port.h ============================================================================== --- stable/11/sys/dev/mlx5/port.h Wed Dec 12 12:55:28 2018 (r341967) +++ stable/11/sys/dev/mlx5/port.h Wed Dec 12 12:55:53 2018 (r341968) @@ -161,6 +161,12 @@ int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev u8 prio, u8 *tc); int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, int prio_index, const u8 prio_tc); +int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, const u8 *tc_group); +int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev, + u8 tc, u8 *tc_group); +int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, const u8 *tc_bw); +int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *bw_pct); + int mlx5_set_trust_state(struct mlx5_core_dev *mdev, u8 trust_state); int mlx5_query_trust_state(struct mlx5_core_dev *mdev, u8 *trust_state); From owner-svn-src-all@freebsd.org Wed Dec 12 12:57:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57A5A130D98E; Wed, 12 Dec 2018 12:57:57 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D5A6492B4D; Wed, 12 Dec 2018 12:57:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD06E83C8; Wed, 12 Dec 2018 12:57:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCvuUX097971; Wed, 12 Dec 2018 12:57:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCvuhf097968; Wed, 12 Dec 2018 12:57:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121257.wBCCvuhf097968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341969 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D5A6492B4D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:57:57 -0000 Author: hselasky Date: Wed Dec 12 12:57:55 2018 New Revision: 341969 URL: https://svnweb.freebsd.org/changeset/base/341969 Log: MFC r341578 and r341655: mlx5en: Remove the DRBR and associated logic in the transmit path. The hardware queues are deep enough currently and using the DRBR and associated callbacks only leads to more task switching in the TX path. The is also a race setting the queue_state which can lead to hung TX rings. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:55:53 2018 (r341968) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:57:55 2018 (r341969) @@ -473,7 +473,6 @@ struct mlx5e_params { m(+1, u64 tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining tx packets") \ m(+1, u64 tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of tx packets to join") \ m(+1, u64 tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \ - m(+1, u64 tx_bufring_disable, "tx_bufring_disable", "0: Enable bufring 1: Disable bufring") \ m(+1, u64 tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \ m(+1, u64 tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \ m(+1, u64 hw_lro, "hw_lro", "set to enable hw_lro") \ @@ -606,8 +605,6 @@ struct mlx5e_sq { struct mlx5e_sq_stats stats; struct mlx5e_cq cq; - struct task sq_task; - struct taskqueue *sq_tq; /* pointers to per packet info: write@xmit, read@completion */ struct mlx5e_sq_mbuf *mbuf; @@ -628,7 +625,6 @@ struct mlx5e_sq { struct mlx5_wq_ctrl wq_ctrl; struct mlx5e_priv *priv; int tc; - unsigned int queue_state; } __aligned(MLX5E_CACHELINE_SIZE); static inline bool @@ -857,7 +853,6 @@ void mlx5e_cq_error_event(struct mlx5_core_cq *mcq, in void mlx5e_rx_cq_comp(struct mlx5_core_cq *); void mlx5e_tx_cq_comp(struct mlx5_core_cq *); struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq); -void mlx5e_tx_que(void *context, int pending); int mlx5e_open_flow_table(struct mlx5e_priv *priv); void mlx5e_close_flow_table(struct mlx5e_priv *priv); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:55:53 2018 (r341968) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:57:55 2018 (r341969) @@ -703,18 +703,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) mlx5e_open_locked(priv->ifp); break; - case MLX5_PARAM_OFFSET(tx_bufring_disable): - /* rangecheck input value */ - priv->params_ethtool.tx_bufring_disable = - priv->params_ethtool.tx_bufring_disable ? 1 : 0; - - /* reconfigure the sendqueues, if any */ - if (was_opened) { - mlx5e_close_locked(priv->ifp); - mlx5e_open_locked(priv->ifp); - } - break; - case MLX5_PARAM_OFFSET(tx_completion_fact): /* network interface must be down */ if (was_opened) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:55:53 2018 (r341968) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:57:55 2018 (r341969) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Mellanox Technologies. All rights reserved. + * Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1133,13 +1133,8 @@ mlx5e_create_sq(struct mlx5e_channel *c, struct mlx5e_priv *priv = c->priv; struct mlx5_core_dev *mdev = priv->mdev; char buffer[16]; - void *sqc = param->sqc; void *sqc_wq = MLX5_ADDR_OF(sqc, sqc, wq); -#ifdef RSS - cpuset_t cpu_mask; - int cpu_id; -#endif int err; /* Create DMA descriptor TAG */ @@ -1182,37 +1177,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->min_inline_mode = priv->params.tx_min_inline_mode; sq->vlan_inline_cap = MLX5_CAP_ETH(mdev, wqe_vlan_insert); - /* check if we should allocate a second packet buffer */ - if (priv->params_ethtool.tx_bufring_disable == 0) { - sq->br = buf_ring_alloc(MLX5E_SQ_TX_QUEUE_SIZE, M_MLX5EN, - M_WAITOK, &sq->lock); - if (sq->br == NULL) { - if_printf(c->ifp, "%s: Failed allocating sq drbr buffer\n", - __func__); - err = -ENOMEM; - goto err_free_sq_db; - } - - sq->sq_tq = taskqueue_create_fast("mlx5e_que", M_WAITOK, - taskqueue_thread_enqueue, &sq->sq_tq); - if (sq->sq_tq == NULL) { - if_printf(c->ifp, "%s: Failed allocating taskqueue\n", - __func__); - err = -ENOMEM; - goto err_free_drbr; - } - - TASK_INIT(&sq->sq_task, 0, mlx5e_tx_que, sq); -#ifdef RSS - cpu_id = rss_getcpu(c->ix % rss_getnumbuckets()); - CPU_SETOF(cpu_id, &cpu_mask); - taskqueue_start_threads_cpuset(&sq->sq_tq, 1, PI_NET, &cpu_mask, - "%s TX SQ%d.%d CPU%d", c->ifp->if_xname, c->ix, tc, cpu_id); -#else - taskqueue_start_threads(&sq->sq_tq, 1, PI_NET, - "%s TX SQ%d.%d", c->ifp->if_xname, c->ix, tc); -#endif - } snprintf(buffer, sizeof(buffer), "txstat%dtc%d", c->ix, tc); mlx5e_create_stats(&sq->stats.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), buffer, mlx5e_sq_stats_desc, MLX5E_SQ_STATS_NUM, @@ -1220,10 +1184,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, return (0); -err_free_drbr: - buf_ring_free(sq->br, M_MLX5EN); -err_free_sq_db: - mlx5e_free_sq_db(sq); err_sq_wq_destroy: mlx5_wq_destroy(&sq->wq_ctrl); @@ -1245,12 +1205,6 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); mlx5_unmap_free_uar(sq->priv->mdev, &sq->uar); - if (sq->sq_tq != NULL) { - taskqueue_drain(sq->sq_tq, &sq->sq_task); - taskqueue_free(sq->sq_tq); - } - if (sq->br != NULL) - buf_ring_free(sq->br, M_MLX5EN); } int @@ -1348,8 +1302,6 @@ mlx5e_open_sq(struct mlx5e_channel *c, err = mlx5e_modify_sq(sq, MLX5_SQC_STATE_RST, MLX5_SQC_STATE_RDY); if (err) goto err_disable_sq; - - WRITE_ONCE(sq->queue_state, MLX5E_SQ_READY); return (0); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 12:55:53 2018 (r341968) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 12:57:55 2018 (r341969) @@ -249,10 +249,6 @@ mlx5e_get_header_size(struct mbuf *mb) return (eth_hdr_len); } -/* - * The return value is not going back to the stack because of - * the drbr - */ static int mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) { @@ -269,13 +265,9 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) u16 pi; u8 opcode; - /* - * Return ENOBUFS if the queue is full, this may trigger reinsertion - * of the mbuf into the drbr (see mlx5e_xmit_locked) - */ - if (unlikely(!mlx5e_sq_has_room_for(sq, 2 * MLX5_SEND_WQE_MAX_WQEBBS))) { + /* Return ENOBUFS if the queue is full */ + if (unlikely(!mlx5e_sq_has_room_for(sq, 2 * MLX5_SEND_WQE_MAX_WQEBBS))) return (ENOBUFS); - } /* Align SQ edge with NOPs to avoid WQE wrap around */ pi = ((~sq->pc) & sq->wq.sz_m1); @@ -497,71 +489,14 @@ mlx5e_poll_tx_cq(struct mlx5e_sq *sq, int budget) atomic_thread_fence_rel(); sq->cc = sqcc; - - if (sq->sq_tq != NULL && - atomic_cmpset_int(&sq->queue_state, MLX5E_SQ_FULL, MLX5E_SQ_READY)) - taskqueue_enqueue(sq->sq_tq, &sq->sq_task); } static int mlx5e_xmit_locked(struct ifnet *ifp, struct mlx5e_sq *sq, struct mbuf *mb) { - struct mbuf *next; int err = 0; - if (likely(mb != NULL)) { - /* - * If we can't insert mbuf into drbr, try to xmit anyway. - * We keep the error we got so we could return that after xmit. - */ - err = drbr_enqueue(ifp, sq->br, mb); - } - - /* - * Check if the network interface is closed or if the SQ is - * being stopped: - */ if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - sq->stopped != 0)) - return (err); - - /* Process the queue */ - while ((next = drbr_peek(ifp, sq->br)) != NULL) { - if (mlx5e_sq_xmit(sq, &next) != 0) { - if (next != NULL) { - drbr_putback(ifp, sq->br, next); - atomic_store_rel_int(&sq->queue_state, MLX5E_SQ_FULL); - break; - } - } - drbr_advance(ifp, sq->br); - } - /* Check if we need to write the doorbell */ - if (likely(sq->doorbell.d64 != 0)) { - mlx5e_tx_notify_hw(sq, sq->doorbell.d32, 0); - sq->doorbell.d64 = 0; - } - /* - * Check if we need to start the event timer which flushes the - * transmit ring on timeout: - */ - if (unlikely(sq->cev_next_state == MLX5E_CEV_STATE_INITIAL && - sq->cev_factor != 1)) { - /* start the timer */ - mlx5e_sq_cev_timeout(sq); - } else { - /* don't send NOPs yet */ - sq->cev_next_state = MLX5E_CEV_STATE_HOLD_NOPS; - } - return (err); -} - -static int -mlx5e_xmit_locked_no_br(struct ifnet *ifp, struct mlx5e_sq *sq, struct mbuf *mb) -{ - int err = 0; - - if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sq->stopped != 0)) { m_freem(mb); return (ENETDOWN); @@ -624,18 +559,9 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) return (ENXIO); } - if (unlikely(sq->br == NULL)) { - /* rate limited traffic */ - mtx_lock(&sq->lock); - ret = mlx5e_xmit_locked_no_br(ifp, sq, mb); - mtx_unlock(&sq->lock); - } else if (mtx_trylock(&sq->lock)) { - ret = mlx5e_xmit_locked(ifp, sq, mb); - mtx_unlock(&sq->lock); - } else { - ret = drbr_enqueue(ifp, sq->br, mb); - taskqueue_enqueue(sq->sq_tq, &sq->sq_task); - } + mtx_lock(&sq->lock); + ret = mlx5e_xmit_locked(ifp, sq, mb); + mtx_unlock(&sq->lock); return (ret); } @@ -649,18 +575,4 @@ mlx5e_tx_cq_comp(struct mlx5_core_cq *mcq) mlx5e_poll_tx_cq(sq, MLX5E_BUDGET_MAX); mlx5e_cq_arm(&sq->cq, MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock)); mtx_unlock(&sq->comp_lock); -} - -void -mlx5e_tx_que(void *context, int pending) -{ - struct mlx5e_sq *sq = context; - struct ifnet *ifp = sq->ifp; - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mtx_lock(&sq->lock); - if (!drbr_empty(ifp, sq->br)) - mlx5e_xmit_locked(ifp, sq, NULL); - mtx_unlock(&sq->lock); - } } From owner-svn-src-all@freebsd.org Wed Dec 12 12:58:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE07C130D9CE; Wed, 12 Dec 2018 12:58:07 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 51C2192C3C; Wed, 12 Dec 2018 12:58:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12B0383C9; Wed, 12 Dec 2018 12:58:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCw6QZ098033; Wed, 12 Dec 2018 12:58:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCw6ZM098026; Wed, 12 Dec 2018 12:58:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121258.wBCCw6ZM098026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341970 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 51C2192C3C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.799,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 12:58:08 -0000 Author: hselasky Date: Wed Dec 12 12:58:05 2018 New Revision: 341970 URL: https://svnweb.freebsd.org/changeset/base/341970 Log: MFC r341578 and r341655: mlx5en: Remove the DRBR and associated logic in the transmit path. The hardware queues are deep enough currently and using the DRBR and associated callbacks only leads to more task switching in the TX path. The is also a race setting the queue_state which can lead to hung TX rings. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:57:55 2018 (r341969) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:58:05 2018 (r341970) @@ -472,7 +472,6 @@ struct mlx5e_params { m(+1, u64 tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining tx packets") \ m(+1, u64 tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of tx packets to join") \ m(+1, u64 tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \ - m(+1, u64 tx_bufring_disable, "tx_bufring_disable", "0: Enable bufring 1: Disable bufring") \ m(+1, u64 tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \ m(+1, u64 tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \ m(+1, u64 hw_lro, "hw_lro", "set to enable hw_lro") \ @@ -605,8 +604,6 @@ struct mlx5e_sq { struct mlx5e_sq_stats stats; struct mlx5e_cq cq; - struct task sq_task; - struct taskqueue *sq_tq; /* pointers to per packet info: write@xmit, read@completion */ struct mlx5e_sq_mbuf *mbuf; @@ -627,7 +624,6 @@ struct mlx5e_sq { struct mlx5_wq_ctrl wq_ctrl; struct mlx5e_priv *priv; int tc; - unsigned int queue_state; } __aligned(MLX5E_CACHELINE_SIZE); static inline bool @@ -833,7 +829,6 @@ void mlx5e_cq_error_event(struct mlx5_core_cq *mcq, in void mlx5e_rx_cq_comp(struct mlx5_core_cq *); void mlx5e_tx_cq_comp(struct mlx5_core_cq *); struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq); -void mlx5e_tx_que(void *context, int pending); int mlx5e_open_flow_table(struct mlx5e_priv *priv); void mlx5e_close_flow_table(struct mlx5e_priv *priv); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:57:55 2018 (r341969) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:58:05 2018 (r341970) @@ -703,18 +703,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) mlx5e_open_locked(priv->ifp); break; - case MLX5_PARAM_OFFSET(tx_bufring_disable): - /* rangecheck input value */ - priv->params_ethtool.tx_bufring_disable = - priv->params_ethtool.tx_bufring_disable ? 1 : 0; - - /* reconfigure the sendqueues, if any */ - if (was_opened) { - mlx5e_close_locked(priv->ifp); - mlx5e_open_locked(priv->ifp); - } - break; - case MLX5_PARAM_OFFSET(tx_completion_fact): /* network interface must be down */ if (was_opened) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:57:55 2018 (r341969) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:58:05 2018 (r341970) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Mellanox Technologies. All rights reserved. + * Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1030,13 +1030,8 @@ mlx5e_create_sq(struct mlx5e_channel *c, struct mlx5e_priv *priv = c->priv; struct mlx5_core_dev *mdev = priv->mdev; char buffer[16]; - void *sqc = param->sqc; void *sqc_wq = MLX5_ADDR_OF(sqc, sqc, wq); -#ifdef RSS - cpuset_t cpu_mask; - int cpu_id; -#endif int err; /* Create DMA descriptor TAG */ @@ -1079,37 +1074,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->min_inline_mode = priv->params.tx_min_inline_mode; sq->vlan_inline_cap = MLX5_CAP_ETH(mdev, wqe_vlan_insert); - /* check if we should allocate a second packet buffer */ - if (priv->params_ethtool.tx_bufring_disable == 0) { - sq->br = buf_ring_alloc(MLX5E_SQ_TX_QUEUE_SIZE, M_MLX5EN, - M_WAITOK, &sq->lock); - if (sq->br == NULL) { - if_printf(c->ifp, "%s: Failed allocating sq drbr buffer\n", - __func__); - err = -ENOMEM; - goto err_free_sq_db; - } - - sq->sq_tq = taskqueue_create_fast("mlx5e_que", M_WAITOK, - taskqueue_thread_enqueue, &sq->sq_tq); - if (sq->sq_tq == NULL) { - if_printf(c->ifp, "%s: Failed allocating taskqueue\n", - __func__); - err = -ENOMEM; - goto err_free_drbr; - } - - TASK_INIT(&sq->sq_task, 0, mlx5e_tx_que, sq); -#ifdef RSS - cpu_id = rss_getcpu(c->ix % rss_getnumbuckets()); - CPU_SETOF(cpu_id, &cpu_mask); - taskqueue_start_threads_cpuset(&sq->sq_tq, 1, PI_NET, &cpu_mask, - "%s TX SQ%d.%d CPU%d", c->ifp->if_xname, c->ix, tc, cpu_id); -#else - taskqueue_start_threads(&sq->sq_tq, 1, PI_NET, - "%s TX SQ%d.%d", c->ifp->if_xname, c->ix, tc); -#endif - } snprintf(buffer, sizeof(buffer), "txstat%dtc%d", c->ix, tc); mlx5e_create_stats(&sq->stats.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), buffer, mlx5e_sq_stats_desc, MLX5E_SQ_STATS_NUM, @@ -1117,10 +1081,6 @@ mlx5e_create_sq(struct mlx5e_channel *c, return (0); -err_free_drbr: - buf_ring_free(sq->br, M_MLX5EN); -err_free_sq_db: - mlx5e_free_sq_db(sq); err_sq_wq_destroy: mlx5_wq_destroy(&sq->wq_ctrl); @@ -1142,12 +1102,6 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); mlx5_unmap_free_uar(sq->priv->mdev, &sq->uar); - if (sq->sq_tq != NULL) { - taskqueue_drain(sq->sq_tq, &sq->sq_task); - taskqueue_free(sq->sq_tq); - } - if (sq->br != NULL) - buf_ring_free(sq->br, M_MLX5EN); } int @@ -1245,8 +1199,6 @@ mlx5e_open_sq(struct mlx5e_channel *c, err = mlx5e_modify_sq(sq, MLX5_SQC_STATE_RST, MLX5_SQC_STATE_RDY); if (err) goto err_disable_sq; - - WRITE_ONCE(sq->queue_state, MLX5E_SQ_READY); return (0); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 12:57:55 2018 (r341969) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 12:58:05 2018 (r341970) @@ -230,10 +230,6 @@ mlx5e_get_header_size(struct mbuf *mb) return (eth_hdr_len); } -/* - * The return value is not going back to the stack because of - * the drbr - */ static int mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) { @@ -250,13 +246,9 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) u16 pi; u8 opcode; - /* - * Return ENOBUFS if the queue is full, this may trigger reinsertion - * of the mbuf into the drbr (see mlx5e_xmit_locked) - */ - if (unlikely(!mlx5e_sq_has_room_for(sq, 2 * MLX5_SEND_WQE_MAX_WQEBBS))) { + /* Return ENOBUFS if the queue is full */ + if (unlikely(!mlx5e_sq_has_room_for(sq, 2 * MLX5_SEND_WQE_MAX_WQEBBS))) return (ENOBUFS); - } /* Align SQ edge with NOPs to avoid WQE wrap around */ pi = ((~sq->pc) & sq->wq.sz_m1); @@ -478,71 +470,14 @@ mlx5e_poll_tx_cq(struct mlx5e_sq *sq, int budget) atomic_thread_fence_rel(); sq->cc = sqcc; - - if (sq->sq_tq != NULL && - atomic_cmpset_int(&sq->queue_state, MLX5E_SQ_FULL, MLX5E_SQ_READY)) - taskqueue_enqueue(sq->sq_tq, &sq->sq_task); } static int mlx5e_xmit_locked(struct ifnet *ifp, struct mlx5e_sq *sq, struct mbuf *mb) { - struct mbuf *next; int err = 0; - if (likely(mb != NULL)) { - /* - * If we can't insert mbuf into drbr, try to xmit anyway. - * We keep the error we got so we could return that after xmit. - */ - err = drbr_enqueue(ifp, sq->br, mb); - } - - /* - * Check if the network interface is closed or if the SQ is - * being stopped: - */ if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - sq->stopped != 0)) - return (err); - - /* Process the queue */ - while ((next = drbr_peek(ifp, sq->br)) != NULL) { - if (mlx5e_sq_xmit(sq, &next) != 0) { - if (next != NULL) { - drbr_putback(ifp, sq->br, next); - atomic_store_rel_int(&sq->queue_state, MLX5E_SQ_FULL); - break; - } - } - drbr_advance(ifp, sq->br); - } - /* Check if we need to write the doorbell */ - if (likely(sq->doorbell.d64 != 0)) { - mlx5e_tx_notify_hw(sq, sq->doorbell.d32, 0); - sq->doorbell.d64 = 0; - } - /* - * Check if we need to start the event timer which flushes the - * transmit ring on timeout: - */ - if (unlikely(sq->cev_next_state == MLX5E_CEV_STATE_INITIAL && - sq->cev_factor != 1)) { - /* start the timer */ - mlx5e_sq_cev_timeout(sq); - } else { - /* don't send NOPs yet */ - sq->cev_next_state = MLX5E_CEV_STATE_HOLD_NOPS; - } - return (err); -} - -static int -mlx5e_xmit_locked_no_br(struct ifnet *ifp, struct mlx5e_sq *sq, struct mbuf *mb) -{ - int err = 0; - - if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sq->stopped != 0)) { m_freem(mb); return (ENETDOWN); @@ -589,18 +524,9 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) return (ENXIO); } - if (unlikely(sq->br == NULL)) { - /* rate limited traffic */ - mtx_lock(&sq->lock); - ret = mlx5e_xmit_locked_no_br(ifp, sq, mb); - mtx_unlock(&sq->lock); - } else if (mtx_trylock(&sq->lock)) { - ret = mlx5e_xmit_locked(ifp, sq, mb); - mtx_unlock(&sq->lock); - } else { - ret = drbr_enqueue(ifp, sq->br, mb); - taskqueue_enqueue(sq->sq_tq, &sq->sq_task); - } + mtx_lock(&sq->lock); + ret = mlx5e_xmit_locked(ifp, sq, mb); + mtx_unlock(&sq->lock); return (ret); } @@ -614,18 +540,4 @@ mlx5e_tx_cq_comp(struct mlx5_core_cq *mcq) mlx5e_poll_tx_cq(sq, MLX5E_BUDGET_MAX); mlx5e_cq_arm(&sq->cq, MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock)); mtx_unlock(&sq->comp_lock); -} - -void -mlx5e_tx_que(void *context, int pending) -{ - struct mlx5e_sq *sq = context; - struct ifnet *ifp = sq->ifp; - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mtx_lock(&sq->lock); - if (!drbr_empty(ifp, sq->br)) - mlx5e_xmit_locked(ifp, sq, NULL); - mtx_unlock(&sq->lock); - } } From owner-svn-src-all@freebsd.org Wed Dec 12 13:00:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E16130DAE6; Wed, 12 Dec 2018 13:00:00 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 BD2AB92E02; Wed, 12 Dec 2018 12:59:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94E6083CA; Wed, 12 Dec 2018 12:59:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCCxx0R098190; Wed, 12 Dec 2018 12:59:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCCxwNr098180; Wed, 12 Dec 2018 12:59:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121259.wBCCxwNr098180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 12:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341971 - in stable/12/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 341971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD2AB92E02 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.804,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:00:00 -0000 Author: hselasky Date: Wed Dec 12 12:59:57 2018 New Revision: 341971 URL: https://svnweb.freebsd.org/changeset/base/341971 Log: MFC r341579: mlx5en: Fix for inlining issues in transmit path 1) Don't exceed the drivers own hardcoded TX inline limit. The blueflame register size can be much greater than the hardcoded limit for inlining. Make sure we don't exceed the drivers own limit, because this also means that the maximum number of TX fragments becomes invalid and then memory size assumptions in the TX path no longer hold up. 2) Make sure the mlx5_query_min_inline() function returns an error code. 3) Header inlining is required when using TSO. 4) Catch failure to compute inline header size for TSO. 5) Add support for UDP when computing inline header size. 6) Fix for inlining issues with regards to DSCP. Make sure we inline 4 bytes beyond the ethernet and/or VLAN header to workaround a hardware bug extracting the DSCP field from the IPv4/v6 header. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/en_rl.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c stable/12/sys/dev/mlx5/vport.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 12:59:57 2018 (r341971) @@ -222,20 +222,28 @@ int mlx5_query_nic_vport_min_inline(struct mlx5_core_d } EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_min_inline); -void mlx5_query_min_inline(struct mlx5_core_dev *mdev, - u8 *min_inline_mode) +int mlx5_query_min_inline(struct mlx5_core_dev *mdev, + u8 *min_inline_mode) { + int err; + switch (MLX5_CAP_ETH(mdev, wqe_inline_mode)) { case MLX5_CAP_INLINE_MODE_L2: *min_inline_mode = MLX5_INLINE_MODE_L2; + err = 0; break; case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT: - mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode); + err = mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode); break; case MLX5_CAP_INLINE_MODE_NOT_REQUIRED: *min_inline_mode = MLX5_INLINE_MODE_NONE; + err = 0; break; + default: + err = -EINVAL; + break; } + return err; } EXPORT_SYMBOL_GPL(mlx5_query_min_inline); Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:59:57 2018 (r341971) @@ -619,7 +619,9 @@ struct mlx5e_sq { u32 mkey_be; u16 max_inline; u8 min_inline_mode; - u8 vlan_inline_cap; + u8 min_insert_caps; +#define MLX5E_INSERT_VLAN 1 +#define MLX5E_INSERT_NON_VLAN 2 /* control path */ struct mlx5_wq_ctrl wq_ctrl; @@ -925,6 +927,7 @@ void mlx5e_drain_sq(struct mlx5e_sq *); void mlx5e_modify_tx_dma(struct mlx5e_priv *priv, uint8_t value); void mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t value); void mlx5e_resume_sq(struct mlx5e_sq *sq); -u8 mlx5e_params_calculate_tx_min_inline(struct mlx5_core_dev *mdev); +void mlx5e_update_sq_inline(struct mlx5e_sq *sq); +void mlx5e_refresh_sq_inline(struct mlx5e_priv *priv); #endif /* _MLX5_EN_H_ */ Modified: stable/12/sys/dev/mlx5/mlx5_en/en_rl.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en_rl.h Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/mlx5_en/en_rl.h Wed Dec 12 12:59:57 2018 (r341971) @@ -166,6 +166,7 @@ struct mlx5e_rl_priv_data { int mlx5e_rl_init(struct mlx5e_priv *priv); void mlx5e_rl_cleanup(struct mlx5e_priv *priv); +void mlx5e_rl_refresh_sq_inline(struct mlx5e_rl_priv_data *rl); if_snd_tag_alloc_t mlx5e_rl_snd_tag_alloc; if_snd_tag_modify_t mlx5e_rl_snd_tag_modify; if_snd_tag_query_t mlx5e_rl_snd_tag_query; Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:59:57 2018 (r341971) @@ -374,6 +374,12 @@ mlx5e_trust_state_handler(SYSCTL_HANDLER_ARGS) goto done; priv->params_ethtool.trust_state = result; + + /* update inline mode */ + mlx5e_refresh_sq_inline(priv); +#ifdef RATELIMIT + mlx5e_rl_refresh_sq_inline(&priv->rl); +#endif done: PRIV_UNLOCK(priv); return (err); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:59:57 2018 (r341971) @@ -1124,6 +1124,52 @@ static const char *mlx5e_sq_stats_desc[] = { MLX5E_SQ_STATS(MLX5E_STATS_DESC) }; +void +mlx5e_update_sq_inline(struct mlx5e_sq *sq) +{ + sq->max_inline = sq->priv->params.tx_max_inline; + sq->min_inline_mode = sq->priv->params.tx_min_inline_mode; + + /* + * Check if trust state is DSCP or if inline mode is NONE which + * indicates CX-5 or newer hardware. + */ + if (sq->priv->params_ethtool.trust_state != MLX5_QPTS_TRUST_PCP || + sq->min_inline_mode == MLX5_INLINE_MODE_NONE) { + if (MLX5_CAP_ETH(sq->priv->mdev, wqe_vlan_insert)) + sq->min_insert_caps = MLX5E_INSERT_VLAN | MLX5E_INSERT_NON_VLAN; + else + sq->min_insert_caps = MLX5E_INSERT_NON_VLAN; + } else { + sq->min_insert_caps = 0; + } +} + +static void +mlx5e_refresh_sq_inline_sub(struct mlx5e_priv *priv, struct mlx5e_channel *c) +{ + int i; + + for (i = 0; i != c->num_tc; i++) { + mtx_lock(&c->sq[i].lock); + mlx5e_update_sq_inline(&c->sq[i]); + mtx_unlock(&c->sq[i].lock); + } +} + +void +mlx5e_refresh_sq_inline(struct mlx5e_priv *priv) +{ + int i; + + /* check if channels are closed */ + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) + return; + + for (i = 0; i < priv->params.num_channels; i++) + mlx5e_refresh_sq_inline_sub(priv, priv->channel[i]); +} + static int mlx5e_create_sq(struct mlx5e_channel *c, int tc, @@ -1173,10 +1219,9 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->ifp = priv->ifp; sq->priv = priv; sq->tc = tc; - sq->max_inline = priv->params.tx_max_inline; - sq->min_inline_mode = priv->params.tx_min_inline_mode; - sq->vlan_inline_cap = MLX5_CAP_ETH(mdev, wqe_vlan_insert); + mlx5e_update_sq_inline(sq); + snprintf(buffer, sizeof(buffer), "txstat%dtc%d", c->ix, tc); mlx5e_create_stats(&sq->stats.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), buffer, mlx5e_sq_stats_desc, MLX5E_SQ_STATS_NUM, @@ -2985,18 +3030,24 @@ mlx5e_check_required_hca_cap(struct mlx5_core_dev *mde static u16 mlx5e_get_max_inline_cap(struct mlx5_core_dev *mdev) { - int bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2; + uint32_t bf_buf_size = (1U << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2U; - return bf_buf_size - - sizeof(struct mlx5e_tx_wqe) + - 2 /*sizeof(mlx5e_tx_wqe.inline_hdr_start)*/; + bf_buf_size -= sizeof(struct mlx5e_tx_wqe) - 2; + + /* verify against driver hardware limit */ + if (bf_buf_size > MLX5E_MAX_TX_INLINE) + bf_buf_size = MLX5E_MAX_TX_INLINE; + + return (bf_buf_size); } -static void +static int mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, struct mlx5e_priv *priv, int num_comp_vectors) { + int err; + /* * TODO: Consider link speed for setting "log_sq_size", * "log_rq_size" and "cq_moderation_xxx": @@ -3028,8 +3079,11 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, priv->params.default_vlan_prio = 0; priv->counter_set_id = -1; priv->params.tx_max_inline = mlx5e_get_max_inline_cap(mdev); - mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode); + err = mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode); + if (err) + return (err); + /* * hw lro is currently defaulted to off. when it won't anymore we * will consider the HW capability: "!!MLX5_CAP_ETH(mdev, lro_cap)" @@ -3051,6 +3105,8 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, INIT_WORK(&priv->update_stats_work, mlx5e_update_stats_work); INIT_WORK(&priv->update_carrier_work, mlx5e_update_carrier_work); INIT_WORK(&priv->set_rx_mode_work, mlx5e_set_rx_mode_work); + + return (0); } static int @@ -3290,20 +3346,6 @@ mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t v } } -u8 -mlx5e_params_calculate_tx_min_inline(struct mlx5_core_dev *mdev) -{ - u8 min_inline_mode; - - min_inline_mode = MLX5_INLINE_MODE_L2; - mlx5_query_min_inline(mdev, &min_inline_mode); - if (min_inline_mode == MLX5_INLINE_MODE_NONE && - !MLX5_CAP_ETH(mdev, wqe_vlan_insert)) - min_inline_mode = MLX5_INLINE_MODE_L2; - - return (min_inline_mode); -} - static void mlx5e_add_hw_stats(struct mlx5e_priv *priv) { @@ -3583,7 +3625,12 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) mlx5_core_err(mdev, "SYSCTL_ADD_NODE() failed\n"); goto err_free_sysctl; } - mlx5e_build_ifp_priv(mdev, priv, ncv); + + err = mlx5e_build_ifp_priv(mdev, priv, ncv); + if (err) { + mlx5_core_err(mdev, "mlx5e_build_ifp_priv() failed (%d)\n", err); + goto err_free_sysctl; + } snprintf(unit, sizeof(unit), "mce%u_wq", device_get_unit(mdev->pdev->dev.bsddev)); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 12:59:57 2018 (r341971) @@ -137,10 +137,9 @@ mlx5e_rl_create_sq(struct mlx5e_priv *priv, struct mlx sq->mkey_be = cpu_to_be32(priv->mr.key); sq->ifp = priv->ifp; sq->priv = priv; - sq->max_inline = priv->params.tx_max_inline; - sq->min_inline_mode = priv->params.tx_min_inline_mode; - sq->vlan_inline_cap = MLX5_CAP_ETH(mdev, wqe_vlan_insert); + mlx5e_update_sq_inline(sq); + return (0); err_sq_wq_destroy: @@ -1231,6 +1230,32 @@ mlx5e_rl_refresh_channel_params(struct mlx5e_rl_priv_d } } return (0); +} + +void +mlx5e_rl_refresh_sq_inline(struct mlx5e_rl_priv_data *rl) +{ + uint64_t x; + uint64_t y; + + for (y = 0; y != rl->param.tx_worker_threads_def; y++) { + struct mlx5e_rl_worker *rlw = rl->workers + y; + + for (x = 0; x != rl->param.tx_channels_per_worker_def; x++) { + struct mlx5e_rl_channel *channel; + struct mlx5e_sq *sq; + + channel = rlw->channels + x; + sq = channel->sq; + + if (sq == NULL) + continue; + + mtx_lock(&sq->lock); + mlx5e_update_sq_inline(sq); + mtx_unlock(&sq->lock); + } + } } static int Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 12:59:57 2018 (r341971) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Mellanox Technologies. All rights reserved. + * Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -154,49 +154,53 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) } static inline u16 -mlx5e_get_inline_hdr_size(struct mlx5e_sq *sq, struct mbuf *mb) +mlx5e_get_l2_header_size(struct mlx5e_sq *sq, struct mbuf *mb) { + struct ether_vlan_header *eh; + uint16_t eth_type; + int min_inline; - switch(sq->min_inline_mode) { - case MLX5_INLINE_MODE_NONE: + eh = mtod(mb, struct ether_vlan_header *); + if (unlikely(mb->m_len < ETHER_HDR_LEN)) { + goto max_inline; + } else if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + if (unlikely(mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN))) + goto max_inline; + eth_type = ntohs(eh->evl_proto); + min_inline = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + } else { + eth_type = ntohs(eh->evl_encap_proto); + min_inline = ETHER_HDR_LEN; + } + + switch (eth_type) { + case ETHERTYPE_IP: + case ETHERTYPE_IPV6: /* - * When inline mode is NONE, we do not need to copy - * headers into WQEs, except when vlan tag framing is - * requested. Hardware might offload vlan tagging on - * transmit. This is a separate capability, which is - * known to be disabled on ConnectX-5 due to a hardware - * bug RM 931383. If vlan_inline_cap is not present and - * the packet has vlan tag, fall back to inlining. + * Make sure the TOS(IPv4) or traffic class(IPv6) + * field gets inlined. Else the SQ may stall. */ - if ((mb->m_flags & M_VLANTAG) != 0 && - sq->vlan_inline_cap == 0) - break; - return (0); - case MLX5_INLINE_MODE_L2: - /* - * Due to hardware limitations, when trust mode is - * DSCP, the hardware may request MLX5_INLINE_MODE_L2 - * while it really needs all L2 headers and the 4 first - * bytes of the IP header (which include the - * TOS/traffic-class). - * - * To avoid doing a firmware command for querying the - * trust state and parsing the mbuf for doing - * unnecessary checks (VLAN/eth_type) in the fast path, - * we are going for the worth case (22 Bytes) if - * the mb->m_pkthdr.len allows it. - */ - if (mb->m_pkthdr.len > ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN + 4) - return (MIN(sq->max_inline, ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN + 4)); + min_inline += 4; break; + default: + goto max_inline; } - return (MIN(sq->max_inline, mb->m_pkthdr.len)); + + /* + * m_copydata() will be used on the remaining header which + * does not need to reside within the first m_len bytes of + * data: + */ + if (mb->m_pkthdr.len < min_inline) + goto max_inline; + return (min_inline); + +max_inline: + return (MIN(mb->m_pkthdr.len, sq->max_inline)); } static int -mlx5e_get_header_size(struct mbuf *mb) +mlx5e_get_full_header_size(struct mbuf *mb) { struct ether_vlan_header *eh; struct tcphdr *th; @@ -210,31 +214,46 @@ mlx5e_get_header_size(struct mbuf *mb) if (mb->m_len < ETHER_HDR_LEN) return (0); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + if (mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)) + return (0); eth_type = ntohs(eh->evl_proto); eth_hdr_len = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; } else { eth_type = ntohs(eh->evl_encap_proto); eth_hdr_len = ETHER_HDR_LEN; } - if (mb->m_len < eth_hdr_len) - return (0); switch (eth_type) { case ETHERTYPE_IP: ip = (struct ip *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip)) return (0); - if (ip->ip_p != IPPROTO_TCP) + switch (ip->ip_p) { + case IPPROTO_TCP: + ip_hlen = ip->ip_hl << 2; + eth_hdr_len += ip_hlen; + break; + case IPPROTO_UDP: + ip_hlen = ip->ip_hl << 2; + eth_hdr_len += ip_hlen + 8; + goto done; + default: return (0); - ip_hlen = ip->ip_hl << 2; - eth_hdr_len += ip_hlen; + } break; case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip6)) return (0); - if (ip6->ip6_nxt != IPPROTO_TCP) + switch (ip6->ip6_nxt) { + case IPPROTO_TCP: + eth_hdr_len += sizeof(*ip6); + break; + case IPPROTO_UDP: + eth_hdr_len += sizeof(*ip6) + 8; + goto done; + default: return (0); - eth_hdr_len += sizeof(*ip6); + } break; default: return (0); @@ -244,7 +263,13 @@ mlx5e_get_header_size(struct mbuf *mb) th = (struct tcphdr *)(mb->m_data + eth_hdr_len); tcp_hlen = th->th_off << 2; eth_hdr_len += tcp_hlen; - if (mb->m_len < eth_hdr_len) +done: + /* + * m_copydata() will be used on the remaining header which + * does not need to reside within the first m_len bytes of + * data: + */ + if (mb->m_pkthdr.len < eth_hdr_len) return (0); return (eth_hdr_len); } @@ -306,7 +331,11 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) wqe->eth.mss = cpu_to_be16(mss); opcode = MLX5_OPCODE_LSO; - ihs = mlx5e_get_header_size(mb); + ihs = mlx5e_get_full_header_size(mb); + if (unlikely(ihs == 0)) { + err = EINVAL; + goto tx_drop; + } payload_len = mb->m_pkthdr.len - ihs; if (payload_len == 0) num_pkts = 1; @@ -318,46 +347,72 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) sq->stats.tso_bytes += payload_len; } else { opcode = MLX5_OPCODE_SEND; - ihs = mlx5e_get_inline_hdr_size(sq, mb); + + switch (sq->min_inline_mode) { + case MLX5_INLINE_MODE_IP: + case MLX5_INLINE_MODE_TCP_UDP: + ihs = mlx5e_get_full_header_size(mb); + if (unlikely(ihs == 0)) + ihs = mlx5e_get_l2_header_size(sq, mb); + break; + case MLX5_INLINE_MODE_L2: + ihs = mlx5e_get_l2_header_size(sq, mb); + break; + case MLX5_INLINE_MODE_NONE: + /* FALLTHROUGH */ + default: + if ((mb->m_flags & M_VLANTAG) != 0 && + (sq->min_insert_caps & MLX5E_INSERT_VLAN) != 0) { + /* inlining VLAN data is not required */ + wqe->eth.vlan_cmd = htons(0x8000); /* bit 0 CVLAN */ + wqe->eth.vlan_hdr = htons(mb->m_pkthdr.ether_vtag); + ihs = 0; + } else if ((mb->m_flags & M_VLANTAG) == 0 && + (sq->min_insert_caps & MLX5E_INSERT_NON_VLAN) != 0) { + /* inlining non-VLAN data is not required */ + ihs = 0; + } else { + /* we are forced to inlining L2 header, if any */ + ihs = mlx5e_get_l2_header_size(sq, mb); + } + break; + } sq->mbuf[pi].num_bytes = max_t (unsigned int, mb->m_pkthdr.len, ETHER_MIN_LEN - ETHER_CRC_LEN); } - if (ihs == 0) { - if ((mb->m_flags & M_VLANTAG) != 0) { - wqe->eth.vlan_cmd = htons(0x8000); /* bit 0 CVLAN */ - wqe->eth.vlan_hdr = htons(mb->m_pkthdr.ether_vtag); - } else { - wqe->eth.inline_hdr_sz = 0; - } - } else { - if ((mb->m_flags & M_VLANTAG) != 0) { - struct ether_vlan_header *eh = (struct ether_vlan_header - *)wqe->eth.inline_hdr_start; - /* Range checks */ - if (ihs > (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN)) - ihs = (MLX5E_MAX_TX_INLINE - - ETHER_VLAN_ENCAP_LEN); - else if (ihs < ETHER_HDR_LEN) { - err = EINVAL; - goto tx_drop; - } - m_copydata(mb, 0, ETHER_HDR_LEN, (caddr_t)eh); - m_adj(mb, ETHER_HDR_LEN); - /* Insert 4 bytes VLAN tag into data stream */ - eh->evl_proto = eh->evl_encap_proto; - eh->evl_encap_proto = htons(ETHERTYPE_VLAN); - eh->evl_tag = htons(mb->m_pkthdr.ether_vtag); - /* Copy rest of header data, if any */ - m_copydata(mb, 0, ihs - ETHER_HDR_LEN, (caddr_t)(eh + - 1)); - m_adj(mb, ihs - ETHER_HDR_LEN); - /* Extend header by 4 bytes */ - ihs += ETHER_VLAN_ENCAP_LEN; - } else { - m_copydata(mb, 0, ihs, wqe->eth.inline_hdr_start); - m_adj(mb, ihs); + if (likely(ihs == 0)) { + /* nothing to inline */ + } else if (unlikely(ihs > sq->max_inline)) { + /* inline header size is too big */ + err = EINVAL; + goto tx_drop; + } else if ((mb->m_flags & M_VLANTAG) != 0) { + struct ether_vlan_header *eh = (struct ether_vlan_header *) + wqe->eth.inline_hdr_start; + + /* Range checks */ + if (unlikely(ihs > (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN))) + ihs = (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN); + else if (unlikely(ihs < ETHER_HDR_LEN)) { + err = EINVAL; + goto tx_drop; } + m_copydata(mb, 0, ETHER_HDR_LEN, (caddr_t)eh); + m_adj(mb, ETHER_HDR_LEN); + /* Insert 4 bytes VLAN tag into data stream */ + eh->evl_proto = eh->evl_encap_proto; + eh->evl_encap_proto = htons(ETHERTYPE_VLAN); + eh->evl_tag = htons(mb->m_pkthdr.ether_vtag); + /* Copy rest of header data, if any */ + m_copydata(mb, 0, ihs - ETHER_HDR_LEN, (caddr_t)(eh + 1)); + m_adj(mb, ihs - ETHER_HDR_LEN); + /* Extend header by 4 bytes */ + ihs += ETHER_VLAN_ENCAP_LEN; + wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); + } else { + m_copydata(mb, 0, ihs, wqe->eth.inline_hdr_start); + m_adj(mb, ihs); wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); } Modified: stable/12/sys/dev/mlx5/vport.h ============================================================================== --- stable/12/sys/dev/mlx5/vport.h Wed Dec 12 12:58:05 2018 (r341970) +++ stable/12/sys/dev/mlx5/vport.h Wed Dec 12 12:59:57 2018 (r341971) @@ -88,7 +88,7 @@ int mlx5_set_nic_vport_current_mac(struct mlx5_core_de bool other_vport, u8 *addr); int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev, u16 vport, u8 *min_inline); -void mlx5_query_min_inline(struct mlx5_core_dev *mdev, u8 *min_inline); +int mlx5_query_min_inline(struct mlx5_core_dev *mdev, u8 *min_inline); int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev, u16 vport, u8 min_inline); int mlx5_modify_nic_vport_port_guid(struct mlx5_core_dev *mdev, From owner-svn-src-all@freebsd.org Wed Dec 12 13:00:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3C06130DB83; Wed, 12 Dec 2018 13:00:57 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 A3A1E92F9A; Wed, 12 Dec 2018 13:00:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A65E83EE; Wed, 12 Dec 2018 13:00:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCD0v8A098336; Wed, 12 Dec 2018 13:00:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCD0uBW098329; Wed, 12 Dec 2018 13:00:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121300.wBCD0uBW098329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341972 - in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 341972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A3A1E92F9A X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.80 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.80)[-0.804,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:00:58 -0000 Author: hselasky Date: Wed Dec 12 13:00:56 2018 New Revision: 341972 URL: https://svnweb.freebsd.org/changeset/base/341972 Log: MFC r341579: mlx5en: Fix for inlining issues in transmit path 1) Don't exceed the drivers own hardcoded TX inline limit. The blueflame register size can be much greater than the hardcoded limit for inlining. Make sure we don't exceed the drivers own limit, because this also means that the maximum number of TX fragments becomes invalid and then memory size assumptions in the TX path no longer hold up. 2) Make sure the mlx5_query_min_inline() function returns an error code. 3) Header inlining is required when using TSO. 4) Catch failure to compute inline header size for TSO. 5) Add support for UDP when computing inline header size. 6) Fix for inlining issues with regards to DSCP. Make sure we inline 4 bytes beyond the ethernet and/or VLAN header to workaround a hardware bug extracting the DSCP field from the IPv4/v6 header. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c stable/11/sys/dev/mlx5/vport.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 12:59:57 2018 (r341971) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Dec 12 13:00:56 2018 (r341972) @@ -222,20 +222,28 @@ int mlx5_query_nic_vport_min_inline(struct mlx5_core_d } EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_min_inline); -void mlx5_query_min_inline(struct mlx5_core_dev *mdev, - u8 *min_inline_mode) +int mlx5_query_min_inline(struct mlx5_core_dev *mdev, + u8 *min_inline_mode) { + int err; + switch (MLX5_CAP_ETH(mdev, wqe_inline_mode)) { case MLX5_CAP_INLINE_MODE_L2: *min_inline_mode = MLX5_INLINE_MODE_L2; + err = 0; break; case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT: - mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode); + err = mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode); break; case MLX5_CAP_INLINE_MODE_NOT_REQUIRED: *min_inline_mode = MLX5_INLINE_MODE_NONE; + err = 0; break; + default: + err = -EINVAL; + break; } + return err; } EXPORT_SYMBOL_GPL(mlx5_query_min_inline); Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 12:59:57 2018 (r341971) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:00:56 2018 (r341972) @@ -618,7 +618,9 @@ struct mlx5e_sq { u32 mkey_be; u16 max_inline; u8 min_inline_mode; - u8 vlan_inline_cap; + u8 min_insert_caps; +#define MLX5E_INSERT_VLAN 1 +#define MLX5E_INSERT_NON_VLAN 2 /* control path */ struct mlx5_wq_ctrl wq_ctrl; @@ -901,6 +903,7 @@ void mlx5e_drain_sq(struct mlx5e_sq *); void mlx5e_modify_tx_dma(struct mlx5e_priv *priv, uint8_t value); void mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t value); void mlx5e_resume_sq(struct mlx5e_sq *sq); -u8 mlx5e_params_calculate_tx_min_inline(struct mlx5_core_dev *mdev); +void mlx5e_update_sq_inline(struct mlx5e_sq *sq); +void mlx5e_refresh_sq_inline(struct mlx5e_priv *priv); #endif /* _MLX5_EN_H_ */ Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 12:59:57 2018 (r341971) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:00:56 2018 (r341972) @@ -374,6 +374,12 @@ mlx5e_trust_state_handler(SYSCTL_HANDLER_ARGS) goto done; priv->params_ethtool.trust_state = result; + + /* update inline mode */ + mlx5e_refresh_sq_inline(priv); +#ifdef RATELIMIT + mlx5e_rl_refresh_sq_inline(&priv->rl); +#endif done: PRIV_UNLOCK(priv); return (err); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 12:59:57 2018 (r341971) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:00:56 2018 (r341972) @@ -1021,6 +1021,52 @@ static const char *mlx5e_sq_stats_desc[] = { MLX5E_SQ_STATS(MLX5E_STATS_DESC) }; +void +mlx5e_update_sq_inline(struct mlx5e_sq *sq) +{ + sq->max_inline = sq->priv->params.tx_max_inline; + sq->min_inline_mode = sq->priv->params.tx_min_inline_mode; + + /* + * Check if trust state is DSCP or if inline mode is NONE which + * indicates CX-5 or newer hardware. + */ + if (sq->priv->params_ethtool.trust_state != MLX5_QPTS_TRUST_PCP || + sq->min_inline_mode == MLX5_INLINE_MODE_NONE) { + if (MLX5_CAP_ETH(sq->priv->mdev, wqe_vlan_insert)) + sq->min_insert_caps = MLX5E_INSERT_VLAN | MLX5E_INSERT_NON_VLAN; + else + sq->min_insert_caps = MLX5E_INSERT_NON_VLAN; + } else { + sq->min_insert_caps = 0; + } +} + +static void +mlx5e_refresh_sq_inline_sub(struct mlx5e_priv *priv, struct mlx5e_channel *c) +{ + int i; + + for (i = 0; i != c->num_tc; i++) { + mtx_lock(&c->sq[i].lock); + mlx5e_update_sq_inline(&c->sq[i]); + mtx_unlock(&c->sq[i].lock); + } +} + +void +mlx5e_refresh_sq_inline(struct mlx5e_priv *priv) +{ + int i; + + /* check if channels are closed */ + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) + return; + + for (i = 0; i < priv->params.num_channels; i++) + mlx5e_refresh_sq_inline_sub(priv, priv->channel[i]); +} + static int mlx5e_create_sq(struct mlx5e_channel *c, int tc, @@ -1070,10 +1116,9 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->ifp = priv->ifp; sq->priv = priv; sq->tc = tc; - sq->max_inline = priv->params.tx_max_inline; - sq->min_inline_mode = priv->params.tx_min_inline_mode; - sq->vlan_inline_cap = MLX5_CAP_ETH(mdev, wqe_vlan_insert); + mlx5e_update_sq_inline(sq); + snprintf(buffer, sizeof(buffer), "txstat%dtc%d", c->ix, tc); mlx5e_create_stats(&sq->stats.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), buffer, mlx5e_sq_stats_desc, MLX5E_SQ_STATS_NUM, @@ -2872,18 +2917,24 @@ mlx5e_check_required_hca_cap(struct mlx5_core_dev *mde static u16 mlx5e_get_max_inline_cap(struct mlx5_core_dev *mdev) { - int bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2; + uint32_t bf_buf_size = (1U << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2U; - return bf_buf_size - - sizeof(struct mlx5e_tx_wqe) + - 2 /*sizeof(mlx5e_tx_wqe.inline_hdr_start)*/; + bf_buf_size -= sizeof(struct mlx5e_tx_wqe) - 2; + + /* verify against driver hardware limit */ + if (bf_buf_size > MLX5E_MAX_TX_INLINE) + bf_buf_size = MLX5E_MAX_TX_INLINE; + + return (bf_buf_size); } -static void +static int mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, struct mlx5e_priv *priv, int num_comp_vectors) { + int err; + /* * TODO: Consider link speed for setting "log_sq_size", * "log_rq_size" and "cq_moderation_xxx": @@ -2915,8 +2966,11 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, priv->params.default_vlan_prio = 0; priv->counter_set_id = -1; priv->params.tx_max_inline = mlx5e_get_max_inline_cap(mdev); - mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode); + err = mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode); + if (err) + return (err); + /* * hw lro is currently defaulted to off. when it won't anymore we * will consider the HW capability: "!!MLX5_CAP_ETH(mdev, lro_cap)" @@ -2938,6 +2992,8 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, INIT_WORK(&priv->update_stats_work, mlx5e_update_stats_work); INIT_WORK(&priv->update_carrier_work, mlx5e_update_carrier_work); INIT_WORK(&priv->set_rx_mode_work, mlx5e_set_rx_mode_work); + + return (0); } static int @@ -3177,20 +3233,6 @@ mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t v } } -u8 -mlx5e_params_calculate_tx_min_inline(struct mlx5_core_dev *mdev) -{ - u8 min_inline_mode; - - min_inline_mode = MLX5_INLINE_MODE_L2; - mlx5_query_min_inline(mdev, &min_inline_mode); - if (min_inline_mode == MLX5_INLINE_MODE_NONE && - !MLX5_CAP_ETH(mdev, wqe_vlan_insert)) - min_inline_mode = MLX5_INLINE_MODE_L2; - - return (min_inline_mode); -} - static void mlx5e_add_hw_stats(struct mlx5e_priv *priv) { @@ -3463,7 +3505,12 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) mlx5_core_err(mdev, "SYSCTL_ADD_NODE() failed\n"); goto err_free_sysctl; } - mlx5e_build_ifp_priv(mdev, priv, ncv); + + err = mlx5e_build_ifp_priv(mdev, priv, ncv); + if (err) { + mlx5_core_err(mdev, "mlx5e_build_ifp_priv() failed (%d)\n", err); + goto err_free_sysctl; + } snprintf(unit, sizeof(unit), "mce%u_wq", device_get_unit(mdev->pdev->dev.bsddev)); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 12:59:57 2018 (r341971) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:00:56 2018 (r341972) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Mellanox Technologies. All rights reserved. + * Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -135,49 +135,53 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) } static inline u16 -mlx5e_get_inline_hdr_size(struct mlx5e_sq *sq, struct mbuf *mb) +mlx5e_get_l2_header_size(struct mlx5e_sq *sq, struct mbuf *mb) { + struct ether_vlan_header *eh; + uint16_t eth_type; + int min_inline; - switch(sq->min_inline_mode) { - case MLX5_INLINE_MODE_NONE: + eh = mtod(mb, struct ether_vlan_header *); + if (unlikely(mb->m_len < ETHER_HDR_LEN)) { + goto max_inline; + } else if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + if (unlikely(mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN))) + goto max_inline; + eth_type = ntohs(eh->evl_proto); + min_inline = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + } else { + eth_type = ntohs(eh->evl_encap_proto); + min_inline = ETHER_HDR_LEN; + } + + switch (eth_type) { + case ETHERTYPE_IP: + case ETHERTYPE_IPV6: /* - * When inline mode is NONE, we do not need to copy - * headers into WQEs, except when vlan tag framing is - * requested. Hardware might offload vlan tagging on - * transmit. This is a separate capability, which is - * known to be disabled on ConnectX-5 due to a hardware - * bug RM 931383. If vlan_inline_cap is not present and - * the packet has vlan tag, fall back to inlining. + * Make sure the TOS(IPv4) or traffic class(IPv6) + * field gets inlined. Else the SQ may stall. */ - if ((mb->m_flags & M_VLANTAG) != 0 && - sq->vlan_inline_cap == 0) - break; - return (0); - case MLX5_INLINE_MODE_L2: - /* - * Due to hardware limitations, when trust mode is - * DSCP, the hardware may request MLX5_INLINE_MODE_L2 - * while it really needs all L2 headers and the 4 first - * bytes of the IP header (which include the - * TOS/traffic-class). - * - * To avoid doing a firmware command for querying the - * trust state and parsing the mbuf for doing - * unnecessary checks (VLAN/eth_type) in the fast path, - * we are going for the worth case (22 Bytes) if - * the mb->m_pkthdr.len allows it. - */ - if (mb->m_pkthdr.len > ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN + 4) - return (MIN(sq->max_inline, ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN + 4)); + min_inline += 4; break; + default: + goto max_inline; } - return (MIN(sq->max_inline, mb->m_pkthdr.len)); + + /* + * m_copydata() will be used on the remaining header which + * does not need to reside within the first m_len bytes of + * data: + */ + if (mb->m_pkthdr.len < min_inline) + goto max_inline; + return (min_inline); + +max_inline: + return (MIN(mb->m_pkthdr.len, sq->max_inline)); } static int -mlx5e_get_header_size(struct mbuf *mb) +mlx5e_get_full_header_size(struct mbuf *mb) { struct ether_vlan_header *eh; struct tcphdr *th; @@ -191,31 +195,46 @@ mlx5e_get_header_size(struct mbuf *mb) if (mb->m_len < ETHER_HDR_LEN) return (0); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + if (mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)) + return (0); eth_type = ntohs(eh->evl_proto); eth_hdr_len = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; } else { eth_type = ntohs(eh->evl_encap_proto); eth_hdr_len = ETHER_HDR_LEN; } - if (mb->m_len < eth_hdr_len) - return (0); switch (eth_type) { case ETHERTYPE_IP: ip = (struct ip *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip)) return (0); - if (ip->ip_p != IPPROTO_TCP) + switch (ip->ip_p) { + case IPPROTO_TCP: + ip_hlen = ip->ip_hl << 2; + eth_hdr_len += ip_hlen; + break; + case IPPROTO_UDP: + ip_hlen = ip->ip_hl << 2; + eth_hdr_len += ip_hlen + 8; + goto done; + default: return (0); - ip_hlen = ip->ip_hl << 2; - eth_hdr_len += ip_hlen; + } break; case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip6)) return (0); - if (ip6->ip6_nxt != IPPROTO_TCP) + switch (ip6->ip6_nxt) { + case IPPROTO_TCP: + eth_hdr_len += sizeof(*ip6); + break; + case IPPROTO_UDP: + eth_hdr_len += sizeof(*ip6) + 8; + goto done; + default: return (0); - eth_hdr_len += sizeof(*ip6); + } break; default: return (0); @@ -225,7 +244,13 @@ mlx5e_get_header_size(struct mbuf *mb) th = (struct tcphdr *)(mb->m_data + eth_hdr_len); tcp_hlen = th->th_off << 2; eth_hdr_len += tcp_hlen; - if (mb->m_len < eth_hdr_len) +done: + /* + * m_copydata() will be used on the remaining header which + * does not need to reside within the first m_len bytes of + * data: + */ + if (mb->m_pkthdr.len < eth_hdr_len) return (0); return (eth_hdr_len); } @@ -287,7 +312,11 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) wqe->eth.mss = cpu_to_be16(mss); opcode = MLX5_OPCODE_LSO; - ihs = mlx5e_get_header_size(mb); + ihs = mlx5e_get_full_header_size(mb); + if (unlikely(ihs == 0)) { + err = EINVAL; + goto tx_drop; + } payload_len = mb->m_pkthdr.len - ihs; if (payload_len == 0) num_pkts = 1; @@ -299,46 +328,72 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) sq->stats.tso_bytes += payload_len; } else { opcode = MLX5_OPCODE_SEND; - ihs = mlx5e_get_inline_hdr_size(sq, mb); + + switch (sq->min_inline_mode) { + case MLX5_INLINE_MODE_IP: + case MLX5_INLINE_MODE_TCP_UDP: + ihs = mlx5e_get_full_header_size(mb); + if (unlikely(ihs == 0)) + ihs = mlx5e_get_l2_header_size(sq, mb); + break; + case MLX5_INLINE_MODE_L2: + ihs = mlx5e_get_l2_header_size(sq, mb); + break; + case MLX5_INLINE_MODE_NONE: + /* FALLTHROUGH */ + default: + if ((mb->m_flags & M_VLANTAG) != 0 && + (sq->min_insert_caps & MLX5E_INSERT_VLAN) != 0) { + /* inlining VLAN data is not required */ + wqe->eth.vlan_cmd = htons(0x8000); /* bit 0 CVLAN */ + wqe->eth.vlan_hdr = htons(mb->m_pkthdr.ether_vtag); + ihs = 0; + } else if ((mb->m_flags & M_VLANTAG) == 0 && + (sq->min_insert_caps & MLX5E_INSERT_NON_VLAN) != 0) { + /* inlining non-VLAN data is not required */ + ihs = 0; + } else { + /* we are forced to inlining L2 header, if any */ + ihs = mlx5e_get_l2_header_size(sq, mb); + } + break; + } sq->mbuf[pi].num_bytes = max_t (unsigned int, mb->m_pkthdr.len, ETHER_MIN_LEN - ETHER_CRC_LEN); } - if (ihs == 0) { - if ((mb->m_flags & M_VLANTAG) != 0) { - wqe->eth.vlan_cmd = htons(0x8000); /* bit 0 CVLAN */ - wqe->eth.vlan_hdr = htons(mb->m_pkthdr.ether_vtag); - } else { - wqe->eth.inline_hdr_sz = 0; - } - } else { - if ((mb->m_flags & M_VLANTAG) != 0) { - struct ether_vlan_header *eh = (struct ether_vlan_header - *)wqe->eth.inline_hdr_start; - /* Range checks */ - if (ihs > (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN)) - ihs = (MLX5E_MAX_TX_INLINE - - ETHER_VLAN_ENCAP_LEN); - else if (ihs < ETHER_HDR_LEN) { - err = EINVAL; - goto tx_drop; - } - m_copydata(mb, 0, ETHER_HDR_LEN, (caddr_t)eh); - m_adj(mb, ETHER_HDR_LEN); - /* Insert 4 bytes VLAN tag into data stream */ - eh->evl_proto = eh->evl_encap_proto; - eh->evl_encap_proto = htons(ETHERTYPE_VLAN); - eh->evl_tag = htons(mb->m_pkthdr.ether_vtag); - /* Copy rest of header data, if any */ - m_copydata(mb, 0, ihs - ETHER_HDR_LEN, (caddr_t)(eh + - 1)); - m_adj(mb, ihs - ETHER_HDR_LEN); - /* Extend header by 4 bytes */ - ihs += ETHER_VLAN_ENCAP_LEN; - } else { - m_copydata(mb, 0, ihs, wqe->eth.inline_hdr_start); - m_adj(mb, ihs); + if (likely(ihs == 0)) { + /* nothing to inline */ + } else if (unlikely(ihs > sq->max_inline)) { + /* inline header size is too big */ + err = EINVAL; + goto tx_drop; + } else if ((mb->m_flags & M_VLANTAG) != 0) { + struct ether_vlan_header *eh = (struct ether_vlan_header *) + wqe->eth.inline_hdr_start; + + /* Range checks */ + if (unlikely(ihs > (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN))) + ihs = (MLX5E_MAX_TX_INLINE - ETHER_VLAN_ENCAP_LEN); + else if (unlikely(ihs < ETHER_HDR_LEN)) { + err = EINVAL; + goto tx_drop; } + m_copydata(mb, 0, ETHER_HDR_LEN, (caddr_t)eh); + m_adj(mb, ETHER_HDR_LEN); + /* Insert 4 bytes VLAN tag into data stream */ + eh->evl_proto = eh->evl_encap_proto; + eh->evl_encap_proto = htons(ETHERTYPE_VLAN); + eh->evl_tag = htons(mb->m_pkthdr.ether_vtag); + /* Copy rest of header data, if any */ + m_copydata(mb, 0, ihs - ETHER_HDR_LEN, (caddr_t)(eh + 1)); + m_adj(mb, ihs - ETHER_HDR_LEN); + /* Extend header by 4 bytes */ + ihs += ETHER_VLAN_ENCAP_LEN; + wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); + } else { + m_copydata(mb, 0, ihs, wqe->eth.inline_hdr_start); + m_adj(mb, ihs); wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); } Modified: stable/11/sys/dev/mlx5/vport.h ============================================================================== --- stable/11/sys/dev/mlx5/vport.h Wed Dec 12 12:59:57 2018 (r341971) +++ stable/11/sys/dev/mlx5/vport.h Wed Dec 12 13:00:56 2018 (r341972) @@ -88,7 +88,7 @@ int mlx5_set_nic_vport_current_mac(struct mlx5_core_de bool other_vport, u8 *addr); int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev, u16 vport, u8 *min_inline); -void mlx5_query_min_inline(struct mlx5_core_dev *mdev, u8 *min_inline); +int mlx5_query_min_inline(struct mlx5_core_dev *mdev, u8 *min_inline); int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev, u16 vport, u8 min_inline); int mlx5_modify_nic_vport_port_guid(struct mlx5_core_dev *mdev, From owner-svn-src-all@freebsd.org Wed Dec 12 13:02:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51746130DDFC; Wed, 12 Dec 2018 13:02:01 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D2ABC932B0; Wed, 12 Dec 2018 13:02:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C89C88539; Wed, 12 Dec 2018 13:02:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCD208r002632; Wed, 12 Dec 2018 13:02:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCD20At002631; Wed, 12 Dec 2018 13:02:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121302.wBCD20At002631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341973 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D2ABC932B0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.60 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.60)[-0.604,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:02:01 -0000 Author: hselasky Date: Wed Dec 12 13:02:00 2018 New Revision: 341973 URL: https://svnweb.freebsd.org/changeset/base/341973 Log: MFC r341580: mlx5en: Don't set rate on SQs when the SQ is already stopped. This can happen when connections are short lived and leads to a firmware error printout in dmesg, syndrome 0x51cfb0, because the SQ is in the wrong state. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 13:00:56 2018 (r341972) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 13:02:00 2018 (r341973) @@ -458,9 +458,9 @@ mlx5e_rlw_channel_set_rate_locked(struct mlx5e_rl_work howmany(rate, 1000), burst); } - /* set new rate */ + /* set new rate, if SQ is not stopped */ sq = channel->sq; - if (sq != NULL) { + if (sq != NULL && sq->stopped == 0) { error = mlx5e_rl_modify_sq(sq, index); if (error != 0) atomic_add_64(&rlw->priv->rl.stats.tx_modify_rate_failure, 1ULL); From owner-svn-src-all@freebsd.org Wed Dec 12 13:03:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C5B1130DFF2; Wed, 12 Dec 2018 13:03:51 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 2F75B93499; Wed, 12 Dec 2018 13:03:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 265C7856E; Wed, 12 Dec 2018 13:03:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCD3pek003789; Wed, 12 Dec 2018 13:03:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCD3oUv003783; Wed, 12 Dec 2018 13:03:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121303.wBCD3oUv003783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341974 - in stable/12/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 341974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2F75B93499 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:03:51 -0000 Author: hselasky Date: Wed Dec 12 13:03:50 2018 New Revision: 341974 URL: https://svnweb.freebsd.org/changeset/base/341974 Log: MFC r341581: mlx5en: Add support for IFM_10G_LR and IFM_40G_ER4 media types. Inspect the ethernet compliance code to figure out actual cable type by reading the PDDR module info register. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_ifc.h stable/12/sys/dev/mlx5/port.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 13:02:00 2018 (r341973) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 13:03:50 2018 (r341974) @@ -1146,3 +1146,39 @@ out: kfree(out); return err; } + +int mlx5_query_pddr_range_info(struct mlx5_core_dev *mdev, u8 local_port, u8 *is_er_type) +{ + u32 pddr_reg[MLX5_ST_SZ_DW(pddr_reg)] = {}; + int sz = MLX5_ST_SZ_BYTES(pddr_reg); + int error; + u8 ecc; + u8 ci; + + MLX5_SET(pddr_reg, pddr_reg, local_port, local_port); + MLX5_SET(pddr_reg, pddr_reg, page_select, 3 /* module info page */); + + error = mlx5_core_access_reg(mdev, pddr_reg, sz, pddr_reg, sz, + MLX5_ACCESS_REG_SUMMARY_CTRL_ID_PDDR, 0, 0); + if (error != 0) + return (error); + + ecc = MLX5_GET(pddr_reg, pddr_reg, page_data.pddr_module_info.ethernet_compliance_code); + ci = MLX5_GET(pddr_reg, pddr_reg, page_data.pddr_module_info.cable_identifier); + + switch (ci) { + case 0: /* QSFP28 */ + case 1: /* QSFP+ */ + *is_er_type = 0; + break; + case 2: /* SFP28/SFP+ */ + case 3: /* QSA (QSFP->SFP) */ + *is_er_type = ((ecc & (1 << 7)) != 0); + break; + default: + *is_er_type = 0; + break; + } + return (0); +} +EXPORT_SYMBOL_GPL(mlx5_query_pddr_range_info); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:02:00 2018 (r341973) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:03:50 2018 (r341974) @@ -167,6 +167,7 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) u32 eth_proto_oper; int error; u8 port_state; + u8 is_er_type; u8 i; port_state = mlx5_query_vport_state(mdev, @@ -195,10 +196,33 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) if (mlx5e_mode_table[i].baudrate == 0) continue; if (MLX5E_PROT_MASK(i) & eth_proto_oper) { + u32 subtype = mlx5e_mode_table[i].subtype; + priv->ifp->if_baudrate = mlx5e_mode_table[i].baudrate; - priv->media_active_last = - mlx5e_mode_table[i].subtype | IFM_ETHER | IFM_FDX; + + switch (subtype) { + case IFM_10G_ER: + error = mlx5_query_pddr_range_info(mdev, 1, &is_er_type); + if (error != 0) { + if_printf(priv->ifp, "%s: query port pddr failed: %d\n", + __func__, error); + } + if (error != 0 || is_er_type == 0) + subtype = IFM_10G_LR; + break; + case IFM_40G_LR4: + error = mlx5_query_pddr_range_info(mdev, 1, &is_er_type); + if (error != 0) { + if_printf(priv->ifp, "%s: query port pddr failed: %d\n", + __func__, error); + } + if (error == 0 && is_er_type != 0) + subtype = IFM_40G_ER4; + break; + } + priv->media_active_last = subtype | IFM_ETHER | IFM_FDX; + break; } } if_link_state_change(priv->ifp, LINK_STATE_UP); @@ -222,6 +246,15 @@ mlx5e_find_link_mode(u32 subtype) u32 i; u32 link_mode = 0; + switch (subtype) { + case IFM_10G_LR: + subtype = IFM_10G_ER; + break; + case IFM_40G_ER4: + subtype = IFM_40G_LR4; + break; + } + for (i = 0; i < MLX5E_LINK_MODES_NUMBER; ++i) { if (mlx5e_mode_table[i].baudrate == 0) continue; @@ -3716,6 +3749,17 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL); } } + + /* Additional supported medias */ + ifmedia_add(&priv->media, IFM_10G_LR | IFM_ETHER, 0, NULL); + ifmedia_add(&priv->media, IFM_10G_LR | + IFM_ETHER | IFM_FDX | + IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL); + + ifmedia_add(&priv->media, IFM_40G_ER4 | IFM_ETHER, 0, NULL); + ifmedia_add(&priv->media, IFM_40G_ER4 | + IFM_ETHER | IFM_FDX | + IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL); ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO | IFM_FDX | Modified: stable/12/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 13:02:00 2018 (r341973) +++ stable/12/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 13:03:50 2018 (r341974) @@ -755,6 +755,115 @@ struct mlx5_ifc_flow_table_nic_cap_bits { u8 reserved_1[0x7200]; }; +enum { + MLX5_ACCESS_REG_SUMMARY_CTRL_ID_PDDR = 0x5031, +}; + +struct mlx5_ifc_pddr_module_info_bits { + u8 cable_technology[0x8]; + u8 cable_breakout[0x8]; + u8 ext_ethernet_compliance_code[0x8]; + u8 ethernet_compliance_code[0x8]; + + u8 cable_type[0x4]; + u8 cable_vendor[0x4]; + u8 cable_length[0x8]; + u8 cable_identifier[0x8]; + u8 cable_power_class[0x8]; + + u8 reserved_at_40[0x8]; + u8 cable_rx_amp[0x8]; + u8 cable_rx_emphasis[0x8]; + u8 cable_tx_equalization[0x8]; + + u8 reserved_at_60[0x8]; + u8 cable_attenuation_12g[0x8]; + u8 cable_attenuation_7g[0x8]; + u8 cable_attenuation_5g[0x8]; + + u8 reserved_at_80[0x8]; + u8 rx_cdr_cap[0x4]; + u8 tx_cdr_cap[0x4]; + u8 reserved_at_90[0x4]; + u8 rx_cdr_state[0x4]; + u8 reserved_at_98[0x4]; + u8 tx_cdr_state[0x4]; + + u8 vendor_name[16][0x8]; + + u8 vendor_pn[16][0x8]; + + u8 vendor_rev[0x20]; + + u8 fw_version[0x20]; + + u8 vendor_sn[16][0x8]; + + u8 temperature[0x10]; + u8 voltage[0x10]; + + u8 rx_power_lane0[0x10]; + u8 rx_power_lane1[0x10]; + + u8 rx_power_lane2[0x10]; + u8 rx_power_lane3[0x10]; + + u8 reserved_at_2c0[0x40]; + + u8 tx_power_lane0[0x10]; + u8 tx_power_lane1[0x10]; + + u8 tx_power_lane2[0x10]; + u8 tx_power_lane3[0x10]; + + u8 reserved_at_340[0x40]; + + u8 tx_bias_lane0[0x10]; + u8 tx_bias_lane1[0x10]; + + u8 tx_bias_lane2[0x10]; + u8 tx_bias_lane3[0x10]; + + u8 reserved_at_3c0[0x40]; + + u8 temperature_high_th[0x10]; + u8 temperature_low_th[0x10]; + + u8 voltage_high_th[0x10]; + u8 voltage_low_th[0x10]; + + u8 rx_power_high_th[0x10]; + u8 rx_power_low_th[0x10]; + + u8 tx_power_high_th[0x10]; + u8 tx_power_low_th[0x10]; + + u8 tx_bias_high_th[0x10]; + u8 tx_bias_low_th[0x10]; + + u8 reserved_at_4a0[0x10]; + u8 wavelength[0x10]; + + u8 reserved_at_4c0[0x300]; +}; + +union mlx5_ifc_pddr_operation_info_page_pddr_phy_info_page_pddr_troubleshooting_page_pddr_module_info_auto_bits { + struct mlx5_ifc_pddr_module_info_bits pddr_module_info; + u8 reserved_at_0[0x7c0]; +}; + +struct mlx5_ifc_pddr_reg_bits { + u8 reserved_at_0[0x8]; + u8 local_port[0x8]; + u8 pnat[0x2]; + u8 reserved_at_12[0xe]; + + u8 reserved_at_20[0x18]; + u8 page_select[0x8]; + + union mlx5_ifc_pddr_operation_info_page_pddr_phy_info_page_pddr_troubleshooting_page_pddr_module_info_auto_bits page_data; +}; + struct mlx5_ifc_per_protocol_networking_offload_caps_bits { u8 csum_cap[0x1]; u8 vlan_cap[0x1]; Modified: stable/12/sys/dev/mlx5/port.h ============================================================================== --- stable/12/sys/dev/mlx5/port.h Wed Dec 12 13:02:00 2018 (r341973) +++ stable/12/sys/dev/mlx5/port.h Wed Dec 12 13:03:50 2018 (r341974) @@ -174,4 +174,6 @@ int mlx5_query_trust_state(struct mlx5_core_dev *mdev, int mlx5_set_dscp2prio(struct mlx5_core_dev *mdev, const u8 *dscp2prio); int mlx5_query_dscp2prio(struct mlx5_core_dev *mdev, u8 *dscp2prio); +int mlx5_query_pddr_range_info(struct mlx5_core_dev *mdev, u8 local_port, u8 *is_er_type); + #endif /* __MLX5_PORT_H__ */ From owner-svn-src-all@freebsd.org Wed Dec 12 13:03:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4103F130DFFE; Wed, 12 Dec 2018 13:03:53 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 DC73E9349B; Wed, 12 Dec 2018 13:03:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D11A7856F; Wed, 12 Dec 2018 13:03:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCD3qHQ003838; Wed, 12 Dec 2018 13:03:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCD3q8H003834; Wed, 12 Dec 2018 13:03:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121303.wBCD3q8H003834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341975 - in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 341975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DC73E9349B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:03:53 -0000 Author: hselasky Date: Wed Dec 12 13:03:51 2018 New Revision: 341975 URL: https://svnweb.freebsd.org/changeset/base/341975 Log: MFC r341581: mlx5en: Add support for IFM_10G_LR and IFM_40G_ER4 media types. Inspect the ethernet compliance code to figure out actual cable type by reading the PDDR module info register. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_ifc.h stable/11/sys/dev/mlx5/port.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 13:03:50 2018 (r341974) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Dec 12 13:03:51 2018 (r341975) @@ -1146,3 +1146,39 @@ out: kfree(out); return err; } + +int mlx5_query_pddr_range_info(struct mlx5_core_dev *mdev, u8 local_port, u8 *is_er_type) +{ + u32 pddr_reg[MLX5_ST_SZ_DW(pddr_reg)] = {}; + int sz = MLX5_ST_SZ_BYTES(pddr_reg); + int error; + u8 ecc; + u8 ci; + + MLX5_SET(pddr_reg, pddr_reg, local_port, local_port); + MLX5_SET(pddr_reg, pddr_reg, page_select, 3 /* module info page */); + + error = mlx5_core_access_reg(mdev, pddr_reg, sz, pddr_reg, sz, + MLX5_ACCESS_REG_SUMMARY_CTRL_ID_PDDR, 0, 0); + if (error != 0) + return (error); + + ecc = MLX5_GET(pddr_reg, pddr_reg, page_data.pddr_module_info.ethernet_compliance_code); + ci = MLX5_GET(pddr_reg, pddr_reg, page_data.pddr_module_info.cable_identifier); + + switch (ci) { + case 0: /* QSFP28 */ + case 1: /* QSFP+ */ + *is_er_type = 0; + break; + case 2: /* SFP28/SFP+ */ + case 3: /* QSA (QSFP->SFP) */ + *is_er_type = ((ecc & (1 << 7)) != 0); + break; + default: + *is_er_type = 0; + break; + } + return (0); +} +EXPORT_SYMBOL_GPL(mlx5_query_pddr_range_info); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:03:50 2018 (r341974) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:03:51 2018 (r341975) @@ -167,6 +167,7 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) u32 eth_proto_oper; int error; u8 port_state; + u8 is_er_type; u8 i; port_state = mlx5_query_vport_state(mdev, @@ -195,10 +196,33 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) if (mlx5e_mode_table[i].baudrate == 0) continue; if (MLX5E_PROT_MASK(i) & eth_proto_oper) { + u32 subtype = mlx5e_mode_table[i].subtype; + priv->ifp->if_baudrate = mlx5e_mode_table[i].baudrate; - priv->media_active_last = - mlx5e_mode_table[i].subtype | IFM_ETHER | IFM_FDX; + + switch (subtype) { + case IFM_10G_ER: + error = mlx5_query_pddr_range_info(mdev, 1, &is_er_type); + if (error != 0) { + if_printf(priv->ifp, "%s: query port pddr failed: %d\n", + __func__, error); + } + if (error != 0 || is_er_type == 0) + subtype = IFM_10G_LR; + break; + case IFM_40G_LR4: + error = mlx5_query_pddr_range_info(mdev, 1, &is_er_type); + if (error != 0) { + if_printf(priv->ifp, "%s: query port pddr failed: %d\n", + __func__, error); + } + if (error == 0 && is_er_type != 0) + subtype = IFM_40G_ER4; + break; + } + priv->media_active_last = subtype | IFM_ETHER | IFM_FDX; + break; } } if_link_state_change(priv->ifp, LINK_STATE_UP); @@ -222,6 +246,15 @@ mlx5e_find_link_mode(u32 subtype) u32 i; u32 link_mode = 0; + switch (subtype) { + case IFM_10G_LR: + subtype = IFM_10G_ER; + break; + case IFM_40G_ER4: + subtype = IFM_40G_LR4; + break; + } + for (i = 0; i < MLX5E_LINK_MODES_NUMBER; ++i) { if (mlx5e_mode_table[i].baudrate == 0) continue; @@ -3588,6 +3621,17 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL); } } + + /* Additional supported medias */ + ifmedia_add(&priv->media, IFM_10G_LR | IFM_ETHER, 0, NULL); + ifmedia_add(&priv->media, IFM_10G_LR | + IFM_ETHER | IFM_FDX | + IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL); + + ifmedia_add(&priv->media, IFM_40G_ER4 | IFM_ETHER, 0, NULL); + ifmedia_add(&priv->media, IFM_40G_ER4 | + IFM_ETHER | IFM_FDX | + IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL); ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO | IFM_FDX | Modified: stable/11/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 13:03:50 2018 (r341974) +++ stable/11/sys/dev/mlx5/mlx5_ifc.h Wed Dec 12 13:03:51 2018 (r341975) @@ -755,6 +755,115 @@ struct mlx5_ifc_flow_table_nic_cap_bits { u8 reserved_1[0x7200]; }; +enum { + MLX5_ACCESS_REG_SUMMARY_CTRL_ID_PDDR = 0x5031, +}; + +struct mlx5_ifc_pddr_module_info_bits { + u8 cable_technology[0x8]; + u8 cable_breakout[0x8]; + u8 ext_ethernet_compliance_code[0x8]; + u8 ethernet_compliance_code[0x8]; + + u8 cable_type[0x4]; + u8 cable_vendor[0x4]; + u8 cable_length[0x8]; + u8 cable_identifier[0x8]; + u8 cable_power_class[0x8]; + + u8 reserved_at_40[0x8]; + u8 cable_rx_amp[0x8]; + u8 cable_rx_emphasis[0x8]; + u8 cable_tx_equalization[0x8]; + + u8 reserved_at_60[0x8]; + u8 cable_attenuation_12g[0x8]; + u8 cable_attenuation_7g[0x8]; + u8 cable_attenuation_5g[0x8]; + + u8 reserved_at_80[0x8]; + u8 rx_cdr_cap[0x4]; + u8 tx_cdr_cap[0x4]; + u8 reserved_at_90[0x4]; + u8 rx_cdr_state[0x4]; + u8 reserved_at_98[0x4]; + u8 tx_cdr_state[0x4]; + + u8 vendor_name[16][0x8]; + + u8 vendor_pn[16][0x8]; + + u8 vendor_rev[0x20]; + + u8 fw_version[0x20]; + + u8 vendor_sn[16][0x8]; + + u8 temperature[0x10]; + u8 voltage[0x10]; + + u8 rx_power_lane0[0x10]; + u8 rx_power_lane1[0x10]; + + u8 rx_power_lane2[0x10]; + u8 rx_power_lane3[0x10]; + + u8 reserved_at_2c0[0x40]; + + u8 tx_power_lane0[0x10]; + u8 tx_power_lane1[0x10]; + + u8 tx_power_lane2[0x10]; + u8 tx_power_lane3[0x10]; + + u8 reserved_at_340[0x40]; + + u8 tx_bias_lane0[0x10]; + u8 tx_bias_lane1[0x10]; + + u8 tx_bias_lane2[0x10]; + u8 tx_bias_lane3[0x10]; + + u8 reserved_at_3c0[0x40]; + + u8 temperature_high_th[0x10]; + u8 temperature_low_th[0x10]; + + u8 voltage_high_th[0x10]; + u8 voltage_low_th[0x10]; + + u8 rx_power_high_th[0x10]; + u8 rx_power_low_th[0x10]; + + u8 tx_power_high_th[0x10]; + u8 tx_power_low_th[0x10]; + + u8 tx_bias_high_th[0x10]; + u8 tx_bias_low_th[0x10]; + + u8 reserved_at_4a0[0x10]; + u8 wavelength[0x10]; + + u8 reserved_at_4c0[0x300]; +}; + +union mlx5_ifc_pddr_operation_info_page_pddr_phy_info_page_pddr_troubleshooting_page_pddr_module_info_auto_bits { + struct mlx5_ifc_pddr_module_info_bits pddr_module_info; + u8 reserved_at_0[0x7c0]; +}; + +struct mlx5_ifc_pddr_reg_bits { + u8 reserved_at_0[0x8]; + u8 local_port[0x8]; + u8 pnat[0x2]; + u8 reserved_at_12[0xe]; + + u8 reserved_at_20[0x18]; + u8 page_select[0x8]; + + union mlx5_ifc_pddr_operation_info_page_pddr_phy_info_page_pddr_troubleshooting_page_pddr_module_info_auto_bits page_data; +}; + struct mlx5_ifc_per_protocol_networking_offload_caps_bits { u8 csum_cap[0x1]; u8 vlan_cap[0x1]; Modified: stable/11/sys/dev/mlx5/port.h ============================================================================== --- stable/11/sys/dev/mlx5/port.h Wed Dec 12 13:03:50 2018 (r341974) +++ stable/11/sys/dev/mlx5/port.h Wed Dec 12 13:03:51 2018 (r341975) @@ -174,4 +174,6 @@ int mlx5_query_trust_state(struct mlx5_core_dev *mdev, int mlx5_set_dscp2prio(struct mlx5_core_dev *mdev, const u8 *dscp2prio); int mlx5_query_dscp2prio(struct mlx5_core_dev *mdev, u8 *dscp2prio); +int mlx5_query_pddr_range_info(struct mlx5_core_dev *mdev, u8 local_port, u8 *is_er_type); + #endif /* __MLX5_PORT_H__ */ From owner-svn-src-all@freebsd.org Wed Dec 12 13:04:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5814130E17B; Wed, 12 Dec 2018 13:04:54 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 6DFA693716; Wed, 12 Dec 2018 13:04:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63A4C8570; Wed, 12 Dec 2018 13:04:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCD4snP004069; Wed, 12 Dec 2018 13:04:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCD4rAW004066; Wed, 12 Dec 2018 13:04:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121304.wBCD4rAW004066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341976 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6DFA693716 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:04:55 -0000 Author: hselasky Date: Wed Dec 12 13:04:53 2018 New Revision: 341976 URL: https://svnweb.freebsd.org/changeset/base/341976 Log: MFC r341582: mlx5en: Fix race in mlx5e_ethtool_debug_stats(). Writing to the debug stats variable must be locked, else serialization will be lost which might cause various kernel panics due to creating and destroying sysctls out of order. Make sure the sysctl context is initialized after freeing the sysctl nodes, else they can be freed twice. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:03:51 2018 (r341975) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:04:53 2018 (r341976) @@ -794,7 +794,6 @@ struct mlx5e_priv { struct sysctl_oid *sysctl_hw; int sysctl_debug; struct mlx5e_stats stats; - struct sysctl_ctx_list sysctl_ctx_channel_debug; int counter_set_id; struct workqueue_struct *wq; Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:03:51 2018 (r341975) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:04:53 2018 (r341976) @@ -1056,33 +1056,34 @@ static int mlx5e_ethtool_debug_stats(SYSCTL_HANDLER_ARGS) { struct mlx5e_priv *priv = arg1; - int error, sys_debug; + int sys_debug; + int error; + PRIV_LOCK(priv); sys_debug = priv->sysctl_debug; - error = sysctl_handle_int(oidp, &priv->sysctl_debug, 0, req); + error = sysctl_handle_int(oidp, &sys_debug, 0, req); if (error != 0 || !req->newptr) - return (error); - priv->sysctl_debug = priv->sysctl_debug != 0; + goto done; + sys_debug = sys_debug ? 1 : 0; if (sys_debug == priv->sysctl_debug) - return (0); + goto done; - PRIV_LOCK(priv); - if (priv->sysctl_debug) { + if ((priv->sysctl_debug = sys_debug)) { mlx5e_create_stats(&priv->stats.port_stats_debug.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), "debug_stats", mlx5e_port_stats_debug_desc, MLX5E_PORT_STATS_DEBUG_NUM, priv->stats.port_stats_debug.arg); - SYSCTL_ADD_PROC(&priv->sysctl_ctx_channel_debug, + SYSCTL_ADD_PROC(&priv->stats.port_stats_debug.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), OID_AUTO, "hw_ctx_debug", CTLFLAG_RD | CTLFLAG_MPSAFE | CTLTYPE_STRING, priv, 0, mlx5e_ethtool_debug_channel_info, "S", ""); } else { sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); - sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); } +done: PRIV_UNLOCK(priv); - return (0); + return (error); } static void Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:03:51 2018 (r341975) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:04:53 2018 (r341976) @@ -3632,8 +3632,6 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); - sysctl_ctx_init(&priv->sysctl_ctx_channel_debug); - /* ifnet sysctl tree */ sysctl_ctx_init(&priv->sysctl_ctx); priv->sysctl_ifnet = SYSCTL_ADD_NODE(&priv->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_dev), @@ -3824,8 +3822,8 @@ err_free_wq: err_free_sysctl: sysctl_ctx_free(&priv->sysctl_ctx); - sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); - + if (priv->sysctl_debug) + sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); if_free(ifp); err_free_priv: @@ -3882,13 +3880,11 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp mlx5e_rl_cleanup(priv); #endif /* destroy all remaining sysctl nodes */ - if (priv->sysctl_debug) { - sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); - sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); - } sysctl_ctx_free(&priv->stats.vport.ctx); sysctl_ctx_free(&priv->stats.pport.ctx); sysctl_ctx_free(&priv->sysctl_ctx); + if (priv->sysctl_debug) + sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); mlx5_core_destroy_mkey(priv->mdev, &priv->mr); mlx5_dealloc_transport_domain(priv->mdev, priv->tdn); From owner-svn-src-all@freebsd.org Wed Dec 12 13:05:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0247E130E290; Wed, 12 Dec 2018 13:05:47 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9D36593873; Wed, 12 Dec 2018 13:05:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 908F28571; Wed, 12 Dec 2018 13:05:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCD5kn0004262; Wed, 12 Dec 2018 13:05:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCD5jub004259; Wed, 12 Dec 2018 13:05:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121305.wBCD5jub004259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341977 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9D36593873 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:05:47 -0000 Author: hselasky Date: Wed Dec 12 13:05:45 2018 New Revision: 341977 URL: https://svnweb.freebsd.org/changeset/base/341977 Log: MFC r341582: mlx5en: Fix race in mlx5e_ethtool_debug_stats(). Writing to the debug stats variable must be locked, else serialization will be lost which might cause various kernel panics due to creating and destroying sysctls out of order. Make sure the sysctl context is initialized after freeing the sysctl nodes, else they can be freed twice. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:04:53 2018 (r341976) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:05:45 2018 (r341977) @@ -779,7 +779,6 @@ struct mlx5e_priv { struct sysctl_oid *sysctl_hw; int sysctl_debug; struct mlx5e_stats stats; - struct sysctl_ctx_list sysctl_ctx_channel_debug; int counter_set_id; struct workqueue_struct *wq; Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:04:53 2018 (r341976) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:05:45 2018 (r341977) @@ -1056,33 +1056,34 @@ static int mlx5e_ethtool_debug_stats(SYSCTL_HANDLER_ARGS) { struct mlx5e_priv *priv = arg1; - int error, sys_debug; + int sys_debug; + int error; + PRIV_LOCK(priv); sys_debug = priv->sysctl_debug; - error = sysctl_handle_int(oidp, &priv->sysctl_debug, 0, req); + error = sysctl_handle_int(oidp, &sys_debug, 0, req); if (error != 0 || !req->newptr) - return (error); - priv->sysctl_debug = priv->sysctl_debug != 0; + goto done; + sys_debug = sys_debug ? 1 : 0; if (sys_debug == priv->sysctl_debug) - return (0); + goto done; - PRIV_LOCK(priv); - if (priv->sysctl_debug) { + if ((priv->sysctl_debug = sys_debug)) { mlx5e_create_stats(&priv->stats.port_stats_debug.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), "debug_stats", mlx5e_port_stats_debug_desc, MLX5E_PORT_STATS_DEBUG_NUM, priv->stats.port_stats_debug.arg); - SYSCTL_ADD_PROC(&priv->sysctl_ctx_channel_debug, + SYSCTL_ADD_PROC(&priv->stats.port_stats_debug.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), OID_AUTO, "hw_ctx_debug", CTLFLAG_RD | CTLFLAG_MPSAFE | CTLTYPE_STRING, priv, 0, mlx5e_ethtool_debug_channel_info, "S", ""); } else { sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); - sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); } +done: PRIV_UNLOCK(priv); - return (0); + return (error); } static void Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:04:53 2018 (r341976) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:05:45 2018 (r341977) @@ -3512,8 +3512,6 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); - sysctl_ctx_init(&priv->sysctl_ctx_channel_debug); - /* ifnet sysctl tree */ sysctl_ctx_init(&priv->sysctl_ctx); priv->sysctl_ifnet = SYSCTL_ADD_NODE(&priv->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_dev), @@ -3685,8 +3683,8 @@ err_free_wq: err_free_sysctl: sysctl_ctx_free(&priv->sysctl_ctx); - sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); - + if (priv->sysctl_debug) + sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); if_free(ifp); err_free_priv: @@ -3726,13 +3724,11 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp if_free(ifp); /* destroy all remaining sysctl nodes */ - if (priv->sysctl_debug) { - sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); - sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); - } sysctl_ctx_free(&priv->stats.vport.ctx); sysctl_ctx_free(&priv->stats.pport.ctx); sysctl_ctx_free(&priv->sysctl_ctx); + if (priv->sysctl_debug) + sysctl_ctx_free(&priv->stats.port_stats_debug.ctx); mlx5_core_destroy_mkey(priv->mdev, &priv->mr); mlx5_dealloc_transport_domain(priv->mdev, priv->tdn); From owner-svn-src-all@freebsd.org Wed Dec 12 13:08:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73341130E866; Wed, 12 Dec 2018 13:08:51 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 1EB2993C31; Wed, 12 Dec 2018 13:08:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF62D8580; Wed, 12 Dec 2018 13:08:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCD8o08004828; Wed, 12 Dec 2018 13:08:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCD8oqs004823; Wed, 12 Dec 2018 13:08:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121308.wBCD8oqs004823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341978 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1EB2993C31 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.611,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:08:51 -0000 Author: hselasky Date: Wed Dec 12 13:08:49 2018 New Revision: 341978 URL: https://svnweb.freebsd.org/changeset/base/341978 Log: MFC r341583: mlx5en: Statically allocate and free the channel structure(s). By allocating the worst case size channel structure array at attach time we can eliminate various NULL checks in the fast path. And also reduce the chance for use-after-free issues in the transmit fast path. This change is also a requirement for implementing backpressure support. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:05:45 2018 (r341977) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:08:49 2018 (r341978) @@ -596,7 +596,7 @@ struct mlx5e_sq { #define MLX5E_CEV_STATE_INITIAL 0 /* timer not started */ #define MLX5E_CEV_STATE_SEND_NOPS 1 /* send NOPs */ #define MLX5E_CEV_STATE_HOLD_NOPS 2 /* don't send NOPs yet */ - u16 stopped; /* set if SQ is stopped */ + u16 running; /* set if SQ is running */ struct callout cev_callout; union { u32 d32[2]; @@ -769,7 +769,6 @@ struct mlx5e_priv { u32 tdn; struct mlx5_core_mr mr; - struct mlx5e_channel *volatile *channel; u32 tisn[MLX5E_MAX_TX_NUM_TC]; u32 rqtn; u32 tirn[MLX5E_NUM_TT]; @@ -814,6 +813,8 @@ struct mlx5e_priv { int clbr_curr; struct mlx5e_clbr_point clbr_points[2]; u_int clbr_gen; + + struct mlx5e_channel channel[]; }; #define MLX5E_NET_IP_ALIGN 2 Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:05:45 2018 (r341977) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:08:49 2018 (r341978) @@ -1035,7 +1035,7 @@ mlx5e_ethtool_debug_channel_info(SYSCTL_HANDLER_ARGS) if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) goto out; for (i = 0; i < priv->params.num_channels; i++) { - c = priv->channel[i]; + c = &priv->channel[i]; rq = &c->rq; sbuf_printf(&sb, "channel %d rq %d cq %d\n", c->ix, rq->rqn, rq->cq.mcq.cqn); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:05:45 2018 (r341977) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:08:49 2018 (r341978) @@ -471,7 +471,6 @@ mlx5e_update_stats_work(struct work_struct *work) update_stats_work); struct mlx5_core_dev *mdev = priv->mdev; struct mlx5e_vport_stats *s = &priv->stats.vport; - struct mlx5e_rq_stats *rq_stats; struct mlx5e_sq_stats *sq_stats; struct buf_ring *sq_br; #if (__FreeBSD_version < 1100000) @@ -505,10 +504,10 @@ mlx5e_update_stats_work(struct work_struct *work) /* Collect firts the SW counters and then HW for consistency */ for (i = 0; i < priv->params.num_channels; i++) { - struct mlx5e_rq *rq = &priv->channel[i]->rq; + struct mlx5e_channel *pch = priv->channel + i; + struct mlx5e_rq *rq = &pch->rq; + struct mlx5e_rq_stats *rq_stats = &pch->rq.stats; - rq_stats = &priv->channel[i]->rq.stats; - /* collect stats from LRO */ rq_stats->sw_lro_queued = rq->lro.lro_queued; rq_stats->sw_lro_flushed = rq->lro.lro_flushed; @@ -520,8 +519,8 @@ mlx5e_update_stats_work(struct work_struct *work) rx_wqe_err += rq_stats->wqe_err; for (j = 0; j < priv->num_tc; j++) { - sq_stats = &priv->channel[i]->sq[j].stats; - sq_br = priv->channel[i]->sq[j].br; + sq_stats = &pch->sq[j].stats; + sq_br = pch->sq[j].br; tso_packets += sq_stats->tso_packets; tso_bytes += sq_stats->tso_bytes; @@ -1200,7 +1199,7 @@ mlx5e_refresh_sq_inline(struct mlx5e_priv *priv) return; for (i = 0; i < priv->params.num_channels; i++) - mlx5e_refresh_sq_inline_sub(priv, priv->channel[i]); + mlx5e_refresh_sq_inline_sub(priv, &priv->channel[i]); } static int @@ -1381,6 +1380,8 @@ mlx5e_open_sq(struct mlx5e_channel *c, if (err) goto err_disable_sq; + WRITE_ONCE(sq->running, 1); + return (0); err_disable_sq: @@ -1455,20 +1456,21 @@ mlx5e_drain_sq(struct mlx5e_sq *sq) /* * Check if already stopped. * - * NOTE: The "stopped" variable is only written when both the - * priv's configuration lock and the SQ's lock is locked. It - * can therefore safely be read when only one of the two locks - * is locked. This function is always called when the priv's - * configuration lock is locked. + * NOTE: Serialization of this function is managed by the + * caller ensuring the priv's state lock is locked or in case + * of rate limit support, a single thread manages drain and + * resume of SQs. The "running" variable can therefore safely + * be read without any locks. */ - if (sq->stopped != 0) + if (READ_ONCE(sq->running) == 0) return; - mtx_lock(&sq->lock); - /* don't put more packets into the SQ */ - sq->stopped = 1; + WRITE_ONCE(sq->running, 0); + /* serialize access to DMA rings */ + mtx_lock(&sq->lock); + /* teardown event factor timer, if any */ sq->cev_next_state = MLX5E_CEV_STATE_HOLD_NOPS; callout_stop(&sq->cev_callout); @@ -1761,15 +1763,14 @@ mlx5e_chan_mtx_destroy(struct mlx5e_channel *c) static int mlx5e_open_channel(struct mlx5e_priv *priv, int ix, struct mlx5e_channel_param *cparam, - struct mlx5e_channel *volatile *cp) + struct mlx5e_channel *c) { - struct mlx5e_channel *c; int err; - c = malloc(sizeof(*c), M_MLX5EN, M_WAITOK | M_ZERO); + memset(c, 0, sizeof(*c)); + c->priv = priv; c->ix = ix; - c->cpu = 0; c->ifp = priv->ifp; c->mkey_be = cpu_to_be32(priv->mr.key); c->num_tc = priv->num_tc; @@ -1796,9 +1797,6 @@ mlx5e_open_channel(struct mlx5e_priv *priv, int ix, if (err) goto err_close_sqs; - /* store channel pointer */ - *cp = c; - /* poll receive queue initially */ c->rq.cq.mcq.comp(&c->rq.cq.mcq); @@ -1816,39 +1814,24 @@ err_close_tx_cqs: err_free: /* destroy mutexes */ mlx5e_chan_mtx_destroy(c); - free(c, M_MLX5EN); return (err); } static void -mlx5e_close_channel(struct mlx5e_channel *volatile *pp) +mlx5e_close_channel(struct mlx5e_channel *c) { - struct mlx5e_channel *c = *pp; - - /* check if channel is already closed */ - if (c == NULL) - return; mlx5e_close_rq(&c->rq); } static void -mlx5e_close_channel_wait(struct mlx5e_channel *volatile *pp) +mlx5e_close_channel_wait(struct mlx5e_channel *c) { - struct mlx5e_channel *c = *pp; - - /* check if channel is already closed */ - if (c == NULL) - return; - /* ensure channel pointer is no longer used */ - *pp = NULL; - mlx5e_close_rq_wait(&c->rq); mlx5e_close_sqs_wait(c); mlx5e_close_cq(&c->rq.cq); mlx5e_close_tx_cqs(c); /* destroy mutexes */ mlx5e_chan_mtx_destroy(c); - free(c, M_MLX5EN); } static int @@ -2005,14 +1988,10 @@ static int mlx5e_open_channels(struct mlx5e_priv *priv) { struct mlx5e_channel_param cparam; - void *ptr; int err; int i; int j; - priv->channel = malloc(priv->params.num_channels * - sizeof(struct mlx5e_channel *), M_MLX5EN, M_WAITOK | M_ZERO); - mlx5e_build_channel_param(priv, &cparam); for (i = 0; i < priv->params.num_channels; i++) { err = mlx5e_open_channel(priv, i, &cparam, &priv->channel[i]); @@ -2021,7 +2000,7 @@ mlx5e_open_channels(struct mlx5e_priv *priv) } for (j = 0; j < priv->params.num_channels; j++) { - err = mlx5e_wait_for_min_rx_wqes(&priv->channel[j]->rq); + err = mlx5e_wait_for_min_rx_wqes(&priv->channel[j].rq); if (err) goto err_close_channels; } @@ -2029,39 +2008,22 @@ mlx5e_open_channels(struct mlx5e_priv *priv) return (0); err_close_channels: - for (i--; i >= 0; i--) { + while (i--) { mlx5e_close_channel(&priv->channel[i]); mlx5e_close_channel_wait(&priv->channel[i]); } - - /* remove "volatile" attribute from "channel" pointer */ - ptr = __DECONST(void *, priv->channel); - priv->channel = NULL; - - free(ptr, M_MLX5EN); - return (err); } static void mlx5e_close_channels(struct mlx5e_priv *priv) { - void *ptr; int i; - if (priv->channel == NULL) - return; - for (i = 0; i < priv->params.num_channels; i++) mlx5e_close_channel(&priv->channel[i]); for (i = 0; i < priv->params.num_channels; i++) mlx5e_close_channel_wait(&priv->channel[i]); - - /* remove "volatile" attribute from "channel" pointer */ - ptr = __DECONST(void *, priv->channel); - priv->channel = NULL; - - free(ptr, M_MLX5EN); } static int @@ -2127,9 +2089,6 @@ mlx5e_refresh_channel_params_sub(struct mlx5e_priv *pr int err; int i; - if (c == NULL) - return (EINVAL); - err = mlx5e_refresh_rq_params(priv, &c->rq); if (err) goto done; @@ -2148,13 +2107,14 @@ mlx5e_refresh_channel_params(struct mlx5e_priv *priv) { int i; - if (priv->channel == NULL) + /* check if channels are closed */ + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) return (EINVAL); for (i = 0; i < priv->params.num_channels; i++) { int err; - err = mlx5e_refresh_channel_params_sub(priv, priv->channel[i]); + err = mlx5e_refresh_channel_params_sub(priv, &priv->channel[i]); if (err) return (err); } @@ -2248,7 +2208,7 @@ mlx5e_open_rqt(struct mlx5e_priv *priv) /* apply receive side scaling stride, if any */ ix -= ix % (int)priv->params.channels_rsss; - MLX5_SET(rqtc, rqtc, rq_num[i], priv->channel[ix]->rq.rqn); + MLX5_SET(rqtc, rqtc, rq_num[i], priv->channel[ix].rq.rqn); } MLX5_SET(create_rqt_in, in, opcode, MLX5_CMD_OP_CREATE_RQT); @@ -2315,7 +2275,7 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tir MLX5_SET(tirc, tirc, disp_type, MLX5_TIRC_DISP_TYPE_DIRECT); MLX5_SET(tirc, tirc, inline_rqn, - priv->channel[0]->rq.rqn); + priv->channel[0].rq.rqn); break; default: MLX5_SET(tirc, tirc, disp_type, @@ -3246,7 +3206,7 @@ mlx5e_resume_sq(struct mlx5e_sq *sq) int err; /* check if already enabled */ - if (sq->stopped == 0) + if (READ_ONCE(sq->running) != 0) return; err = mlx5e_modify_sq(sq, MLX5_SQC_STATE_ERR, @@ -3269,11 +3229,8 @@ mlx5e_resume_sq(struct mlx5e_sq *sq) "mlx5e_modify_sq() from RST to RDY failed: %d\n", err); } - mtx_lock(&sq->lock); sq->cev_next_state = MLX5E_CEV_STATE_INITIAL; - sq->stopped = 0; - mtx_unlock(&sq->lock); - + WRITE_ONCE(sq->running, 1); } static void @@ -3344,18 +3301,14 @@ mlx5e_modify_tx_dma(struct mlx5e_priv *priv, uint8_t v { int i; - if (priv->channel == NULL) + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) return; for (i = 0; i < priv->params.num_channels; i++) { - - if (!priv->channel[i]) - continue; - if (value) - mlx5e_disable_tx_dma(priv->channel[i]); + mlx5e_disable_tx_dma(&priv->channel[i]); else - mlx5e_enable_tx_dma(priv->channel[i]); + mlx5e_enable_tx_dma(&priv->channel[i]); } } @@ -3364,18 +3317,14 @@ mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t v { int i; - if (priv->channel == NULL) + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) return; for (i = 0; i < priv->params.num_channels; i++) { - - if (!priv->channel[i]) - continue; - if (value) - mlx5e_disable_rx_dma(priv->channel[i]); + mlx5e_disable_rx_dma(&priv->channel[i]); else - mlx5e_enable_rx_dma(priv->channel[i]); + mlx5e_enable_rx_dma(&priv->channel[i]); } } @@ -3580,7 +3529,13 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) mlx5_core_dbg(mdev, "mlx5e_check_required_hca_cap() failed\n"); return (NULL); } - priv = malloc(sizeof(*priv), M_MLX5EN, M_WAITOK | M_ZERO); + /* + * Try to allocate the priv and make room for worst-case + * number of channel structures: + */ + priv = malloc(sizeof(*priv) + + (sizeof(priv->channel[0]) * mdev->priv.eq_table.num_comp_vectors), + M_MLX5EN, M_WAITOK | M_ZERO); mlx5e_priv_mtx_init(priv); ifp = priv->ifp = if_alloc(IFT_ETHER); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 13:05:45 2018 (r341977) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 13:08:49 2018 (r341978) @@ -458,9 +458,9 @@ mlx5e_rlw_channel_set_rate_locked(struct mlx5e_rl_work howmany(rate, 1000), burst); } - /* set new rate, if SQ is not stopped */ + /* set new rate, if SQ is running */ sq = channel->sq; - if (sq != NULL && sq->stopped == 0) { + if (sq != NULL && READ_ONCE(sq->running) != 0) { error = mlx5e_rl_modify_sq(sq, index); if (error != 0) atomic_add_64(&rlw->priv->rl.stats.tx_modify_rate_failure, 1ULL); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:05:45 2018 (r341977) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:08:49 2018 (r341978) @@ -81,17 +81,10 @@ static struct mlx5e_sq * mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) { struct mlx5e_priv *priv = ifp->if_softc; - struct mlx5e_channel * volatile *ppch; - struct mlx5e_channel *pch; + struct mlx5e_sq *sq; u32 ch; u32 tc; - ppch = priv->channel; - - /* check if channels are successfully opened */ - if (unlikely(ppch == NULL)) - return (NULL); - /* obtain VLAN information if present */ if (mb->m_flags & M_VLANTAG) { tc = (mb->m_pkthdr.ether_vtag >> 13); @@ -116,7 +109,7 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) struct mlx5e_rl_channel, m_snd_tag)->sq; /* check if valid */ - if (sq != NULL && sq->stopped == 0) + if (sq != NULL && sq->running != 0) return (sq); /* FALLTHROUGH */ @@ -146,10 +139,10 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) #endif } - /* check if channel is allocated and not stopped */ - pch = ppch[ch]; - if (likely(pch != NULL && pch->sq[tc].stopped == 0)) - return (&pch->sq[tc]); + /* check if send queue is running */ + sq = &priv->channel[ch].sq[tc]; + if (likely(READ_ONCE(sq->running) != 0)) + return (sq); return (NULL); } @@ -552,7 +545,7 @@ mlx5e_xmit_locked(struct ifnet *ifp, struct mlx5e_sq * int err = 0; if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - sq->stopped != 0)) { + READ_ONCE(sq->running) == 0)) { m_freem(mb); return (ENETDOWN); } From owner-svn-src-all@freebsd.org Wed Dec 12 13:11:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 389AF130E9D7; Wed, 12 Dec 2018 13:11:10 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D51AE93E2F; Wed, 12 Dec 2018 13:11:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9597D85B3; Wed, 12 Dec 2018 13:11:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDB9nW008435; Wed, 12 Dec 2018 13:11:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDB8El008430; Wed, 12 Dec 2018 13:11:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121311.wBCDB8El008430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341979 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D51AE93E2F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.611,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:11:10 -0000 Author: hselasky Date: Wed Dec 12 13:11:08 2018 New Revision: 341979 URL: https://svnweb.freebsd.org/changeset/base/341979 Log: MFC r341583: mlx5en: Statically allocate and free the channel structure(s). By allocating the worst case size channel structure array at attach time we can eliminate various NULL checks in the fast path. And also reduce the chance for use-after-free issues in the transmit fast path. This change is also a requirement for implementing backpressure support. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:08:49 2018 (r341978) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:11:08 2018 (r341979) @@ -595,7 +595,7 @@ struct mlx5e_sq { #define MLX5E_CEV_STATE_INITIAL 0 /* timer not started */ #define MLX5E_CEV_STATE_SEND_NOPS 1 /* send NOPs */ #define MLX5E_CEV_STATE_HOLD_NOPS 2 /* don't send NOPs yet */ - u16 stopped; /* set if SQ is stopped */ + u16 running; /* set if SQ is running */ struct callout cev_callout; union { u32 d32[2]; @@ -754,7 +754,6 @@ struct mlx5e_priv { u32 tdn; struct mlx5_core_mr mr; - struct mlx5e_channel *volatile *channel; u32 tisn[MLX5E_MAX_TX_NUM_TC]; u32 rqtn; u32 tirn[MLX5E_NUM_TT]; @@ -790,6 +789,8 @@ struct mlx5e_priv { int media_active_last; struct callout watchdog; + + struct mlx5e_channel channel[]; }; #define MLX5E_NET_IP_ALIGN 2 Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:08:49 2018 (r341978) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:11:08 2018 (r341979) @@ -1035,7 +1035,7 @@ mlx5e_ethtool_debug_channel_info(SYSCTL_HANDLER_ARGS) if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) goto out; for (i = 0; i < priv->params.num_channels; i++) { - c = priv->channel[i]; + c = &priv->channel[i]; rq = &c->rq; sbuf_printf(&sb, "channel %d rq %d cq %d\n", c->ix, rq->rqn, rq->cq.mcq.cqn); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:08:49 2018 (r341978) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:11:08 2018 (r341979) @@ -471,7 +471,6 @@ mlx5e_update_stats_work(struct work_struct *work) update_stats_work); struct mlx5_core_dev *mdev = priv->mdev; struct mlx5e_vport_stats *s = &priv->stats.vport; - struct mlx5e_rq_stats *rq_stats; struct mlx5e_sq_stats *sq_stats; struct buf_ring *sq_br; #if (__FreeBSD_version < 1100000) @@ -505,10 +504,10 @@ mlx5e_update_stats_work(struct work_struct *work) /* Collect firts the SW counters and then HW for consistency */ for (i = 0; i < priv->params.num_channels; i++) { - struct mlx5e_rq *rq = &priv->channel[i]->rq; + struct mlx5e_channel *pch = priv->channel + i; + struct mlx5e_rq *rq = &pch->rq; + struct mlx5e_rq_stats *rq_stats = &pch->rq.stats; - rq_stats = &priv->channel[i]->rq.stats; - /* collect stats from LRO */ rq_stats->sw_lro_queued = rq->lro.lro_queued; rq_stats->sw_lro_flushed = rq->lro.lro_flushed; @@ -520,8 +519,8 @@ mlx5e_update_stats_work(struct work_struct *work) rx_wqe_err += rq_stats->wqe_err; for (j = 0; j < priv->num_tc; j++) { - sq_stats = &priv->channel[i]->sq[j].stats; - sq_br = priv->channel[i]->sq[j].br; + sq_stats = &pch->sq[j].stats; + sq_br = pch->sq[j].br; tso_packets += sq_stats->tso_packets; tso_bytes += sq_stats->tso_bytes; @@ -1097,7 +1096,7 @@ mlx5e_refresh_sq_inline(struct mlx5e_priv *priv) return; for (i = 0; i < priv->params.num_channels; i++) - mlx5e_refresh_sq_inline_sub(priv, priv->channel[i]); + mlx5e_refresh_sq_inline_sub(priv, &priv->channel[i]); } static int @@ -1278,6 +1277,8 @@ mlx5e_open_sq(struct mlx5e_channel *c, if (err) goto err_disable_sq; + WRITE_ONCE(sq->running, 1); + return (0); err_disable_sq: @@ -1352,20 +1353,21 @@ mlx5e_drain_sq(struct mlx5e_sq *sq) /* * Check if already stopped. * - * NOTE: The "stopped" variable is only written when both the - * priv's configuration lock and the SQ's lock is locked. It - * can therefore safely be read when only one of the two locks - * is locked. This function is always called when the priv's - * configuration lock is locked. + * NOTE: Serialization of this function is managed by the + * caller ensuring the priv's state lock is locked or in case + * of rate limit support, a single thread manages drain and + * resume of SQs. The "running" variable can therefore safely + * be read without any locks. */ - if (sq->stopped != 0) + if (READ_ONCE(sq->running) == 0) return; - mtx_lock(&sq->lock); - /* don't put more packets into the SQ */ - sq->stopped = 1; + WRITE_ONCE(sq->running, 0); + /* serialize access to DMA rings */ + mtx_lock(&sq->lock); + /* teardown event factor timer, if any */ sq->cev_next_state = MLX5E_CEV_STATE_HOLD_NOPS; callout_stop(&sq->cev_callout); @@ -1658,15 +1660,14 @@ mlx5e_chan_mtx_destroy(struct mlx5e_channel *c) static int mlx5e_open_channel(struct mlx5e_priv *priv, int ix, struct mlx5e_channel_param *cparam, - struct mlx5e_channel *volatile *cp) + struct mlx5e_channel *c) { - struct mlx5e_channel *c; int err; - c = malloc(sizeof(*c), M_MLX5EN, M_WAITOK | M_ZERO); + memset(c, 0, sizeof(*c)); + c->priv = priv; c->ix = ix; - c->cpu = 0; c->ifp = priv->ifp; c->mkey_be = cpu_to_be32(priv->mr.key); c->num_tc = priv->num_tc; @@ -1693,9 +1694,6 @@ mlx5e_open_channel(struct mlx5e_priv *priv, int ix, if (err) goto err_close_sqs; - /* store channel pointer */ - *cp = c; - /* poll receive queue initially */ c->rq.cq.mcq.comp(&c->rq.cq.mcq); @@ -1713,39 +1711,24 @@ err_close_tx_cqs: err_free: /* destroy mutexes */ mlx5e_chan_mtx_destroy(c); - free(c, M_MLX5EN); return (err); } static void -mlx5e_close_channel(struct mlx5e_channel *volatile *pp) +mlx5e_close_channel(struct mlx5e_channel *c) { - struct mlx5e_channel *c = *pp; - - /* check if channel is already closed */ - if (c == NULL) - return; mlx5e_close_rq(&c->rq); } static void -mlx5e_close_channel_wait(struct mlx5e_channel *volatile *pp) +mlx5e_close_channel_wait(struct mlx5e_channel *c) { - struct mlx5e_channel *c = *pp; - - /* check if channel is already closed */ - if (c == NULL) - return; - /* ensure channel pointer is no longer used */ - *pp = NULL; - mlx5e_close_rq_wait(&c->rq); mlx5e_close_sqs_wait(c); mlx5e_close_cq(&c->rq.cq); mlx5e_close_tx_cqs(c); /* destroy mutexes */ mlx5e_chan_mtx_destroy(c); - free(c, M_MLX5EN); } static int @@ -1902,14 +1885,10 @@ static int mlx5e_open_channels(struct mlx5e_priv *priv) { struct mlx5e_channel_param cparam; - void *ptr; int err; int i; int j; - priv->channel = malloc(priv->params.num_channels * - sizeof(struct mlx5e_channel *), M_MLX5EN, M_WAITOK | M_ZERO); - mlx5e_build_channel_param(priv, &cparam); for (i = 0; i < priv->params.num_channels; i++) { err = mlx5e_open_channel(priv, i, &cparam, &priv->channel[i]); @@ -1918,7 +1897,7 @@ mlx5e_open_channels(struct mlx5e_priv *priv) } for (j = 0; j < priv->params.num_channels; j++) { - err = mlx5e_wait_for_min_rx_wqes(&priv->channel[j]->rq); + err = mlx5e_wait_for_min_rx_wqes(&priv->channel[j].rq); if (err) goto err_close_channels; } @@ -1926,39 +1905,22 @@ mlx5e_open_channels(struct mlx5e_priv *priv) return (0); err_close_channels: - for (i--; i >= 0; i--) { + while (i--) { mlx5e_close_channel(&priv->channel[i]); mlx5e_close_channel_wait(&priv->channel[i]); } - - /* remove "volatile" attribute from "channel" pointer */ - ptr = __DECONST(void *, priv->channel); - priv->channel = NULL; - - free(ptr, M_MLX5EN); - return (err); } static void mlx5e_close_channels(struct mlx5e_priv *priv) { - void *ptr; int i; - if (priv->channel == NULL) - return; - for (i = 0; i < priv->params.num_channels; i++) mlx5e_close_channel(&priv->channel[i]); for (i = 0; i < priv->params.num_channels; i++) mlx5e_close_channel_wait(&priv->channel[i]); - - /* remove "volatile" attribute from "channel" pointer */ - ptr = __DECONST(void *, priv->channel); - priv->channel = NULL; - - free(ptr, M_MLX5EN); } static int @@ -2024,9 +1986,6 @@ mlx5e_refresh_channel_params_sub(struct mlx5e_priv *pr int err; int i; - if (c == NULL) - return (EINVAL); - err = mlx5e_refresh_rq_params(priv, &c->rq); if (err) goto done; @@ -2045,13 +2004,14 @@ mlx5e_refresh_channel_params(struct mlx5e_priv *priv) { int i; - if (priv->channel == NULL) + /* check if channels are closed */ + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) return (EINVAL); for (i = 0; i < priv->params.num_channels; i++) { int err; - err = mlx5e_refresh_channel_params_sub(priv, priv->channel[i]); + err = mlx5e_refresh_channel_params_sub(priv, &priv->channel[i]); if (err) return (err); } @@ -2145,7 +2105,7 @@ mlx5e_open_rqt(struct mlx5e_priv *priv) /* apply receive side scaling stride, if any */ ix -= ix % (int)priv->params.channels_rsss; - MLX5_SET(rqtc, rqtc, rq_num[i], priv->channel[ix]->rq.rqn); + MLX5_SET(rqtc, rqtc, rq_num[i], priv->channel[ix].rq.rqn); } MLX5_SET(create_rqt_in, in, opcode, MLX5_CMD_OP_CREATE_RQT); @@ -2212,7 +2172,7 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tir MLX5_SET(tirc, tirc, disp_type, MLX5_TIRC_DISP_TYPE_DIRECT); MLX5_SET(tirc, tirc, inline_rqn, - priv->channel[0]->rq.rqn); + priv->channel[0].rq.rqn); break; default: MLX5_SET(tirc, tirc, disp_type, @@ -3133,7 +3093,7 @@ mlx5e_resume_sq(struct mlx5e_sq *sq) int err; /* check if already enabled */ - if (sq->stopped == 0) + if (READ_ONCE(sq->running) != 0) return; err = mlx5e_modify_sq(sq, MLX5_SQC_STATE_ERR, @@ -3156,11 +3116,8 @@ mlx5e_resume_sq(struct mlx5e_sq *sq) "mlx5e_modify_sq() from RST to RDY failed: %d\n", err); } - mtx_lock(&sq->lock); sq->cev_next_state = MLX5E_CEV_STATE_INITIAL; - sq->stopped = 0; - mtx_unlock(&sq->lock); - + WRITE_ONCE(sq->running, 1); } static void @@ -3231,18 +3188,14 @@ mlx5e_modify_tx_dma(struct mlx5e_priv *priv, uint8_t v { int i; - if (priv->channel == NULL) + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) return; for (i = 0; i < priv->params.num_channels; i++) { - - if (!priv->channel[i]) - continue; - if (value) - mlx5e_disable_tx_dma(priv->channel[i]); + mlx5e_disable_tx_dma(&priv->channel[i]); else - mlx5e_enable_tx_dma(priv->channel[i]); + mlx5e_enable_tx_dma(&priv->channel[i]); } } @@ -3251,18 +3204,14 @@ mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t v { int i; - if (priv->channel == NULL) + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) return; for (i = 0; i < priv->params.num_channels; i++) { - - if (!priv->channel[i]) - continue; - if (value) - mlx5e_disable_rx_dma(priv->channel[i]); + mlx5e_disable_rx_dma(&priv->channel[i]); else - mlx5e_enable_rx_dma(priv->channel[i]); + mlx5e_enable_rx_dma(&priv->channel[i]); } } @@ -3467,7 +3416,13 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) mlx5_core_dbg(mdev, "mlx5e_check_required_hca_cap() failed\n"); return (NULL); } - priv = malloc(sizeof(*priv), M_MLX5EN, M_WAITOK | M_ZERO); + /* + * Try to allocate the priv and make room for worst-case + * number of channel structures: + */ + priv = malloc(sizeof(*priv) + + (sizeof(priv->channel[0]) * mdev->priv.eq_table.num_comp_vectors), + M_MLX5EN, M_WAITOK | M_ZERO); mlx5e_priv_mtx_init(priv); ifp = priv->ifp = if_alloc(IFT_ETHER); Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:08:49 2018 (r341978) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:11:08 2018 (r341979) @@ -81,17 +81,10 @@ static struct mlx5e_sq * mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) { struct mlx5e_priv *priv = ifp->if_softc; - struct mlx5e_channel * volatile *ppch; - struct mlx5e_channel *pch; + struct mlx5e_sq *sq; u32 ch; u32 tc; - ppch = priv->channel; - - /* check if channels are successfully opened */ - if (unlikely(ppch == NULL)) - return (NULL); - /* obtain VLAN information if present */ if (mb->m_flags & M_VLANTAG) { tc = (mb->m_pkthdr.ether_vtag >> 13); @@ -127,10 +120,10 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) #endif } - /* check if channel is allocated and not stopped */ - pch = ppch[ch]; - if (likely(pch != NULL && pch->sq[tc].stopped == 0)) - return (&pch->sq[tc]); + /* check if send queue is running */ + sq = &priv->channel[ch].sq[tc]; + if (likely(READ_ONCE(sq->running) != 0)) + return (sq); return (NULL); } @@ -533,7 +526,7 @@ mlx5e_xmit_locked(struct ifnet *ifp, struct mlx5e_sq * int err = 0; if (unlikely((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - sq->stopped != 0)) { + READ_ONCE(sq->running) == 0)) { m_freem(mb); return (ENETDOWN); } From owner-svn-src-all@freebsd.org Wed Dec 12 13:12:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DAFC130EA9C; Wed, 12 Dec 2018 13:12:11 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 E93F99413F; Wed, 12 Dec 2018 13:12:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFACB86FB; Wed, 12 Dec 2018 13:12:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDCAq5010181; Wed, 12 Dec 2018 13:12:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDCA73010177; Wed, 12 Dec 2018 13:12:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121312.wBCDCA73010177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341980 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E93F99413F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:12:11 -0000 Author: hselasky Date: Wed Dec 12 13:12:10 2018 New Revision: 341980 URL: https://svnweb.freebsd.org/changeset/base/341980 Log: MFC r341584: mlx5en: Count all transmitted and received bytes. Add counter for all transmitted and received bytes. Currently only all transmitted and received packets were counted. Fix description of RX LRO counters while at it. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:11:08 2018 (r341979) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:12:10 2018 (r341980) @@ -379,9 +379,10 @@ struct mlx5e_port_stats_debug { #define MLX5E_RQ_STATS(m) \ m(+1, u64 packets, "packets", "Received packets") \ + m(+1, u64 bytes, "bytes", "Received bytes") \ m(+1, u64 csum_none, "csum_none", "Received packets") \ - m(+1, u64 lro_packets, "lro_packets", "Received packets") \ - m(+1, u64 lro_bytes, "lro_bytes", "Received packets") \ + m(+1, u64 lro_packets, "lro_packets", "Received LRO packets") \ + m(+1, u64 lro_bytes, "lro_bytes", "Received LRO bytes") \ m(+1, u64 sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO") \ m(+1, u64 sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO") \ m(+1, u64 wqe_err, "wqe_err", "Received packets") @@ -396,6 +397,7 @@ struct mlx5e_rq_stats { #define MLX5E_SQ_STATS(m) \ m(+1, u64 packets, "packets", "Transmitted packets") \ + m(+1, u64 bytes, "bytes", "Transmitted bytes") \ m(+1, u64 tso_packets, "tso_packets", "Transmitted packets") \ m(+1, u64 tso_bytes, "tso_bytes", "Transmitted bytes") \ m(+1, u64 csum_offload_none, "csum_offload_none", "Transmitted packets") \ Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Dec 12 13:11:08 2018 (r341979) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Dec 12 13:12:10 2018 (r341980) @@ -482,6 +482,7 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) } mlx5e_build_rx_mbuf(cqe, rq, mb, byte_cnt); + rq->stats.bytes += byte_cnt; rq->stats.packets++; #if !defined(HAVE_TCP_LRO_RX) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:11:08 2018 (r341979) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:12:10 2018 (r341980) @@ -472,7 +472,10 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) sq->mbuf[pi].num_wqebbs = DIV_ROUND_UP(ds_cnt, MLX5_SEND_WQEBB_NUM_DS); sq->pc += sq->mbuf[pi].num_wqebbs; + /* Count all traffic going out */ sq->stats.packets++; + sq->stats.bytes += sq->mbuf[pi].num_bytes; + *mbp = NULL; /* safety clear */ return (0); From owner-svn-src-all@freebsd.org Wed Dec 12 13:12:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CADFF130EC5A; Wed, 12 Dec 2018 13:12:31 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 712F594292; Wed, 12 Dec 2018 13:12:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 676D2871E; Wed, 12 Dec 2018 13:12:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDCV9G010279; Wed, 12 Dec 2018 13:12:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDCUTv010275; Wed, 12 Dec 2018 13:12:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121312.wBCDCUTv010275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341981 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 712F594292 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:12:32 -0000 Author: hselasky Date: Wed Dec 12 13:12:30 2018 New Revision: 341981 URL: https://svnweb.freebsd.org/changeset/base/341981 Log: MFC r341584: mlx5en: Count all transmitted and received bytes. Add counter for all transmitted and received bytes. Currently only all transmitted and received packets were counted. Fix description of RX LRO counters while at it. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:12:10 2018 (r341980) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:12:30 2018 (r341981) @@ -378,9 +378,10 @@ struct mlx5e_port_stats_debug { #define MLX5E_RQ_STATS(m) \ m(+1, u64 packets, "packets", "Received packets") \ + m(+1, u64 bytes, "bytes", "Received bytes") \ m(+1, u64 csum_none, "csum_none", "Received packets") \ - m(+1, u64 lro_packets, "lro_packets", "Received packets") \ - m(+1, u64 lro_bytes, "lro_bytes", "Received packets") \ + m(+1, u64 lro_packets, "lro_packets", "Received LRO packets") \ + m(+1, u64 lro_bytes, "lro_bytes", "Received LRO bytes") \ m(+1, u64 sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO") \ m(+1, u64 sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO") \ m(+1, u64 wqe_err, "wqe_err", "Received packets") @@ -395,6 +396,7 @@ struct mlx5e_rq_stats { #define MLX5E_SQ_STATS(m) \ m(+1, u64 packets, "packets", "Transmitted packets") \ + m(+1, u64 bytes, "bytes", "Transmitted bytes") \ m(+1, u64 tso_packets, "tso_packets", "Transmitted packets") \ m(+1, u64 tso_bytes, "tso_bytes", "Transmitted bytes") \ m(+1, u64 csum_offload_none, "csum_offload_none", "Transmitted packets") \ Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Dec 12 13:12:10 2018 (r341980) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Dec 12 13:12:30 2018 (r341981) @@ -437,6 +437,7 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) } mlx5e_build_rx_mbuf(cqe, rq, mb, byte_cnt); + rq->stats.bytes += byte_cnt; rq->stats.packets++; #if !defined(HAVE_TCP_LRO_RX) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:12:10 2018 (r341980) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:12:30 2018 (r341981) @@ -453,7 +453,10 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) sq->mbuf[pi].num_wqebbs = DIV_ROUND_UP(ds_cnt, MLX5_SEND_WQEBB_NUM_DS); sq->pc += sq->mbuf[pi].num_wqebbs; + /* Count all traffic going out */ sq->stats.packets++; + sq->stats.bytes += sq->mbuf[pi].num_bytes; + *mbp = NULL; /* safety clear */ return (0); From owner-svn-src-all@freebsd.org Wed Dec 12 13:13:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB40C130ECF7; Wed, 12 Dec 2018 13:13:40 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 9244C943EF; Wed, 12 Dec 2018 13:13:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B6048724; Wed, 12 Dec 2018 13:13:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDDej7010530; Wed, 12 Dec 2018 13:13:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDDeOf010529; Wed, 12 Dec 2018 13:13:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121313.wBCDDeOf010529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341982 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9244C943EF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:13:41 -0000 Author: hselasky Date: Wed Dec 12 13:13:39 2018 New Revision: 341982 URL: https://svnweb.freebsd.org/changeset/base/341982 Log: MFC r341585: mlx5en: Improve configuration of HW LRO. In order to enable HW LRO, both the "hw_lro" sysctl in the mlx5en(4) config space must be set, and the ifconfig(8) LRO capability must be set. Any other settings will disable HW LRO. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:12:30 2018 (r341981) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:13:39 2018 (r341982) @@ -669,21 +669,24 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) mlx5e_close_locked(priv->ifp); /* import HW LRO mode */ - if (priv->params_ethtool.hw_lro != 0) { - if ((priv->ifp->if_capenable & IFCAP_LRO) && - MLX5_CAP_ETH(priv->mdev, lro_cap)) { - priv->params.hw_lro_en = 1; - priv->params_ethtool.hw_lro = 1; + if (priv->params_ethtool.hw_lro != 0 && + MLX5_CAP_ETH(priv->mdev, lro_cap)) { + priv->params_ethtool.hw_lro = 1; + /* check if feature should actually be enabled */ + if (priv->ifp->if_capenable & IFCAP_LRO) { + priv->params.hw_lro_en = true; } else { - priv->params.hw_lro_en = 0; - priv->params_ethtool.hw_lro = 0; - error = EINVAL; + priv->params.hw_lro_en = false; - if_printf(priv->ifp, "Can't enable HW LRO: " - "The HW or SW LRO feature is disabled\n"); + if_printf(priv->ifp, "To enable HW LRO " + "please also enable LRO via ifconfig(8).\n"); } } else { - priv->params.hw_lro_en = 0; + /* return an error if HW does not support this feature */ + if (priv->params_ethtool.hw_lro != 0) + error = EINVAL; + priv->params.hw_lro_en = false; + priv->params_ethtool.hw_lro = 0; } /* restart network interface, if any */ if (was_opened) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:12:30 2018 (r341981) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:13:39 2018 (r341982) @@ -2891,12 +2891,18 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t bool need_restart = false; ifp->if_capenable ^= IFCAP_LRO; + + /* figure out if updating HW LRO is needed */ if (!(ifp->if_capenable & IFCAP_LRO)) { if (priv->params.hw_lro_en) { priv->params.hw_lro_en = false; need_restart = true; - /* Not sure this is the correct way */ - priv->params_ethtool.hw_lro = priv->params.hw_lro_en; + } + } else { + if (priv->params.hw_lro_en == false && + priv->params_ethtool.hw_lro != 0) { + priv->params.hw_lro_en = true; + need_restart = true; } } if (was_opened && need_restart) { From owner-svn-src-all@freebsd.org Wed Dec 12 13:13:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5B34130ED41; Wed, 12 Dec 2018 13:13:51 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 5D5A4944DE; Wed, 12 Dec 2018 13:13:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46AC18725; Wed, 12 Dec 2018 13:13:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDDpnP010607; Wed, 12 Dec 2018 13:13:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDDofa010606; Wed, 12 Dec 2018 13:13:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121313.wBCDDofa010606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341983 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5D5A4944DE X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:13:52 -0000 Author: hselasky Date: Wed Dec 12 13:13:50 2018 New Revision: 341983 URL: https://svnweb.freebsd.org/changeset/base/341983 Log: MFC r341585: mlx5en: Improve configuration of HW LRO. In order to enable HW LRO, both the "hw_lro" sysctl in the mlx5en(4) config space must be set, and the ifconfig(8) LRO capability must be set. Any other settings will disable HW LRO. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:13:39 2018 (r341982) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:13:50 2018 (r341983) @@ -669,21 +669,24 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) mlx5e_close_locked(priv->ifp); /* import HW LRO mode */ - if (priv->params_ethtool.hw_lro != 0) { - if ((priv->ifp->if_capenable & IFCAP_LRO) && - MLX5_CAP_ETH(priv->mdev, lro_cap)) { - priv->params.hw_lro_en = 1; - priv->params_ethtool.hw_lro = 1; + if (priv->params_ethtool.hw_lro != 0 && + MLX5_CAP_ETH(priv->mdev, lro_cap)) { + priv->params_ethtool.hw_lro = 1; + /* check if feature should actually be enabled */ + if (priv->ifp->if_capenable & IFCAP_LRO) { + priv->params.hw_lro_en = true; } else { - priv->params.hw_lro_en = 0; - priv->params_ethtool.hw_lro = 0; - error = EINVAL; + priv->params.hw_lro_en = false; - if_printf(priv->ifp, "Can't enable HW LRO: " - "The HW or SW LRO feature is disabled\n"); + if_printf(priv->ifp, "To enable HW LRO " + "please also enable LRO via ifconfig(8).\n"); } } else { - priv->params.hw_lro_en = 0; + /* return an error if HW does not support this feature */ + if (priv->params_ethtool.hw_lro != 0) + error = EINVAL; + priv->params.hw_lro_en = false; + priv->params_ethtool.hw_lro = 0; } /* restart network interface, if any */ if (was_opened) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:13:39 2018 (r341982) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:13:50 2018 (r341983) @@ -2788,12 +2788,18 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t bool need_restart = false; ifp->if_capenable ^= IFCAP_LRO; + + /* figure out if updating HW LRO is needed */ if (!(ifp->if_capenable & IFCAP_LRO)) { if (priv->params.hw_lro_en) { priv->params.hw_lro_en = false; need_restart = true; - /* Not sure this is the correct way */ - priv->params_ethtool.hw_lro = priv->params.hw_lro_en; + } + } else { + if (priv->params.hw_lro_en == false && + priv->params_ethtool.hw_lro != 0) { + priv->params.hw_lro_en = true; + need_restart = true; } } if (was_opened && need_restart) { From owner-svn-src-all@freebsd.org Wed Dec 12 13:14:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 838DD130EE18; Wed, 12 Dec 2018 13:14:42 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 2A7709470B; Wed, 12 Dec 2018 13:14:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 209BC8728; Wed, 12 Dec 2018 13:14:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDEgAF010936; Wed, 12 Dec 2018 13:14:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDEfrW010935; Wed, 12 Dec 2018 13:14:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121314.wBCDEfrW010935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r341984 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2A7709470B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:14:42 -0000 Author: hselasky Date: Wed Dec 12 13:14:41 2018 New Revision: 341984 URL: https://svnweb.freebsd.org/changeset/base/341984 Log: MFC r341585: mlx5en: Improve configuration of HW LRO. In order to enable HW LRO, both the "hw_lro" sysctl in the mlx5en(4) config space must be set, and the ifconfig(8) LRO capability must be set. Any other settings will disable HW LRO. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:13:50 2018 (r341983) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Dec 12 13:14:41 2018 (r341984) @@ -330,21 +330,24 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) mlx5e_close_locked(priv->ifp); /* import HW LRO mode */ - if (priv->params_ethtool.hw_lro != 0) { - if ((priv->ifp->if_capenable & IFCAP_LRO) && - MLX5_CAP_ETH(priv->mdev, lro_cap)) { - priv->params.hw_lro_en = 1; - priv->params_ethtool.hw_lro = 1; + if (priv->params_ethtool.hw_lro != 0 && + MLX5_CAP_ETH(priv->mdev, lro_cap)) { + priv->params_ethtool.hw_lro = 1; + /* check if feature should actually be enabled */ + if (priv->ifp->if_capenable & IFCAP_LRO) { + priv->params.hw_lro_en = true; } else { - priv->params.hw_lro_en = 0; - priv->params_ethtool.hw_lro = 0; - error = EINVAL; + priv->params.hw_lro_en = false; - if_printf(priv->ifp, "Can't enable HW LRO: " - "The HW or SW LRO feature is disabled\n"); + if_printf(priv->ifp, "To enable HW LRO " + "please also enable LRO via ifconfig(8).\n"); } } else { - priv->params.hw_lro_en = 0; + /* return an error if HW does not support this feature */ + if (priv->params_ethtool.hw_lro != 0) + error = EINVAL; + priv->params.hw_lro_en = false; + priv->params_ethtool.hw_lro = 0; } /* restart network interface, if any */ if (was_opened) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:13:50 2018 (r341983) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:14:41 2018 (r341984) @@ -2751,12 +2751,18 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t bool need_restart = false; ifp->if_capenable ^= IFCAP_LRO; + + /* figure out if updating HW LRO is needed */ if (!(ifp->if_capenable & IFCAP_LRO)) { if (priv->params.hw_lro_en) { priv->params.hw_lro_en = false; need_restart = true; - /* Not sure this is the correct way */ - priv->params_ethtool.hw_lro = priv->params.hw_lro_en; + } + } else { + if (priv->params.hw_lro_en == false && + priv->params_ethtool.hw_lro != 0) { + priv->params.hw_lro_en = true; + need_restart = true; } } if (was_opened && need_restart) { From owner-svn-src-all@freebsd.org Wed Dec 12 13:16:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3B9A130EF9E; Wed, 12 Dec 2018 13:16:40 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 82087948DE; Wed, 12 Dec 2018 13:16:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73C3C872A; Wed, 12 Dec 2018 13:16:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDGeki011303; Wed, 12 Dec 2018 13:16:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDGdOV011295; Wed, 12 Dec 2018 13:16:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121316.wBCDGdOV011295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341985 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 341985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 82087948DE X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:16:41 -0000 Author: hselasky Date: Wed Dec 12 13:16:39 2018 New Revision: 341985 URL: https://svnweb.freebsd.org/changeset/base/341985 Log: MFC r341586: mlx5en: Implement backpressure indication. The backpressure indication is implemented using an unlimited rate type of mbuf send tag. When the upper layers typically the socket layer has obtained such a tag, it can then query the destination driver queue for the current amount of space available in the send queue. A single mbuf send tag may be referenced multiple times and a refcount has been added to the mlx5e_priv structure to track its usage. Because the send tag resides in the mlx5e_channel structure, there is no need to wait for refcounts to reach zero until the mlx4en(4) driver is detached. The channels structure is persistant during the lifetime of the mlx5en(4) driver it belongs to and can so be accessed without any need of synchronization. The mlx5e_snd_tag structure was extended to contain a type field, because there are now two different tag types which end up in the driver which need to be distinguished. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h stable/12/sys/dev/mlx5/mlx5_en/en_rl.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:14:41 2018 (r341984) +++ stable/12/sys/dev/mlx5/mlx5_en/en.h Wed Dec 12 13:16:39 2018 (r341985) @@ -580,6 +580,11 @@ enum { MLX5E_SQ_FULL }; +struct mlx5e_snd_tag { + struct m_snd_tag m_snd_tag; /* send tag */ + u32 type; /* tag type */ +}; + struct mlx5e_sq { /* data path */ struct mtx lock; @@ -640,11 +645,27 @@ mlx5e_sq_has_room_for(struct mlx5e_sq *sq, u16 n) return ((sq->wq.sz_m1 & (cc - pc)) >= n || cc == pc); } +static inline u32 +mlx5e_sq_queue_level(struct mlx5e_sq *sq) +{ + u16 cc; + u16 pc; + + if (sq == NULL) + return (0); + + cc = sq->cc; + pc = sq->pc; + + return (((sq->wq.sz_m1 & (pc - cc)) * + IF_SND_QUEUE_LEVEL_MAX) / sq->wq.sz_m1); +} + struct mlx5e_channel { /* data path */ struct mlx5e_rq rq; + struct mlx5e_snd_tag tag; struct mlx5e_sq sq[MLX5E_MAX_TX_NUM_TC]; - struct ifnet *ifp; u32 mkey_be; u8 num_tc; @@ -770,6 +791,7 @@ struct mlx5e_priv { u32 pdn; u32 tdn; struct mlx5_core_mr mr; + volatile unsigned int channel_refs; u32 tisn[MLX5E_MAX_TX_NUM_TC]; u32 rqtn; @@ -907,6 +929,24 @@ mlx5e_cq_arm(struct mlx5e_cq *cq, spinlock_t *dblock) mcq = &cq->mcq; mlx5_cq_arm(mcq, MLX5_CQ_DB_REQ_NOT, mcq->uar->map, dblock, cq->wq.cc); +} + +static inline void +mlx5e_ref_channel(struct mlx5e_priv *priv) +{ + + KASSERT(priv->channel_refs < INT_MAX, + ("Channel refs will overflow")); + atomic_fetchadd_int(&priv->channel_refs, 1); +} + +static inline void +mlx5e_unref_channel(struct mlx5e_priv *priv) +{ + + KASSERT(priv->channel_refs > 0, + ("Channel refs is not greater than zero")); + atomic_fetchadd_int(&priv->channel_refs, -1); } extern const struct ethtool_ops mlx5e_ethtool_ops; Modified: stable/12/sys/dev/mlx5/mlx5_en/en_rl.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/en_rl.h Wed Dec 12 13:14:41 2018 (r341984) +++ stable/12/sys/dev/mlx5/mlx5_en/en_rl.h Wed Dec 12 13:16:39 2018 (r341985) @@ -129,7 +129,7 @@ struct mlx5e_rl_channel_param { }; struct mlx5e_rl_channel { - struct m_snd_tag m_snd_tag; + struct mlx5e_snd_tag tag; STAILQ_ENTRY(mlx5e_rl_channel) entry; struct mlx5e_sq * volatile sq; struct mlx5e_rl_worker *worker; Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:14:41 2018 (r341984) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:16:39 2018 (r341985) @@ -884,7 +884,7 @@ mlx5e_create_rq(struct mlx5e_channel *c, wq_sz = mlx5_wq_ll_get_size(&rq->wq); - err = -tcp_lro_init_args(&rq->lro, c->ifp, TCP_LRO_ENTRIES, wq_sz); + err = -tcp_lro_init_args(&rq->lro, c->tag.m_snd_tag.ifp, TCP_LRO_ENTRIES, wq_sz); if (err) goto err_rq_wq_destroy; @@ -914,7 +914,7 @@ mlx5e_create_rq(struct mlx5e_channel *c, #endif } - rq->ifp = c->ifp; + rq->ifp = c->tag.m_snd_tag.ifp; rq->channel = c; rq->ix = c->ix; @@ -1771,7 +1771,9 @@ mlx5e_open_channel(struct mlx5e_priv *priv, int ix, c->priv = priv; c->ix = ix; - c->ifp = priv->ifp; + /* setup send tag */ + c->tag.m_snd_tag.ifp = priv->ifp; + c->tag.type = IF_SND_TAG_TYPE_UNLIMITED; c->mkey_be = cpu_to_be32(priv->mr.key); c->num_tc = priv->num_tc; @@ -2004,7 +2006,6 @@ mlx5e_open_channels(struct mlx5e_priv *priv) if (err) goto err_close_channels; } - return (0); err_close_channels: @@ -3518,6 +3519,141 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) PRIV_UNLOCK(priv); } +static int +mlx5e_ul_snd_tag_alloc(struct ifnet *ifp, + union if_snd_tag_alloc_params *params, + struct m_snd_tag **ppmt) +{ + struct mlx5e_priv *priv; + struct mlx5e_channel *pch; + + priv = ifp->if_softc; + + if (unlikely(priv->gone || params->hdr.flowtype == M_HASHTYPE_NONE)) { + return (EOPNOTSUPP); + } else { + /* keep this code synced with mlx5e_select_queue() */ + u32 ch = priv->params.num_channels; +#ifdef RSS + u32 temp; + + if (rss_hash2bucket(params->hdr.flowid, + params->hdr.flowtype, &temp) == 0) + ch = temp % ch; + else +#endif + ch = (params->hdr.flowid % 128) % ch; + + /* + * NOTE: The channels array is only freed at detach + * and it safe to return a pointer to the send tag + * inside the channels structure as long as we + * reference the priv. + */ + pch = priv->channel + ch; + + /* check if send queue is not running */ + if (unlikely(pch->sq[0].running == 0)) + return (ENXIO); + mlx5e_ref_channel(priv); + *ppmt = &pch->tag.m_snd_tag; + return (0); + } +} + +static int +mlx5e_ul_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *params) +{ + struct mlx5e_channel *pch = + container_of(pmt, struct mlx5e_channel, tag.m_snd_tag); + + params->unlimited.max_rate = -1ULL; + params->unlimited.queue_level = mlx5e_sq_queue_level(&pch->sq[0]); + return (0); +} + +static void +mlx5e_ul_snd_tag_free(struct m_snd_tag *pmt) +{ + struct mlx5e_channel *pch = + container_of(pmt, struct mlx5e_channel, tag.m_snd_tag); + + mlx5e_unref_channel(pch->priv); +} + +static int +mlx5e_snd_tag_alloc(struct ifnet *ifp, + union if_snd_tag_alloc_params *params, + struct m_snd_tag **ppmt) +{ + + switch (params->hdr.type) { +#ifdef RATELIMIT + case IF_SND_TAG_TYPE_RATE_LIMIT: + return (mlx5e_rl_snd_tag_alloc(ifp, params, ppmt)); +#endif + case IF_SND_TAG_TYPE_UNLIMITED: + return (mlx5e_ul_snd_tag_alloc(ifp, params, ppmt)); + default: + return (EOPNOTSUPP); + } +} + +static int +mlx5e_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params) +{ + struct mlx5e_snd_tag *tag = + container_of(pmt, struct mlx5e_snd_tag, m_snd_tag); + + switch (tag->type) { +#ifdef RATELIMIT + case IF_SND_TAG_TYPE_RATE_LIMIT: + return (mlx5e_rl_snd_tag_modify(pmt, params)); +#endif + case IF_SND_TAG_TYPE_UNLIMITED: + default: + return (EOPNOTSUPP); + } +} + +static int +mlx5e_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *params) +{ + struct mlx5e_snd_tag *tag = + container_of(pmt, struct mlx5e_snd_tag, m_snd_tag); + + switch (tag->type) { +#ifdef RATELIMIT + case IF_SND_TAG_TYPE_RATE_LIMIT: + return (mlx5e_rl_snd_tag_query(pmt, params)); +#endif + case IF_SND_TAG_TYPE_UNLIMITED: + return (mlx5e_ul_snd_tag_query(pmt, params)); + default: + return (EOPNOTSUPP); + } +} + +static void +mlx5e_snd_tag_free(struct m_snd_tag *pmt) +{ + struct mlx5e_snd_tag *tag = + container_of(pmt, struct mlx5e_snd_tag, m_snd_tag); + + switch (tag->type) { +#ifdef RATELIMIT + case IF_SND_TAG_TYPE_RATE_LIMIT: + mlx5e_rl_snd_tag_free(pmt); + break; +#endif + case IF_SND_TAG_TYPE_UNLIMITED: + mlx5e_ul_snd_tag_free(pmt); + break; + default: + break; + } +} + static void * mlx5e_create_ifp(struct mlx5_core_dev *mdev) { @@ -3571,13 +3707,11 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) ifp->if_capabilities |= IFCAP_LRO; ifp->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; ifp->if_capabilities |= IFCAP_HWSTATS | IFCAP_HWRXTSTMP; -#ifdef RATELIMIT ifp->if_capabilities |= IFCAP_TXRTLMT; - ifp->if_snd_tag_alloc = mlx5e_rl_snd_tag_alloc; - ifp->if_snd_tag_free = mlx5e_rl_snd_tag_free; - ifp->if_snd_tag_modify = mlx5e_rl_snd_tag_modify; - ifp->if_snd_tag_query = mlx5e_rl_snd_tag_query; -#endif + ifp->if_snd_tag_alloc = mlx5e_snd_tag_alloc; + ifp->if_snd_tag_free = mlx5e_snd_tag_free; + ifp->if_snd_tag_modify = mlx5e_snd_tag_modify; + ifp->if_snd_tag_query = mlx5e_snd_tag_query; /* set TSO limits so that we don't have to drop TX packets */ ifp->if_hw_tsomax = MLX5E_MAX_TX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); @@ -3831,6 +3965,13 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp PRIV_LOCK(priv); mlx5e_close_locked(ifp); PRIV_UNLOCK(priv); + + /* wait for all unlimited send tags to go away */ + while (priv->channel_refs != 0) { + if_printf(priv->ifp, "Waiting for all unlimited connections " + "to terminate\n"); + pause("W", hz); + } /* unregister device */ ifmedia_removeall(&priv->media); Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 13:14:41 2018 (r341984) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Dec 12 13:16:39 2018 (r341985) @@ -841,7 +841,8 @@ mlx5e_rl_init(struct mlx5e_priv *priv) for (i = 0; i < rl->param.tx_channels_per_worker_def; i++) { struct mlx5e_rl_channel *channel = rlw->channels + i; channel->worker = rlw; - channel->m_snd_tag.ifp = priv->ifp; + channel->tag.m_snd_tag.ifp = priv->ifp; + channel->tag.type = IF_SND_TAG_TYPE_RATE_LIMIT; STAILQ_INSERT_TAIL(&rlw->index_list_head, channel, entry); } MLX5E_RL_WORKER_UNLOCK(rlw); @@ -1038,17 +1039,21 @@ mlx5e_rl_modify(struct mlx5e_rl_worker *rlw, struct ml } static int -mlx5e_rl_query(struct mlx5e_rl_worker *rlw, struct mlx5e_rl_channel *channel, uint64_t *prate) +mlx5e_rl_query(struct mlx5e_rl_worker *rlw, struct mlx5e_rl_channel *channel, + union if_snd_tag_query_params *params) { int retval; MLX5E_RL_WORKER_LOCK(rlw); switch (channel->state) { case MLX5E_RL_ST_USED: - *prate = channel->last_rate; + params->rate_limit.max_rate = channel->last_rate; + params->rate_limit.queue_level = mlx5e_sq_queue_level(channel->sq); retval = 0; break; case MLX5E_RL_ST_MODIFY: + params->rate_limit.max_rate = channel->last_rate; + params->rate_limit.queue_level = mlx5e_sq_queue_level(channel->sq); retval = EBUSY; break; default: @@ -1120,7 +1125,7 @@ mlx5e_rl_snd_tag_alloc(struct ifnet *ifp, } /* store pointer to mbuf tag */ - *ppmt = &channel->m_snd_tag; + *ppmt = &channel->tag.m_snd_tag; done: return (error); } @@ -1130,7 +1135,7 @@ int mlx5e_rl_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params) { struct mlx5e_rl_channel *channel = - container_of(pmt, struct mlx5e_rl_channel, m_snd_tag); + container_of(pmt, struct mlx5e_rl_channel, tag.m_snd_tag); return (mlx5e_rl_modify(channel->worker, channel, params->rate_limit.max_rate)); } @@ -1139,16 +1144,16 @@ int mlx5e_rl_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *params) { struct mlx5e_rl_channel *channel = - container_of(pmt, struct mlx5e_rl_channel, m_snd_tag); + container_of(pmt, struct mlx5e_rl_channel, tag.m_snd_tag); - return (mlx5e_rl_query(channel->worker, channel, ¶ms->rate_limit.max_rate)); + return (mlx5e_rl_query(channel->worker, channel, params)); } void mlx5e_rl_snd_tag_free(struct m_snd_tag *pmt) { struct mlx5e_rl_channel *channel = - container_of(pmt, struct mlx5e_rl_channel, m_snd_tag); + container_of(pmt, struct mlx5e_rl_channel, tag.m_snd_tag); mlx5e_rl_free(channel->worker, channel); } Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:14:41 2018 (r341984) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Dec 12 13:16:39 2018 (r341985) @@ -78,6 +78,47 @@ SYSINIT(mlx5e_hash_init, SI_SUB_RANDOM, SI_ORDER_ANY, #endif static struct mlx5e_sq * +mlx5e_select_queue_by_send_tag(struct ifnet *ifp, struct mbuf *mb) +{ + struct mlx5e_snd_tag *ptag; + struct mlx5e_sq *sq; + + /* check for route change */ + if (mb->m_pkthdr.snd_tag->ifp != ifp) + return (NULL); + + /* get pointer to sendqueue */ + ptag = container_of(mb->m_pkthdr.snd_tag, + struct mlx5e_snd_tag, m_snd_tag); + + switch (ptag->type) { +#ifdef RATELIMIT + case IF_SND_TAG_TYPE_RATE_LIMIT: + sq = container_of(ptag, + struct mlx5e_rl_channel, tag)->sq; + break; +#endif + case IF_SND_TAG_TYPE_UNLIMITED: + sq = &container_of(ptag, + struct mlx5e_channel, tag)->sq[0]; + KASSERT(({ + struct mlx5e_priv *priv = ifp->if_softc; + priv->channel_refs > 0; }), + ("mlx5e_select_queue: Channel refs are zero for unlimited tag")); + break; + default: + sq = NULL; + break; + } + + /* check if valid */ + if (sq != NULL && READ_ONCE(sq->running) != 0) + return (sq); + + return (NULL); +} + +static struct mlx5e_sq * mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) { struct mlx5e_priv *priv = ifp->if_softc; @@ -96,25 +137,6 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) ch = priv->params.num_channels; -#ifdef RATELIMIT - if (mb->m_pkthdr.snd_tag != NULL) { - struct mlx5e_sq *sq; - - /* check for route change */ - if (mb->m_pkthdr.snd_tag->ifp != ifp) - return (NULL); - - /* get pointer to sendqueue */ - sq = container_of(mb->m_pkthdr.snd_tag, - struct mlx5e_rl_channel, m_snd_tag)->sq; - - /* check if valid */ - if (sq != NULL && sq->running != 0) - return (sq); - - /* FALLTHROUGH */ - } -#endif /* check if flowid is set */ if (M_HASHTYPE_GET(mb) != M_HASHTYPE_NONE) { #ifdef RSS @@ -587,27 +609,33 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) struct mlx5e_sq *sq; int ret; - sq = mlx5e_select_queue(ifp, mb); - if (unlikely(sq == NULL)) { -#ifdef RATELIMIT - /* Check for route change */ - if (mb->m_pkthdr.snd_tag != NULL && - mb->m_pkthdr.snd_tag->ifp != ifp) { + if (mb->m_pkthdr.snd_tag != NULL) { + sq = mlx5e_select_queue_by_send_tag(ifp, mb); + if (unlikely(sq == NULL)) { + /* Check for route change */ + if (mb->m_pkthdr.snd_tag->ifp != ifp) { + /* Free mbuf */ + m_freem(mb); + + /* + * Tell upper layers about route + * change and to re-transmit this + * packet: + */ + return (EAGAIN); + } + goto select_queue; + } + } else { +select_queue: + sq = mlx5e_select_queue(ifp, mb); + if (unlikely(sq == NULL)) { /* Free mbuf */ m_freem(mb); - /* - * Tell upper layers about route change and to - * re-transmit this packet: - */ - return (EAGAIN); + /* Invalid send queue */ + return (ENXIO); } -#endif - /* Free mbuf */ - m_freem(mb); - - /* Invalid send queue */ - return (ENXIO); } mtx_lock(&sq->lock); From owner-svn-src-all@freebsd.org Wed Dec 12 13:17:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D34A130F056; Wed, 12 Dec 2018 13:17:51 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 D8F0D94A3D; Wed, 12 Dec 2018 13:17:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB0B2872C; Wed, 12 Dec 2018 13:17:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDHokc011556; Wed, 12 Dec 2018 13:17:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDHntY011546; Wed, 12 Dec 2018 13:17:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121317.wBCDHntY011546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341986 - in stable/12/sys/dev: mlx4/mlx4_core mlx4/mlx4_ib mlx5/mlx5_core mlx5/mlx5_en mlx5/mlx5_ib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/dev: mlx4/mlx4_core mlx4/mlx4_ib mlx5/mlx5_core mlx5/mlx5_en mlx5/mlx5_ib X-SVN-Commit-Revision: 341986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8F0D94A3D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:17:51 -0000 Author: hselasky Date: Wed Dec 12 13:17:49 2018 New Revision: 341986 URL: https://svnweb.freebsd.org/changeset/base/341986 Log: MFC r341587: mlx4/mlx5: Updated driver version to 3.5.0 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4.h stable/12/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_core/mlx4.h ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_core/mlx4.h Wed Dec 12 13:16:39 2018 (r341985) +++ stable/12/sys/dev/mlx4/mlx4_core/mlx4.h Wed Dec 12 13:17:49 2018 (r341986) @@ -53,8 +53,8 @@ #define DRV_NAME "mlx4_core" #define PFX DRV_NAME ": " -#define DRV_VERSION "3.4.1" -#define DRV_RELDATE "October 2017" +#define DRV_VERSION "3.5.0" +#define DRV_RELDATE "November 2018" #define MLX4_FS_UDP_UC_EN (1 << 1) #define MLX4_FS_TCP_UC_EN (1 << 2) Modified: stable/12/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Dec 12 13:16:39 2018 (r341985) +++ stable/12/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Dec 12 13:17:49 2018 (r341986) @@ -64,9 +64,9 @@ #define DRV_NAME MLX4_IB_DRV_NAME #ifndef DRV_VERSION -#define DRV_VERSION "3.4.1" +#define DRV_VERSION "3.5.0" #endif -#define DRV_RELDATE "February 2018" +#define DRV_RELDATE "November 2018" #define MLX4_IB_FLOW_MAX_PRIO 0xFFF #define MLX4_IB_FLOW_QPN_MASK 0xFFFFFF Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 13:16:39 2018 (r341985) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 13:17:49 2018 (r341986) @@ -34,9 +34,9 @@ #define DRIVER_NAME "mlx5_core" #ifndef DRIVER_VERSION -#define DRIVER_VERSION "3.4.2" +#define DRIVER_VERSION "3.5.0" #endif -#define DRIVER_RELDATE "July 2018" +#define DRIVER_RELDATE "November 2018" extern int mlx5_core_debug_mask; Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:16:39 2018 (r341985) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:17:49 2018 (r341986) @@ -31,8 +31,9 @@ #include #ifndef ETH_DRIVER_VERSION -#define ETH_DRIVER_VERSION "3.4.2" +#define ETH_DRIVER_VERSION "3.5.0" #endif +#define DRIVER_RELDATE "November 2018" static const char mlx5e_version[] = "mlx5en: Mellanox Ethernet driver " ETH_DRIVER_VERSION " (" DRIVER_RELDATE ")\n"; Modified: stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 13:16:39 2018 (r341985) +++ stable/12/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 13:17:49 2018 (r341986) @@ -52,9 +52,9 @@ #define DRIVER_NAME "mlx5ib" #ifndef DRIVER_VERSION -#define DRIVER_VERSION "3.4.2" +#define DRIVER_VERSION "3.5.0" #endif -#define DRIVER_RELDATE "July 2018" +#define DRIVER_RELDATE "November 2018" MODULE_DESCRIPTION("Mellanox Connect-IB HCA IB driver"); MODULE_LICENSE("Dual BSD/GPL"); From owner-svn-src-all@freebsd.org Wed Dec 12 13:17:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ACC9130F06F; Wed, 12 Dec 2018 13:17:53 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 214C194A3F; Wed, 12 Dec 2018 13:17:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15AA0872D; Wed, 12 Dec 2018 13:17:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDHqfP011608; Wed, 12 Dec 2018 13:17:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDHqVw011603; Wed, 12 Dec 2018 13:17:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812121317.wBCDHqVw011603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Dec 2018 13:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341987 - in stable/11/sys/dev: mlx4/mlx4_core mlx4/mlx4_ib mlx5/mlx5_core mlx5/mlx5_en mlx5/mlx5_ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev: mlx4/mlx4_core mlx4/mlx4_ib mlx5/mlx5_core mlx5/mlx5_en mlx5/mlx5_ib X-SVN-Commit-Revision: 341987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 214C194A3F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.61 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.61)[-0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:17:53 -0000 Author: hselasky Date: Wed Dec 12 13:17:51 2018 New Revision: 341987 URL: https://svnweb.freebsd.org/changeset/base/341987 Log: MFC r341587: mlx4/mlx5: Updated driver version to 3.5.0 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4.h stable/11/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4.h ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Wed Dec 12 13:17:49 2018 (r341986) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Wed Dec 12 13:17:51 2018 (r341987) @@ -53,8 +53,8 @@ #define DRV_NAME "mlx4_core" #define PFX DRV_NAME ": " -#define DRV_VERSION "3.4.1" -#define DRV_RELDATE "October 2017" +#define DRV_VERSION "3.5.0" +#define DRV_RELDATE "November 2018" #define MLX4_FS_UDP_UC_EN (1 << 1) #define MLX4_FS_TCP_UC_EN (1 << 2) Modified: stable/11/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Dec 12 13:17:49 2018 (r341986) +++ stable/11/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Dec 12 13:17:51 2018 (r341987) @@ -64,9 +64,9 @@ #define DRV_NAME MLX4_IB_DRV_NAME #ifndef DRV_VERSION -#define DRV_VERSION "3.4.1" +#define DRV_VERSION "3.5.0" #endif -#define DRV_RELDATE "February 2018" +#define DRV_RELDATE "November 2018" #define MLX4_IB_FLOW_MAX_PRIO 0xFFF #define MLX4_IB_FLOW_QPN_MASK 0xFFFFFF Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 13:17:49 2018 (r341986) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Dec 12 13:17:51 2018 (r341987) @@ -34,9 +34,9 @@ #define DRIVER_NAME "mlx5_core" #ifndef DRIVER_VERSION -#define DRIVER_VERSION "3.4.2" +#define DRIVER_VERSION "3.5.0" #endif -#define DRIVER_RELDATE "July 2018" +#define DRIVER_RELDATE "November 2018" extern int mlx5_core_debug_mask; Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:17:49 2018 (r341986) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Dec 12 13:17:51 2018 (r341987) @@ -31,8 +31,9 @@ #include #ifndef ETH_DRIVER_VERSION -#define ETH_DRIVER_VERSION "3.4.2" +#define ETH_DRIVER_VERSION "3.5.0" #endif +#define DRIVER_RELDATE "November 2018" static const char mlx5e_version[] = "mlx5en: Mellanox Ethernet driver " ETH_DRIVER_VERSION " (" DRIVER_RELDATE ")\n"; Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 13:17:49 2018 (r341986) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Dec 12 13:17:51 2018 (r341987) @@ -52,9 +52,9 @@ #define DRIVER_NAME "mlx5ib" #ifndef DRIVER_VERSION -#define DRIVER_VERSION "3.4.2" +#define DRIVER_VERSION "3.5.0" #endif -#define DRIVER_RELDATE "July 2018" +#define DRIVER_RELDATE "November 2018" MODULE_DESCRIPTION("Mellanox Connect-IB HCA IB driver"); MODULE_LICENSE("Dual BSD/GPL"); From owner-svn-src-all@freebsd.org Wed Dec 12 13:43:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 739F2130FC97; Wed, 12 Dec 2018 13:43:56 +0000 (UTC) (envelope-from dab@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) server-signature RSA-PSS (4096 bits) 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 1A5D695B5A; Wed, 12 Dec 2018 13:43:56 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10D3A8C31; Wed, 12 Dec 2018 13:43:56 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCDhtqo029789; Wed, 12 Dec 2018 13:43:55 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCDht3c029786; Wed, 12 Dec 2018 13:43:55 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201812121343.wBCDht3c029786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Wed, 12 Dec 2018 13:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341988 - head/sys/dev/asmc X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/dev/asmc X-SVN-Commit-Revision: 341988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A5D695B5A X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.62 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.62)[-0.622,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 13:43:56 -0000 Author: dab Date: Wed Dec 12 13:43:55 2018 New Revision: 341988 URL: https://svnweb.freebsd.org/changeset/base/341988 Log: asmc: Add Support for Macbook Pro 8,1 PR: 217505 Submitted by: John O. Brickley , updated by Maciej Pasternacki Reported by: John O. Brickley MFC after: 1 week Modified: head/sys/dev/asmc/asmc.c head/sys/dev/asmc/asmcvar.h Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Wed Dec 12 13:17:51 2018 (r341987) +++ head/sys/dev/asmc/asmc.c Wed Dec 12 13:43:55 2018 (r341988) @@ -219,9 +219,15 @@ struct asmc_model asmc_models[] = { }, { + "MacBookPro8,1", "Apple SMC MacBook Pro (early 2011, 13-inch)", + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, + ASMC_MBP81_TEMPS, ASMC_MBP81_TEMPNAMES, ASMC_MBP81_TEMPDESCS + }, + + { "MacBookPro8,2", "Apple SMC MacBook Pro (early 2011)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, - ASMC_MBP8_TEMPS, ASMC_MBP8_TEMPNAMES, ASMC_MBP8_TEMPDESCS + ASMC_MBP82_TEMPS, ASMC_MBP82_TEMPNAMES, ASMC_MBP82_TEMPDESCS }, { Modified: head/sys/dev/asmc/asmcvar.h ============================================================================== --- head/sys/dev/asmc/asmcvar.h Wed Dec 12 13:17:51 2018 (r341987) +++ head/sys/dev/asmc/asmcvar.h Wed Dec 12 13:43:55 2018 (r341988) @@ -218,21 +218,39 @@ struct asmc_softc { "Heatsink 2", "Memory Controller", \ "PCI Express Slot Pin", "PCI Express Slot (unk)" } -#define ASMC_MBP8_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ +#define ASMC_MBP81_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ + "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \ + "TP0P", "TPCD", "TW0P", "Th1H", "Ts0P", \ + "Ts0S", NULL } + +#define ASMC_MBP81_TEMPNAMES { "enclosure", "TB1T", "TB2T", "TC0C", "TC0D", \ + "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ + "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \ + "TP0P", "TPCD", "wireless", "Th1H", "Ts0P", \ + "Ts0S" } + +#define ASMC_MBP81_TEMPDESCS { "Enclosure Bottomside", "TB1T", "TB2T", "TC0C", "TC0D", \ + "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ + "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \ + "TP0P", "TPCD", "TW0P", "Th1H", "Ts0P", \ + "Ts0S" } + +#define ASMC_MBP82_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ + "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ "TCTD", "TG0D", "TG0P", "THSP", "TM0S", \ "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ "Th2H", "Tm0P", "Ts0P", "Ts0S", NULL } -#define ASMC_MBP8_TEMPNAMES { "enclosure", "TB1T", "TB2T", "TC0C", "TC0D", \ +#define ASMC_MBP82_TEMPNAMES { "enclosure", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ "TCTD", "graphics", "TG0P", "THSP", "TM0S", \ "TMBS", "TP0P", "TPCD", "wireless", "Th1H", \ "Th2H", "memory", "Ts0P", "Ts0S" } -#define ASMC_MBP8_TEMPDESCS { "Enclosure Bottomside", "TB1T", "TB2T", "TC0C", "TC0D", \ +#define ASMC_MBP82_TEMPDESCS { "Enclosure Bottomside", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ "TCTD", "TG0D", "TG0P", "THSP", "TM0S", \ From owner-svn-src-all@freebsd.org Wed Dec 12 15:23:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47AFC131247A; Wed, 12 Dec 2018 15:23:41 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) 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 E39586A0D1; Wed, 12 Dec 2018 15:23:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8B119D44; Wed, 12 Dec 2018 15:23:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCFNe8R092448; Wed, 12 Dec 2018 15:23:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCFNeXe092447; Wed, 12 Dec 2018 15:23:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201812121523.wBCFNeXe092447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Dec 2018 15:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341989 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 341989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E39586A0D1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.63 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.63)[-0.629,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 15:23:41 -0000 Author: emaste Date: Wed Dec 12 15:23:40 2018 New Revision: 341989 URL: https://svnweb.freebsd.org/changeset/base/341989 Log: Makefile.inc1: update stale wpa dependency removal statement Only stale .depend files are removed; do not mention object files. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Dec 12 13:43:55 2018 (r341988) +++ head/Makefile.inc1 Wed Dec 12 15:23:40 2018 (r341989) @@ -981,7 +981,7 @@ _cleanobj_fast_depend_hack: .PHONY @if [ -e "${OBJTOP}/usr.sbin/wpa/wpa_supplicant/.depend.rrm.o" ] && \ egrep -q 'src/ap/rrm.c' \ ${OBJTOP}/usr.sbin/wpa/wpa_supplicant/.depend.rrm.o; then \ - echo "Removing stale wpa dependencies and objects"; \ + echo "Removing stale wpa dependencies"; \ rm -f ${OBJTOP}/usr.sbin/wpa/*/.depend*; \ fi From owner-svn-src-all@freebsd.org Wed Dec 12 15:49:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 133FE1313236; Wed, 12 Dec 2018 15:49:15 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 A9C866B130; Wed, 12 Dec 2018 15:49:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F362A0CC; Wed, 12 Dec 2018 15:49:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCFnESG005878; Wed, 12 Dec 2018 15:49:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCFnEmM005877; Wed, 12 Dec 2018 15:49:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812121549.wBCFnEmM005877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 12 Dec 2018 15:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341990 - head/sys/dev/bwn X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/bwn X-SVN-Commit-Revision: 341990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9C866B130 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.64)[-0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 15:49:15 -0000 Author: markj Date: Wed Dec 12 15:49:14 2018 New Revision: 341990 URL: https://svnweb.freebsd.org/changeset/base/341990 Log: Fix a possible mbuf double free in bwn_dma_tx_start(). If bus_dmamap_load_mbuf() fails following a defrag, the caller of bwn_dma_tx_start() would free the original mbuf after m_defrag() had already done so. Fix this by returning the defragged mbuf to the caller instead. Update bwn_pio_tx_start() similarly for consistency. Reported by: Ilja Van Sprundel Reviewed by: landonf Tested by: landonf MFC after: 3 days admbug: 820 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18342 Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Wed Dec 12 15:23:40 2018 (r341989) +++ head/sys/dev/bwn/if_bwn.c Wed Dec 12 15:49:14 2018 (r341990) @@ -209,7 +209,7 @@ static void bwn_pio_rx_write_2(struct bwn_pio_rxqueue static void bwn_pio_rx_write_4(struct bwn_pio_rxqueue *, uint16_t, uint32_t); static int bwn_pio_tx_start(struct bwn_mac *, struct ieee80211_node *, - struct mbuf *); + struct mbuf **); static struct bwn_pio_txqueue *bwn_pio_select(struct bwn_mac *, uint8_t); static uint32_t bwn_pio_write_multi_4(struct bwn_mac *, struct bwn_pio_txqueue *, uint32_t, const void *, int); @@ -273,7 +273,7 @@ static void bwn_ratectl_tx_complete(const struct ieee8 static void bwn_dma_handle_txeof(struct bwn_mac *, const struct bwn_txstatus *); static int bwn_dma_tx_start(struct bwn_mac *, struct ieee80211_node *, - struct mbuf *); + struct mbuf **); static int bwn_dma_getslot(struct bwn_dma_ring *); static struct bwn_dma_ring *bwn_dma_select(struct bwn_mac *, uint8_t); @@ -1068,7 +1068,7 @@ bwn_tx_start(struct bwn_softc *sc, struct ieee80211_no } error = (mac->mac_flags & BWN_MAC_FLAG_DMA) ? - bwn_dma_tx_start(mac, ni, m) : bwn_pio_tx_start(mac, ni, m); + bwn_dma_tx_start(mac, ni, &m) : bwn_pio_tx_start(mac, ni, &m); if (error) { m_freem(m); return (error); @@ -1077,13 +1077,14 @@ bwn_tx_start(struct bwn_softc *sc, struct ieee80211_no } static int -bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) +bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, + struct mbuf **mp) { struct bwn_pio_txpkt *tp; - struct bwn_pio_txqueue *tq = bwn_pio_select(mac, M_WME_GETAC(m)); + struct bwn_pio_txqueue *tq; struct bwn_softc *sc = mac->mac_sc; struct bwn_txhdr txhdr; - struct mbuf *m_new; + struct mbuf *m, *m_new; uint32_t ctl32; int error; uint16_t ctl16; @@ -1092,6 +1093,8 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211 /* XXX TODO send packets after DTIM */ + m = *mp; + tq = bwn_pio_select(mac, M_WME_GETAC(m)); KASSERT(!TAILQ_EMPTY(&tq->tq_pktlist), ("%s: fail", __func__)); tp = TAILQ_FIRST(&tq->tq_pktlist); tp->tp_ni = ni; @@ -1111,13 +1114,14 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211 /* * XXX please removes m_defrag(9) */ - m_new = m_defrag(m, M_NOWAIT); + m_new = m_defrag(*mp, M_NOWAIT); if (m_new == NULL) { device_printf(sc->sc_dev, "%s: can't defrag TX buffer\n", __func__); return (ENOBUFS); } + *mp = m_new; if (m_new->m_next != NULL) device_printf(sc->sc_dev, "TODO: fragmented packets for PIO\n"); @@ -1168,15 +1172,17 @@ bwn_pio_select(struct bwn_mac *mac, uint8_t prio) } static int -bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) +bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, + struct mbuf **mp) { #define BWN_GET_TXHDRCACHE(slot) \ &(txhdr_cache[(slot / BWN_TX_SLOTS_PER_FRAME) * BWN_HDRSIZE(mac)]) struct bwn_dma *dma = &mac->mac_method.dma; - struct bwn_dma_ring *dr = bwn_dma_select(mac, M_WME_GETAC(m)); + struct bwn_dma_ring *dr = bwn_dma_select(mac, M_WME_GETAC(*mp)); struct bwn_dmadesc_generic *desc; struct bwn_dmadesc_meta *mt; struct bwn_softc *sc = mac->mac_sc; + struct mbuf *m; uint8_t *txhdr_cache = (uint8_t *)dr->dr_txhdr_cache; int error, slot, backup[2] = { dr->dr_curslot, dr->dr_usedslot }; @@ -1185,6 +1191,7 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211 /* XXX send after DTIM */ + m = *mp; slot = bwn_dma_getslot(dr); dr->getdesc(dr, slot, &desc, &mt); KASSERT(mt->mt_txtype == BWN_DMADESC_METATYPE_HEADER, @@ -1233,9 +1240,8 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211 __func__); error = ENOBUFS; goto fail; - } else { - m = m_new; } + *mp = m = m_new; mt->mt_m = m; error = bus_dmamap_load_mbuf(dma->txbuf_dtag, mt->mt_dmap, From owner-svn-src-all@freebsd.org Wed Dec 12 16:25:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37DA41313E22; Wed, 12 Dec 2018 16:25:31 +0000 (UTC) (envelope-from sobomax@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) server-signature RSA-PSS (4096 bits) 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 CD2DE6C3E7; Wed, 12 Dec 2018 16:25:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0FECA7FE; Wed, 12 Dec 2018 16:25:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCGPUag029837; Wed, 12 Dec 2018 16:25:30 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCGPUgQ029836; Wed, 12 Dec 2018 16:25:30 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201812121625.wBCGPUgQ029836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Wed, 12 Dec 2018 16:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341991 - stable/12/contrib/elftoolchain/readelf X-SVN-Group: stable-12 X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 341991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CD2DE6C3E7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.66)[-0.655,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 16:25:31 -0000 Author: sobomax Date: Wed Dec 12 16:25:30 2018 New Revision: 341991 URL: https://svnweb.freebsd.org/changeset/base/341991 Log: MFC: r340745, fix CU: output of the --debug-dump=decodedline. Modified: stable/12/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/12/contrib/elftoolchain/readelf/readelf.c Wed Dec 12 15:49:14 2018 (r341990) +++ stable/12/contrib/elftoolchain/readelf/readelf.c Wed Dec 12 16:25:30 2018 (r341991) @@ -4720,7 +4720,7 @@ dump_dwarf_line_decoded(struct readelf *re) DW_DLV_OK) dir = NULL; printf("CU: "); - if (dir && file) + if (dir && file && file[0] != '/') printf("%s/", dir); if (file) printf("%s", file); From owner-svn-src-all@freebsd.org Wed Dec 12 16:32:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D0F21314371; Wed, 12 Dec 2018 16:32:16 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 B5BD76CAE4; Wed, 12 Dec 2018 16:32:15 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AADD2A9AE; Wed, 12 Dec 2018 16:32:15 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCGWFWx035163; Wed, 12 Dec 2018 16:32:15 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCGWFY7035162; Wed, 12 Dec 2018 16:32:15 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812121632.wBCGWFY7035162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 12 Dec 2018 16:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341992 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 341992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5BD76CAE4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.62 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.62)[-0.625,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 16:32:16 -0000 Author: vmaffione Date: Wed Dec 12 16:32:15 2018 New Revision: 341992 URL: https://svnweb.freebsd.org/changeset/base/341992 Log: netmap: fix warning in netmap_kloop.c Reported by: markj MFC after: 3 days Modified: head/sys/dev/netmap/netmap_kloop.c Modified: head/sys/dev/netmap/netmap_kloop.c ============================================================================== --- head/sys/dev/netmap/netmap_kloop.c Wed Dec 12 16:25:30 2018 (r341991) +++ head/sys/dev/netmap/netmap_kloop.c Wed Dec 12 16:32:15 2018 (r341992) @@ -111,6 +111,7 @@ csb_ktoa_kick_enable(struct nm_csb_ktoa __user *csb_kt CSB_WRITE(csb_ktoa, kern_need_kick, val); } +#ifdef SYNC_KLOOP_POLL /* Are application interrupt enabled or disabled? */ static inline uint32_t csb_atok_intr_enabled(struct nm_csb_atok __user *csb_atok) @@ -121,6 +122,7 @@ csb_atok_intr_enabled(struct nm_csb_atok __user *csb_a return v; } +#endif /* SYNC_KLOOP_POLL */ static inline void sync_kloop_kring_dump(const char *title, const struct netmap_kring *kring) From owner-svn-src-all@freebsd.org Wed Dec 12 17:05:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33B871315BD2; Wed, 12 Dec 2018 17:05:48 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 CED686E758; Wed, 12 Dec 2018 17:05:47 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4CF2AEF3; Wed, 12 Dec 2018 17:05:47 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCH5luq051262; Wed, 12 Dec 2018 17:05:47 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCH5lOB051261; Wed, 12 Dec 2018 17:05:47 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812121705.wBCH5lOB051261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 12 Dec 2018 17:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341993 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 341993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CED686E758 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.42 / 15.00]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.42)[-0.420,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 17:05:48 -0000 Author: vmaffione Date: Wed Dec 12 17:05:47 2018 New Revision: 341993 URL: https://svnweb.freebsd.org/changeset/base/341993 Log: netmap: add man page for ptnet Add a man page for ptnet(4), describing the guest driver for netmap passthrough. Reviewed by: bcr MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D18518 Added: head/share/man/man4/ptnet.4 (contents, props changed) Added: head/share/man/man4/ptnet.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ptnet.4 Wed Dec 12 17:05:47 2018 (r341993) @@ -0,0 +1,140 @@ +.\" Copyright (c) 2018 Vincenzo Maffione +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" 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$ +.\" +.Dd December 11, 2018 +.Dt PTNET 4 +.Os +.Sh NAME +.Nm ptnet +.Nd Ethernet driver for passed-through netmap ports +.Sh SYNOPSIS +This network driver is included in +.Xr netmap 4 , +and it can be compiled into the kernel by adding the following +line in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device netmap" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides direct access to host netmap ports, +from within a Virtual Machine (VM). +Applications running inside +the VM can access the TX/RX rings and buffers of a netmap port +that the hypervisor has passed-through to the VM. +Hypervisor support for +.Nm +is currently available for QEMU/KVM. +Any +.Xr netmap 4 +port can be passed-through, including physical NICs, +.Xr vale 4 +ports, netmap pipes, etc. +.Pp +The main use-case for netmap passthrough is Network Function +Virtualization (NFV), where middlebox applications running within +VMs may want to process very high packet rates (e.g., 1-10 millions +packets per second or more). +Note, however, that those applications +must use the device in netmap mode in order to achieve such rates. +In addition to the general advantages of netmap, the improved +performance of +.Nm +when compared to hypervisor device emulation or paravirtualization (e.g., +.Xr vtnet 4 , +.Xr vmx 4 ) +comes from the hypervisor being completely bypassed in the data-path. +For example, when using +.Xr vtnet 4 +the VM has to convert each +.Xr mbuf 9 +to a VirtIO-specific packet representation +and publish that to a VirtIO queue; on the hypervisor side, the +packet is extracted from the VirtIO queue and converted to a +hypervisor-specific packet representation. +The overhead of format conversions (and packet copies, in same cases) is not +incured by +.Nm +in netmap mode, because mbufs are not used at all, and the packet format +is the one defined by netmap (e.g., +.Ar struct netmap_slot ) +along the whole data-path. +No format conversions or copies happen. +.Pp +It is also possible to use a +.Nm +device like a regular network interface, which interacts with the +.Fx +network stack (i.e., not in netmap mode). +However, in that case it is necessary to pay the cost of data copies +between mbufs and netmap buffers, which generally results in lower +TCP/UDP performance than +.Xr vtnet 4 +or other paravirtualized network devices. +If the passed-through netmap port supports the VirtIO network header, +.Nm +is able to use it, and support TCP/UDP checksum offload (for both transmit +and receive), TCP segmentation offload (TSO) and TCP large receive offload +(LRO). +Currently, +.Xr vale 4 +ports support the header. +Note that the VirtIO network header is generally not used in NFV +use-cases, because middleboxes are not endpoints of TCP/UDP connections. +.Sh TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va dev.netmap.ptnet_vnet_hdr +This tunable enables (1) or disables (0) the VirtIO network header. +If enabled, +.Nm +uses the same header used by +.Xr vtnet 4 +to exchange offload metadata with the hypervisor. +If disabled, no header is prepended to transmitted and received +packets. +The metadata is necessary to support TCP/UDP checksum offloads, +TSO, and LRO. +The default value is 1. +.El +.Sh SEE ALSO +.Xr netintro 4 , +.Xr netmap 4 , +.Xr vale 4 , +.Xr virtio 4 , +.Xr vmx 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +driver was written by +.An Vincenzo Maffione Aq Mt vmaffione@FreeBSD.org . +It first appeared in +.Fx 12.0 . From owner-svn-src-all@freebsd.org Wed Dec 12 18:13:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D48241317933; Wed, 12 Dec 2018 18:13:57 +0000 (UTC) (envelope-from cem@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) server-signature RSA-PSS (4096 bits) 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 77D1F70D2E; Wed, 12 Dec 2018 18:13:57 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AA98BAA8; Wed, 12 Dec 2018 18:13:57 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCIDv46088023; Wed, 12 Dec 2018 18:13:57 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCIDvjH088022; Wed, 12 Dec 2018 18:13:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201812121813.wBCIDvjH088022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 12 Dec 2018 18:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341994 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 341994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 77D1F70D2E X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.41 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.41)[-0.414,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 18:13:58 -0000 Author: cem Date: Wed Dec 12 18:13:56 2018 New Revision: 341994 URL: https://svnweb.freebsd.org/changeset/base/341994 Log: gmirror: Remove a last-minute INVARIANTS breakage in r341840 I mistakenly added a lock assertion to this routine at the last minute without confirming it was held during g_mirror_create. It isn't (it isn't even initialized yet). Mea culpa. Access is exclusive in both callers, just not always by that particular lock. Reported by: lwhsu X-MFC-With: r341840, r341674 Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Wed Dec 12 17:05:47 2018 (r341993) +++ head/sys/geom/mirror/g_mirror.c Wed Dec 12 18:13:56 2018 (r341994) @@ -3061,8 +3061,6 @@ g_mirror_reinit_from_metadata(struct g_mirror_softc *s const struct g_mirror_metadata *md) { - sx_assert(&sc->sc_lock, SX_XLOCKED); - sc->sc_genid = md->md_genid; sc->sc_syncid = md->md_syncid; From owner-svn-src-all@freebsd.org Wed Dec 12 18:18:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B641317AE8; Wed, 12 Dec 2018 18:18:35 +0000 (UTC) (envelope-from gjb@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) server-signature RSA-PSS (4096 bits) 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 7057E70F80; Wed, 12 Dec 2018 18:18:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65337BAB2; Wed, 12 Dec 2018 18:18:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCIIZPM088299; Wed, 12 Dec 2018 18:18:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCIIZ3M088298; Wed, 12 Dec 2018 18:18:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201812121818.wBCIIZ3M088298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 12 Dec 2018 18:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341995 - stable/11/release X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release X-SVN-Commit-Revision: 341995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7057E70F80 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.41 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.41)[-0.414,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 18:18:36 -0000 Author: gjb Date: Wed Dec 12 18:18:34 2018 New Revision: 341995 URL: https://svnweb.freebsd.org/changeset/base/341995 Log: MFC r339873: Set OPTIONS_UNSET in the argument list to env(1), and add AVAHI to the list. This fixes the textproc/docproj build seemingly following FLAVORS being added. Specifically, the problem with the dependency chain here is: - textproc/docproj depends on print/cups, which sets AVAHI=on by default; - net/avahi-app depends on devel/gobject-introspection, which requires python3+; - graphics/netpbm depends on graphics/mesa-libs, which can only be built with python2.7; - textproc/docproj depends on a number of graphics ports for font rendering, etc. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/release.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/release/release.sh ============================================================================== --- stable/11/release/release.sh Wed Dec 12 18:13:56 2018 (r341994) +++ stable/11/release/release.sh Wed Dec 12 18:18:34 2018 (r341995) @@ -287,9 +287,9 @@ extra_chroot_setup() { PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" - chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + chroot ${CHROOTDIR} env ${PBUILD_FLAGS} \ + OPTIONS_UNSET="AVAHI FOP IGOR" make -C \ /usr/ports/textproc/docproj \ - OPTIONS_UNSET="FOP IGOR" \ FORCE_PKG_REGISTER=1 \ install clean distclean fi From owner-svn-src-all@freebsd.org Wed Dec 12 19:02:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2371F1321EFD; Wed, 12 Dec 2018 19:02:38 +0000 (UTC) (envelope-from sobomax@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) server-signature RSA-PSS (4096 bits) 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 B9E4B73921; Wed, 12 Dec 2018 19:02:37 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A953BC4B7; Wed, 12 Dec 2018 19:02:37 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCJ2bBC014777; Wed, 12 Dec 2018 19:02:37 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCJ2b2e014776; Wed, 12 Dec 2018 19:02:37 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201812121902.wBCJ2b2e014776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Wed, 12 Dec 2018 19:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341996 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 341996 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B9E4B73921 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.63 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.80)[-0.797,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 19:02:38 -0000 Author: sobomax Date: Wed Dec 12 19:02:37 2018 New Revision: 341996 URL: https://svnweb.freebsd.org/changeset/base/341996 Log: Add NETGRAPH_CHECKSUM. MFC after: 1 week Modified: head/sys/conf/NOTES head/sys/conf/files Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Dec 12 18:18:34 2018 (r341995) +++ head/sys/conf/NOTES Wed Dec 12 19:02:37 2018 (r341996) @@ -767,6 +767,7 @@ options NETGRAPH_BLUETOOTH_UBTBCMFW # ubtbcmfw(4) options NETGRAPH_BPF options NETGRAPH_BRIDGE options NETGRAPH_CAR +options NETGRAPH_CHECKSUM options NETGRAPH_CISCO options NETGRAPH_DEFLATE options NETGRAPH_DEVICE Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 12 18:18:34 2018 (r341995) +++ head/sys/conf/files Wed Dec 12 19:02:37 2018 (r341996) @@ -4212,6 +4212,7 @@ netgraph/ng_base.c optional netgraph netgraph/ng_bpf.c optional netgraph_bpf netgraph/ng_bridge.c optional netgraph_bridge netgraph/ng_car.c optional netgraph_car +netgraph/ng_checksum.c optional netgraph_checksum netgraph/ng_cisco.c optional netgraph_cisco netgraph/ng_deflate.c optional netgraph_deflate netgraph/ng_device.c optional netgraph_device From owner-svn-src-all@freebsd.org Wed Dec 12 19:58:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91DF3132382A; Wed, 12 Dec 2018 19:58:55 +0000 (UTC) (envelope-from syrinx@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) server-signature RSA-PSS (4096 bits) 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 3A14E76034; Wed, 12 Dec 2018 19:58:55 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C55FCD68; Wed, 12 Dec 2018 19:58:55 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCJwtaf041382; Wed, 12 Dec 2018 19:58:55 GMT (envelope-from syrinx@FreeBSD.org) Received: (from syrinx@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCJwtXB041381; Wed, 12 Dec 2018 19:58:55 GMT (envelope-from syrinx@FreeBSD.org) Message-Id: <201812121958.wBCJwtXB041381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: syrinx set sender to syrinx@FreeBSD.org using -f From: Shteryana Shopova Date: Wed, 12 Dec 2018 19:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341997 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: syrinx X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 341997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3A14E76034 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 19:58:55 -0000 Author: syrinx Date: Wed Dec 12 19:58:54 2018 New Revision: 341997 URL: https://svnweb.freebsd.org/changeset/base/341997 Log: Add myself to the calendar Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Wed Dec 12 19:02:37 2018 (r341996) +++ head/usr.bin/calendar/calendars/calendar.freebsd Wed Dec 12 19:58:54 2018 (r341997) @@ -425,6 +425,7 @@ 11/19 Konstantin Belousov born in Kiev, USSR, 1972 11/20 Dmitry Morozovsky born in Moscow, USSR, 1968 11/20 Gavin Atkinson born in Middlesbrough, United Kingdom, 1979 +11/21 Shteryana Shopova born in Petrich, Bulgaria, 1982 11/21 Mark Johnston born in Toronto, Ontario, Canada, 1989 11/22 Frederic Culot born in Saint-Germain-En-Laye, France, 1976 11/23 Josef Lawrence Karthauser born in Pembury, Kent, United Kingdom, 1972 From owner-svn-src-all@freebsd.org Wed Dec 12 20:15:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28C4D132421B; Wed, 12 Dec 2018 20:15:07 +0000 (UTC) (envelope-from kp@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) server-signature RSA-PSS (4096 bits) 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 BF4EB76B47; Wed, 12 Dec 2018 20:15:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADB2ED105; Wed, 12 Dec 2018 20:15:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCKF66R051985; Wed, 12 Dec 2018 20:15:06 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCKF6C6051983; Wed, 12 Dec 2018 20:15:06 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812122015.wBCKF6C6051983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 12 Dec 2018 20:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341998 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 341998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BF4EB76B47 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:15:07 -0000 Author: kp Date: Wed Dec 12 20:15:06 2018 New Revision: 341998 URL: https://svnweb.freebsd.org/changeset/base/341998 Log: pf: Fix endless loop on NAT exhaustion with sticky-address When we try to find a source port in pf_get_sport() it's possible that all available source ports will be in use. In that case we call pf_map_addr() to try to find a new source IP to try from. If there are no more available source IPs pf_map_addr() will return 1 and we stop trying. However, if sticky-address is set we'll always return the same IP address, even if we've already tried that one. We need to check the supplied address, because if that's the one we'd set it means pf_get_sport() has already tried it, and we should error out rather than keep trying. PR: 233867 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18483 Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_lb.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Wed Dec 12 19:58:54 2018 (r341997) +++ head/sys/netpfil/pf/pf.c Wed Dec 12 20:15:06 2018 (r341998) @@ -5513,6 +5513,8 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, dst.sin_len = sizeof(dst); dst.sin_addr = ip->ip_dst; + bzero(&naddr, sizeof(naddr)); + if (TAILQ_EMPTY(&r->rpool.list)) { DPFPRINTF(PF_DEBUG_URGENT, ("%s: TAILQ_EMPTY(&r->rpool.list)\n", __func__)); @@ -5671,6 +5673,8 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, dst.sin6_family = AF_INET6; dst.sin6_len = sizeof(dst); dst.sin6_addr = ip6->ip6_dst; + + bzero(&naddr, sizeof(naddr)); if (TAILQ_EMPTY(&r->rpool.list)) { DPFPRINTF(PF_DEBUG_URGENT, Modified: head/sys/netpfil/pf/pf_lb.c ============================================================================== --- head/sys/netpfil/pf/pf_lb.c Wed Dec 12 19:58:54 2018 (r341997) +++ head/sys/netpfil/pf/pf_lb.c Wed Dec 12 20:15:06 2018 (r341998) @@ -328,6 +328,12 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct src node was created just a moment ago in pf_create_state and it needs to be filled in with routing decision calculated here. */ if (*sn != NULL && !PF_AZERO(&(*sn)->raddr, af)) { + /* If the supplied address is the same as the current one we've + * been asked before, so tell the caller that there's no other + * address to be had. */ + if (PF_AEQ(naddr, &(*sn)->raddr, af)) + return (1); + PF_ACPY(naddr, &(*sn)->raddr, af); if (V_pf_status.debug >= PF_DEBUG_MISC) { printf("pf_map_addr: src tracking maps "); From owner-svn-src-all@freebsd.org Wed Dec 12 20:19:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E32821324458; Wed, 12 Dec 2018 20:19:19 +0000 (UTC) (envelope-from kp@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) server-signature RSA-PSS (4096 bits) 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 8655E76DFC; Wed, 12 Dec 2018 20:19:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C74DD129; Wed, 12 Dec 2018 20:19:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCKJJKM052207; Wed, 12 Dec 2018 20:19:19 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCKJJp9052205; Wed, 12 Dec 2018 20:19:19 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812122019.wBCKJJp9052205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 12 Dec 2018 20:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341999 - head/tests/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf X-SVN-Commit-Revision: 341999 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8655E76DFC X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.65 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.82)[-0.823,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:19:20 -0000 Author: kp Date: Wed Dec 12 20:19:18 2018 New Revision: 341999 URL: https://svnweb.freebsd.org/changeset/base/341999 Log: pf tests: NAT exhaustion test It's been reported that pf doesn't handle running out of available ports for NAT correctly. It freezes until a state expires and it can find a free port. Test for this, by setting up a situation where only two ports are available for NAT and then attempting to create three connections. If successful the third connection will fail immediately. In an incorrect case the connection attempt will freeze, also freezing all interaction with pf through pfctl and trigger timeout. PR: 233867 MFC after: 2 weeks Added: head/tests/sys/netpfil/pf/nat.sh (contents, props changed) Modified: head/tests/sys/netpfil/pf/Makefile Modified: head/tests/sys/netpfil/pf/Makefile ============================================================================== --- head/tests/sys/netpfil/pf/Makefile Wed Dec 12 20:15:06 2018 (r341998) +++ head/tests/sys/netpfil/pf/Makefile Wed Dec 12 20:19:18 2018 (r341999) @@ -10,6 +10,7 @@ ATF_TESTS_SH+= anchor \ forward \ fragmentation \ names \ + nat \ set_tos \ route_to \ synproxy \ Added: head/tests/sys/netpfil/pf/nat.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netpfil/pf/nat.sh Wed Dec 12 20:19:18 2018 (r341999) @@ -0,0 +1,64 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "exhaust" "cleanup" +exhaust_head() +{ + atf_set descr 'Test exhausting the NAT pool' + atf_set require.user root +} + +exhaust_body() +{ + pft_init + + epair_nat=$(pft_mkepair) + epair_echo=$(pft_mkepair) + + pft_mkjail nat ${epair_nat}b ${epair_echo}a + pft_mkjail echo ${epair_echo}b + + ifconfig ${epair_nat}a 192.0.2.2/24 up + route add -net 198.51.100.0/24 192.0.2.1 + + jexec nat ifconfig ${epair_nat}b 192.0.2.1/24 up + jexec nat ifconfig ${epair_echo}a 198.51.100.1/24 up + jexec nat sysctl net.inet.ip.forwarding=1 + + jexec echo ifconfig ${epair_echo}b 198.51.100.2/24 up + jexec echo /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf + + # Enable pf! + jexec nat pfctl -e + pft_set_rules nat \ + "nat pass on ${epair_echo}a inet from 192.0.2.0/24 to any -> (${epair_echo}a) port 30000:30001 sticky-address" + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 3 198.51.100.2 + + echo "foo" | nc -N 198.51.100.2 7 + echo "foo" | nc -N 198.51.100.2 7 + + # This one will fail, but that's expected + echo "foo" | nc -N 198.51.100.2 7 & + + sleep 1 + + # If the kernel is stuck in pf_get_sport() this will not succeed either. + timeout 2 jexec nat pfctl -sa + if [ $? -eq 124 ]; then + # Timed out + atf_fail "pfctl timeout" + fi +} + +exhaust_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "exhaust" +} From owner-svn-src-all@freebsd.org Wed Dec 12 20:19:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4270B13244BC; Wed, 12 Dec 2018 20:19:57 +0000 (UTC) (envelope-from kp@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) server-signature RSA-PSS (4096 bits) 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 BEF6D76F4C; Wed, 12 Dec 2018 20:19:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4178D12B; Wed, 12 Dec 2018 20:19:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCKJuPN052289; Wed, 12 Dec 2018 20:19:56 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCKJuQq052288; Wed, 12 Dec 2018 20:19:56 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812122019.wBCKJuQq052288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 12 Dec 2018 20:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342000 - head/tests/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf X-SVN-Commit-Revision: 342000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BEF6D76F4C X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:19:57 -0000 Author: kp Date: Wed Dec 12 20:19:56 2018 New Revision: 342000 URL: https://svnweb.freebsd.org/changeset/base/342000 Log: pf tests: Basic rdr test MFC after: 2 weeks Added: head/tests/sys/netpfil/pf/rdr.sh (contents, props changed) Modified: head/tests/sys/netpfil/pf/Makefile Modified: head/tests/sys/netpfil/pf/Makefile ============================================================================== --- head/tests/sys/netpfil/pf/Makefile Wed Dec 12 20:19:18 2018 (r341999) +++ head/tests/sys/netpfil/pf/Makefile Wed Dec 12 20:19:56 2018 (r342000) @@ -12,6 +12,7 @@ ATF_TESTS_SH+= anchor \ names \ nat \ set_tos \ + rdr \ route_to \ synproxy \ set_skip \ Added: head/tests/sys/netpfil/pf/rdr.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netpfil/pf/rdr.sh Wed Dec 12 20:19:56 2018 (r342000) @@ -0,0 +1,48 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "basic" "cleanup" +basic_head() +{ + atf_set descr 'Basic rdr test' + atf_set require.user root +} + +basic_body() +{ + pft_init + + epair=$(pft_mkepair) + + pft_mkjail alcatraz ${epair}b + + ifconfig ${epair}a 192.0.2.2/24 up + route add -net 198.51.100.0/24 192.0.2.1 + + jexec alcatraz ifconfig ${epair}b 192.0.2.1/24 up + jexec alcatraz sysctl net.inet.ip.forwarding=1 + + # Enable pf! + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "rdr pass on ${epair}b proto tcp from any to 198.51.100.0/24 port 1234 -> 192.0.2.1 port 4321" + + echo "foo" | jexec alcatraz nc -N -l 4321 & + sleep 1 + + result=$(nc -N -w 3 198.51.100.2 1234) + if [ "$result" != "foo" ]; then + atf_fail "Redirect failed" + fi +} + +basic_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "basic" +} From owner-svn-src-all@freebsd.org Wed Dec 12 20:32:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DBA31324BED; Wed, 12 Dec 2018 20:32:18 +0000 (UTC) (envelope-from oshogbo@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) server-signature RSA-PSS (4096 bits) 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 D8645778CC; Wed, 12 Dec 2018 20:32:17 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5074D48A; Wed, 12 Dec 2018 20:32:17 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCKWHaa059601; Wed, 12 Dec 2018 20:32:17 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCKWHLm059600; Wed, 12 Dec 2018 20:32:17 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201812122032.wBCKWHLm059600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 12 Dec 2018 20:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342001 - head/lib/libcapsicum X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcapsicum X-SVN-Commit-Revision: 342001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8645778CC X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:32:18 -0000 Author: oshogbo Date: Wed Dec 12 20:32:17 2018 New Revision: 342001 URL: https://svnweb.freebsd.org/changeset/base/342001 Log: libcapsicum: add missing links Reported by: manu Modified: head/lib/libcapsicum/Makefile Modified: head/lib/libcapsicum/Makefile ============================================================================== --- head/lib/libcapsicum/Makefile Wed Dec 12 20:19:56 2018 (r342000) +++ head/lib/libcapsicum/Makefile Wed Dec 12 20:32:17 2018 (r342001) @@ -9,6 +9,8 @@ MAN+= capsicum_helpers.3 MLINKS+=capsicum_helpers.3 caph_enter.3 MLINKS+=capsicum_helpers.3 caph_enter_casper.3 MLINKS+=capsicum_helpers.3 caph_rights_limit.3 +MLINKS+=capsicum_helpers.3 caph_fcntls_limit.3 +MLINKS+=capsicum_helpers.3 caph_ioctls_limit.3 MLINKS+=capsicum_helpers.3 caph_limit_stream.3 MLINKS+=capsicum_helpers.3 caph_limit_stdin.3 MLINKS+=capsicum_helpers.3 caph_limit_stderr.3 From owner-svn-src-all@freebsd.org Wed Dec 12 20:40:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7B691324EE8; Wed, 12 Dec 2018 20:40:02 +0000 (UTC) (envelope-from sobomax@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) server-signature RSA-PSS (4096 bits) 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 6F54377D18; Wed, 12 Dec 2018 20:40:02 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6074BD4BD; Wed, 12 Dec 2018 20:40:02 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCKe2Pk062445; Wed, 12 Dec 2018 20:40:02 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCKe2sI062444; Wed, 12 Dec 2018 20:40:02 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201812122040.wBCKe2sI062444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Wed, 12 Dec 2018 20:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342002 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 342002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6F54377D18 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:40:03 -0000 Author: sobomax Date: Wed Dec 12 20:40:01 2018 New Revision: 342002 URL: https://svnweb.freebsd.org/changeset/base/342002 Log: Add NETGRAPH_CHECKSUM. MFC after: 1 week Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Dec 12 20:32:17 2018 (r342001) +++ head/sys/conf/options Wed Dec 12 20:40:01 2018 (r342002) @@ -504,6 +504,7 @@ NETGRAPH_BLUETOOTH_UBTBCMFW opt_netgraph.h NETGRAPH_BPF opt_netgraph.h NETGRAPH_BRIDGE opt_netgraph.h NETGRAPH_CAR opt_netgraph.h +NETGRAPH_CHECKSUM opt_netgraph.h NETGRAPH_CISCO opt_netgraph.h NETGRAPH_DEFLATE opt_netgraph.h NETGRAPH_DEVICE opt_netgraph.h From owner-svn-src-all@freebsd.org Wed Dec 12 20:57:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 630DF1325775; Wed, 12 Dec 2018 20:57:00 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 A60E6808AA; Wed, 12 Dec 2018 20:56:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32DFFD887; Wed, 12 Dec 2018 20:56:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCKux8V073116; Wed, 12 Dec 2018 20:56:59 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCKuvkH073105; Wed, 12 Dec 2018 20:56:57 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122056.wBCKuvkH073105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 20:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342003 - in head: share/man/man9 sys/conf sys/dev/pwm sys/sys usr.sbin usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: share/man/man9 sys/conf sys/dev/pwm sys/sys usr.sbin usr.sbin/pwm X-SVN-Commit-Revision: 342003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A60E6808AA X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.81)[-0.814,0]; NEURAL_HAM_SHORT(-0.85)[-0.849,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:57:00 -0000 Author: manu Date: Wed Dec 12 20:56:56 2018 New Revision: 342003 URL: https://svnweb.freebsd.org/changeset/base/342003 Log: Add a pwm subsystem so we can configure pwm controller from kernel and userland. The pwm subsystem consist of API for PWM controllers, pwmbus to register them and a pwm(8) utility to talk to them from userland. Reviewed by: oshgobo (capsicum), bcr (manpage), 0mp (manpage) Differential Revision: https://reviews.freebsd.org/D17938 Added: head/share/man/man9/pwm.9 (contents, props changed) head/share/man/man9/pwmbus.9 (contents, props changed) head/sys/dev/pwm/ head/sys/dev/pwm/ofw_pwm.c (contents, props changed) head/sys/dev/pwm/pwm_if.m (contents, props changed) head/sys/dev/pwm/pwmbus.c (contents, props changed) head/sys/dev/pwm/pwmbus.h (contents, props changed) head/sys/dev/pwm/pwmbus_if.m (contents, props changed) head/sys/dev/pwm/pwmc.c (contents, props changed) head/sys/sys/pwm.h (contents, props changed) head/usr.sbin/pwm/ head/usr.sbin/pwm/Makefile (contents, props changed) head/usr.sbin/pwm/pwm.8 (contents, props changed) head/usr.sbin/pwm/pwm.c (contents, props changed) Modified: head/share/man/man9/Makefile head/sys/conf/files head/usr.sbin/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed Dec 12 20:40:01 2018 (r342002) +++ head/share/man/man9/Makefile Wed Dec 12 20:56:56 2018 (r342003) @@ -269,6 +269,8 @@ MAN= accept_filter.9 \ proc_rwmem.9 \ pseudofs.9 \ psignal.9 \ + pwm.9 \ + pwmbus.9 \ random.9 \ random_harvest.9 \ ratecheck.9 \ Added: head/share/man/man9/pwm.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/pwm.9 Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,93 @@ +.\" Copyright (c) 2018 Emmanuel Vadot +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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$ +.\" +.Dd November 12, 2018 +.Dt PWM 9 +.Os +.Sh NAME +.Nm pwm , +.Nm PWM_GET_BUS , +.Nm PWM_CHANNEL_CONFIG , +.Nm PWM_CHANNEL_GET_CONFIG , +.Nm PWM_CHANNEL_SET_FLAGS , +.Nm PWM_CHANNEL_GET_FLAGS , +.Nm PWM_CHANNEL_ENABLE , +.Nm PWM_CHANNEL_IS_ENABLED , +.Nm PWM_CHANNEL_MAX +.Nd PWM methods +.Sh SYNOPSIS +.Cd "device pwm" +.In "pwm_if.h" +.Ft device_t +.Fn PWM_GET_BUS "device_t dev" +.Ft int +.Fn PWM_CHANNEL_CONFIG "device_t dev" "int channel" "uint64_t period" "uint64_t duty" +.Ft int +.Fn PWM_CHANNEL_GET_CONFIG "device_t dev" "int channel" "uint64_t *period" "uint64_t *duty" +.Ft int +.Fn PWM_CHANNEL_SET_FLAGS "device_t dev" "int channel" "uint32_t flags" +.Ft int +.Fn PWM_CHANNEL_GET_FLAGS "device_t dev" "int channel" "uint32_t *flags" +.Ft int +.Fn PWM_CHANNEL_ENABLE "device_t dev" "int channel" "bool enable" +.Ft int +.Fn PWM_CHANNEL_IS_ENABLED "device_t dev" "int channel" "bool *enabled" +.Ft int +.Fn PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" +.Sh DESCRIPTION +The PWM (Pulse-Width Modulation) interface allows the device driver to register to a global +bus so other devices in the kernel can use them in a generic way. +.Sh INTERFACE +.Bl -tag -width indent +.It Fn PWM_GET_BUS "device_t dev" +Return the bus device. +.It Fn PWM_CHANNEL_CONFIG "device_t dev" "int channel" "uint64_t period" "uint64_t duty" +Configure the period and duty (in nanoseconds) in the PWM controller for the specified channel. +Returns 0 on success or +.Er EINVAL +if the values are not supported by the controller or +.Er EBUSY +is the PWM controller is in use and does not support changing the value on the fly. +.It Fn PWM_CHANNEL_GET_CONFIG "device_t dev" "int channel" "uint64_t *period" "uint64_t *duty" +Get the current configuration of the period and duty for the specified channel. +.It Fn PWM_CHANNEL_SET_FLAGS "device_t dev" "int channel" "uint32_t flags" +Set the flags of the channel (like inverted polarity). +.It Fn PWM_CHANNEL_GET_FLAGS "device_t dev" "int channel" "uint32_t *flags" +Get the current flags for the channel. +.It Fn PWM_CHANNEL_ENABLE "device_t dev" "int channel" "bool enable" +Enable the PWM channel. +.It Fn PWM_CHANNEL_ISENABLED "device_t dev" "int channel" "bool *enable" +Test if the PWM channel is enabled. +.It PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" +Get the maximum number of channels supported by the controller. +.El +.Sh HISTORY +The +.Nm pwm +interface first appeared in +.Fx 13.0 . +The +.Nm pwm +interface and manual page was written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . Added: head/share/man/man9/pwmbus.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/pwmbus.9 Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,98 @@ +.\" Copyright (c) 2018 Emmanuel Vadot +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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$ +.\" +.Dd November 12, 2018 +.Dt PWMBUS 9 +.Os +.Sh NAME +.Nm pwmbus , +.Nm pwmbus_attach_bus , +.Nm PWMBUS_GET_BUS , +.Nm PWMBUS_CHANNEL_CONFIG , +.Nm PWMBUS_CHANNEL_GET_CONFIG , +.Nm PWMBUS_CHANNEL_SET_FLAGS , +.Nm PWMBUS_CHANNEL_GET_FLAGS , +.Nm PWMBUS_CHANNEL_ENABLE , +.Nm PWMBUS_CHANNEL_IS_ENABLED , +.Nm PWMBUS_CHANNEL_MAX +.Nd PWMBUS methods +.Sh SYNOPSIS +.Cd "device pwm" +.In "pwmbus_if.h" +.Ft device_t +.Fn pwmbus_attach_bus "device_t dev" +.Ft int +.Fn PWMBUS_CHANNEL_CONFIG "device_t bus" "int channel" "uint64_t period" "uint64_t duty" +.Ft int +.Fn PWMBUS_CHANNEL_GET_CONFIG "device_t bus" "int channel" "uint64_t *period" "uint64_t *duty" +.Ft int +.Fn PWMBUS_CHANNEL_SET_FLAGS "device_t bus" "int channel" "uint32_t flags" +.Ft int +.Fn PWMBUS_CHANNEL_GET_FLAGS "device_t bus" "int channel" "uint32_t *flags" +.Ft int +.Fn PWMBUS_CHANNEL_ENABLE "device_t bus" "int channel" "bool enable" +.Ft int +.Fn PWMBUS_CHANNEL_IS_ENABLED "device_t bus" "int channel" "bool *enabled" +.Ft int +.Fn PWMBUS_CHANNEL_MAX "device_t bus" "int channel" "int *nchannel" +.Sh DESCRIPTION +The PWMBUS (Pulse-Width Modulation) interface allows the device driver to register to a global +bus so other devices in the kernel can use them in a generic way +.Sh INTERFACE +.Bl -tag -width indent +.It Fn pwmbus_attach_bus "device_t dev" +Attach the +.Nm pwmbus +to the device driver +.It Fn PWMBUS_CHANNEL_CONFIG "device_t bus" "int channel" "uint64_t period" "uint64_t duty" +Configure the period and duty (in nanoseconds) in the PWM controller on the bus for the specified channel. +Returns 0 on success or +.Er EINVAL +is the values are not supported by the controller or +.Er EBUSY +is the PWMBUS controller is in use and doesn't support changing the value on the fly. +.It Fn PWMBUS_CHANNEL_GET_CONFIG "device_t bus" "int channel" "uint64_t *period" "uint64_t *duty" +Get the current configuration of the period and duty for the specified channel. +.It Fn PWMBUS_CHANNEL_SET_FLAGS "device_t bus" "int channel" "uint32_t flags" +Set the flags of the channel (like inverted polarity), if the driver or controller +doesn't support this a default method is used. +.It Fn PWMBUS_CHANNEL_GET_FLAGS "device_t bus" "int channel" "uint32_t *flags" +Get the current flags for the channel, if the driver or controller +doesn't support this, a default method is used. +.It Fn PWMBUS_CHANNEL_ENABLE "device_t bus" "int channel" "bool enable" +Enable the PWM channel. +.It Fn PWMBUS_CHANNEL_ISENABLED "device_t bus" "int channel" "bool *enable" +Test if the PWM channel is enabled. +.It PWMBUS_CHANNEL_MAX "device_t bus" "int channel" "int *nchannel" +Get the maximum number of channel supported by the controller. +.El +.Sh HISTORY +The +.Nm pwmbus +interface first appear in +.Fx 13.0 . +The +.Nm pwmbus +interface and manual page was written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 12 20:40:01 2018 (r342002) +++ head/sys/conf/files Wed Dec 12 20:56:56 2018 (r342003) @@ -2746,6 +2746,11 @@ dev/puc/puc.c optional puc dev/puc/puc_cfg.c optional puc dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci +dev/pwm/pwmc.c optional pwm +dev/pwm/pwmbus.c optional pwm +dev/pwm/pwm_if.m optional pwm +dev/pwm/pwmbus_if.m optional pwm +dev/pwm/ofw_pwm.c optional pwm fdt dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral Added: head/sys/dev/pwm/ofw_pwm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pwm/ofw_pwm.c Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,109 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "pwm_if.h" + +int +pwm_get_by_ofw_propidx(device_t consumer, phandle_t node, + const char *prop_name, int idx, pwm_channel_t *out_channel) +{ + phandle_t xref; + pcell_t *cells; + struct pwm_channel channel; + int ncells, rv; + + rv = ofw_bus_parse_xref_list_alloc(node, prop_name, "#pwm-cells", + idx, &xref, &ncells, &cells); + if (rv != 0) + return (rv); + + channel.dev = OF_device_from_xref(xref); + if (channel.dev == NULL) { + OF_prop_free(cells); + return (ENODEV); + } + + channel.busdev = PWM_GET_BUS(channel.dev); + if (channel.busdev == NULL) { + OF_prop_free(cells); + return (ENODEV); + } + + channel.channel = cells[0]; + channel.period = cells[1]; + + if (ncells >= 3) + channel.flags = cells[2]; + + *out_channel = malloc(sizeof(struct pwm_channel), M_DEVBUF, M_WAITOK | M_ZERO); + **out_channel = channel; + return (0); +} + +int +pwm_get_by_ofw_idx(device_t consumer, phandle_t node, int idx, + pwm_channel_t *out_channel) +{ + + return (pwm_get_by_ofw_propidx(consumer, node, "pwms", idx, out_channel)); +} + +int +pwm_get_by_ofw_property(device_t consumer, phandle_t node, + const char *prop_name, pwm_channel_t *out_channel) +{ + + return (pwm_get_by_ofw_propidx(consumer, node, prop_name, 0, out_channel)); +} + +int +pwm_get_by_ofw_name(device_t consumer, phandle_t node, const char *name, + pwm_channel_t *out_channel) +{ + int rv, idx; + + rv = ofw_bus_find_string_index(node, "pwm-names", name, &idx); + if (rv != 0) + return (rv); + + return (pwm_get_by_ofw_idx(consumer, node, idx, out_channel)); +} Added: head/sys/dev/pwm/pwm_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pwm/pwm_if.m Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,106 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2018 Emmanuel Vadot +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# 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$ +# + +#include + +INTERFACE pwm; + +# +# Get the bus +# + +METHOD device_t get_bus { + device_t dev; +}; + +# +# Config the period (Total number of cycle in ns) and +# the duty (active number of cycle in ns) +# +METHOD int channel_config { + device_t dev; + int channel; + uint64_t period; + uint64_t duty; +}; + +# +# Get the period (Total number of cycle in ns) and +# the duty (active number of cycle in ns) +# +METHOD int channel_get_config { + device_t dev; + int channel; + uint64_t *period; + uint64_t *duty; +}; + +# +# Set the flags +# +METHOD int channel_set_flags { + device_t dev; + int channel; + uint32_t flags; +}; + +# +# Get the flags +# +METHOD int channel_get_flags { + device_t dev; + int channel; + uint32_t *flags; +}; + +# +# Enable the pwm output +# +METHOD int channel_enable { + device_t dev; + int channel; + bool enable; +}; + +# +# Is the pwm output enabled +# +METHOD int channel_is_enabled { + device_t dev; + int channel; + bool *enabled; +}; + +# +# Get the number of channels +# +METHOD int channel_max { + device_t dev; + int *nchannel; +}; Added: head/sys/dev/pwm/pwmbus.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pwm/pwmbus.c Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,244 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#include "pwmbus_if.h" +#include "pwm_if.h" + +struct pwmbus_channel_data { + int reserved; + char *name; +}; + +struct pwmbus_softc { + device_t busdev; + device_t dev; + + int nchannels; +}; + +device_t +pwmbus_attach_bus(device_t dev) +{ + device_t busdev; +#ifdef FDT + phandle_t node; +#endif + + busdev = device_add_child(dev, "pwmbus", -1); + if (busdev == NULL) { + device_printf(dev, "Cannot add child pwmbus\n"); + return (NULL); + } + if (device_add_child(dev, "pwmc", -1) == NULL) { + device_printf(dev, "Cannot add pwmc\n"); + device_delete_child(dev, busdev); + return (NULL); + } + +#ifdef FDT + node = ofw_bus_get_node(dev); + OF_device_register_xref(OF_xref_from_node(node), dev); +#endif + + bus_generic_attach(dev); + + return (busdev); +} + +static int +pwmbus_probe(device_t dev) +{ + + device_set_desc(dev, "PWM bus"); + return (BUS_PROBE_GENERIC); +} + +static int +pwmbus_attach(device_t dev) +{ + struct pwmbus_softc *sc; + + sc = device_get_softc(dev); + sc->busdev = dev; + sc->dev = device_get_parent(dev); + + if (PWM_CHANNEL_MAX(sc->dev, &sc->nchannels) != 0 || + sc->nchannels == 0) + return (ENXIO); + + if (bootverbose) + device_printf(dev, "Registering %d channel(s)\n", sc->nchannels); + bus_generic_probe(dev); + + return (bus_generic_attach(dev)); +} + +static int +pwmbus_detach(device_t dev) +{ + device_t *devlist; + int i, rv, ndevs; + + rv = bus_generic_detach(dev); + if (rv != 0) + return (rv); + + rv = device_get_children(dev, &devlist, &ndevs); + if (rv != 0) + return (rv); + for (i = 0; i < ndevs; i++) + device_delete_child(dev, devlist[i]); + + return (0); +} + +static int +pwmbus_channel_config(device_t bus, int channel, uint64_t period, uint64_t duty) +{ + struct pwmbus_softc *sc; + + sc = device_get_softc(bus); + + if (channel > sc->nchannels) + return (EINVAL); + + return (PWM_CHANNEL_CONFIG(sc->dev, channel, period, duty)); +} + +static int +pwmbus_channel_get_config(device_t bus, int channel, uint64_t *period, uint64_t *duty) +{ + struct pwmbus_softc *sc; + + sc = device_get_softc(bus); + + if (channel > sc->nchannels) + return (EINVAL); + + return (PWM_CHANNEL_GET_CONFIG(sc->dev, channel, period, duty)); +} + +static int +pwmbus_channel_set_flags(device_t bus, int channel, uint32_t flags) +{ + struct pwmbus_softc *sc; + + sc = device_get_softc(bus); + + if (channel > sc->nchannels) + return (EINVAL); + + return (PWM_CHANNEL_SET_FLAGS(sc->dev, channel, flags)); +} + +static int +pwmbus_channel_get_flags(device_t bus, int channel, uint32_t *flags) +{ + struct pwmbus_softc *sc; + + sc = device_get_softc(bus); + + if (channel > sc->nchannels) + return (EINVAL); + + return (PWM_CHANNEL_GET_FLAGS(sc->dev, channel, flags)); +} + +static int +pwmbus_channel_enable(device_t bus, int channel, bool enable) +{ + struct pwmbus_softc *sc; + + sc = device_get_softc(bus); + + if (channel > sc->nchannels) + return (EINVAL); + + return (PWM_CHANNEL_ENABLE(sc->dev, channel, enable)); +} + +static int +pwmbus_channel_is_enabled(device_t bus, int channel, bool *enable) +{ + struct pwmbus_softc *sc; + + sc = device_get_softc(bus); + + if (channel > sc->nchannels) + return (EINVAL); + + return (PWM_CHANNEL_IS_ENABLED(sc->dev, channel, enable)); +} + +static device_method_t pwmbus_methods[] = { + /* device_if */ + DEVMETHOD(device_probe, pwmbus_probe), + DEVMETHOD(device_attach, pwmbus_attach), + DEVMETHOD(device_detach, pwmbus_detach), + + /* pwm interface */ + DEVMETHOD(pwmbus_channel_config, pwmbus_channel_config), + DEVMETHOD(pwmbus_channel_get_config, pwmbus_channel_get_config), + DEVMETHOD(pwmbus_channel_set_flags, pwmbus_channel_set_flags), + DEVMETHOD(pwmbus_channel_get_flags, pwmbus_channel_get_flags), + DEVMETHOD(pwmbus_channel_enable, pwmbus_channel_enable), + DEVMETHOD(pwmbus_channel_is_enabled, pwmbus_channel_is_enabled), + + DEVMETHOD_END +}; + +driver_t pwmbus_driver = { + "pwmbus", + pwmbus_methods, + sizeof(struct pwmbus_softc), +}; +devclass_t pwmbus_devclass; + +EARLY_DRIVER_MODULE(pwmbus, pwm, pwmbus_driver, pwmbus_devclass, 0, 0, + BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); +MODULE_VERSION(pwmbus, 1); Added: head/sys/dev/pwm/pwmbus.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pwm/pwmbus.h Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,64 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#ifndef _PWMBUS_H_ + +#include +#include + +struct pwm_channel { + device_t dev; + device_t busdev; + int channel; + uint64_t period; + uint64_t duty; + uint32_t flags; + bool enabled; +}; +typedef struct pwm_channel *pwm_channel_t; + +device_t pwmbus_attach_bus(device_t dev); +int pwmbus_acquire_channel(device_t bus, int channel); +int pwmbus_release_channel(device_t bus, int channel); + +int +pwm_get_by_ofw_propidx(device_t consumer, phandle_t node, + const char *prop_name, int idx, pwm_channel_t *channel); +int +pwm_get_by_ofw_idx(device_t consumer, phandle_t node, int idx, + pwm_channel_t *out_channel); +int +pwm_get_by_ofw_property(device_t consumer, phandle_t node, + const char *prop_name, pwm_channel_t *out_channel); +int +pwm_get_by_ofw_name(device_t consumer, phandle_t node, const char *name, + pwm_channel_t *out_channel); + +#endif /* _PWMBUS_H_ */ Added: head/sys/dev/pwm/pwmbus_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pwm/pwmbus_if.m Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,111 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2018 Emmanuel Vadot +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# 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$ +# + +#include + +INTERFACE pwmbus; + +CODE { + static int + pwm_default_set_flags(device_t dev, int channel, uint32_t flags) + { + + return (EOPNOTSUPP); + } + + static int + pwm_default_get_flags(device_t dev, int channel, uint32_t *flags) + { + + *flags = 0; + return (0); + } +}; + +HEADER { + #include +}; + +# +# Config the period (Total number of cycle in ns) and +# the duty (active number of cycle in ns) +# +METHOD int channel_config { + device_t bus; + int channel; + uint64_t period; + uint64_t duty; +}; + +# +# Get the period (Total number of cycle in ns) and +# the duty (active number of cycle in ns) +# +METHOD int channel_get_config { + device_t bus; + int channel; + uint64_t *period; + uint64_t *duty; +}; + +# +# Set the flags +# +METHOD int channel_set_flags { + device_t bus; + int channel; + uint32_t flags; +} DEFAULT pwm_default_set_flags; + +# +# Get the flags +# +METHOD int channel_get_flags { + device_t dev; + int channel; + uint32_t *flags; +} DEFAULT pwm_default_get_flags; + +# +# Enable the pwm output +# +METHOD int channel_enable { + device_t bus; + int channel; + bool enable; +}; + +# +# Is the pwm output enabled +# +METHOD int channel_is_enabled { + device_t bus; + int channel; + bool *enabled; +}; Added: head/sys/dev/pwm/pwmc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pwm/pwmc.c Wed Dec 12 20:56:56 2018 (r342003) @@ -0,0 +1,161 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "pwmbus_if.h" +#include "pwm_if.h" + +struct pwmc_softc { + device_t dev; + device_t pdev; + struct cdev *pwm_dev; + char name[32]; +}; + +static int +pwm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, + int fflag, struct thread *td) +{ + struct pwmc_softc *sc; + struct pwm_state state; + device_t bus; + int nchannel; + int rv = 0; + + sc = dev->si_drv1; + bus = PWM_GET_BUS(sc->pdev); + if (bus == NULL) + return (EINVAL); + + switch (cmd) { + case PWMMAXCHANNEL: + nchannel = -1; + rv = PWM_CHANNEL_MAX(sc->pdev, &nchannel); + bcopy(&nchannel, data, sizeof(nchannel)); + break; + case PWMSETSTATE: + bcopy(data, &state, sizeof(state)); + rv = PWMBUS_CHANNEL_CONFIG(bus, state.channel, + state.period, state.duty); + if (rv == 0) + rv = PWMBUS_CHANNEL_ENABLE(bus, state.channel, + state.enable); + break; + case PWMGETSTATE: + bcopy(data, &state, sizeof(state)); + rv = PWMBUS_CHANNEL_GET_CONFIG(bus, state.channel, + &state.period, &state.duty); + if (rv != 0) + return (rv); + rv = PWMBUS_CHANNEL_IS_ENABLED(bus, state.channel, + &state.enable); + if (rv != 0) + return (rv); + bcopy(&state, data, sizeof(state)); + break; + } + + return (rv); +} + +static struct cdevsw pwm_cdevsw = { + .d_version = D_VERSION, + .d_name = "pwm", + .d_ioctl = pwm_ioctl +}; + +static int +pwmc_probe(device_t dev) +{ + + device_set_desc(dev, "PWM Controller"); + return (0); +} + +static int +pwmc_attach(device_t dev) +{ + struct pwmc_softc *sc; + struct make_dev_args args; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->pdev = device_get_parent(dev); + + snprintf(sc->name, sizeof(sc->name), "pwmc%d", device_get_unit(dev)); + make_dev_args_init(&args); + args.mda_flags = MAKEDEV_CHECKNAME | MAKEDEV_WAITOK; + args.mda_devsw = &pwm_cdevsw; + args.mda_uid = UID_ROOT; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Dec 12 20:58:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3C48132588A; Wed, 12 Dec 2018 20:58:44 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 5BC4B80AE5; Wed, 12 Dec 2018 20:58:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FD32D889; Wed, 12 Dec 2018 20:58:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCKwi2Q073230; Wed, 12 Dec 2018 20:58:44 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCKwhk4073227; Wed, 12 Dec 2018 20:58:43 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122058.wBCKwhk4073227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 20:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342004 - in head/sys: arm/allwinner arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/allwinner arm64/conf conf X-SVN-Commit-Revision: 342004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5BC4B80AE5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.65 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.83)[-0.832,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:58:44 -0000 Author: manu Date: Wed Dec 12 20:58:43 2018 New Revision: 342004 URL: https://svnweb.freebsd.org/changeset/base/342004 Log: arm64: allwinner: Add pwm driver Add a pwm driver for Allwinner PWM Add pwm and aw_pwm to the GENERIC kernel Added: head/sys/arm/allwinner/aw_pwm.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Added: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/aw_pwm.c Wed Dec 12 20:58:43 2018 (r342004) @@ -0,0 +1,340 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include "pwm_if.h" + +#define AW_PWM_CTRL 0x00 +#define AW_PWM_CTRL_PRESCALE_MASK 0xF +#define AW_PWM_CTRL_EN (1 << 4) +#define AW_PWM_CTRL_ACTIVE_LEVEL_HIGH (1 << 5) +#define AW_PWM_CTRL_GATE (1 << 6) +#define AW_PWM_CTRL_MODE_MASK 0x80 +#define AW_PWM_CTRL_PULSE_MODE (1 << 7) +#define AW_PWM_CTRL_CYCLE_MODE (0 << 7) +#define AW_PWM_CTRL_PULSE_START (1 << 8) +#define AW_PWM_CTRL_CLK_BYPASS (1 << 9) +#define AW_PWM_CTRL_PERIOD_BUSY (1 << 28) + +#define AW_PWM_PERIOD 0x04 +#define AW_PWM_PERIOD_TOTAL_MASK 0xFFFF +#define AW_PWM_PERIOD_TOTAL_SHIFT 16 +#define AW_PWM_PERIOD_ACTIVE_MASK 0xFFFF +#define AW_PWM_PERIOD_ACTIVE_SHIFT 0 + +#define AW_PWM_MAX_FREQ 24000000 + +#define NS_PER_SEC 1000000000 + +static struct ofw_compat_data compat_data[] = { + { "allwinner,sun5i-a13-pwm", 1 }, + { NULL, 0 } +}; + +static struct resource_spec aw_pwm_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +struct aw_pwm_softc { + device_t dev; + device_t busdev; + clk_t clk; + struct resource *res; + + uint64_t clk_freq; + uint64_t period; + uint64_t duty; + uint32_t flags; + bool enabled; +}; + +static uint32_t aw_pwm_clk_prescaler[] = { + 120, + 180, + 240, + 360, + 480, + 0, + 0, + 0, + 12000, + 24000, + 36000, + 48000, + 72000, + 0, + 0, + 1, +}; + +#define AW_PWM_READ(sc, reg) bus_read_4((sc)->res, (reg)) +#define AW_PWM_WRITE(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int aw_pwm_probe(device_t dev); +static int aw_pwm_attach(device_t dev); +static int aw_pwm_detach(device_t dev); + +static int +aw_pwm_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Allwinner PWM"); + return (BUS_PROBE_DEFAULT); +} + +static int +aw_pwm_attach(device_t dev) +{ + struct aw_pwm_softc *sc; + /* uint32_t reg; */ + int error; + + sc = device_get_softc(dev); + sc->dev = dev; + + error = clk_get_by_ofw_index(dev, 0, 0, &sc->clk); + if (error != 0) { + device_printf(dev, "cannot get clock\n"); + goto fail; + } + error = clk_enable(sc->clk); + + error = clk_get_freq(sc->clk, &sc->clk_freq); + + if (bus_alloc_resources(dev, aw_pwm_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + error = ENXIO; + goto fail; + } + + if ((sc->busdev = pwmbus_attach_bus(dev)) == NULL) + device_printf(dev, "Cannot attach pwm bus\n"); + + return (0); + +fail: + aw_pwm_detach(dev); + return (error); +} + +static int +aw_pwm_detach(device_t dev) +{ + struct aw_pwm_softc *sc; + + sc = device_get_softc(dev); + + bus_generic_detach(sc->dev); + + bus_release_resources(dev, aw_pwm_spec, &sc->res); + + return (0); +} + +static int +aw_pwm_channel_max(device_t dev, int *nchannel) +{ + + *nchannel = 1; + + return (0); +} + +static int +aw_pwm_channel_config(device_t dev, int channel, uint64_t period, uint64_t duty) +{ + struct aw_pwm_softc *sc; + uint64_t period_freq, duty_freq; + uint64_t clk_rate, div; + uint32_t reg; + int prescaler; + int i; + + sc = device_get_softc(dev); + + period_freq = NS_PER_SEC / period; + if (period_freq > AW_PWM_MAX_FREQ) + return (EINVAL); + duty_freq = NS_PER_SEC / duty; + if (duty_freq < period_freq) { + device_printf(sc->dev, "duty < period\n"); + return (EINVAL); + } + + /* First test without prescaler */ + clk_rate = AW_PWM_MAX_FREQ; + prescaler = AW_PWM_CTRL_PRESCALE_MASK; + div = AW_PWM_MAX_FREQ / period_freq; + if ((div - 1) > AW_PWM_PERIOD_TOTAL_MASK) { + /* Test all prescaler */ + for (i = 0; i < nitems(aw_pwm_clk_prescaler); i++) { + if (aw_pwm_clk_prescaler[i] == 0) + continue; + div = (AW_PWM_MAX_FREQ * aw_pwm_clk_prescaler[i]) / period_freq; + if ((div - 1) < AW_PWM_PERIOD_TOTAL_MASK ) { + prescaler = i; + clk_rate = AW_PWM_MAX_FREQ / aw_pwm_clk_prescaler[i]; + break; + } + } + if (prescaler == AW_PWM_CTRL_PRESCALE_MASK) + return (EINVAL); + } + + reg = AW_PWM_READ(sc, AW_PWM_CTRL); + if (reg & AW_PWM_CTRL_PERIOD_BUSY) { + device_printf(sc->dev, "pwm busy\n"); + return (EBUSY); + } + + /* Write the prescalar */ + reg &= ~AW_PWM_CTRL_PRESCALE_MASK; + reg |= prescaler; + AW_PWM_WRITE(sc, AW_PWM_CTRL, reg); + + /* Write the total/active cycles */ + reg = ((clk_rate / period_freq) << AW_PWM_PERIOD_TOTAL_SHIFT) | + ((clk_rate / duty_freq) << AW_PWM_PERIOD_ACTIVE_SHIFT); + AW_PWM_WRITE(sc, AW_PWM_PERIOD, reg); + + sc->period = period; + sc->duty = duty; + + return (0); +} + +static int +aw_pwm_channel_get_config(device_t dev, int channel, uint64_t *period, uint64_t *duty) +{ + struct aw_pwm_softc *sc; + + sc = device_get_softc(dev); + + *period = sc->period; + *duty = sc->duty; + + return (0); +} + +static int +aw_pwm_channel_enable(device_t dev, int channel, bool enable) +{ + struct aw_pwm_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + + if (enable && sc->enabled) + return (0); + + reg = AW_PWM_READ(sc, AW_PWM_CTRL); + if (enable) + reg |= AW_PWM_CTRL_GATE | AW_PWM_CTRL_EN; + else + reg &= ~(AW_PWM_CTRL_GATE | AW_PWM_CTRL_EN); + + AW_PWM_WRITE(sc, AW_PWM_CTRL, reg); + + sc->enabled = enable; + + return (0); +} + +static int +aw_pwm_channel_is_enabled(device_t dev, int channel, bool *enabled) +{ + struct aw_pwm_softc *sc; + + sc = device_get_softc(dev); + + *enabled = sc->enabled; + + return (0); +} + +static device_t +aw_pwm_get_bus(device_t dev) +{ + struct aw_pwm_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} +static device_method_t aw_pwm_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aw_pwm_probe), + DEVMETHOD(device_attach, aw_pwm_attach), + DEVMETHOD(device_detach, aw_pwm_detach), + + /* pwm interface */ + DEVMETHOD(pwm_get_bus, aw_pwm_get_bus), + DEVMETHOD(pwm_channel_max, aw_pwm_channel_max), + DEVMETHOD(pwm_channel_config, aw_pwm_channel_config), + DEVMETHOD(pwm_channel_get_config, aw_pwm_channel_get_config), + DEVMETHOD(pwm_channel_enable, aw_pwm_channel_enable), + DEVMETHOD(pwm_channel_is_enabled, aw_pwm_channel_is_enabled), + + DEVMETHOD_END +}; + +static driver_t aw_pwm_driver = { + "pwm", + aw_pwm_methods, + sizeof(struct aw_pwm_softc), +}; + +static devclass_t aw_pwm_devclass; + +DRIVER_MODULE(aw_pwm, simplebus, aw_pwm_driver, aw_pwm_devclass, 0, 0); +SIMPLEBUS_PNP_INFO(compat_data); Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Dec 12 20:56:56 2018 (r342003) +++ head/sys/arm64/conf/GENERIC Wed Dec 12 20:58:43 2018 (r342004) @@ -240,6 +240,10 @@ device aw_thermal # Allwinner Thermal Sensor Controll device spibus device bcm2835_spi # Broadcom BCM283x SPI bus +# PWM +device pwm +device aw_pwm + # Console device vt device kbdmux Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 20:56:56 2018 (r342003) +++ head/sys/conf/files.arm64 Wed Dec 12 20:58:43 2018 (r342004) @@ -31,6 +31,7 @@ arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/gnu/dts/include" +arm/allwinner/aw_pwm.c optional aw_pwm fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_sid.c optional aw_sid nvmem fdt From owner-svn-src-all@freebsd.org Wed Dec 12 21:02:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D3671325C98; Wed, 12 Dec 2018 21:02:23 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 408AE810CF; Wed, 12 Dec 2018 21:02:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30AECDA5A; Wed, 12 Dec 2018 21:02:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCL2NC2078133; Wed, 12 Dec 2018 21:02:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCL2MGt078130; Wed, 12 Dec 2018 21:02:22 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122102.wBCL2MGt078130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 21:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342005 - in head/sys: dts/arm64/overlays modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: dts/arm64/overlays modules/dtb/allwinner X-SVN-Commit-Revision: 342005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 408AE810CF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.65 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.82)[-0.823,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 21:02:23 -0000 Author: manu Date: Wed Dec 12 21:02:22 2018 New Revision: 342005 URL: https://svnweb.freebsd.org/changeset/base/342005 Log: arm64: allwinner: Add DTSO for pwm and r_pwm Those are both dtso (overlays) for the two pwm controllers found on the A64. Added: head/sys/dts/arm64/overlays/sun50i-a64-pwm.dtso (contents, props changed) head/sys/dts/arm64/overlays/sun50i-a64-rpwm.dtso (contents, props changed) Modified: head/sys/modules/dtb/allwinner/Makefile Added: head/sys/dts/arm64/overlays/sun50i-a64-pwm.dtso ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dts/arm64/overlays/sun50i-a64-pwm.dtso Wed Dec 12 21:02:22 2018 (r342005) @@ -0,0 +1,52 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun50i-a64"; +}; + +&{/soc} { + pwm: pwm@1c21400 { + compatible = "allwinner,sun50i-a64-pwm", + "allwinner,sun5i-a13-pwm"; + reg = <0x01c21400 0x400>; + clocks = <&osc24M>; + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pin>; + #pwm-cells = <3>; + status = "disabled"; + }; +}; + +&{/soc/pinctrl@1c20800} { + pwm_pin: pwm_pin { + pins = "PD22"; + function = "pwm"; + }; +}; +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun50i-a64"; +}; + +&{/soc} { + pwm: pwm@1c21400 { + compatible = "allwinner,sun50i-a64-pwm", + "allwinner,sun5i-a13-pwm"; + reg = <0x01c21400 0x400>; + clocks = <&osc24M>; + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pin>; + #pwm-cells = <3>; + status = "disabled"; + }; +}; + +&{/soc/pinctrl@1c20800} { + pwm_pin: pwm_pin { + pins = "PD22"; + function = "pwm"; + }; +}; Added: head/sys/dts/arm64/overlays/sun50i-a64-rpwm.dtso ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dts/arm64/overlays/sun50i-a64-rpwm.dtso Wed Dec 12 21:02:22 2018 (r342005) @@ -0,0 +1,52 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun50i-a64"; +}; + +&{/soc} { + r_pwm: pwm@1f03800 { + compatible = "allwinner,sun50i-a64-pwm", + "allwinner,sun5i-a13-pwm"; + reg = <0x01f03800 0x400>; + clocks = <&osc24M>; + pinctrl-names = "default"; + pinctrl-0 = <&r_pwm_pin>; + #pwm-cells = <3>; + status = "okay"; + }; +}; + +&{/soc/pinctrl@1f02c00} { + r_pwm_pin: pwm { + pins = "PL10"; + function = "s_pwm"; + }; +}; +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun50i-a64"; +}; + +&{/soc} { + r_pwm: pwm@1f03800 { + compatible = "allwinner,sun50i-a64-pwm", + "allwinner,sun5i-a13-pwm"; + reg = <0x01f03800 0x400>; + clocks = <&osc24M>; + pinctrl-names = "default"; + pinctrl-0 = <&r_pwm_pin>; + #pwm-cells = <3>; + status = "okay"; + }; +}; + +&{/soc/pinctrl@1f02c00} { + r_pwm_pin: pwm { + pins = "PL10"; + function = "s_pwm"; + }; +}; Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Wed Dec 12 20:58:43 2018 (r342004) +++ head/sys/modules/dtb/allwinner/Makefile Wed Dec 12 21:02:22 2018 (r342005) @@ -45,6 +45,8 @@ DTS= \ allwinner/sun50i-h5-orangepi-pc2.dts DTSO= sun50i-a64-opp.dtso \ + sun50i-a64-pwm.dtso \ + sun50i-a64-rpwm.dtso \ sun50i-a64-sid.dtso \ sun50i-a64-ths.dtso \ sun50i-a64-timer.dtso From owner-svn-src-all@freebsd.org Wed Dec 12 21:10:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E150A1325F34; Wed, 12 Dec 2018 21:10:35 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 8138981468; Wed, 12 Dec 2018 21:10:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 657AEDA86; Wed, 12 Dec 2018 21:10:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCLAZdj078521; Wed, 12 Dec 2018 21:10:35 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCLAZrX078519; Wed, 12 Dec 2018 21:10:35 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122110.wBCLAZrX078519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 21:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342006 - head/sys/dts/arm64/overlays X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dts/arm64/overlays X-SVN-Commit-Revision: 342006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8138981468 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 21:10:36 -0000 Author: manu Date: Wed Dec 12 21:10:34 2018 New Revision: 342006 URL: https://svnweb.freebsd.org/changeset/base/342006 Log: arm64: allwinner: Fix pwm dtso Double patched files ended up in the tree Reported by: kevans Modified: head/sys/dts/arm64/overlays/sun50i-a64-pwm.dtso head/sys/dts/arm64/overlays/sun50i-a64-rpwm.dtso Modified: head/sys/dts/arm64/overlays/sun50i-a64-pwm.dtso ============================================================================== --- head/sys/dts/arm64/overlays/sun50i-a64-pwm.dtso Wed Dec 12 21:02:22 2018 (r342005) +++ head/sys/dts/arm64/overlays/sun50i-a64-pwm.dtso Wed Dec 12 21:10:34 2018 (r342006) @@ -24,29 +24,3 @@ function = "pwm"; }; }; -/dts-v1/; -/plugin/; - -/ { - compatible = "allwinner,sun50i-a64"; -}; - -&{/soc} { - pwm: pwm@1c21400 { - compatible = "allwinner,sun50i-a64-pwm", - "allwinner,sun5i-a13-pwm"; - reg = <0x01c21400 0x400>; - clocks = <&osc24M>; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_pin>; - #pwm-cells = <3>; - status = "disabled"; - }; -}; - -&{/soc/pinctrl@1c20800} { - pwm_pin: pwm_pin { - pins = "PD22"; - function = "pwm"; - }; -}; Modified: head/sys/dts/arm64/overlays/sun50i-a64-rpwm.dtso ============================================================================== --- head/sys/dts/arm64/overlays/sun50i-a64-rpwm.dtso Wed Dec 12 21:02:22 2018 (r342005) +++ head/sys/dts/arm64/overlays/sun50i-a64-rpwm.dtso Wed Dec 12 21:10:34 2018 (r342006) @@ -24,29 +24,3 @@ function = "s_pwm"; }; }; -/dts-v1/; -/plugin/; - -/ { - compatible = "allwinner,sun50i-a64"; -}; - -&{/soc} { - r_pwm: pwm@1f03800 { - compatible = "allwinner,sun50i-a64-pwm", - "allwinner,sun5i-a13-pwm"; - reg = <0x01f03800 0x400>; - clocks = <&osc24M>; - pinctrl-names = "default"; - pinctrl-0 = <&r_pwm_pin>; - #pwm-cells = <3>; - status = "okay"; - }; -}; - -&{/soc/pinctrl@1f02c00} { - r_pwm_pin: pwm { - pins = "PL10"; - function = "s_pwm"; - }; -}; From owner-svn-src-all@freebsd.org Wed Dec 12 21:25:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 039C913267C7; Wed, 12 Dec 2018 21:25:53 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 9ED6B82001; Wed, 12 Dec 2018 21:25:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 928A7DDFE; Wed, 12 Dec 2018 21:25:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCLPq7o088628; Wed, 12 Dec 2018 21:25:52 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCLPq5R088627; Wed, 12 Dec 2018 21:25:52 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122125.wBCLPq5R088627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 21:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342007 - head/usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.sbin/pwm X-SVN-Commit-Revision: 342007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9ED6B82001 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.64 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 21:25:53 -0000 Author: manu Date: Wed Dec 12 21:25:52 2018 New Revision: 342007 URL: https://svnweb.freebsd.org/changeset/base/342007 Log: pwm: Fix some arches by using %ju and casting to uintmax_t Reported by: ci.freebsd.org Modified: head/usr.sbin/pwm/pwm.c Modified: head/usr.sbin/pwm/pwm.c ============================================================================== --- head/usr.sbin/pwm/pwm.c Wed Dec 12 21:10:34 2018 (r342006) +++ head/usr.sbin/pwm/pwm.c Wed Dec 12 21:25:52 2018 (r342007) @@ -190,9 +190,9 @@ main(int argc, char *argv[]) } break; case PWM_SHOW_CONFIG: - printf("period: %lu\nduty: %lu\nenabled:%d\n", - state.period, - state.duty, + printf("period: %ju\nduty: %ju\nenabled:%d\n", + (uintmax_t) state.period, + (uintmax_t) state.duty, state.enable); break; case PWM_PERIOD: From owner-svn-src-all@freebsd.org Wed Dec 12 21:56:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA3541327257; Wed, 12 Dec 2018 21:56:46 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 5301E82F04; Wed, 12 Dec 2018 21:56:46 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 428F8E2EC; Wed, 12 Dec 2018 21:56:46 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCLuk5l004405; Wed, 12 Dec 2018 21:56:46 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCLujCU004401; Wed, 12 Dec 2018 21:56:45 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122156.wBCLujCU004401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 21:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342008 - in head/sys: conf dev/fdt X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: conf dev/fdt X-SVN-Commit-Revision: 342008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5301E82F04 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.51)[-0.506,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 21:56:47 -0000 Author: manu Date: Wed Dec 12 21:56:45 2018 New Revision: 342008 URL: https://svnweb.freebsd.org/changeset/base/342008 Log: fdt: Add support for simple-mfd bus Quoting the binding Documentation : "These devices comprise a nexus for heterogeneous hardware blocks containing more than one non-unique yet varying hardware functionality." Reviewed by: loos Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D17751 Added: head/sys/dev/fdt/simple_mfd.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/fdt/simplebus.c head/sys/dev/fdt/simplebus.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 12 21:25:52 2018 (r342007) +++ head/sys/conf/files Wed Dec 12 21:56:45 2018 (r342008) @@ -1762,6 +1762,7 @@ dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand | fd dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "fdt_dtb_file" dev/fdt/simplebus.c optional fdt +dev/fdt/simple_mfd.c optional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard dev/filemon/filemon.c optional filemon Added: head/sys/dev/fdt/simple_mfd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/simple_mfd.c Wed Dec 12 21:56:45 2018 (r342008) @@ -0,0 +1,176 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +struct simple_mfd_softc { + struct simplebus_softc sc; +}; + +device_t simple_mfd_add_device(device_t dev, phandle_t node, u_int order, + const char *name, int unit, struct simplebus_devinfo *di); +struct simplebus_devinfo *simple_mfd_setup_dinfo(device_t dev, phandle_t node, struct simplebus_devinfo *di); + +static int +simple_mfd_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "simple-mfd")) + return (ENXIO); + + device_set_desc(dev, "Simple MFD (Multi-Functions Device)"); + + return (BUS_PROBE_GENERIC); +} + +static int +simple_mfd_attach(device_t dev) +{ + struct simple_mfd_softc *sc; + phandle_t node, child; + device_t cdev; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + + /* Parse address-cells and size-cells from the parent node as a fallback */ + if (OF_getencprop(node, "#address-cells", &sc->sc.acells, + sizeof(sc->sc.acells)) == -1) { + if (OF_getencprop(OF_parent(node), "#address-cells", &sc->sc.acells, + sizeof(sc->sc.acells)) == -1) { + sc->sc.acells = 2; + } + } + if (OF_getencprop(node, "#size-cells", &sc->sc.scells, + sizeof(sc->sc.scells)) == -1) { + if (OF_getencprop(OF_parent(node), "#size-cells", &sc->sc.scells, + sizeof(sc->sc.scells)) == -1) { + sc->sc.scells = 1; + } + } + + /* If the node has a ranges prop, parse it so children mapping will be done correctly */ + if (OF_hasprop(node, "ranges")) { + if (simplebus_fill_ranges(node, &sc->sc) < 0) { + device_printf(dev, "could not get ranges\n"); + return (ENXIO); + } + } + + /* Attach child devices */ + for (child = OF_child(node); child > 0; child = OF_peer(child)) { + cdev = simple_mfd_add_device(dev, child, 0, NULL, -1, NULL); + if (cdev != NULL) + device_probe_and_attach(cdev); + } + + return (bus_generic_attach(dev)); +} + +struct simplebus_devinfo * +simple_mfd_setup_dinfo(device_t dev, phandle_t node, + struct simplebus_devinfo *di) +{ + struct simplebus_softc *sc; + struct simplebus_devinfo *ndi; + + sc = device_get_softc(dev); + if (di == NULL) + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + else + ndi = di; + if (ofw_bus_gen_setup_devinfo(&ndi->obdinfo, node) != 0) { + if (di == NULL) + free(ndi, M_DEVBUF); + return (NULL); + } + + /* reg resources is from the parent but interrupts is on the node itself */ + resource_list_init(&ndi->rl); + ofw_bus_reg_to_rl(dev, OF_parent(node), sc->acells, sc->scells, &ndi->rl); + ofw_bus_intr_to_rl(dev, node, &ndi->rl, NULL); + + return (ndi); +} + +device_t +simple_mfd_add_device(device_t dev, phandle_t node, u_int order, + const char *name, int unit, struct simplebus_devinfo *di) +{ + struct simplebus_devinfo *ndi; + device_t cdev; + + if ((ndi = simple_mfd_setup_dinfo(dev, node, di)) == NULL) + return (NULL); + cdev = device_add_child_ordered(dev, order, name, unit); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + ndi->obdinfo.obd_name); + resource_list_free(&ndi->rl); + ofw_bus_gen_destroy_devinfo(&ndi->obdinfo); + if (di == NULL) + free(ndi, M_DEVBUF); + return (NULL); + } + device_set_ivars(cdev, ndi); + + return(cdev); +} + +static device_method_t simple_mfd_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, simple_mfd_probe), + DEVMETHOD(device_attach, simple_mfd_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(simple_mfd, simple_mfd_driver, simple_mfd_methods, + sizeof(struct simple_mfd_softc), simplebus_driver); + +static devclass_t simple_mfd_devclass; + +EARLY_DRIVER_MODULE(simple_mfd, simplebus, simple_mfd_driver, + simple_mfd_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LATE); +MODULE_VERSION(simple_mfd, 1); Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Wed Dec 12 21:25:52 2018 (r342007) +++ head/sys/dev/fdt/simplebus.c Wed Dec 12 21:56:45 2018 (r342008) @@ -62,13 +62,6 @@ static const struct ofw_bus_devinfo *simplebus_get_dev device_t child); /* - * local methods - */ - -static int simplebus_fill_ranges(phandle_t node, - struct simplebus_softc *sc); - -/* * Driver methods. */ static device_method_t simplebus_methods[] = { @@ -184,7 +177,7 @@ simplebus_init(device_t dev, phandle_t node) OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); } -static int +int simplebus_fill_ranges(phandle_t node, struct simplebus_softc *sc) { int host_address_cells; Modified: head/sys/dev/fdt/simplebus.h ============================================================================== --- head/sys/dev/fdt/simplebus.h Wed Dec 12 21:25:52 2018 (r342007) +++ head/sys/dev/fdt/simplebus.h Wed Dec 12 21:56:45 2018 (r342008) @@ -61,4 +61,6 @@ device_t simplebus_add_device(device_t dev, phandle_t const char *name, int unit, struct simplebus_devinfo *di); struct simplebus_devinfo *simplebus_setup_dinfo(device_t dev, phandle_t node, struct simplebus_devinfo *di); +int simplebus_fill_ranges(phandle_t node, + struct simplebus_softc *sc); #endif /* _FDT_SIMPLEBUS_H */ From owner-svn-src-all@freebsd.org Wed Dec 12 21:56:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6DBD1327265; Wed, 12 Dec 2018 21:56:48 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 5E72282F0E; Wed, 12 Dec 2018 21:56:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54C9CE2ED; Wed, 12 Dec 2018 21:56:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCLumu7004451; Wed, 12 Dec 2018 21:56:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCLum13004450; Wed, 12 Dec 2018 21:56:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201812122156.wBCLum13004450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 12 Dec 2018 21:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342009 - head/secure/lib/libcrypto X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/secure/lib/libcrypto X-SVN-Commit-Revision: 342009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E72282F0E X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.50)[-0.500,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 21:56:49 -0000 Author: jkim Date: Wed Dec 12 21:56:47 2018 New Revision: 342009 URL: https://svnweb.freebsd.org/changeset/base/342009 Log: Enable devcryptoeng for OpenSSL. Since OpenSSL 1.1.1, the good old BSD-specific cryptodev engine has been deprecated in favor of this new engine. However, this engine is not throughly tested on FreeBSD because it was originally written for Linux. http://cryptodev-linux.org/ Also, the author actually meant to enable it by default on BSD platforms but he failed to do so because there was a bug in the Configure script. https://github.com/openssl/openssl/pull/7882 Now they found that it was more generic issue. https://github.com/openssl/openssl/pull/7885 Therefore, we need to enable this engine on head to give it more exposure. Modified: head/secure/lib/libcrypto/Makefile head/secure/lib/libcrypto/opensslconf.h.in Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Wed Dec 12 21:56:45 2018 (r342008) +++ head/secure/lib/libcrypto/Makefile Wed Dec 12 21:56:47 2018 (r342009) @@ -192,8 +192,8 @@ SRCS+= ecp_nistz256-x86.S ecp_nistz256.c .endif # engine -SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_dyn.c eng_err.c eng_fat.c -SRCS+= eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c +SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_devcrypto.c eng_dyn.c eng_err.c +SRCS+= eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c SRCS+= eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_digest.c SRCS+= tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c Modified: head/secure/lib/libcrypto/opensslconf.h.in ============================================================================== --- head/secure/lib/libcrypto/opensslconf.h.in Wed Dec 12 21:56:45 2018 (r342008) +++ head/secure/lib/libcrypto/opensslconf.h.in Wed Dec 12 21:56:47 2018 (r342009) @@ -46,9 +46,6 @@ extern "C" { #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE #endif -#ifndef OPENSSL_NO_DEVCRYPTOENG -# define OPENSSL_NO_DEVCRYPTOENG -#endif #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 # define OPENSSL_NO_EC_NISTP_64_GCC_128 #endif From owner-svn-src-all@freebsd.org Wed Dec 12 21:58:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E1A713273C1; Wed, 12 Dec 2018 21:58:31 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 12B9C832F6; Wed, 12 Dec 2018 21:58:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08FE2E2FC; Wed, 12 Dec 2018 21:58:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCLwUp7004699; Wed, 12 Dec 2018 21:58:30 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCLwUYD004697; Wed, 12 Dec 2018 21:58:30 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122158.wBCLwUYD004697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 21:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342010 - in head/sys: arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm64/conf conf X-SVN-Commit-Revision: 342010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 12B9C832F6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.50)[-0.500,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 21:58:31 -0000 Author: manu Date: Wed Dec 12 21:58:30 2018 New Revision: 342010 URL: https://svnweb.freebsd.org/changeset/base/342010 Log: arm64: Add new SoC type MARVELL_8K Sponsored by: Rubicon Communications, LLC ("Netgate") Modified: head/sys/arm64/conf/GENERIC head/sys/conf/options.arm64 Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Dec 12 21:56:47 2018 (r342009) +++ head/sys/arm64/conf/GENERIC Wed Dec 12 21:58:30 2018 (r342010) @@ -107,6 +107,7 @@ options SOC_ALLWINNER_H5 options SOC_CAVM_THUNDERX options SOC_HISI_HI6220 options SOC_BRCM_BCM2837 +options SOC_MARVELL_8K options SOC_ROCKCHIP_RK3328 options SOC_ROCKCHIP_RK3399 options SOC_XILINX_ZYNQ Modified: head/sys/conf/options.arm64 ============================================================================== --- head/sys/conf/options.arm64 Wed Dec 12 21:56:47 2018 (r342009) +++ head/sys/conf/options.arm64 Wed Dec 12 21:58:30 2018 (r342010) @@ -19,6 +19,7 @@ SOC_ALLWINNER_H5 opt_soc.h SOC_BRCM_BCM2837 opt_soc.h SOC_CAVM_THUNDERX opt_soc.h SOC_HISI_HI6220 opt_soc.h +SOC_MARVELL_8K opt_soc.h SOC_ROCKCHIP_RK3328 opt_soc.h SOC_ROCKCHIP_RK3399 opt_soc.h SOC_XILINX_ZYNQ opt_soc.h From owner-svn-src-all@freebsd.org Wed Dec 12 22:00:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 739CA13274E9; Wed, 12 Dec 2018 22:00:06 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 3D334834BB; Wed, 12 Dec 2018 22:00:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3265FE302; Wed, 12 Dec 2018 22:00:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCM067b004861; Wed, 12 Dec 2018 22:00:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCM05kK004858; Wed, 12 Dec 2018 22:00:05 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122200.wBCM05kK004858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342011 - in head/sys: arm/mv arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/mv arm64/conf conf X-SVN-Commit-Revision: 342011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D334834BB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.51)[-0.513,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:00:06 -0000 Author: manu Date: Wed Dec 12 22:00:05 2018 New Revision: 342011 URL: https://svnweb.freebsd.org/changeset/base/342011 Log: arm64: mvebu_pinctrl: Add driver for Marvell Pinmux Controller Add a driver compatible with Marvell mvebu-pinctrl and add ap806-pinctrl support. Sponsored by: Rubicon Communications, LCC ("Netgate") Added: head/sys/arm/mv/mvebu_pinctrl.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Added: head/sys/arm/mv/mvebu_pinctrl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mvebu_pinctrl.c Wed Dec 12 22:00:05 2018 (r342011) @@ -0,0 +1,246 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include + +#include "opt_soc.h" + +#define PINS_PER_REG 8 +#define BITS_PER_PIN 4 +#define PINS_MASK 0xf +#define MAX_PIN_FUNC 5 + +struct mv_pins { + const char *name; + const char *functions[MAX_PIN_FUNC]; +}; + +struct mv_padconf { + const struct mv_pins *pins; + size_t npins; +}; + +#ifdef SOC_MARVELL_8K +const static struct mv_pins ap806_pins[] = { + {"mpp0", {"gpio", "sdio", NULL, "spi0"}}, + {"mpp1", {"gpio", "sdio", NULL, "spi0"}}, + {"mpp2", {"gpio", "sdio", NULL, "spi0"}}, + {"mpp3", {"gpio", "sdio", NULL, "spi0"}}, + {"mpp4", {"gpio", "sdio", NULL, "i2c0"}}, + {"mpp5", {"gpio", "sdio", NULL, "i2c0"}}, + {"mpp6", {"gpio", "sdio", NULL, NULL}}, + {"mpp7", {"gpio", "sdio", NULL, "uart1"}}, + {"mpp8", {"gpio", "sdio", NULL, "uart1"}}, + {"mpp9", {"gpio", "sdio", NULL, "spi0"}}, + {"mpp10", {"gpio", "sdio", NULL, NULL}}, + {"mpp11", {"gpio", NULL, NULL, "uart0"}}, + {"mpp12", {"gpio", "sdio", "sdio", NULL}}, + {"mpp13", {"gpio", NULL, NULL}}, + {"mpp14", {"gpio", NULL, NULL}}, + {"mpp15", {"gpio", NULL, NULL}}, + {"mpp16", {"gpio", NULL, NULL}}, + {"mpp17", {"gpio", NULL, NULL}}, + {"mpp18", {"gpio", NULL, NULL}}, + {"mpp19", {"gpio", NULL, NULL, "uart0", "sdio"}}, +}; + +const struct mv_padconf ap806_padconf = { + .npins = nitems(ap806_pins), + .pins = ap806_pins, +}; +#endif + +struct mv_pinctrl_softc { + device_t dev; + struct resource *res; + + struct mv_padconf *padconf; +}; + +static struct resource_spec mv_pinctrl_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +static struct ofw_compat_data compat_data[] = { +#ifdef SOC_MARVELL_8K + {"marvell,ap806-pinctrl", (uintptr_t)&ap806_padconf}, +#endif + {NULL, 0} +}; + +#define RD4(sc, reg) bus_read_4((sc)->res, (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static void +mv_pinctrl_configure_pin(struct mv_pinctrl_softc *sc, uint32_t pin, + uint32_t function) +{ + uint32_t offset, shift, reg; + + offset = (pin / PINS_PER_REG) * BITS_PER_PIN; + shift = (pin % PINS_PER_REG) * BITS_PER_PIN; + reg = RD4(sc, offset); + reg &= ~(PINS_MASK << shift); + reg |= function << shift; + WR4(sc, offset, reg); +} + +static int +mv_pinctrl_configure_pins(device_t dev, phandle_t cfgxref) +{ + struct mv_pinctrl_softc *sc; + phandle_t node; + char *function; + const char **pins; + int i, pin_num, pin_func, npins; + + sc = device_get_softc(dev); + node = OF_node_from_xref(cfgxref); + + if (OF_getprop_alloc(node, "marvell,function", + (void **)&function) == -1) + return (ENOMEM); + + npins = ofw_bus_string_list_to_array(node, "marvell,pins", &pins); + if (npins == -1) + return (ENOMEM); + + for (i = 0; i < npins; i++) { + for (pin_num = 0; pin_num < sc->padconf->npins; pin_num++) { + if (strcmp(pins[i], sc->padconf->pins[pin_num].name) == 0) + break; + } + if (pin_num == sc->padconf->npins) + continue; + + for (pin_func = 0; pin_func < MAX_PIN_FUNC; pin_func++) + if (sc->padconf->pins[pin_num].functions[pin_func] && + strcmp(function, sc->padconf->pins[pin_num].functions[pin_func]) == 0) + break; + + if (pin_func == MAX_PIN_FUNC) + continue; + + mv_pinctrl_configure_pin(sc, pin_num, pin_func); + } + + OF_prop_free(pins); + + return (0); +} + +static int +mv_pinctrl_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Marvell Pinctrl controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +mv_pinctrl_attach(device_t dev) +{ + struct mv_pinctrl_softc *sc; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->padconf = (struct mv_padconf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; + + if (bus_alloc_resources(dev, mv_pinctrl_res_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + return (ENXIO); + } + + node = ofw_bus_get_node(dev); + + fdt_pinctrl_register(dev, "marvell,pins"); + fdt_pinctrl_configure_tree(dev); + + return (0); +} + +static int +mv_pinctrl_detach(device_t dev) +{ + + return (EBUSY); +} + +static device_method_t mv_pinctrl_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mv_pinctrl_probe), + DEVMETHOD(device_attach, mv_pinctrl_attach), + DEVMETHOD(device_detach, mv_pinctrl_detach), + + /* fdt_pinctrl interface */ + DEVMETHOD(fdt_pinctrl_configure,mv_pinctrl_configure_pins), + + DEVMETHOD_END +}; + +static devclass_t mv_pinctrl_devclass; + +static driver_t mv_pinctrl_driver = { + "mv_pinctrl", + mv_pinctrl_methods, + sizeof(struct mv_pinctrl_softc), +}; + +EARLY_DRIVER_MODULE(mv_pinctrl, simplebus, mv_pinctrl_driver, + mv_pinctrl_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Dec 12 21:58:30 2018 (r342010) +++ head/sys/arm64/conf/GENERIC Wed Dec 12 22:00:05 2018 (r342011) @@ -199,11 +199,12 @@ device muge device smcphy device smsc -# GPIO +# GPIO / PINCTRL device aw_gpio # Allwinner GPIO controller device gpio device gpioled device fdt_pinctrl +device mvebu_pinctrl # Marvell Pinmux Controller # I2C device aw_rsb # Allwinner Reduced Serial Bus Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 21:58:30 2018 (r342010) +++ head/sys/conf/files.arm64 Wed Dec 12 22:00:05 2018 (r342011) @@ -89,6 +89,7 @@ arm/broadcom/bcm2835/bcm2835_vcio.c optional soc_brcm arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm_bcm2837 fdt arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 +arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq arm64/acpica/acpi_machdep.c optional acpi From owner-svn-src-all@freebsd.org Wed Dec 12 22:01:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2FEF1327753; Wed, 12 Dec 2018 22:01:07 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 6B5C9836FD; Wed, 12 Dec 2018 22:01:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61D4CE448; Wed, 12 Dec 2018 22:01:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCM17nR006472; Wed, 12 Dec 2018 22:01:07 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCM17xl006471; Wed, 12 Dec 2018 22:01:07 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122201.wBCM17xl006471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342012 - in head/sys: arm/mv conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/mv conf X-SVN-Commit-Revision: 342012 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B5C9836FD X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.51)[-0.506,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:01:08 -0000 Author: manu Date: Wed Dec 12 22:01:06 2018 New Revision: 342012 URL: https://svnweb.freebsd.org/changeset/base/342012 Log: arm64: marvell: Add driver for Marvell Ap806 System Controller The first two clocks are for the clusters and their frequencies can be found reading a register. Then a fixed 1200Mhz clock is present and two fixed clocks, 'mss' which is 1200 / 6 and 'sdio' which is 1200 / 3. Sponsored by: Rubicon Communications, LLC ("Netgate") Added: head/sys/arm/mv/mv_ap806_clock.c (contents, props changed) Modified: head/sys/conf/files.arm64 Added: head/sys/arm/mv/mv_ap806_clock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mv_ap806_clock.c Wed Dec 12 22:01:06 2018 (r342012) @@ -0,0 +1,210 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include + +static struct clk_fixed_def ap806_clk_cluster_0 = { + .clkdef.id = 0, + .clkdef.name = "ap806-cpu-cluster-0", + .freq = 0, +}; + +static struct clk_fixed_def ap806_clk_cluster_1 = { + .clkdef.id = 1, + .clkdef.name = "ap806-cpu-cluster-1", + .freq = 0, +}; + +static struct clk_fixed_def ap806_clk_fixed = { + .clkdef.id = 2, + .clkdef.name = "ap806-fixed", + .freq = 1200000000, +}; + +/* Thoses are the only exported clocks AFAICT */ + +static const char *mss_parents[] = {"ap806-fixed"}; +static struct clk_fixed_def ap806_clk_mss = { + .clkdef.id = 3, + .clkdef.name = "ap806-mss", + .clkdef.parent_names = mss_parents, + .clkdef.parent_cnt = 1, + .mult = 1, + .div = 6, +}; + +static const char *sdio_parents[] = {"ap806-fixed"}; +static struct clk_fixed_def ap806_clk_sdio = { + .clkdef.id = 4, + .clkdef.name = "ap806-sdio", + .clkdef.parent_names = sdio_parents, + .clkdef.parent_cnt = 1, + .mult = 1, + .div = 3, +}; + +struct mv_ap806_clock_softc { + struct simplebus_softc simplebus_sc; + device_t dev; + struct resource *res; +}; + +static struct resource_spec mv_ap806_clock_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +static struct ofw_compat_data compat_data[] = { + {"marvell,ap806-clock", 1}, + {NULL, 0} +}; + +#define RD4(sc, reg) bus_read_4((sc)->res, (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int +mv_ap806_clock_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Marvell AP806 Clock Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +mv_ap806_clock_attach(device_t dev) +{ + struct mv_ap806_clock_softc *sc; + struct clkdom *clkdom; + uint64_t clock_freq; + uint32_t reg; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, mv_ap806_clock_res_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + return (ENXIO); + } + + /* + * We might miss some combinations + * Those are the only possible ones on the mcbin + */ + reg = RD4(sc, 0x400); + switch (reg & 0x1f) { + case 0x0: + case 0x1: + clock_freq = 2000000000; + break; + case 0x6: + clock_freq = 1800000000; + break; + case 0xd: + clock_freq = 1600000000; + break; + case 0x14: + clock_freq = 1333000000; + break; + default: + device_printf(dev, "Cannot guess clock freq with reg %x\n", reg & 0x1f); + return (ENXIO); + break; + }; + + ap806_clk_cluster_0.freq = clock_freq; + ap806_clk_cluster_1.freq = clock_freq; + clkdom = clkdom_create(dev); + + clknode_fixed_register(clkdom, &ap806_clk_cluster_0); + clknode_fixed_register(clkdom, &ap806_clk_cluster_1); + clknode_fixed_register(clkdom, &ap806_clk_fixed); + clknode_fixed_register(clkdom, &ap806_clk_mss); + clknode_fixed_register(clkdom, &ap806_clk_sdio); + + clkdom_finit(clkdom); + + if (bootverbose) + clkdom_dump(clkdom); + return (0); +} + +static int +mv_ap806_clock_detach(device_t dev) +{ + + return (EBUSY); +} + +static device_method_t mv_ap806_clock_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mv_ap806_clock_probe), + DEVMETHOD(device_attach, mv_ap806_clock_attach), + DEVMETHOD(device_detach, mv_ap806_clock_detach), + + DEVMETHOD_END +}; + +static devclass_t mv_ap806_clock_devclass; + +static driver_t mv_ap806_clock_driver = { + "mv_ap806_clock", + mv_ap806_clock_methods, + sizeof(struct mv_ap806_clock_softc), +}; + +EARLY_DRIVER_MODULE(mv_ap806_clock, simplebus, mv_ap806_clock_driver, + mv_ap806_clock_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_LATE); Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 22:00:05 2018 (r342011) +++ head/sys/conf/files.arm64 Wed Dec 12 22:01:06 2018 (r342012) @@ -90,6 +90,7 @@ arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt +arm/mv/mv_ap806_clock.c optional SOC_MARVELL_8K fdt arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq arm64/acpica/acpi_machdep.c optional acpi From owner-svn-src-all@freebsd.org Wed Dec 12 22:02:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A604A13278A0; Wed, 12 Dec 2018 22:02:58 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 4D71883B3A; Wed, 12 Dec 2018 22:02:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39778E4B6; Wed, 12 Dec 2018 22:02:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCM2wTj009771; Wed, 12 Dec 2018 22:02:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCM2vV2009769; Wed, 12 Dec 2018 22:02:57 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122202.wBCM2vV2009769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342013 - in head/sys: arm/mv arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/mv arm64/conf conf X-SVN-Commit-Revision: 342013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D71883B3A X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.51)[-0.513,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:02:58 -0000 Author: manu Date: Wed Dec 12 22:02:57 2018 New Revision: 342013 URL: https://svnweb.freebsd.org/changeset/base/342013 Log: arm64: mv_gpio: Add Marvell 8K support While here put the interrupts setup in it's own function Sponsored by: Rubicon Communications, LCC ("Netgate") Modified: head/sys/arm/mv/gpio.c head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Wed Dec 12 22:01:06 2018 (r342012) +++ head/sys/arm/mv/gpio.c Wed Dec 12 22:02:57 2018 (r342013) @@ -60,6 +60,10 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" +#ifdef __aarch64__ +#include "opt_soc.h" +#endif + #define GPIO_MAX_INTR_COUNT 8 #define GPIO_PINS_PER_REG 32 #define GPIO_GENERIC_CAP (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ @@ -74,6 +78,7 @@ __FBSDID("$FreeBSD$"); #define DEBOUNCE_CHECK_TICKS ((hz / 1000) * DEBOUNCE_CHECK_MS) struct mv_gpio_softc { + device_t dev; device_t sc_busdev; struct resource * mem_res; int mem_rid; @@ -83,6 +88,7 @@ struct mv_gpio_softc { void *ih_cookie[GPIO_MAX_INTR_COUNT]; bus_space_tag_t bst; bus_space_handle_t bsh; + uint32_t offset; struct mtx mutex; uint8_t pin_num; /* number of GPIO pins */ uint8_t irq_num; /* number of real IRQs occupied by GPIO controller */ @@ -189,9 +195,12 @@ static devclass_t mv_gpio_devclass; DRIVER_MODULE(mv_gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0); -struct ofw_compat_data gpio_controllers[] = { - { "mrvl,gpio", (uintptr_t)true }, - { "marvell,orion-gpio", (uintptr_t)true }, +struct ofw_compat_data compat_data[] = { + { "mrvl,gpio", 1 }, + { "marvell,orion-gpio", 1 }, +#ifdef SOC_MARVELL_8K + { "marvell,armada-8k-gpio", 1 }, +#endif { NULL, 0 } }; @@ -201,7 +210,7 @@ mv_gpio_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_search_compatible(dev, gpio_controllers)->ocd_data == 0) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev, "Marvell Integrated GPIO Controller"); @@ -209,61 +218,75 @@ mv_gpio_probe(device_t dev) } static int -mv_gpio_attach(device_t dev) +mv_gpio_setup_interrupts(struct mv_gpio_softc *sc, phandle_t node) { - int i, size; - struct mv_gpio_softc *sc; - pcell_t pincnt = 0; - pcell_t irq_cells = 0; phandle_t iparent; + pcell_t irq_cells; + int i, size; - sc = (struct mv_gpio_softc *)device_get_softc(dev); - if (sc == NULL) - return (ENXIO); - - if (OF_getencprop(ofw_bus_get_node(dev), "pin-count", &pincnt, - sizeof(pcell_t)) >= 0 || - OF_getencprop(ofw_bus_get_node(dev), "ngpios", &pincnt, - sizeof(pcell_t)) >= 0) { - sc->pin_num = MIN(pincnt, MV_GPIO_MAX_NPINS); - if (bootverbose) - device_printf(dev, "%d pins available\n", sc->pin_num); - } else { - device_printf(dev, "ERROR: no pin-count or ngpios entry found!\n"); - return (ENXIO); - } - - /* Assign generic capabilities to every gpio pin */ - for(i = 0; i < sc->pin_num; i++) - sc->gpio_setup[i].gp_caps = GPIO_GENERIC_CAP; - /* Find root interrupt controller */ - iparent = ofw_bus_find_iparent(ofw_bus_get_node(dev)); + iparent = ofw_bus_find_iparent(node); if (iparent == 0) { - device_printf(dev, "No interrupt-parrent found. " + device_printf(sc->dev, "No interrupt-parrent found. " "Error in DTB\n"); return (ENXIO); } else { /* While at parent - store interrupt cells prop */ if (OF_searchencprop(OF_node_from_xref(iparent), "#interrupt-cells", &irq_cells, sizeof(irq_cells)) == -1) { - device_printf(dev, "DTB: Missing #interrupt-cells " + device_printf(sc->dev, "DTB: Missing #interrupt-cells " "property in interrupt parent node\n"); return (ENXIO); } } - size = OF_getproplen(ofw_bus_get_node(dev), "interrupts"); + size = OF_getproplen(node, "interrupts"); if (size != -1) { size = size / sizeof(pcell_t); size = size / irq_cells; sc->irq_num = size; - device_printf(dev, "%d IRQs available\n", sc->irq_num); + device_printf(sc->dev, "%d IRQs available\n", sc->irq_num); } else { - device_printf(dev, "ERROR: no interrupts entry found!\n"); + device_printf(sc->dev, "ERROR: no interrupts entry found!\n"); return (ENXIO); } + for (i = 0; i < sc->irq_num; i++) { + sc->irq_rid[i] = i; + sc->irq_res[i] = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, + &sc->irq_rid[i], RF_ACTIVE); + if (!sc->irq_res[i]) { + mtx_destroy(&sc->mutex); + device_printf(sc->dev, + "could not allocate gpio%d interrupt\n", i+1); + return (ENXIO); + } + } + + device_printf(sc->dev, "Disable interrupts (offset = %x + EDGE(0x18)\n", sc->offset); + /* Disable all interrupts */ + bus_space_write_4(sc->bst, sc->bsh, sc->offset + GPIO_INT_EDGE_MASK, 0); + device_printf(sc->dev, "Disable interrupts (offset = %x + LEV(0x1C))\n", sc->offset); + bus_space_write_4(sc->bst, sc->bsh, sc->offset + GPIO_INT_LEV_MASK, 0); + + for (i = 0; i < sc->irq_num; i++) { + device_printf(sc->dev, "Setup intr %d\n", i); + if (bus_setup_intr(sc->dev, sc->irq_res[i], + INTR_TYPE_MISC, + (driver_filter_t *)mv_gpio_intr, NULL, + sc, &sc->ih_cookie[i]) != 0) { + mtx_destroy(&sc->mutex); + bus_release_resource(sc->dev, SYS_RES_IRQ, + sc->irq_rid[i], sc->irq_res[i]); + device_printf(sc->dev, "could not set up intr %d\n", i); + return (ENXIO); + } + } + + /* Clear interrupt status. */ + device_printf(sc->dev, "Clear int status (offset = %x)\n", sc->offset); + bus_space_write_4(sc->bst, sc->bsh, sc->offset + GPIO_INT_CAUSE, 0); + sc->debounce_callouts = (struct callout **)malloc(sc->pin_num * sizeof(struct callout *), M_DEVBUF, M_WAITOK | M_ZERO); if (sc->debounce_callouts == NULL) @@ -274,11 +297,46 @@ mv_gpio_attach(device_t dev) if (sc->debounce_counters == NULL) return (ENOMEM); + return (0); +} + +static int +mv_gpio_attach(device_t dev) +{ + int i, rv; + struct mv_gpio_softc *sc; + phandle_t node; + pcell_t pincnt = 0; + + sc = (struct mv_gpio_softc *)device_get_softc(dev); + if (sc == NULL) + return (ENXIO); + + node = ofw_bus_get_node(dev); + sc->dev = dev; + + if (OF_getencprop(node, "pin-count", &pincnt, sizeof(pcell_t)) >= 0 || + OF_getencprop(node, "ngpios", &pincnt, sizeof(pcell_t)) >= 0) { + sc->pin_num = MIN(pincnt, MV_GPIO_MAX_NPINS); + if (bootverbose) + device_printf(dev, "%d pins available\n", sc->pin_num); + } else { + device_printf(dev, "ERROR: no pin-count or ngpios entry found!\n"); + return (ENXIO); + } + + if (OF_getencprop(node, "offset", &sc->offset, sizeof(sc->offset)) == -1) + sc->offset = 0; + + /* Assign generic capabilities to every gpio pin */ + for(i = 0; i < sc->pin_num; i++) + sc->gpio_setup[i].gp_caps = GPIO_GENERIC_CAP; + mtx_init(&sc->mutex, device_get_nameunit(dev), NULL, MTX_SPIN); sc->mem_rid = 0; sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, - RF_ACTIVE); + RF_ACTIVE | RF_SHAREABLE ); if (!sc->mem_res) { mtx_destroy(&sc->mutex); @@ -289,38 +347,10 @@ mv_gpio_attach(device_t dev) sc->bst = rman_get_bustag(sc->mem_res); sc->bsh = rman_get_bushandle(sc->mem_res); - for (i = 0; i < sc->irq_num; i++) { - sc->irq_rid[i] = i; - sc->irq_res[i] = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &sc->irq_rid[i], RF_ACTIVE); - if (!sc->irq_res[i]) { - mtx_destroy(&sc->mutex); - device_printf(dev, - "could not allocate gpio%d interrupt\n", i+1); - return (ENXIO); - } - } + rv = mv_gpio_setup_interrupts(sc, node); + if (rv != 0) + return (rv); - /* Disable all interrupts */ - bus_space_write_4(sc->bst, sc->bsh, GPIO_INT_EDGE_MASK, 0); - bus_space_write_4(sc->bst, sc->bsh, GPIO_INT_LEV_MASK, 0); - - for (i = 0; i < sc->irq_num; i++) { - if (bus_setup_intr(dev, sc->irq_res[i], - INTR_TYPE_MISC, - (driver_filter_t *)mv_gpio_intr, NULL, - sc, &sc->ih_cookie[i]) != 0) { - mtx_destroy(&sc->mutex); - bus_release_resource(dev, SYS_RES_IRQ, - sc->irq_rid[i], sc->irq_res[i]); - device_printf(dev, "could not set up intr %d\n", i); - return (ENXIO); - } - } - - /* Clear interrupt status. */ - bus_space_write_4(sc->bst, sc->bsh, GPIO_INT_CAUSE, 0); - sc->sc_busdev = gpiobus_attach_bus(dev); if (sc->sc_busdev == NULL) { mtx_destroy(&sc->mutex); @@ -540,6 +570,8 @@ mv_gpio_configure(device_t dev, uint32_t pin, uint32_t return (EINVAL); if (mask & MV_GPIO_IN_DEBOUNCE) { + if (sc->irq_num == 0) + return (EINVAL); error = mv_gpio_debounce_prepare(dev, pin); if (error != 0) return (error); @@ -845,7 +877,7 @@ mv_gpio_reg_read(device_t dev, uint32_t reg) struct mv_gpio_softc *sc; sc = (struct mv_gpio_softc *)device_get_softc(dev); - return (bus_space_read_4(sc->bst, sc->bsh, reg)); + return (bus_space_read_4(sc->bst, sc->bsh, sc->offset + reg)); } static void @@ -854,7 +886,7 @@ mv_gpio_reg_write(device_t dev, uint32_t reg, uint32_t struct mv_gpio_softc *sc; sc = (struct mv_gpio_softc *)device_get_softc(dev); - bus_space_write_4(sc->bst, sc->bsh, reg, val); + bus_space_write_4(sc->bst, sc->bsh, sc->offset + reg, val); } static void Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Dec 12 22:01:06 2018 (r342012) +++ head/sys/arm64/conf/GENERIC Wed Dec 12 22:02:57 2018 (r342013) @@ -204,6 +204,7 @@ device aw_gpio # Allwinner GPIO controller device gpio device gpioled device fdt_pinctrl +device mv_gpio # Marvell GPIO controller device mvebu_pinctrl # Marvell Pinmux Controller # I2C Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 22:01:06 2018 (r342012) +++ head/sys/conf/files.arm64 Wed Dec 12 22:02:57 2018 (r342013) @@ -89,6 +89,7 @@ arm/broadcom/bcm2835/bcm2835_vcio.c optional soc_brcm arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm_bcm2837 fdt arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 +arm/mv/gpio.c optional mv_gpio fdt arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt arm/mv/mv_ap806_clock.c optional SOC_MARVELL_8K fdt arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt From owner-svn-src-all@freebsd.org Wed Dec 12 22:04:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1B661327A02; Wed, 12 Dec 2018 22:04:22 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 7298F83D73; Wed, 12 Dec 2018 22:04:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61C78E4B7; Wed, 12 Dec 2018 22:04:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCM4MEo009870; Wed, 12 Dec 2018 22:04:22 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCM4L4F009867; Wed, 12 Dec 2018 22:04:21 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122204.wBCM4L4F009867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342014 - in head/sys: arm/mv conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/mv conf X-SVN-Commit-Revision: 342014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7298F83D73 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.51)[-0.513,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:04:23 -0000 Author: manu Date: Wed Dec 12 22:04:21 2018 New Revision: 342014 URL: https://svnweb.freebsd.org/changeset/base/342014 Log: arm64: marvell: Add cp110 clock controller support The cp110 clock controller controls the clocks and gate of the CP110 hardware block. Every clock/gate are implemented except the NAND clock. Sponsored by: Rubicon Communications, LLC ("Netgate") Added: head/sys/arm/mv/mv_cp110_clock.c (contents, props changed) head/sys/arm/mv/mv_cp110_clock.h (contents, props changed) Modified: head/sys/conf/files.arm64 Added: head/sys/arm/mv/mv_cp110_clock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mv_cp110_clock.c Wed Dec 12 22:04:21 2018 (r342014) @@ -0,0 +1,375 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include + +#include "clkdev_if.h" + +/* Clocks */ +static struct clk_fixed_def cp110_clk_pll_0 = { + .clkdef.id = CP110_PLL_0, + .freq = 1000000000, +}; + +static const char *clk_parents_0[] = {"cp110-pll0-0"}; +static const char *clk_parents_1[] = {"cp110-pll0-1"}; + +static struct clk_fixed_def cp110_clk_ppv2_core = { + .clkdef.id = CP110_PPV2_CORE, + .clkdef.parent_cnt = 1, + .mult = 1, + .div = 3, +}; + +static struct clk_fixed_def cp110_clk_x2core = { + .clkdef.id = CP110_X2CORE, + .clkdef.parent_cnt = 1, + .mult = 1, + .div = 2, +}; + +static const char *core_parents_0[] = {"cp110-x2core-0"}; +static const char *core_parents_1[] = {"cp110-x2core-1"}; + +static struct clk_fixed_def cp110_clk_core = { + .clkdef.id = CP110_CORE, + .clkdef.parent_cnt = 1, + .mult = 1, + .div = 2, +}; + +static struct clk_fixed_def cp110_clk_sdio = { + .clkdef.id = CP110_SDIO, + .clkdef.parent_cnt = 1, + .mult = 2, + .div = 5, +}; + +/* Gates */ + +static struct cp110_gate cp110_gates[] = { + CCU_GATE(CP110_GATE_AUDIO, "cp110-gate-audio", 0) + CCU_GATE(CP110_GATE_COMM_UNIT, "cp110-gate-comm_unit", 1) + /* CCU_GATE(CP110_GATE_NAND, "cp110-gate-nand", 2) */ + CCU_GATE(CP110_GATE_PPV2, "cp110-gate-ppv2", 3) + CCU_GATE(CP110_GATE_SDIO, "cp110-gate-sdio", 4) + CCU_GATE(CP110_GATE_MG, "cp110-gate-mg", 5) + CCU_GATE(CP110_GATE_MG_CORE, "cp110-gate-mg_core", 6) + CCU_GATE(CP110_GATE_XOR1, "cp110-gate-xor1", 7) + CCU_GATE(CP110_GATE_XOR0, "cp110-gate-xor0", 8) + CCU_GATE(CP110_GATE_GOP_DP, "cp110-gate-gop_dp", 9) + CCU_GATE(CP110_GATE_PCIE_X1_0, "cp110-gate-pcie_x10", 11) + CCU_GATE(CP110_GATE_PCIE_X1_1, "cp110-gate-pcie_x11", 12) + CCU_GATE(CP110_GATE_PCIE_X4, "cp110-gate-pcie_x4", 13) + CCU_GATE(CP110_GATE_PCIE_XOR, "cp110-gate-pcie_xor", 14) + CCU_GATE(CP110_GATE_SATA, "cp110-gate-sata", 15) + CCU_GATE(CP110_GATE_SATA_USB, "cp110-gate-sata_usb", 16) + CCU_GATE(CP110_GATE_MAIN, "cp110-gate-main", 17) + CCU_GATE(CP110_GATE_SDMMC_GOP, "cp110-gate-sdmmc_gop", 18) + CCU_GATE(CP110_GATE_SLOW_IO, "cp110-gate-slow_io", 21) + CCU_GATE(CP110_GATE_USB3H0, "cp110-gate-usb3h0", 22) + CCU_GATE(CP110_GATE_USB3H1, "cp110-gate-usb3h1", 23) + CCU_GATE(CP110_GATE_USB3DEV, "cp110-gate-usb3dev", 24) + CCU_GATE(CP110_GATE_EIP150, "cp110-gate-eip150", 25) + CCU_GATE(CP110_GATE_EIP197, "cp110-gate-eip197", 26) +}; + +struct mv_cp110_clock_softc { + struct simplebus_softc simplebus_sc; + device_t dev; + struct resource *res; + struct mtx mtx; +}; + +static struct resource_spec mv_cp110_clock_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +static struct ofw_compat_data compat_data[] = { + {"marvell,cp110-clock", 1}, + {NULL, 0} +}; + +#define RD4(sc, reg) bus_read_4((sc)->res, (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static char * +mv_cp110_clock_name(device_t dev, const char *name) +{ + char *clkname = NULL; + int unit; + + unit = device_get_unit(dev); + if (asprintf(&clkname, M_DEVBUF, "%s-%d", name, unit) <= 0) + panic("Cannot generate unique clock name for %s\n", name); + return (clkname); +} + +static int +mv_cp110_clock_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Marvell CP110 Clock Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +cp110_ofw_map(struct clkdom *clkdom, uint32_t ncells, + phandle_t *cells, struct clknode **clk) +{ + int id = 0; + + if (ncells != 2) + return (ENXIO); + + id = cells[1]; + if (cells[0] == 1) + id += CP110_MAX_CLOCK; + + *clk = clknode_find_by_id(clkdom, id); + + return (0); +} + +static int +mv_cp110_clock_attach(device_t dev) +{ + struct mv_cp110_clock_softc *sc; + struct clkdom *clkdom; + struct clk_gate_def def; + char *pll0_name; + int unit, i; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, mv_cp110_clock_res_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + return (ENXIO); + } + + unit = device_get_unit(dev); + if (unit > 1) { + device_printf(dev, "Bogus cp110-system-controller unit %d\n", unit); + return (ENXIO); + } + + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + clkdom = clkdom_create(dev); + clkdom_set_ofw_mapper(clkdom, cp110_ofw_map); + + pll0_name = mv_cp110_clock_name(dev, "cp110-pll0"); + cp110_clk_pll_0.clkdef.name = pll0_name; + clknode_fixed_register(clkdom, &cp110_clk_pll_0); + + cp110_clk_ppv2_core.clkdef.name = mv_cp110_clock_name(dev, "cp110-ppv2"); + cp110_clk_ppv2_core.clkdef.parent_names = (unit == 0) ? clk_parents_0 : clk_parents_1; + clknode_fixed_register(clkdom, &cp110_clk_ppv2_core); + + cp110_clk_x2core.clkdef.name = mv_cp110_clock_name(dev, "cp110-x2core"); + cp110_clk_x2core.clkdef.parent_names = (unit == 0) ? clk_parents_0 : clk_parents_1; + clknode_fixed_register(clkdom, &cp110_clk_x2core); + + cp110_clk_core.clkdef.name = mv_cp110_clock_name(dev, "cp110-core"); + cp110_clk_core.clkdef.parent_names = (unit == 0) ? core_parents_0 : core_parents_1; + clknode_fixed_register(clkdom, &cp110_clk_core); + + /* NAND missing */ + + cp110_clk_sdio.clkdef.name = mv_cp110_clock_name(dev, "cp110-sdio"); + cp110_clk_sdio.clkdef.parent_names = (unit == 0) ? clk_parents_0 : clk_parents_1; + clknode_fixed_register(clkdom, &cp110_clk_sdio); + + for (i = 0; i < nitems(cp110_gates); i++) { + if (cp110_gates[i].name == NULL) + continue; + + memset(&def, 0, sizeof(def)); + def.clkdef.id = CP110_MAX_CLOCK + i; + def.clkdef.name = mv_cp110_clock_name(dev, cp110_gates[i].name); + def.clkdef.parent_cnt = 1; + def.offset = CP110_CLOCK_GATING_OFFSET; + def.shift = cp110_gates[i].shift; + def.mask = 1; + def.on_value = 1; + def.off_value = 0; + + switch (i) { + case CP110_GATE_MG: + case CP110_GATE_GOP_DP: + case CP110_GATE_PPV2: + def.clkdef.parent_names = &cp110_clk_ppv2_core.clkdef.name; + break; + case CP110_GATE_SDIO: + def.clkdef.parent_names = &cp110_clk_sdio.clkdef.name; + break; + case CP110_GATE_MAIN: + case CP110_GATE_PCIE_XOR: + case CP110_GATE_PCIE_X4: + case CP110_GATE_EIP150: + case CP110_GATE_EIP197: + def.clkdef.parent_names = &cp110_clk_x2core.clkdef.name; + break; + default: + def.clkdef.parent_names = &cp110_clk_core.clkdef.name; + break; + } + + clknode_gate_register(clkdom, &def); + } + + clkdom_finit(clkdom); + + if (bootverbose) + clkdom_dump(clkdom); + + return (0); +} + +static int +mv_cp110_clock_detach(device_t dev) +{ + + return (EBUSY); +} + +static int +mv_cp110_clock_write_4(device_t dev, bus_addr_t addr, uint32_t val) +{ + struct mv_cp110_clock_softc *sc; + + sc = device_get_softc(dev); + WR4(sc, addr, val); + return (0); +} + +static int +mv_cp110_clock_read_4(device_t dev, bus_addr_t addr, uint32_t *val) +{ + struct mv_cp110_clock_softc *sc; + + sc = device_get_softc(dev); + + *val = RD4(sc, addr); + return (0); +} + +static int +mv_cp110_clock_modify_4(device_t dev, bus_addr_t addr, uint32_t clr, uint32_t set) +{ + struct mv_cp110_clock_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + + reg = RD4(sc, addr); + reg &= ~clr; + reg |= set; + WR4(sc, addr, reg); + + return (0); +} + +static void +mv_cp110_clock_device_lock(device_t dev) +{ + struct mv_cp110_clock_softc *sc; + + sc = device_get_softc(dev); + mtx_lock(&sc->mtx); +} + +static void +mv_cp110_clock_device_unlock(device_t dev) +{ + struct mv_cp110_clock_softc *sc; + + sc = device_get_softc(dev); + mtx_unlock(&sc->mtx); +} + +static device_method_t mv_cp110_clock_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mv_cp110_clock_probe), + DEVMETHOD(device_attach, mv_cp110_clock_attach), + DEVMETHOD(device_detach, mv_cp110_clock_detach), + + /* clkdev interface */ + DEVMETHOD(clkdev_write_4, mv_cp110_clock_write_4), + DEVMETHOD(clkdev_read_4, mv_cp110_clock_read_4), + DEVMETHOD(clkdev_modify_4, mv_cp110_clock_modify_4), + DEVMETHOD(clkdev_device_lock, mv_cp110_clock_device_lock), + DEVMETHOD(clkdev_device_unlock, mv_cp110_clock_device_unlock), + + DEVMETHOD_END +}; + +static devclass_t mv_cp110_clock_devclass; + +static driver_t mv_cp110_clock_driver = { + "mv_cp110_clock", + mv_cp110_clock_methods, + sizeof(struct mv_cp110_clock_softc), +}; + +EARLY_DRIVER_MODULE(mv_cp110_clock, simplebus, mv_cp110_clock_driver, + mv_cp110_clock_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_LATE); Added: head/sys/arm/mv/mv_cp110_clock.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mv_cp110_clock.h Wed Dec 12 22:04:21 2018 (r342014) @@ -0,0 +1,82 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#ifndef _MV_CP110_SYSCON_H_ +#define _MV_CP110_SYSCON_H_ + +enum mv_cp110_clk_id { + CP110_PLL_0 = 0, + CP110_PPV2_CORE, + CP110_X2CORE, + CP110_CORE, + CP110_NAND, + CP110_SDIO, + CP110_MAX_CLOCK +}; + +/* Gates */ +#define CP110_CLOCK_GATING_OFFSET 0x220 + +struct cp110_gate { + const char *name; + uint32_t shift; +}; + +#define CCU_GATE(idx, clkname, s) \ + [idx] = { \ + .name = clkname, \ + .shift = s, \ + }, + +#define CP110_GATE_AUDIO 0 +#define CP110_GATE_COMM_UNIT 1 +#define CP110_GATE_NAND 2 +#define CP110_GATE_PPV2 3 +#define CP110_GATE_SDIO 4 +#define CP110_GATE_MG 5 +#define CP110_GATE_MG_CORE 6 +#define CP110_GATE_XOR1 7 +#define CP110_GATE_XOR0 8 +#define CP110_GATE_GOP_DP 9 +#define CP110_GATE_PCIE_X1_0 11 +#define CP110_GATE_PCIE_X1_1 12 +#define CP110_GATE_PCIE_X4 13 +#define CP110_GATE_PCIE_XOR 14 +#define CP110_GATE_SATA 15 +#define CP110_GATE_SATA_USB 16 +#define CP110_GATE_MAIN 17 +#define CP110_GATE_SDMMC_GOP 18 +#define CP110_GATE_SLOW_IO 21 +#define CP110_GATE_USB3H0 22 +#define CP110_GATE_USB3H1 23 +#define CP110_GATE_USB3DEV 24 +#define CP110_GATE_EIP150 25 +#define CP110_GATE_EIP197 26 + +#endif Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 22:02:57 2018 (r342013) +++ head/sys/conf/files.arm64 Wed Dec 12 22:04:21 2018 (r342014) @@ -92,6 +92,7 @@ arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcot arm/mv/gpio.c optional mv_gpio fdt arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt arm/mv/mv_ap806_clock.c optional SOC_MARVELL_8K fdt +arm/mv/mv_cp110_clock.c optional SOC_MARVELL_8K fdt arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq arm64/acpica/acpi_machdep.c optional acpi From owner-svn-src-all@freebsd.org Wed Dec 12 22:05:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D23FD1327AD9; Wed, 12 Dec 2018 22:05:08 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 75D0E83F21; Wed, 12 Dec 2018 22:05:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56A97E4B8; Wed, 12 Dec 2018 22:05:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCM58Iu009956; Wed, 12 Dec 2018 22:05:08 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCM57lG009952; Wed, 12 Dec 2018 22:05:07 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122205.wBCM57lG009952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342015 - in head/sys: conf dev/iicbus/twsi X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: conf dev/iicbus/twsi X-SVN-Commit-Revision: 342015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 75D0E83F21 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.51)[-0.506,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:05:09 -0000 Author: manu Date: Wed Dec 12 22:05:07 2018 New Revision: 342015 URL: https://svnweb.freebsd.org/changeset/base/342015 Log: twsi: Clean up marvell part and add support for Marvell 7k/8k Sponsored by: Rubicon Communications, LLC ("Netgate") Modified: head/sys/conf/files.arm64 head/sys/dev/iicbus/twsi/mv_twsi.c head/sys/dev/iicbus/twsi/twsi.c head/sys/dev/iicbus/twsi/twsi.h Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 22:04:21 2018 (r342014) +++ head/sys/conf/files.arm64 Wed Dec 12 22:05:07 2018 (r342015) @@ -201,6 +201,7 @@ dev/axgbe/xgbe-dev.c optional axgbe dev/axgbe/xgbe-drv.c optional axgbe dev/axgbe/xgbe-mdio.c optional axgbe dev/cpufreq/cpufreq_dt.c optional cpufreq fdt +dev/iicbus/twsi/mv_twsi.c optional twsi fdt dev/iicbus/twsi/a10_twsi.c optional twsi fdt dev/iicbus/twsi/twsi.c optional twsi fdt dev/hwpmc/hwpmc_arm64.c optional hwpmc Modified: head/sys/dev/iicbus/twsi/mv_twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/mv_twsi.c Wed Dec 12 22:04:21 2018 (r342014) +++ head/sys/dev/iicbus/twsi/mv_twsi.c Wed Dec 12 22:05:07 2018 (r342015) @@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -98,6 +100,7 @@ static int mv_twsi_attach(device_t); static struct ofw_compat_data compat_data[] = { { "mrvl,twsi", true }, { "marvell,mv64xxx-i2c", true }, + { "marvell,mv78230-i2c", true }, { NULL, false } }; @@ -141,29 +144,27 @@ mv_twsi_probe(device_t dev) if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); - sc->reg_data = TWSI_DATA; - sc->reg_slave_addr = TWSI_ADDR; - sc->reg_slave_ext_addr = TWSI_XADDR; - sc->reg_control = TWSI_CNTR; - sc->reg_status = TWSI_STAT; - sc->reg_baud_rate = TWSI_BAUD_RATE; - sc->reg_soft_reset = TWSI_SRST; - device_set_desc(dev, "Marvell Integrated I2C Bus Controller"); return (BUS_PROBE_DEFAULT); } #define ABSSUB(a,b) (((a) > (b)) ? (a) - (b) : (b) - (a)) static void -mv_twsi_cal_baud_rate(const uint32_t target, struct twsi_baud_rate *rate) +mv_twsi_cal_baud_rate(struct twsi_softc *sc, const uint32_t target, + struct twsi_baud_rate *rate) { - uint32_t clk, cur, diff, diff0; + uint64_t clk; + uint32_t cur, diff, diff0; int m, n, m0, n0; /* Calculate baud rate. */ m0 = n0 = 4; /* Default values on reset */ diff0 = 0xffffffff; +#ifdef __aarch64__ + clk_get_freq(sc->clk_core, &clk); +#else clk = get_tclk(); +#endif for (n = 0; n < 8; n++) { for (m = 0; m < 16; m++) { @@ -186,17 +187,37 @@ static int mv_twsi_attach(device_t dev) { struct twsi_softc *sc; - phandle_t child, iicbusnode; - device_t childdev; - struct iicbus_ivar *devi; - char dname[32]; /* 32 is taken from struct u_device */ - uint32_t paddr; - int len, error, ret; +#ifdef __aarch64__ + int error; +#endif sc = device_get_softc(dev); + sc->dev = dev; - mv_twsi_cal_baud_rate(TWSI_BAUD_RATE_SLOW, &sc->baud_rate[IIC_SLOW]); - mv_twsi_cal_baud_rate(TWSI_BAUD_RATE_FAST, &sc->baud_rate[IIC_FAST]); +#ifdef __aarch64__ + /* Activate clock */ + error = clk_get_by_ofw_index(dev, 0, 0, &sc->clk_core); + if (error != 0) { + device_printf(dev, "could not find core clock\n"); + return (error); + } + error = clk_enable(sc->clk_core); + if (error != 0) { + device_printf(dev, "could not enable core clock\n"); + return (error); + } + + if (clk_get_by_ofw_index(dev, 0, 1, &sc->clk_reg) == 0) { + error = clk_enable(sc->clk_reg); + if (error != 0) { + device_printf(dev, "could not enable core clock\n"); + return (error); + } + } +#endif + + mv_twsi_cal_baud_rate(sc, TWSI_BAUD_RATE_SLOW, &sc->baud_rate[IIC_SLOW]); + mv_twsi_cal_baud_rate(sc, TWSI_BAUD_RATE_FAST, &sc->baud_rate[IIC_FAST]); if (bootverbose) device_printf(dev, "calculated baud rates are:\n" " %" PRIu32 " kHz (M=%d, N=%d) for slow,\n" @@ -208,56 +229,13 @@ mv_twsi_attach(device_t dev) sc->baud_rate[IIC_FAST].m, sc->baud_rate[IIC_FAST].n); + sc->reg_data = TWSI_DATA; + sc->reg_slave_addr = TWSI_ADDR; + sc->reg_slave_ext_addr = TWSI_XADDR; + sc->reg_control = TWSI_CNTR; + sc->reg_status = TWSI_STAT; + sc->reg_baud_rate = TWSI_BAUD_RATE; + sc->reg_soft_reset = TWSI_SRST; - ret = twsi_attach(dev); - if (ret != 0) - return (ret); - - iicbusnode = 0; - /* Find iicbus as the child devices in the device tree. */ - for (child = OF_child(ofw_bus_get_node(dev)); child != 0; - child = OF_peer(child)) { - len = OF_getproplen(child, "model"); - if (len <= 0 || len > sizeof(dname)) - continue; - error = OF_getprop(child, "model", &dname, len); - if (error == -1) - continue; - len = strlen(dname); - if (len == strlen(IICBUS_DEVNAME) && - strncasecmp(dname, IICBUS_DEVNAME, len) == 0) { - iicbusnode = child; - break; - } - } - if (iicbusnode == 0) - goto attach_end; - - /* Attach child devices onto iicbus. */ - for (child = OF_child(iicbusnode); child != 0; child = OF_peer(child)) { - /* Get slave address. */ - error = OF_getencprop(child, "i2c-address", &paddr, sizeof(paddr)); - if (error == -1) - error = OF_getencprop(child, "reg", &paddr, sizeof(paddr)); - if (error == -1) - continue; - - /* Get device driver name. */ - len = OF_getproplen(child, "model"); - if (len <= 0 || len > sizeof(dname)) - continue; - OF_getprop(child, "model", &dname, len); - - if (bootverbose) - device_printf(dev, "adding a device %s at %d.\n", - dname, paddr); - childdev = BUS_ADD_CHILD(sc->iicbus, 0, dname, -1); - devi = IICBUS_IVAR(childdev); - devi->addr = paddr; - } - -attach_end: - bus_generic_attach(sc->iicbus); - - return (0); + return (twsi_attach(dev)); } Modified: head/sys/dev/iicbus/twsi/twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/twsi.c Wed Dec 12 22:04:21 2018 (r342014) +++ head/sys/dev/iicbus/twsi/twsi.c Wed Dec 12 22:05:07 2018 (r342015) @@ -440,6 +440,7 @@ twsi_detach(device_t dev) int rv; sc = device_get_softc(dev); + debugf(""); if ((rv = bus_generic_detach(dev)) != 0) return (rv); Modified: head/sys/dev/iicbus/twsi/twsi.h ============================================================================== --- head/sys/dev/iicbus/twsi/twsi.h Wed Dec 12 22:04:21 2018 (r342014) +++ head/sys/dev/iicbus/twsi/twsi.h Wed Dec 12 22:05:07 2018 (r342015) @@ -34,6 +34,8 @@ #ifndef _TWSI_H_ #define _TWSI_H_ +#include + struct twsi_baud_rate { uint32_t raw; int param; @@ -46,6 +48,8 @@ struct twsi_softc { struct resource *res[1]; /* SYS_RES_MEMORY */ struct mtx mutex; device_t iicbus; + clk_t clk_core; + clk_t clk_reg; bus_size_t reg_data; bus_size_t reg_slave_addr; From owner-svn-src-all@freebsd.org Wed Dec 12 22:08:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27E011327C84; Wed, 12 Dec 2018 22:08:45 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 CC04484145; Wed, 12 Dec 2018 22:08:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C14C9E4BA; Wed, 12 Dec 2018 22:08:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCM8iqD010133; Wed, 12 Dec 2018 22:08:44 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCM8iKs010129; Wed, 12 Dec 2018 22:08:44 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122208.wBCM8iKs010129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342016 - in head/sys: arm/mv arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/mv arm64/conf conf X-SVN-Commit-Revision: 342016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CC04484145 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.34 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.52)[-0.519,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-0.82)[-0.818,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:08:45 -0000 Author: manu Date: Wed Dec 12 22:08:43 2018 New Revision: 342016 URL: https://svnweb.freebsd.org/changeset/base/342016 Log: arm64: Add mv_cp110_icu and mv_cp110_gicp icu is a interrupt concentrator in the CP110 block and gicp is a gic extension to allow interrupts in the CP block to be turned into GIC SPI interrupts Sponsored by: Rubicon Communications, LLC ("Netgate") Added: head/sys/arm/mv/mv_ap806_gicp.c (contents, props changed) head/sys/arm/mv/mv_cp110_icu.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Added: head/sys/arm/mv/mv_ap806_gicp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mv_ap806_gicp.c Wed Dec 12 22:08:43 2018 (r342016) @@ -0,0 +1,289 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include "pic_if.h" + +#define MV_AP806_GICP_MAX_NIRQS 207 + +struct mv_ap806_gicp_softc { + device_t dev; + device_t parent; + struct resource *res; + + ssize_t spi_ranges_cnt; + uint32_t *spi_ranges; +}; + +static struct ofw_compat_data compat_data[] = { + {"marvell,ap806-gicp", 1}, + {NULL, 0} +}; + +#define RD4(sc, reg) bus_read_4((sc)->res, (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int +mv_ap806_gicp_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Marvell GICP"); + return (BUS_PROBE_DEFAULT); +} + +static int +mv_ap806_gicp_attach(device_t dev) +{ + struct mv_ap806_gicp_softc *sc; + phandle_t node, xref, intr_parent; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + /* Look for our parent */ + if ((intr_parent = ofw_bus_find_iparent(node)) == 0) { + device_printf(dev, "Cannot find our parent interrupt controller\n"); + return (ENXIO); + } + if ((sc->parent = OF_device_from_xref(intr_parent)) == NULL) { + device_printf(dev, "cannot find parent interrupt controller device\n"); + return (ENXIO); + } + + sc->spi_ranges_cnt = OF_getencprop_alloc(node, "marvell,spi-ranges", + (void **)&sc->spi_ranges); + + xref = OF_xref_from_node(node); + if (intr_pic_register(dev, xref) == NULL) { + device_printf(dev, "Cannot register GICP\n"); + return (ENXIO); + } + + OF_device_register_xref(xref, dev); + + return (0); +} + +static int +mv_ap806_gicp_detach(device_t dev) +{ + + return (EBUSY); +} + +static int +mv_ap806_gicp_activate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_ACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static void +mv_ap806_gicp_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_ENABLE_INTR(sc->parent, isrc); +} + +static void +mv_ap806_gicp_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_DISABLE_INTR(sc->parent, isrc); +} + +static int +mv_ap806_gicp_map_intr(device_t dev, struct intr_map_data *data, + struct intr_irqsrc **isrcp) +{ + struct mv_ap806_gicp_softc *sc; + struct intr_map_data_fdt *daf; + uint32_t group, irq_num, irq_type; + int i; + + sc = device_get_softc(dev); + + if (data->type != INTR_MAP_DATA_FDT) + return (ENOTSUP); + + daf = (struct intr_map_data_fdt *)data; + if (daf->ncells != 3 || daf->cells[0] >= MV_AP806_GICP_MAX_NIRQS) + return (EINVAL); + + group = daf->cells[0]; + irq_num = daf->cells[1]; + irq_type = daf->cells[2]; + + /* Map the interrupt number to spi number */ + for (i = 0; i < sc->spi_ranges_cnt / 2; i += 2) { + if (irq_num < sc->spi_ranges[i + 1]) { + irq_num += sc->spi_ranges[i]; + break; + } + + irq_num -= sc->spi_ranges[i]; + } + + daf->cells[1] = irq_num - 32; + + return (PIC_MAP_INTR(sc->parent, data, isrcp)); +} + +static int +mv_ap806_gicp_deactivate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_DEACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static int +mv_ap806_gicp_setup_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_SETUP_INTR(sc->parent, isrc, res, data)); +} + +static int +mv_ap806_gicp_teardown_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_TEARDOWN_INTR(sc->parent, isrc, res, data)); +} + +static void +mv_ap806_gicp_pre_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_PRE_ITHREAD(sc->parent, isrc); +} + +static void +mv_ap806_gicp_post_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_ITHREAD(sc->parent, isrc); +} + +static void +mv_ap806_gicp_post_filter(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_ap806_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_FILTER(sc->parent, isrc); +} + +static device_method_t mv_ap806_gicp_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mv_ap806_gicp_probe), + DEVMETHOD(device_attach, mv_ap806_gicp_attach), + DEVMETHOD(device_detach, mv_ap806_gicp_detach), + + /* Interrupt controller interface */ + DEVMETHOD(pic_activate_intr, mv_ap806_gicp_activate_intr), + DEVMETHOD(pic_disable_intr, mv_ap806_gicp_disable_intr), + DEVMETHOD(pic_enable_intr, mv_ap806_gicp_enable_intr), + DEVMETHOD(pic_map_intr, mv_ap806_gicp_map_intr), + DEVMETHOD(pic_deactivate_intr, mv_ap806_gicp_deactivate_intr), + DEVMETHOD(pic_setup_intr, mv_ap806_gicp_setup_intr), + DEVMETHOD(pic_teardown_intr, mv_ap806_gicp_teardown_intr), + DEVMETHOD(pic_post_filter, mv_ap806_gicp_post_filter), + DEVMETHOD(pic_post_ithread, mv_ap806_gicp_post_ithread), + DEVMETHOD(pic_pre_ithread, mv_ap806_gicp_pre_ithread), + + DEVMETHOD_END +}; + +static devclass_t mv_ap806_gicp_devclass; + +static driver_t mv_ap806_gicp_driver = { + "mv_ap806_gicp", + mv_ap806_gicp_methods, + sizeof(struct mv_ap806_gicp_softc), +}; + +EARLY_DRIVER_MODULE(mv_ap806_gicp, simplebus, mv_ap806_gicp_driver, + mv_ap806_gicp_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); Added: head/sys/arm/mv/mv_cp110_icu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mv_cp110_icu.c Wed Dec 12 22:08:43 2018 (r342016) @@ -0,0 +1,299 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include "pic_if.h" + +#define ICU_GRP_NSR 0x0 +#define ICU_GRP_SR 0x1 +#define ICU_GRP_SEI 0x4 +#define ICU_GRP_REI 0x5 + +#define ICU_SETSPI_NSR_AL 0x10 +#define ICU_SETSPI_NSR_AH 0x14 +#define ICU_CLRSPI_NSR_AL 0x18 +#define ICU_CLRSPI_NSR_AH 0x1c +#define ICU_INT_CFG(x) (0x100 + (x) * 4) +#define ICU_INT_ENABLE (1 << 24) +#define ICU_INT_EDGE (1 << 28) +#define ICU_INT_GROUP_SHIFT 29 +#define ICU_INT_MASK 0x3ff + +#define MV_CP110_ICU_MAX_NIRQS 207 + +struct mv_cp110_icu_softc { + device_t dev; + device_t parent; + struct resource *res; +}; + +static struct resource_spec mv_cp110_icu_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +static struct ofw_compat_data compat_data[] = { + {"marvell,cp110-icu", 1}, + {NULL, 0} +}; + +#define RD4(sc, reg) bus_read_4((sc)->res, (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int +mv_cp110_icu_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Marvell Interrupt Consolidation Unit"); + return (BUS_PROBE_DEFAULT); +} + +static int +mv_cp110_icu_attach(device_t dev) +{ + struct mv_cp110_icu_softc *sc; + phandle_t node, msi_parent; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + if (OF_getencprop(node, "msi-parent", &msi_parent, + sizeof(phandle_t)) <= 0) { + device_printf(dev, "cannot find msi-parent property\n"); + return (ENXIO); + } + + if ((sc->parent = OF_device_from_xref(msi_parent)) == NULL) { + device_printf(dev, "cannot find msi-parent device\n"); + return (ENXIO); + } + if (bus_alloc_resources(dev, mv_cp110_icu_res_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + return (ENXIO); + } + + if (intr_pic_register(dev, OF_xref_from_node(node)) == NULL) { + device_printf(dev, "Cannot register ICU\n"); + goto fail; + } + return (0); + +fail: + bus_release_resources(dev, mv_cp110_icu_res_spec, &sc->res); + return (ENXIO); +} + +static int +mv_cp110_icu_detach(device_t dev) +{ + + return (EBUSY); +} + +static int +mv_cp110_icu_activate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_ACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static void +mv_cp110_icu_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + PIC_ENABLE_INTR(sc->parent, isrc); +} + +static void +mv_cp110_icu_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + PIC_DISABLE_INTR(sc->parent, isrc); +} + +static int +mv_cp110_icu_map_intr(device_t dev, struct intr_map_data *data, + struct intr_irqsrc **isrcp) +{ + struct mv_cp110_icu_softc *sc; + struct intr_map_data_fdt *daf; + uint32_t reg; + + sc = device_get_softc(dev); + + if (data->type != INTR_MAP_DATA_FDT) + return (ENOTSUP); + + daf = (struct intr_map_data_fdt *)data; + if (daf->ncells != 3 || daf->cells[0] >= MV_CP110_ICU_MAX_NIRQS) + return (EINVAL); + + reg = RD4(sc, ICU_INT_CFG(daf->cells[1])); + + if ((reg & ICU_INT_ENABLE) == 0) { + reg |= ICU_INT_ENABLE; + WR4(sc, ICU_INT_CFG(daf->cells[1], reg)); + } + + daf->cells[1] = reg & ICU_INT_MASK; + return (PIC_MAP_INTR(sc->parent, data, isrcp)); +} + +static int +mv_cp110_icu_deactivate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_DEACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static int +mv_cp110_icu_setup_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_SETUP_INTR(sc->parent, isrc, res, data)); +} + +static int +mv_cp110_icu_teardown_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + return (PIC_TEARDOWN_INTR(sc->parent, isrc, res, data)); +} + +static void +mv_cp110_icu_pre_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + PIC_PRE_ITHREAD(sc->parent, isrc); +} + +static void +mv_cp110_icu_post_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_ITHREAD(sc->parent, isrc); +} + +static void +mv_cp110_icu_post_filter(device_t dev, struct intr_irqsrc *isrc) +{ + struct mv_cp110_icu_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_FILTER(sc->parent, isrc); +} + +static device_method_t mv_cp110_icu_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mv_cp110_icu_probe), + DEVMETHOD(device_attach, mv_cp110_icu_attach), + DEVMETHOD(device_detach, mv_cp110_icu_detach), + + /* Interrupt controller interface */ + DEVMETHOD(pic_activate_intr, mv_cp110_icu_activate_intr), + DEVMETHOD(pic_disable_intr, mv_cp110_icu_disable_intr), + DEVMETHOD(pic_enable_intr, mv_cp110_icu_enable_intr), + DEVMETHOD(pic_map_intr, mv_cp110_icu_map_intr), + DEVMETHOD(pic_deactivate_intr, mv_cp110_icu_deactivate_intr), + DEVMETHOD(pic_setup_intr, mv_cp110_icu_setup_intr), + DEVMETHOD(pic_teardown_intr, mv_cp110_icu_teardown_intr), + DEVMETHOD(pic_post_filter, mv_cp110_icu_post_filter), + DEVMETHOD(pic_post_ithread, mv_cp110_icu_post_ithread), + DEVMETHOD(pic_pre_ithread, mv_cp110_icu_pre_ithread), + + DEVMETHOD_END +}; + +static devclass_t mv_cp110_icu_devclass; + +static driver_t mv_cp110_icu_driver = { + "mv_cp110_icu", + mv_cp110_icu_methods, + sizeof(struct mv_cp110_icu_softc), +}; + +EARLY_DRIVER_MODULE(mv_cp110_icu, simplebus, mv_cp110_icu_driver, + mv_cp110_icu_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST); Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Dec 12 22:05:07 2018 (r342015) +++ head/sys/arm64/conf/GENERIC Wed Dec 12 22:08:43 2018 (r342016) @@ -221,6 +221,8 @@ device aw_ccu # Allwinner clock controller # Interrupt controllers device aw_nmi # Allwinner NMI support +device mv_cp110_icu # Marvell CP110 ICU +device mv_ap806_gicp # Marvell AP806 GICP # Real-time clock support device aw_rtc # Allwinner Real-time Clock Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 22:05:07 2018 (r342015) +++ head/sys/conf/files.arm64 Wed Dec 12 22:08:43 2018 (r342016) @@ -91,6 +91,8 @@ arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 arm/mv/gpio.c optional mv_gpio fdt arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt +arm/mv/mv_cp110_icu.c optional mv_cp110_icu fdt +arm/mv/mv_ap806_gicp.c optional mv_ap806_gicp fdt arm/mv/mv_ap806_clock.c optional SOC_MARVELL_8K fdt arm/mv/mv_cp110_clock.c optional SOC_MARVELL_8K fdt arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt From owner-svn-src-all@freebsd.org Wed Dec 12 22:09:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF3E21327D45; Wed, 12 Dec 2018 22:09:36 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 777BF842B8; Wed, 12 Dec 2018 22:09:36 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AF7FE4BB; Wed, 12 Dec 2018 22:09:36 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCM9aRD010212; Wed, 12 Dec 2018 22:09:36 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCM9aC8010211; Wed, 12 Dec 2018 22:09:36 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122209.wBCM9aC8010211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342017 - head/sys/dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/sdhci X-SVN-Commit-Revision: 342017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 777BF842B8 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.50)[-0.500,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:09:37 -0000 Author: manu Date: Wed Dec 12 22:09:35 2018 New Revision: 342017 URL: https://svnweb.freebsd.org/changeset/base/342017 Log: sdhci_xenon: Add Marvell 8k compatible string Sponsored by: Rubicon Communications, LLC ("Netgate") Modified: head/sys/dev/sdhci/sdhci_xenon.c Modified: head/sys/dev/sdhci/sdhci_xenon.c ============================================================================== --- head/sys/dev/sdhci/sdhci_xenon.c Wed Dec 12 22:08:43 2018 (r342016) +++ head/sys/dev/sdhci/sdhci_xenon.c Wed Dec 12 22:09:35 2018 (r342017) @@ -62,11 +62,16 @@ __FBSDID("$FreeBSD$"); #include "sdhci_if.h" #include "opt_mmccam.h" +#include "opt_soc.h" #define MAX_SLOTS 6 static struct ofw_compat_data compat_data[] = { { "marvell,armada-3700-sdhci", 1 }, +#ifdef SOC_MARVELL_8K + { "marvell,armada-cp110-sdhci", 1 }, + { "marvell,armada-ap806-sdhci", 1 }, +#endif { NULL, 0 } }; From owner-svn-src-all@freebsd.org Wed Dec 12 22:10:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A82FE1327DED; Wed, 12 Dec 2018 22:10:12 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 4F9B68441D; Wed, 12 Dec 2018 22:10:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44784E4C0; Wed, 12 Dec 2018 22:10:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCMACig010309; Wed, 12 Dec 2018 22:10:12 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCMAChH010308; Wed, 12 Dec 2018 22:10:12 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122210.wBCMAChH010308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342018 - head/sys/arm/mv X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/mv X-SVN-Commit-Revision: 342018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F9B68441D X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.50)[-0.500,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:10:12 -0000 Author: manu Date: Wed Dec 12 22:10:11 2018 New Revision: 342018 URL: https://svnweb.freebsd.org/changeset/base/342018 Log: mv_gpio: Since it's also an interrupt controller, attach sooner Sponsored by: Rubicon Communications, LLC ("Netgate") Modified: head/sys/arm/mv/gpio.c Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Wed Dec 12 22:09:35 2018 (r342017) +++ head/sys/arm/mv/gpio.c Wed Dec 12 22:10:11 2018 (r342018) @@ -193,7 +193,8 @@ static driver_t mv_gpio_driver = { static devclass_t mv_gpio_devclass; -DRIVER_MODULE(mv_gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0); +EARLY_DRIVER_MODULE(mv_gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST); struct ofw_compat_data compat_data[] = { { "mrvl,gpio", 1 }, From owner-svn-src-all@freebsd.org Wed Dec 12 22:24:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F14FC1328569; Wed, 12 Dec 2018 22:24:31 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 8BCC184EB5; Wed, 12 Dec 2018 22:24:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CFF8E803; Wed, 12 Dec 2018 22:24:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCMOVlM020141; Wed, 12 Dec 2018 22:24:31 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCMOV5w020140; Wed, 12 Dec 2018 22:24:31 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122224.wBCMOV5w020140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342019 - head/sys/arm/mv X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/mv X-SVN-Commit-Revision: 342019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8BCC184EB5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.50)[-0.500,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:24:32 -0000 Author: manu Date: Wed Dec 12 22:24:30 2018 New Revision: 342019 URL: https://svnweb.freebsd.org/changeset/base/342019 Log: arm64: mv_cp110_icu: Fix build Modified: head/sys/arm/mv/mv_cp110_icu.c Modified: head/sys/arm/mv/mv_cp110_icu.c ============================================================================== --- head/sys/arm/mv/mv_cp110_icu.c Wed Dec 12 22:10:11 2018 (r342018) +++ head/sys/arm/mv/mv_cp110_icu.c Wed Dec 12 22:24:30 2018 (r342019) @@ -196,7 +196,7 @@ mv_cp110_icu_map_intr(device_t dev, struct intr_map_da if ((reg & ICU_INT_ENABLE) == 0) { reg |= ICU_INT_ENABLE; - WR4(sc, ICU_INT_CFG(daf->cells[1], reg)); + WR4(sc, ICU_INT_CFG(daf->cells[1]), reg); } daf->cells[1] = reg & ICU_INT_MASK; From owner-svn-src-all@freebsd.org Wed Dec 12 22:33:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B26751328B42; Wed, 12 Dec 2018 22:33:06 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 5A81F8556D; Wed, 12 Dec 2018 22:33:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50C91E9AC; Wed, 12 Dec 2018 22:33:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCMX6Qf025510; Wed, 12 Dec 2018 22:33:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCMX5hg025508; Wed, 12 Dec 2018 22:33:05 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812122233.wBCMX5hg025508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Dec 2018 22:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342020 - in head/sys: arm/mv arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/mv arm64/conf conf X-SVN-Commit-Revision: 342020 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A81F8556D X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.51)[-0.513,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:33:06 -0000 Author: manu Date: Wed Dec 12 22:33:05 2018 New Revision: 342020 URL: https://svnweb.freebsd.org/changeset/base/342020 Log: mv_thermal: Add thermal driver for AP806 and CP110 thermal sensor Sponsored by: Rubicon Communications, LLC ("Netgate") Added: head/sys/arm/mv/mv_thermal.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Added: head/sys/arm/mv/mv_thermal.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/mv_thermal.c Wed Dec 12 22:33:05 2018 (r342020) @@ -0,0 +1,381 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#define CONTROL0 0x00 +#define CONTROL0_TSEN_START (1 << 0) +#define CONTROL0_TSEN_RESET (1 << 1) +#define CONTROL0_TSEN_EN (1 << 2) +#define CONTROL0_CHANNEL_SHIFT 13 +#define CONTROL0_CHANNEL_MASK 0xF +#define CONTROL0_OSR_SHIFT 24 +#define CONTROL0_OSR_MAX 3 /* OSR = 512 * 4uS = ~2mS */ +#define CONTROL0_MODE_SHIFT 30 +#define CONTROL0_MODE_EXTERNAL 0x2 +#define CONTROL0_MODE_MASK 0x3 + +#define CONTROL1 0x04 +/* This doesn't seems to work */ +#define CONTROL1_TSEN_SENS_SHIFT 21 +#define CONTROL1_TSEN_SENS_MASK 0x7 + +#define STATUS 0x00 +#define STATUS_TEMP_MASK 0x3FF + +enum mv_thermal_type { + MV_AP806 = 1, + MV_CP110, +}; + +struct mv_thermal_config { + enum mv_thermal_type type; + int ncpus; + int64_t calib_mul; + int64_t calib_add; + int64_t calib_div; + uint32_t valid_mask; + bool signed_value; +}; + +struct mv_thermal_softc { + device_t dev; + struct resource *res[2]; + struct mtx mtx; + + struct mv_thermal_config *config; + int cur_sensor; +}; + +static struct mv_thermal_config mv_ap806_config = { + .type = MV_AP806, + .ncpus = 4, + .calib_mul = 423, + .calib_add = -150000, + .calib_div = 100, + .valid_mask = (1 << 16), + .signed_value = true, +}; + +static struct mv_thermal_config mv_cp110_config = { + .type = MV_CP110, + .calib_mul = 2000096, + .calib_add = 1172499100, + .calib_div = 420100, + .valid_mask = (1 << 10), + .signed_value = false, +}; + +static struct resource_spec mv_thermal_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 1, RF_ACTIVE }, + { -1, 0 } +}; + +static struct ofw_compat_data compat_data[] = { + {"marvell,armada-ap806-thermal", (uintptr_t) &mv_ap806_config}, + {"marvell,armada-cp110-thermal", (uintptr_t) &mv_cp110_config}, + {NULL, 0} +}; + +#define RD_STA(sc, reg) bus_read_4((sc)->res[0], (reg)) +#define WR_STA(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) +#define RD_CON(sc, reg) bus_read_4((sc)->res[1], (reg)) +#define WR_CON(sc, reg, val) bus_write_4((sc)->res[1], (reg), (val)) + +static inline int32_t sign_extend(uint32_t value, int index) +{ + uint8_t shift; + + shift = 31 - index; + return ((int32_t)(value << shift) >> shift); +} + +static int +mv_thermal_wait_sensor(struct mv_thermal_softc *sc) +{ + uint32_t reg; + uint32_t timeout; + + timeout = 100000; + while (--timeout > 0) { + reg = RD_STA(sc, STATUS); + if ((reg & sc->config->valid_mask) == sc->config->valid_mask) + break; + DELAY(100); + } + if (timeout == 0) { + return (ETIMEDOUT); + } + + return (0); +} + +static int +mv_thermal_select_sensor(struct mv_thermal_softc *sc, int sensor) +{ + uint32_t reg; + + if (sc->cur_sensor == sensor) + return (0); + + /* Stop the current reading and reset the module */ + reg = RD_CON(sc, CONTROL0); + reg &= ~(CONTROL0_TSEN_START | CONTROL0_TSEN_EN); + WR_CON(sc, CONTROL0, reg); + + /* Switch to the selected sensor */ + /* + * NOTE : Datasheet says to use CONTROL1 for selecting + * but when doing so the sensors >0 are never ready + * Do what Linux does using undocumented bits in CONTROL0 + */ + /* This reset automatically to the sensor 0 */ + reg &= ~(CONTROL0_MODE_MASK << CONTROL0_MODE_SHIFT); + if (sensor) { + /* Select external sensor */ + reg |= CONTROL0_MODE_EXTERNAL << CONTROL0_MODE_SHIFT; + reg &= ~(CONTROL0_CHANNEL_MASK << CONTROL0_CHANNEL_SHIFT); + reg |= (sensor - 1) << CONTROL0_CHANNEL_SHIFT; + } + WR_CON(sc, CONTROL0, reg); + sc->cur_sensor = sensor; + + /* Start the reading */ + reg = RD_CON(sc, CONTROL0); + reg |= CONTROL0_TSEN_START | CONTROL0_TSEN_EN; + WR_CON(sc, CONTROL0, reg); + + return (mv_thermal_wait_sensor(sc)); +} + +static int +mv_thermal_read_sensor(struct mv_thermal_softc *sc, int sensor, int *temp) +{ + uint32_t reg; + int64_t sample, rv; + + rv = mv_thermal_select_sensor(sc, sensor); + if (rv != 0) + return (rv); + + reg = RD_STA(sc, STATUS) & STATUS_TEMP_MASK; + + if (sc->config->signed_value) + sample = sign_extend(reg, fls(STATUS_TEMP_MASK) - 1); + else + sample = reg; + + *temp = ((sample * sc->config->calib_mul) - sc->config->calib_add) / + sc->config->calib_div; + + return (0); +} + +static int +ap806_init(struct mv_thermal_softc *sc) +{ + uint32_t reg; + + /* Start the temp capture/conversion */ + reg = RD_CON(sc, CONTROL0); + reg &= ~CONTROL0_TSEN_RESET; + reg |= CONTROL0_TSEN_START | CONTROL0_TSEN_EN; + + /* Sample every ~2ms */ + reg |= CONTROL0_OSR_MAX << CONTROL0_OSR_SHIFT; + + WR_CON(sc, CONTROL0, reg); + + /* Since we just started the module wait for the sensor to be ready */ + mv_thermal_wait_sensor(sc); + + return (0); +} + +static int +cp110_init(struct mv_thermal_softc *sc) +{ + uint32_t reg; + + reg = RD_CON(sc, CONTROL1); + reg &= (1 << 7); + reg |= (1 << 8); + WR_CON(sc, CONTROL1, reg); + + /* Sample every ~2ms */ + reg = RD_CON(sc, CONTROL0); + reg |= CONTROL0_OSR_MAX << CONTROL0_OSR_SHIFT; + WR_CON(sc, CONTROL0, reg); + + return (0); +} + +static int +mv_thermal_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct mv_thermal_softc *sc; + device_t dev = arg1; + int sensor = arg2; + int val = 0; + + sc = device_get_softc(dev); + mtx_lock(&(sc)->mtx); + + if (mv_thermal_read_sensor(sc, sensor, &val) == 0) { + /* Convert to Kelvin */ + val = val + 2732; + } else { + device_printf(dev, "Timeout waiting for sensor\n"); + } + + mtx_unlock(&(sc)->mtx); + return sysctl_handle_opaque(oidp, &val, sizeof(val), req); +} + +static int +mv_thermal_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Marvell Thermal Sensor Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +mv_thermal_attach(device_t dev) +{ + struct mv_thermal_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *oid; + char name[255]; + char desc[255]; + int i; + + sc = device_get_softc(dev); + sc->dev = dev; + + sc->config = (struct mv_thermal_config *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; + + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + if (bus_alloc_resources(dev, mv_thermal_res_spec, sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + return (ENXIO); + } + + sc->cur_sensor = -1; + switch (sc->config->type) { + case MV_AP806: + ap806_init(sc); + break; + case MV_CP110: + cp110_init(sc); + break; + } + + ctx = device_get_sysctl_ctx(dev); + oid = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + /* There is always at least one sensor */ + SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, "internal", + CTLTYPE_INT | CTLFLAG_RD, + dev, 0, mv_thermal_sysctl, + "IK", + "Internal Temperature"); + + for (i = 0; i < sc->config->ncpus; i++) { + snprintf(name, sizeof(name), "cpu%d", i); + snprintf(desc, sizeof(desc), "CPU%d Temperature", i); + SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, name, + CTLTYPE_INT | CTLFLAG_RD, + dev, i + 1, mv_thermal_sysctl, + "IK", + desc); + } + + return (0); +} + +static int +mv_thermal_detach(device_t dev) +{ + struct mv_thermal_softc *sc; + + sc = device_get_softc(dev); + + bus_release_resources(dev, mv_thermal_res_spec, sc->res); + + return (0); +} + +static device_method_t mv_thermal_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mv_thermal_probe), + DEVMETHOD(device_attach, mv_thermal_attach), + DEVMETHOD(device_detach, mv_thermal_detach), + + DEVMETHOD_END +}; + +static devclass_t mv_thermal_devclass; + +static driver_t mv_thermal_driver = { + "mv_thermal", + mv_thermal_methods, + sizeof(struct mv_thermal_softc), +}; + +DRIVER_MODULE(mv_thermal, simplebus, mv_thermal_driver, + mv_thermal_devclass, 0, 0); Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Dec 12 22:24:30 2018 (r342019) +++ head/sys/arm64/conf/GENERIC Wed Dec 12 22:33:05 2018 (r342020) @@ -240,6 +240,7 @@ device aw_sid # Allwinner Secure ID EFUSE # Thermal sensors device aw_thermal # Allwinner Thermal Sensor Controller +device mv_thermal # Marvell Thermal Sensor Controller # SPI device spibus Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Dec 12 22:24:30 2018 (r342019) +++ head/sys/conf/files.arm64 Wed Dec 12 22:33:05 2018 (r342020) @@ -95,6 +95,7 @@ arm/mv/mv_cp110_icu.c optional mv_cp110_icu fdt arm/mv/mv_ap806_gicp.c optional mv_ap806_gicp fdt arm/mv/mv_ap806_clock.c optional SOC_MARVELL_8K fdt arm/mv/mv_cp110_clock.c optional SOC_MARVELL_8K fdt +arm/mv/mv_thermal.c optional SOC_MARVELL_8K mv_thermal fdt arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq arm64/acpica/acpi_machdep.c optional acpi From owner-svn-src-all@freebsd.org Wed Dec 12 22:39:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 840C01328CA2; Wed, 12 Dec 2018 22:39:18 +0000 (UTC) (envelope-from gjb@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) server-signature RSA-PSS (4096 bits) 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 28E25859D2; Wed, 12 Dec 2018 22:39:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18672E9B1; Wed, 12 Dec 2018 22:39:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBCMdHxv025938; Wed, 12 Dec 2018 22:39:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBCMdHwa025936; Wed, 12 Dec 2018 22:39:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201812122239.wBCMdHwa025936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 12 Dec 2018 22:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r342021 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 342021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 28E25859D2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.50)[-0.500,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 22:39:18 -0000 Author: gjb Date: Wed Dec 12 22:39:17 2018 New Revision: 342021 URL: https://svnweb.freebsd.org/changeset/base/342021 Log: Update the approvers file to share custody of releng/12.0 between so@ and re@ until re@ is comfortable turning over releng/12.0 entirely. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Wed Dec 12 22:33:05 2018 (r342020) +++ svnadmin/conf/approvers Wed Dec 12 22:39:17 2018 (r342021) @@ -20,7 +20,7 @@ #^stable/12/ re #^stable/11/ re ^release/ re -^releng/12.0/ re +^releng/12.0/ (re|security-officer|so) ^releng/11.[0-2]/ (security-officer|so) ^releng/10.[0-4]/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) From owner-svn-src-all@freebsd.org Thu Dec 13 00:42:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D058132BB8F; Thu, 13 Dec 2018 00:42:27 +0000 (UTC) (envelope-from imp@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) server-signature RSA-PSS (4096 bits) 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 0238C895B2; Thu, 13 Dec 2018 00:42:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC4431800D; Thu, 13 Dec 2018 00:42:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD0gQu1093052; Thu, 13 Dec 2018 00:42:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD0gQjq093051; Thu, 13 Dec 2018 00:42:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812130042.wBD0gQjq093051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 13 Dec 2018 00:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342022 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 342022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0238C895B2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.33 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.50)[-0.500,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 00:42:27 -0000 Author: imp Date: Thu Dec 13 00:42:26 2018 New Revision: 342022 URL: https://svnweb.freebsd.org/changeset/base/342022 Log: Correctly implemenet atomic_swap_long for mips64. MIPS64 has 64-bit longs, so use uint64_t for it, otherwise uint32_t. sizeof(long) == sizeof(ptr) for all platforms, so define atomic_swap_ptr in terms of atomic_swap_long. Submitted by: hps@ Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Wed Dec 12 22:39:17 2018 (r342021) +++ head/sys/mips/include/atomic.h Thu Dec 13 00:42:26 2018 (r342022) @@ -793,6 +793,7 @@ atomic_swap_64(volatile uint64_t *ptr, const uint64_t } #endif +#ifdef __mips_n64 static __inline unsigned long atomic_swap_long(volatile unsigned long *ptr, const unsigned long value) { @@ -800,16 +801,16 @@ atomic_swap_long(volatile unsigned long *ptr, const un retval = *ptr; - while (!atomic_fcmpset_32((volatile uint32_t *)ptr, - (uint32_t *)&retval, value)) + while (!atomic_fcmpset_64((volatile uint64_t *)ptr, + (uint64_t *)&retval, value)) ; return (retval); } - -static __inline uintptr_t -atomic_swap_ptr(volatile uintptr_t *ptr, const uintptr_t value) +#else +static __inline unsigned long +atomic_swap_long(volatile unsigned long *ptr, const unsigned long value) { - uintptr_t retval; + unsigned long retval; retval = *ptr; @@ -818,5 +819,7 @@ atomic_swap_ptr(volatile uintptr_t *ptr, const uintptr ; return (retval); } +#endif +#define atomic_swap_ptr(ptr, value) atomic_swap_long((unsigned long *)(ptr), value) #endif /* ! _MACHINE_ATOMIC_H_ */ From owner-svn-src-all@freebsd.org Thu Dec 13 03:12:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBC8B133546E; Thu, 13 Dec 2018 03:12:17 +0000 (UTC) (envelope-from cy@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) server-signature RSA-PSS (4096 bits) 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 74B8D68311; Thu, 13 Dec 2018 03:12:17 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67BF819D33; Thu, 13 Dec 2018 03:12:17 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD3CHQr071599; Thu, 13 Dec 2018 03:12:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD3CGjI071596; Thu, 13 Dec 2018 03:12:16 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812130312.wBD3CGjI071596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 13 Dec 2018 03:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r342023 - in stable: 10/contrib/ipfilter/ipsend 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/ipsend 11/sys/contrib/ipfilter/netinet 12/contrib/ipfilter/ipsend 12/sys/contrib/ipfi... X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/ipsend 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/ipsend 11/sys/contrib/ipfilter/netinet 12/contrib/ipfilter/ipsend 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 342023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 74B8D68311 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.30 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.839,0]; NEURAL_HAM_SHORT(-0.46)[-0.461,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 03:12:18 -0000 Author: cy Date: Thu Dec 13 03:12:15 2018 New Revision: 342023 URL: https://svnweb.freebsd.org/changeset/base/342023 Log: MFC r341650: Remove an ugly Ultrix hack. Ultrix has been AWOL since the last ice age, more to come. Modified: stable/10/contrib/ipfilter/ipsend/ip.c stable/10/contrib/ipfilter/ipsend/resend.c stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/ipsend/ip.c stable/11/contrib/ipfilter/ipsend/resend.c stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/contrib/ipfilter/ipsend/ip.c stable/12/contrib/ipfilter/ipsend/resend.c stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/contrib/ipfilter/ipsend/ip.c ============================================================================== --- stable/10/contrib/ipfilter/ipsend/ip.c Thu Dec 13 00:42:26 2018 (r342022) +++ stable/10/contrib/ipfilter/ipsend/ip.c Thu Dec 13 03:12:15 2018 (r342023) @@ -70,9 +70,9 @@ int send_ether(nfd, buf, len, gwip) bcopy((char *)buf, s + sizeof(*eh), len); if (gwip.s_addr == last_gw.s_addr) { - bcopy(last_arp, (char *)A_A eh->ether_dhost, 6); + bcopy(last_arp, (char *) &eh->ether_dhost, 6); } - else if (arp((char *)&gwip, (char *)A_A eh->ether_dhost) == -1) + else if (arp((char *)&gwip, (char *) &eh->ether_dhost) == -1) { perror("arp"); return -2; @@ -112,17 +112,17 @@ int send_ip(nfd, mtu, ip, gwip, frag) eh = (ether_header_t *)ipbuf; - bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); + bzero((char *) &eh->ether_shost, sizeof(eh->ether_shost)); if (last_gw.s_addr && (gwip.s_addr == last_gw.s_addr)) { - bcopy(last_arp, (char *)A_A eh->ether_dhost, 6); + bcopy(last_arp, (char *) &eh->ether_dhost, 6); } - else if (arp((char *)&gwip, (char *)A_A eh->ether_dhost) == -1) + else if (arp((char *)&gwip, (char *) &eh->ether_dhost) == -1) { perror("arp"); return -2; } - bcopy((char *)A_A eh->ether_dhost, last_arp, sizeof(last_arp)); + bcopy((char *) &eh->ether_dhost, last_arp, sizeof(last_arp)); eh->ether_type = htons(ETHERTYPE_IP); bcopy((char *)ip, (char *)&ipsv, sizeof(*ip)); @@ -139,11 +139,11 @@ int send_ip(nfd, mtu, ip, gwip, frag) } if (ip->ip_src.s_addr != local_ip.s_addr) { - (void) arp((char *)&ip->ip_src, (char *)A_A local_arp); - bcopy(local_arp, (char *)A_A eh->ether_shost,sizeof(last_arp)); + (void) arp((char *)&ip->ip_src, (char *) &local_arp); + bcopy(local_arp, (char *) &eh->ether_shost,sizeof(last_arp)); local_ip = ip->ip_src; } else - bcopy(local_arp, (char *)A_A eh->ether_shost, 6); + bcopy(local_arp, (char *) &eh->ether_shost, 6); if (!frag || (sizeof(*eh) + iplen < mtu)) { Modified: stable/10/contrib/ipfilter/ipsend/resend.c ============================================================================== --- stable/10/contrib/ipfilter/ipsend/resend.c Thu Dec 13 00:42:26 2018 (r342022) +++ stable/10/contrib/ipfilter/ipsend/resend.c Thu Dec 13 03:12:15 2018 (r342023) @@ -100,7 +100,7 @@ int ip_resend(dev, mtu, r, gwip, datain) return -2; } - bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); + bzero((char *) &eh->ether_shost, sizeof(eh->ether_shost)); if (gwip.s_addr && (arp((char *)&gwip, dhost) == -1)) { perror("arp"); @@ -116,12 +116,12 @@ int ip_resend(dev, mtu, r, gwip, datain) eh->ether_type = htons((u_short)ETHERTYPE_IP); if (!gwip.s_addr) { if (arp((char *)&gwip, - (char *)A_A eh->ether_dhost) == -1) { + (char *) &eh->ether_dhost) == -1) { perror("arp"); continue; } } else - bcopy(dhost, (char *)A_A eh->ether_dhost, + bcopy(dhost, (char *) &eh->ether_dhost, sizeof(dhost)); if (!ip->ip_sum) ip->ip_sum = chksum((u_short *)ip, Modified: stable/10/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Thu Dec 13 00:42:26 2018 (r342022) +++ stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Thu Dec 13 03:12:15 2018 (r342023) @@ -743,16 +743,6 @@ typedef struct tcpiphdr tcpiphdr_t; #endif #define IPMINLEN(i, h) ((i)->ip_len >= (IP_HL(i) * 4 + sizeof(struct h))) - -/* - * XXX - This is one of those *awful* hacks which nobody likes - */ -#ifdef ultrix -#define A_A -#else -#define A_A & -#endif - #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) From owner-svn-src-all@freebsd.org Thu Dec 13 03:12:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EB7D1335466; Thu, 13 Dec 2018 03:12:16 +0000 (UTC) (envelope-from cy@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) server-signature RSA-PSS (4096 bits) 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 159E768308; Thu, 13 Dec 2018 03:12:16 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C74319D2F; Thu, 13 Dec 2018 03:12:16 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD3CFId071582; Thu, 13 Dec 2018 03:12:15 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD3CF2c071580; Thu, 13 Dec 2018 03:12:15 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812130312.wBD3CF2c071580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 13 Dec 2018 03:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342023 - in stable: 10/contrib/ipfilter/ipsend 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/ipsend 11/sys/contrib/ipfilter/netinet 12/contrib/ipfilter/ipsend 12/sys/contrib/ipfi... X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/ipsend 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/ipsend 11/sys/contrib/ipfilter/netinet 12/contrib/ipfilter/ipsend 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 342023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 159E768308 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.30 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.839,0]; NEURAL_HAM_SHORT(-0.46)[-0.461,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 03:12:16 -0000 Author: cy Date: Thu Dec 13 03:12:15 2018 New Revision: 342023 URL: https://svnweb.freebsd.org/changeset/base/342023 Log: MFC r341650: Remove an ugly Ultrix hack. Ultrix has been AWOL since the last ice age, more to come. Modified: stable/11/contrib/ipfilter/ipsend/ip.c stable/11/contrib/ipfilter/ipsend/resend.c stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/ipsend/ip.c stable/10/contrib/ipfilter/ipsend/resend.c stable/10/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/contrib/ipfilter/ipsend/ip.c stable/12/contrib/ipfilter/ipsend/resend.c stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/contrib/ipfilter/ipsend/ip.c ============================================================================== --- stable/11/contrib/ipfilter/ipsend/ip.c Thu Dec 13 00:42:26 2018 (r342022) +++ stable/11/contrib/ipfilter/ipsend/ip.c Thu Dec 13 03:12:15 2018 (r342023) @@ -67,9 +67,9 @@ int send_ether(nfd, buf, len, gwip) bcopy((char *)buf, s + sizeof(*eh), len); if (gwip.s_addr == last_gw.s_addr) { - bcopy(last_arp, (char *)A_A eh->ether_dhost, 6); + bcopy(last_arp, (char *) &eh->ether_dhost, 6); } - else if (arp((char *)&gwip, (char *)A_A eh->ether_dhost) == -1) + else if (arp((char *)&gwip, (char *) &eh->ether_dhost) == -1) { perror("arp"); return -2; @@ -109,17 +109,17 @@ int send_ip(nfd, mtu, ip, gwip, frag) eh = (ether_header_t *)ipbuf; - bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); + bzero((char *) &eh->ether_shost, sizeof(eh->ether_shost)); if (last_gw.s_addr && (gwip.s_addr == last_gw.s_addr)) { - bcopy(last_arp, (char *)A_A eh->ether_dhost, 6); + bcopy(last_arp, (char *) &eh->ether_dhost, 6); } - else if (arp((char *)&gwip, (char *)A_A eh->ether_dhost) == -1) + else if (arp((char *)&gwip, (char *) &eh->ether_dhost) == -1) { perror("arp"); return -2; } - bcopy((char *)A_A eh->ether_dhost, last_arp, sizeof(last_arp)); + bcopy((char *) &eh->ether_dhost, last_arp, sizeof(last_arp)); eh->ether_type = htons(ETHERTYPE_IP); bcopy((char *)ip, (char *)&ipsv, sizeof(*ip)); @@ -136,11 +136,11 @@ int send_ip(nfd, mtu, ip, gwip, frag) } if (ip->ip_src.s_addr != local_ip.s_addr) { - (void) arp((char *)&ip->ip_src, (char *)A_A local_arp); - bcopy(local_arp, (char *)A_A eh->ether_shost,sizeof(last_arp)); + (void) arp((char *)&ip->ip_src, (char *) &local_arp); + bcopy(local_arp, (char *) &eh->ether_shost,sizeof(last_arp)); local_ip = ip->ip_src; } else - bcopy(local_arp, (char *)A_A eh->ether_shost, 6); + bcopy(local_arp, (char *) &eh->ether_shost, 6); if (!frag || (sizeof(*eh) + iplen < mtu)) { Modified: stable/11/contrib/ipfilter/ipsend/resend.c ============================================================================== --- stable/11/contrib/ipfilter/ipsend/resend.c Thu Dec 13 00:42:26 2018 (r342022) +++ stable/11/contrib/ipfilter/ipsend/resend.c Thu Dec 13 03:12:15 2018 (r342023) @@ -97,7 +97,7 @@ int ip_resend(dev, mtu, r, gwip, datain) return -2; } - bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); + bzero((char *) &eh->ether_shost, sizeof(eh->ether_shost)); if (gwip.s_addr && (arp((char *)&gwip, dhost) == -1)) { perror("arp"); @@ -113,12 +113,12 @@ int ip_resend(dev, mtu, r, gwip, datain) eh->ether_type = htons((u_short)ETHERTYPE_IP); if (!gwip.s_addr) { if (arp((char *)&gwip, - (char *)A_A eh->ether_dhost) == -1) { + (char *) &eh->ether_dhost) == -1) { perror("arp"); continue; } } else - bcopy(dhost, (char *)A_A eh->ether_dhost, + bcopy(dhost, (char *) &eh->ether_dhost, sizeof(dhost)); if (!ip->ip_sum) ip->ip_sum = chksum((u_short *)ip, Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Dec 13 00:42:26 2018 (r342022) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Dec 13 03:12:15 2018 (r342023) @@ -757,16 +757,6 @@ typedef struct tcpiphdr tcpiphdr_t; #endif #define IPMINLEN(i, h) ((i)->ip_len >= (IP_HL(i) * 4 + sizeof(struct h))) - -/* - * XXX - This is one of those *awful* hacks which nobody likes - */ -#ifdef ultrix -#define A_A -#else -#define A_A & -#endif - #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) From owner-svn-src-all@freebsd.org Thu Dec 13 03:12:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DD1D133546A; Thu, 13 Dec 2018 03:12:17 +0000 (UTC) (envelope-from cy@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) server-signature RSA-PSS (4096 bits) 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 C8B686830A; Thu, 13 Dec 2018 03:12:16 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDF7E19D31; Thu, 13 Dec 2018 03:12:16 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD3CGXu071590; Thu, 13 Dec 2018 03:12:16 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD3CGBj071588; Thu, 13 Dec 2018 03:12:16 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812130312.wBD3CGBj071588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 13 Dec 2018 03:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342023 - in stable: 10/contrib/ipfilter/ipsend 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/ipsend 11/sys/contrib/ipfilter/netinet 12/contrib/ipfilter/ipsend 12/sys/contrib/ipfi... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/ipsend 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/ipsend 11/sys/contrib/ipfilter/netinet 12/contrib/ipfilter/ipsend 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 342023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8B686830A X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.30 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.839,0]; NEURAL_HAM_SHORT(-0.46)[-0.461,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 03:12:17 -0000 Author: cy Date: Thu Dec 13 03:12:15 2018 New Revision: 342023 URL: https://svnweb.freebsd.org/changeset/base/342023 Log: MFC r341650: Remove an ugly Ultrix hack. Ultrix has been AWOL since the last ice age, more to come. Modified: stable/12/contrib/ipfilter/ipsend/ip.c stable/12/contrib/ipfilter/ipsend/resend.c stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/ipsend/ip.c stable/10/contrib/ipfilter/ipsend/resend.c stable/10/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/contrib/ipfilter/ipsend/ip.c stable/11/contrib/ipfilter/ipsend/resend.c stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/contrib/ipfilter/ipsend/ip.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/ip.c Thu Dec 13 00:42:26 2018 (r342022) +++ stable/12/contrib/ipfilter/ipsend/ip.c Thu Dec 13 03:12:15 2018 (r342023) @@ -67,9 +67,9 @@ int send_ether(nfd, buf, len, gwip) bcopy((char *)buf, s + sizeof(*eh), len); if (gwip.s_addr == last_gw.s_addr) { - bcopy(last_arp, (char *)A_A eh->ether_dhost, 6); + bcopy(last_arp, (char *) &eh->ether_dhost, 6); } - else if (arp((char *)&gwip, (char *)A_A eh->ether_dhost) == -1) + else if (arp((char *)&gwip, (char *) &eh->ether_dhost) == -1) { perror("arp"); return -2; @@ -109,17 +109,17 @@ int send_ip(nfd, mtu, ip, gwip, frag) eh = (ether_header_t *)ipbuf; - bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); + bzero((char *) &eh->ether_shost, sizeof(eh->ether_shost)); if (last_gw.s_addr && (gwip.s_addr == last_gw.s_addr)) { - bcopy(last_arp, (char *)A_A eh->ether_dhost, 6); + bcopy(last_arp, (char *) &eh->ether_dhost, 6); } - else if (arp((char *)&gwip, (char *)A_A eh->ether_dhost) == -1) + else if (arp((char *)&gwip, (char *) &eh->ether_dhost) == -1) { perror("arp"); return -2; } - bcopy((char *)A_A eh->ether_dhost, last_arp, sizeof(last_arp)); + bcopy((char *) &eh->ether_dhost, last_arp, sizeof(last_arp)); eh->ether_type = htons(ETHERTYPE_IP); bcopy((char *)ip, (char *)&ipsv, sizeof(*ip)); @@ -136,11 +136,11 @@ int send_ip(nfd, mtu, ip, gwip, frag) } if (ip->ip_src.s_addr != local_ip.s_addr) { - (void) arp((char *)&ip->ip_src, (char *)A_A local_arp); - bcopy(local_arp, (char *)A_A eh->ether_shost,sizeof(last_arp)); + (void) arp((char *)&ip->ip_src, (char *) &local_arp); + bcopy(local_arp, (char *) &eh->ether_shost,sizeof(last_arp)); local_ip = ip->ip_src; } else - bcopy(local_arp, (char *)A_A eh->ether_shost, 6); + bcopy(local_arp, (char *) &eh->ether_shost, 6); if (!frag || (sizeof(*eh) + iplen < mtu)) { Modified: stable/12/contrib/ipfilter/ipsend/resend.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/resend.c Thu Dec 13 00:42:26 2018 (r342022) +++ stable/12/contrib/ipfilter/ipsend/resend.c Thu Dec 13 03:12:15 2018 (r342023) @@ -97,7 +97,7 @@ int ip_resend(dev, mtu, r, gwip, datain) return -2; } - bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); + bzero((char *) &eh->ether_shost, sizeof(eh->ether_shost)); if (gwip.s_addr && (arp((char *)&gwip, dhost) == -1)) { perror("arp"); @@ -113,12 +113,12 @@ int ip_resend(dev, mtu, r, gwip, datain) eh->ether_type = htons((u_short)ETHERTYPE_IP); if (!gwip.s_addr) { if (arp((char *)&gwip, - (char *)A_A eh->ether_dhost) == -1) { + (char *) &eh->ether_dhost) == -1) { perror("arp"); continue; } } else - bcopy(dhost, (char *)A_A eh->ether_dhost, + bcopy(dhost, (char *) &eh->ether_dhost, sizeof(dhost)); if (!ip->ip_sum) ip->ip_sum = chksum((u_short *)ip, Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Dec 13 00:42:26 2018 (r342022) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Dec 13 03:12:15 2018 (r342023) @@ -758,16 +758,6 @@ typedef struct tcpiphdr tcpiphdr_t; #endif #define IPMINLEN(i, h) ((i)->ip_len >= (IP_HL(i) * 4 + sizeof(struct h))) - -/* - * XXX - This is one of those *awful* hacks which nobody likes - */ -#ifdef ultrix -#define A_A -#else -#define A_A & -#endif - #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) From owner-svn-src-all@freebsd.org Thu Dec 13 04:40:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B1D61338773; Thu, 13 Dec 2018 04:40:54 +0000 (UTC) (envelope-from mmacy@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) server-signature RSA-PSS (4096 bits) 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 30EDB6CA07; Thu, 13 Dec 2018 04:40:54 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2304A1AAE2; Thu, 13 Dec 2018 04:40:54 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD4esUd014213; Thu, 13 Dec 2018 04:40:54 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD4erR3014211; Thu, 13 Dec 2018 04:40:53 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201812130440.wBD4erR3014211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 13 Dec 2018 04:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342024 - in head/sys: crypto/aesni opencrypto X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: crypto/aesni opencrypto X-SVN-Commit-Revision: 342024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 30EDB6CA07 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.43 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.61)[-0.605,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 04:40:54 -0000 Author: mmacy Date: Thu Dec 13 04:40:53 2018 New Revision: 342024 URL: https://svnweb.freebsd.org/changeset/base/342024 Log: Generalize AES iov optimization Right now, aesni_cipher_alloc does a bit of special-casing for CRYPTO_F_IOV, to not do any allocation if the first uio is large enough for the requested size. While working on ZFS crypto port, I ran into horrible performance because the code uses scatter-gather, and many of the times the data to encrypt was in the second entry. This code looks through the list, and tries to see if there is a single uio that can contain the requested data, and, if so, uses that. This has a slight impact on the current consumers, in that the check is a little more complicated for the ones that use CRYPTO_F_IOV -- but none of them meet the criteria for testing more than one. Submitted by: sef at ixsystems.com Reviewed by: cem@ MFC after: 3 days Sponsored by: iX Systems Differential Revision: https://reviews.freebsd.org/D18522 Modified: head/sys/crypto/aesni/aesni.c head/sys/opencrypto/criov.c head/sys/opencrypto/cryptodev.h Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Thu Dec 13 03:12:15 2018 (r342023) +++ head/sys/crypto/aesni/aesni.c Thu Dec 13 04:40:53 2018 (r342024) @@ -403,29 +403,14 @@ static uint8_t * aesni_cipher_alloc(struct cryptodesc *enccrd, struct cryptop *crp, bool *allocated) { - struct mbuf *m; - struct uio *uio; - struct iovec *iov; uint8_t *addr; - if (crp->crp_flags & CRYPTO_F_IMBUF) { - m = (struct mbuf *)crp->crp_buf; - if (m->m_next != NULL) - goto alloc; - addr = mtod(m, uint8_t *); - } else if (crp->crp_flags & CRYPTO_F_IOV) { - uio = (struct uio *)crp->crp_buf; - if (uio->uio_iovcnt != 1) - goto alloc; - iov = uio->uio_iov; - addr = (uint8_t *)iov->iov_base; - } else - addr = (uint8_t *)crp->crp_buf; - *allocated = false; - addr += enccrd->crd_skip; - return (addr); - -alloc: + addr = crypto_contiguous_subsegment(crp->crp_flags, + crp->crp_buf, enccrd->crd_skip, enccrd->crd_len); + if (addr != NULL) { + *allocated = false; + return (addr); + } addr = malloc(enccrd->crd_len, M_AESNI, M_NOWAIT); if (addr != NULL) { *allocated = true; Modified: head/sys/opencrypto/criov.c ============================================================================== --- head/sys/opencrypto/criov.c Thu Dec 13 03:12:15 2018 (r342023) +++ head/sys/opencrypto/criov.c Thu Dec 13 04:40:53 2018 (r342024) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -239,3 +241,55 @@ crypto_mbuftoiov(struct mbuf *mbuf, struct iovec **iov *cnt = i; return 0; } + +static inline void * +m_contiguous_subsegment(struct mbuf *m, size_t skip, size_t len) +{ + int rel_off; + + MPASS(skip <= INT_MAX); + + m = m_getptr(m, (int)skip, &rel_off); + if (m == NULL) + return (NULL); + + MPASS(rel_off >= 0); + skip = rel_off; + if (skip + len > m->m_len) + return (NULL); + + return (mtod(m, char*) + skip); +} + +static inline void * +cuio_contiguous_segment(struct uio *uio, size_t skip, size_t len) +{ + int rel_off, idx; + + MPASS(skip <= INT_MAX); + idx = cuio_getptr(uio, (int)skip, &rel_off); + if (idx < 0) + return (NULL); + + MPASS(rel_off >= 0); + skip = rel_off; + if (skip + len > uio->uio_iov[idx].iov_len) + return (NULL); + return ((char *)uio->uio_iov[idx].iov_base + skip); +} + +void * +crypto_contiguous_subsegment(int crp_flags, void *crpbuf, + size_t skip, size_t len) +{ + if ((crp_flags & CRYPTO_F_IMBUF) != 0) + return (m_contiguous_subsegment(crpbuf, skip, len)); + else if ((crp_flags & CRYPTO_F_IOV) != 0) + return (cuio_contiguous_segment(crpbuf, skip, len)); + else { + MPASS((crp_flags & (CRYPTO_F_IMBUF | CRYPTO_F_IOV)) != + (CRYPTO_F_IMBUF | CRYPTO_F_IOV)); + return ((char*)crpbuf + skip); + } +} + Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Thu Dec 13 03:12:15 2018 (r342023) +++ head/sys/opencrypto/cryptodev.h Thu Dec 13 04:40:53 2018 (r342024) @@ -564,5 +564,7 @@ extern void crypto_copydata(int flags, caddr_t buf, in extern int crypto_apply(int flags, caddr_t buf, int off, int len, int (*f)(void *, void *, u_int), void *arg); +extern void *crypto_contiguous_subsegment(int, void *, size_t, size_t); + #endif /* _KERNEL */ #endif /* _CRYPTO_CRYPTO_H_ */ From owner-svn-src-all@freebsd.org Thu Dec 13 04:48:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B3C133898B; Thu, 13 Dec 2018 04:48:30 +0000 (UTC) (envelope-from jhibbits@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) server-signature RSA-PSS (4096 bits) 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 F09376CDAC; Thu, 13 Dec 2018 04:48:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE4B51AC89; Thu, 13 Dec 2018 04:48:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD4mSXB018583; Thu, 13 Dec 2018 04:48:28 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD4mSNL018582; Thu, 13 Dec 2018 04:48:28 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812130448.wBD4mSNL018582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 13 Dec 2018 04:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342025 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 342025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F09376CDAC X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.43 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.61)[-0.605,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 04:48:30 -0000 Author: jhibbits Date: Thu Dec 13 04:48:28 2018 New Revision: 342025 URL: https://svnweb.freebsd.org/changeset/base/342025 Log: powerpcspe: Fix GPR handling in SPE exception handler Optimize the exception handler to only save and load the upper word of the GPRs used in the emulating instruction. This reduces the save/load overhead, and as a side effect does not overwrite the upper word of any temporary register. With this commit I am now able to run editors/abiword and math/gnumeric on a e500-based system. MFC after: 1 week MFC With: r341752,r341751 Modified: head/sys/powerpc/booke/spe.c Modified: head/sys/powerpc/booke/spe.c ============================================================================== --- head/sys/powerpc/booke/spe.c Thu Dec 13 04:40:53 2018 (r342024) +++ head/sys/powerpc/booke/spe.c Thu Dec 13 04:48:28 2018 (r342025) @@ -66,7 +66,6 @@ save_vec_int(struct thread *td) */ msr = mfmsr(); mtmsr(msr | PSL_VEC); - isync(); /* * Save the vector registers and SPEFSCR to the PCB @@ -419,6 +418,52 @@ spe_explode(struct fpemu *fe, struct fpn *fp, uint32_t return (0); } +/* + * Save the high word of a 64-bit GPR for manipulation in the exception handler. + */ +static uint32_t +spe_save_reg_high(int reg) +{ + uint32_t vec[2]; +#define EVSTDW(n) case n: __asm ("evstdw %1,0(%0)" \ + :: "b"(vec), "n"(n)); break; + switch (reg) { + EVSTDW(0); EVSTDW(1); EVSTDW(2); EVSTDW(3); + EVSTDW(4); EVSTDW(5); EVSTDW(6); EVSTDW(7); + EVSTDW(8); EVSTDW(9); EVSTDW(10); EVSTDW(11); + EVSTDW(12); EVSTDW(13); EVSTDW(14); EVSTDW(15); + EVSTDW(16); EVSTDW(17); EVSTDW(18); EVSTDW(19); + EVSTDW(20); EVSTDW(21); EVSTDW(22); EVSTDW(23); + EVSTDW(24); EVSTDW(25); EVSTDW(26); EVSTDW(27); + EVSTDW(28); EVSTDW(29); EVSTDW(30); EVSTDW(31); + } +#undef EVSTDW + + return (vec[0]); +} + +/* + * Load the given value into the high word of the requested register. + */ +static void +spe_load_reg_high(int reg, uint32_t val) +{ +#define EVLDW(n) case n: __asm __volatile("evmergelo "#n",%0,0," \ + :: "r"(val)); break; + switch (reg) { + EVLDW(1); EVLDW(2); EVLDW(3); EVLDW(4); + EVLDW(5); EVLDW(6); EVLDW(7); EVLDW(8); + EVLDW(9); EVLDW(10); EVLDW(11); EVLDW(12); + EVLDW(13); EVLDW(14); EVLDW(15); EVLDW(16); + EVLDW(17); EVLDW(18); EVLDW(19); EVLDW(20); + EVLDW(21); EVLDW(22); EVLDW(23); EVLDW(24); + EVLDW(25); EVLDW(26); EVLDW(27); EVLDW(28); + EVLDW(29); EVLDW(30); EVLDW(31); EVLDW(0); + } +#undef EVLDW + +} + void spe_handle_fpdata(struct trapframe *frame) { @@ -426,11 +471,12 @@ spe_handle_fpdata(struct trapframe *frame) struct fpn *result; uint32_t instr, instr_sec_op; uint32_t cr_shift, ra, rb, rd, src; - uint32_t high, low, res; /* For vector operations. */ + uint32_t high, low, res, tmp; /* For vector operations. */ uint32_t spefscr = 0; uint32_t ftod_res[2]; int width; /* Single, Double, Vector, Integer */ int err; + uint32_t msr; err = fueword32((void *)frame->srr0, &instr); @@ -441,6 +487,7 @@ spe_handle_fpdata(struct trapframe *frame) if ((instr >> OPC_SHIFT) != SPE_OPC) return; + msr = mfmsr(); /* * 'cr' field is the upper 3 bits of rd. Magically, since a) rd is 5 * bits, b) each 'cr' field is 4 bits, and c) Only the 'GT' bit is @@ -460,32 +507,35 @@ spe_handle_fpdata(struct trapframe *frame) width = NONE; switch (src) { case SPE: - save_vec_nodrop(curthread); + mtmsr(msr | PSL_VEC); switch (instr_sec_op) { case EVFSABS: - curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + high = spe_save_reg_high(ra) & ~(1U << 31); frame->fixreg[rd] = frame->fixreg[ra] & ~(1U << 31); + spe_load_reg_high(rd, high); break; case EVFSNABS: - curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + high = spe_save_reg_high(ra) | (1U << 31); frame->fixreg[rd] = frame->fixreg[ra] | (1U << 31); + spe_load_reg_high(rd, high); break; case EVFSNEG: - curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + high = spe_save_reg_high(ra) ^ (1U << 31); frame->fixreg[rd] = frame->fixreg[ra] ^ (1U << 31); + spe_load_reg_high(rd, high); break; default: /* High word */ spe_explode(&fpemu, &fpemu.fe_f1, SINGLE, - curthread->td_pcb->pcb_vec.vr[ra][0], 0); + spe_save_reg_high(ra), 0); spe_explode(&fpemu, &fpemu.fe_f2, SINGLE, - curthread->td_pcb->pcb_vec.vr[rb][0], 0); + spe_save_reg_high(rb), 0); high = spe_emu_instr(instr_sec_op, &fpemu, &result, - &curthread->td_pcb->pcb_vec.vr[rd][0]); + &tmp); + if (high < 0) + spe_load_reg_high(rd, tmp); + spefscr = fpscr_to_spefscr(fpemu.fe_cx) << 16; /* Clear the fpemu to start over on the lower bits. */ memset(&fpemu, 0, sizeof(fpemu)); @@ -508,7 +558,6 @@ spe_handle_fpdata(struct trapframe *frame) width = VECTOR; break; } - enable_vec(curthread); goto end; case SPFP: @@ -524,8 +573,7 @@ spe_handle_fpdata(struct trapframe *frame) break; case EFSCFD: spe_explode(&fpemu, &fpemu.fe_f3, DOUBLE, - curthread->td_pcb->pcb_vec.vr[rb][0], - frame->fixreg[rb]); + spe_save_reg_high(rb), frame->fixreg[rb]); result = &fpemu.fe_f3; width = SINGLE; break; @@ -538,25 +586,22 @@ spe_handle_fpdata(struct trapframe *frame) } break; case DPFP: - save_vec_nodrop(curthread); + mtmsr(msr | PSL_VEC); switch (instr_sec_op) { case EFDABS: - curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + high = spe_save_reg_high(ra) & ~(1U << 31); frame->fixreg[rd] = frame->fixreg[ra]; - enable_vec(curthread); + spe_load_reg_high(rd, high); break; case EFDNABS: - curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + high = spe_save_reg_high(ra) | (1U << 31); frame->fixreg[rd] = frame->fixreg[ra]; - enable_vec(curthread); + spe_load_reg_high(rd, high); break; case EFDNEG: - curthread->td_pcb->pcb_vec.vr[rd][0] = - curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + high = spe_save_reg_high(ra) ^ (1U << 31); frame->fixreg[rd] = frame->fixreg[ra]; - enable_vec(curthread); + spe_load_reg_high(rd, high); break; case EFDCFS: spe_explode(&fpemu, &fpemu.fe_f3, SINGLE, @@ -566,11 +611,9 @@ spe_handle_fpdata(struct trapframe *frame) break; default: spe_explode(&fpemu, &fpemu.fe_f1, DOUBLE, - curthread->td_pcb->pcb_vec.vr[ra][0], - frame->fixreg[ra]); + spe_save_reg_high(ra), frame->fixreg[ra]); spe_explode(&fpemu, &fpemu.fe_f2, DOUBLE, - curthread->td_pcb->pcb_vec.vr[rb][0], - frame->fixreg[rb]); + spe_save_reg_high(rb), frame->fixreg[rb]); width = DOUBLE; } break; @@ -609,10 +652,8 @@ spe_handle_fpdata(struct trapframe *frame) frame->fixreg[rd] = fpu_ftos(&fpemu, result); break; case DOUBLE: - curthread->td_pcb->pcb_vec.vr[rd][0] = - fpu_ftod(&fpemu, result, ftod_res); + spe_load_reg_high(rd, fpu_ftod(&fpemu, result, ftod_res)); frame->fixreg[rd] = ftod_res[1]; - enable_vec(curthread); break; default: panic("Unknown storage width %d", width); @@ -624,6 +665,7 @@ end: spefscr |= (mfspr(SPR_SPEFSCR) & ~SPEFSCR_FINVS); mtspr(SPR_SPEFSCR, spefscr); frame->srr0 += 4; + mtmsr(msr); return; } From owner-svn-src-all@freebsd.org Thu Dec 13 05:07:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F4D1338F8C; Thu, 13 Dec 2018 05:07:40 +0000 (UTC) (envelope-from jhibbits@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) server-signature RSA-PSS (4096 bits) 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 06F5F6D7E5; Thu, 13 Dec 2018 05:07:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3AF51AFE8; Thu, 13 Dec 2018 05:07:39 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD57dLQ029094; Thu, 13 Dec 2018 05:07:39 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD57d4E029093; Thu, 13 Dec 2018 05:07:39 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812130507.wBD57d4E029093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 13 Dec 2018 05:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342026 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 342026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 06F5F6D7E5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.44 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.61)[-0.612,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 05:07:40 -0000 Author: jhibbits Date: Thu Dec 13 05:07:39 2018 New Revision: 342026 URL: https://svnweb.freebsd.org/changeset/base/342026 Log: powerpc/booke: Change KERNBASE to be physical load address Previous commits have made VM_MIN_KERNEL_ADDRESS its own separate entity, and rebased the kernel around that address instead of KERNBASE. This commit pulls the trigger to rebase KERNBASE to a physical load address. The eventual goal is to align the address with the AIM KERNBASE, but at this time that's not an option. Currently a Book-E kernel must be loaded on a 64MB boundary, due to size issues. The common load address is at the 64MB mark (0x04000000), so simply make that the default KERNBASE. As of this commit, Book-E kernels can be loaded and booted with ubldr. MFC after: 3 weeks Modified: head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Thu Dec 13 04:48:28 2018 (r342025) +++ head/sys/powerpc/include/vmparam.h Thu Dec 13 05:07:39 2018 (r342026) @@ -133,16 +133,9 @@ #else /* Book-E */ -#ifdef __powerpc64__ -#ifndef LOCORE -#define KERNBASE 0xe000000000000100UL /* start of kernel virtual */ -#else -#define KERNBASE 0xe000000000000100 /* start of kernel virtual */ -#endif -#else -#define KERNBASE 0xc0000000 /* start of kernel virtual */ - -#define VM_MIN_KERNEL_ADDRESS KERNBASE +#define KERNBASE 0x04000100 /* start of kernel physical */ +#ifndef __powerpc64__ +#define VM_MIN_KERNEL_ADDRESS 0xc0000000 #define VM_MAX_KERNEL_ADDRESS 0xffffefff #define VM_MAX_SAFE_KERNEL_ADDRESS VM_MAX_KERNEL_ADDRESS #endif From owner-svn-src-all@freebsd.org Thu Dec 13 06:07:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDE23130AC4F; Thu, 13 Dec 2018 06:07:50 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 644116FA67; Thu, 13 Dec 2018 06:07:50 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B270421F51; Thu, 13 Dec 2018 01:07:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 13 Dec 2018 01:07:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=g yRlVeE7ZYZ3MXc7caIWlBSdzcp+2+IX5kSpekFwDOo=; b=VYVq5wDk/e7xm0lmK vDXQMx306qAAVqEp8vVnfPKHh2efyeiTJibMW2PplRrVIpjF2w/1Rdqqy/KszbSK laJEmx0qm2TxqCJkpTB/Xcn6j1mjltmXptCNTD/07vyOpbkmULi42aSU6phTm0XZ BoyTaTG0iCasIONwmeAu+ZaDB0PVgIhJQqfBv0LbTgmNxNBAVL3xvS8Y7WJi9y4F dWt3SnR0AC7uQtjgt2fGZgnEx6zmAcvsuEpYOU33b+qzc6lxnuh+PZp8b6URzgzJ UjYofarxXxRSW07uFqRSSXoi00P4TCgxmpsfm1+G/i5Pjyt2WlH+4Jym/18jrQzh sO3Mg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=gyRlVeE7ZYZ3MXc7caIWlBSdzcp+2+IX5kSpekFwD Oo=; b=vKGjqsSdlPqcAb102Zrv/tijIAMAvtAX24D7nEJS4dHMhjxhUTw1OXT3Y 4gIXH/4MwbyFzUlJExNa1lC1DEEYeaAwHyFgxOC7Ivt36PxJEma8fIPE19cr/4dV vbohuMH0QuJ/bEstg2OYuseSlk2NdHt09A8ynO/XbMi/F4gM4kI9XsEyIiOmHdRi Ok/ppUi+RB3Eea7PAfKMidvS5EHZe6W1i7YnMnpPXg4tP2abI4DKoTWpH6+X/a8I ygFU3GTDyL1mOWK5nJbNrM55saMNmlpLOsjLIxiSDwmcCThb2WLnNlF0hIxKiC2q fpTWCjoxq62O57KTSlQdCEmpxmXTg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudehuddgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkff gfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpegjuhhrihcurfgrnhhkohhvuceohihu rhhiphhvseihuhhrihhpvhdrnhgvtheqnecuffhomhgrihhnpehfrhgvvggsshgurdhorh hgpdgtrhihphhtohguvghvqdhlihhnuhigrdhorhhgpdhgihhthhhusgdrtghomhenucfk phepkeefrddvfeelrdegfedrudeinecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrih hpvheshihurhhiphhvrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from odin.yuripv.net (unknown [83.239.43.16]) by mail.messagingengine.com (Postfix) with ESMTPA id 69F21E4122; Thu, 13 Dec 2018 01:07:48 -0500 (EST) Subject: Re: svn commit: r342009 - head/secure/lib/libcrypto To: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812122156.wBCLum13004450@repo.freebsd.org> From: Yuri Pankov Message-ID: <859a37f9-504d-0f31-86f9-5083d16306b1@yuripv.net> Date: Thu, 13 Dec 2018 09:07:46 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <201812122156.wBCLum13004450@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 644116FA67 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 06:07:51 -0000 Jung-uk Kim wrote: > Author: jkim > Date: Wed Dec 12 21:56:47 2018 > New Revision: 342009 > URL: https://svnweb.freebsd.org/changeset/base/342009 > > Log: > Enable devcryptoeng for OpenSSL. > > Since OpenSSL 1.1.1, the good old BSD-specific cryptodev engine has been > deprecated in favor of this new engine. However, this engine is not > throughly tested on FreeBSD because it was originally written for Linux. > > http://cryptodev-linux.org/ > > Also, the author actually meant to enable it by default on BSD platforms but > he failed to do so because there was a bug in the Configure script. > > https://github.com/openssl/openssl/pull/7882 > > Now they found that it was more generic issue. > > https://github.com/openssl/openssl/pull/7885 > > Therefore, we need to enable this engine on head to give it more exposure. > > Modified: > head/secure/lib/libcrypto/Makefile > head/secure/lib/libcrypto/opensslconf.h.in > > Modified: head/secure/lib/libcrypto/Makefile > ============================================================================== > --- head/secure/lib/libcrypto/Makefile Wed Dec 12 21:56:45 2018 (r342008) > +++ head/secure/lib/libcrypto/Makefile Wed Dec 12 21:56:47 2018 (r342009) > @@ -192,8 +192,8 @@ SRCS+= ecp_nistz256-x86.S ecp_nistz256.c > .endif > > # engine > -SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_dyn.c eng_err.c eng_fat.c > -SRCS+= eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c > +SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_devcrypto.c eng_dyn.c eng_err.c > +SRCS+= eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c > SRCS+= eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_digest.c > SRCS+= tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c > > > Modified: head/secure/lib/libcrypto/opensslconf.h.in > ============================================================================== > --- head/secure/lib/libcrypto/opensslconf.h.in Wed Dec 12 21:56:45 2018 (r342008) > +++ head/secure/lib/libcrypto/opensslconf.h.in Wed Dec 12 21:56:47 2018 (r342009) > @@ -46,9 +46,6 @@ extern "C" { > #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE > # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE > #endif > -#ifndef OPENSSL_NO_DEVCRYPTOENG > -# define OPENSSL_NO_DEVCRYPTOENG > -#endif > #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 > # define OPENSSL_NO_EC_NISTP_64_GCC_128 > #endif I'm now getting "Could not open /dev/crypto: No such file or directory" from every other utility unless cryptodev is loaded; given that it's not in GENERIC, this is somewhat unexpected change in behavior. From owner-svn-src-all@freebsd.org Thu Dec 13 06:59:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 475DA130C527; Thu, 13 Dec 2018 06:59:56 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 E159F716D5; Thu, 13 Dec 2018 06:59:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D493E1C2A9; Thu, 13 Dec 2018 06:59:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD6xtw4087798; Thu, 13 Dec 2018 06:59:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD6xthE087796; Thu, 13 Dec 2018 06:59:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812130659.wBD6xthE087796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 13 Dec 2018 06:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342029 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 342029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E159F716D5 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.44 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.61)[-0.612,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 06:59:56 -0000 Author: dim Date: Thu Dec 13 06:59:55 2018 New Revision: 342029 URL: https://svnweb.freebsd.org/changeset/base/342029 Log: Fix dates that I set into the future incorrectly. Noticed by: ler Modified: head/ObsoleteFiles.inc head/UPDATING Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Dec 13 06:51:20 2018 (r342028) +++ head/ObsoleteFiles.inc Thu Dec 13 06:59:55 2018 (r342029) @@ -38,7 +38,7 @@ # xargs -n1 | sort | uniq -d; # done -# 20181218: new clang import which bumps version from 6.0.1 to 7.0.1. +# 20181211: new clang import which bumps version from 6.0.1 to 7.0.1. OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/asan_interface.h OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/common_interface_defs.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Dec 13 06:51:20 2018 (r342028) +++ head/UPDATING Thu Dec 13 06:59:55 2018 (r342029) @@ -31,7 +31,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20181218: +20181211: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 7.0.1. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 From owner-svn-src-all@freebsd.org Thu Dec 13 08:59:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1071B1310BC1; Thu, 13 Dec 2018 08:59:52 +0000 (UTC) (envelope-from ae@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) server-signature RSA-PSS (4096 bits) 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 A554275111; Thu, 13 Dec 2018 08:59:51 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94B711D739; Thu, 13 Dec 2018 08:59:51 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD8xpIP050857; Thu, 13 Dec 2018 08:59:51 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD8xp1X050856; Thu, 13 Dec 2018 08:59:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201812130859.wBD8xp1X050856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 13 Dec 2018 08:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342030 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 342030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A554275111 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.30 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.48)[-0.475,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 08:59:52 -0000 Author: ae Date: Thu Dec 13 08:59:51 2018 New Revision: 342030 URL: https://svnweb.freebsd.org/changeset/base/342030 Log: Plug memory leak for AES_*_NIST_GMAC algorithms. swcr_newsession() allocates sw_ictx for these algorithms, thus we need to free() it in swcr_freesession(). PR: 233907 MFC after: 1 week Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Thu Dec 13 06:59:55 2018 (r342029) +++ head/sys/opencrypto/cryptosoft.c Thu Dec 13 08:59:51 2018 (r342030) @@ -1091,6 +1091,9 @@ swcr_freesession(device_t dev, crypto_session_t cses) case CRYPTO_SHA2_256: case CRYPTO_SHA2_384: case CRYPTO_SHA2_512: + case CRYPTO_AES_128_NIST_GMAC: + case CRYPTO_AES_192_NIST_GMAC: + case CRYPTO_AES_256_NIST_GMAC: axf = swd->sw_axf; if (swd->sw_ictx) { From owner-svn-src-all@freebsd.org Thu Dec 13 09:39:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A50013132F1; Thu, 13 Dec 2018 09:39:06 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 01B1D76FCE; Thu, 13 Dec 2018 09:39:06 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E903F1DE88; Thu, 13 Dec 2018 09:39:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD9d5Ck072135; Thu, 13 Dec 2018 09:39:05 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD9d5oA072134; Thu, 13 Dec 2018 09:39:05 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812130939.wBD9d5oA072134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 13 Dec 2018 09:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342031 - stable/12/sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/netmap X-SVN-Commit-Revision: 342031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01B1D76FCE X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.32 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.842,0]; NEURAL_HAM_SHORT(-0.48)[-0.480,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 09:39:06 -0000 Author: vmaffione Date: Thu Dec 13 09:39:05 2018 New Revision: 342031 URL: https://svnweb.freebsd.org/changeset/base/342031 Log: MFC r341624 netmap: netmap_transmit should honor bpf packet tap hook This allows tcpdump to capture outbound kernel packets while in netmap mode Submitted by: Marc de la Gueronniere Reviewed by: vmaffione MFC after: 1 week Sponsored by: Verisign, Inc. Differential Revision: https://reviews.freebsd.org/D17896 Modified: stable/12/sys/dev/netmap/netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap.c ============================================================================== --- stable/12/sys/dev/netmap/netmap.c Thu Dec 13 08:59:51 2018 (r342030) +++ stable/12/sys/dev/netmap/netmap.c Thu Dec 13 09:39:05 2018 (r342031) @@ -449,6 +449,7 @@ ports attached to the switch) #include /* bus_dmamap_* */ #include #include +#include /* ETHER_BPF_MTAP */ #elif defined(linux) @@ -3859,6 +3860,10 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) RD(1, "%s drop mbuf that needs generic segmentation offload", na->name); goto done; } + +#ifdef __FreeBSD__ + ETHER_BPF_MTAP(ifp, m); +#endif /* __FreeBSD__ */ /* protect against netmap_rxsync_from_host(), netmap_sw_to_nic() * and maybe other instances of netmap_transmit (the latter From owner-svn-src-all@freebsd.org Thu Dec 13 09:40:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA5A913134AA; Thu, 13 Dec 2018 09:40:06 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 8FBED7716E; Thu, 13 Dec 2018 09:40:06 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82B891DE91; Thu, 13 Dec 2018 09:40:06 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBD9e6Nx072260; Thu, 13 Dec 2018 09:40:06 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBD9e6OA072259; Thu, 13 Dec 2018 09:40:06 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812130940.wBD9e6OA072259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 13 Dec 2018 09:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342032 - stable/12/tools/tools/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/tools/tools/netmap X-SVN-Commit-Revision: 342032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8FBED7716E X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.32 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.839,0]; NEURAL_HAM_SHORT(-0.48)[-0.483,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 09:40:07 -0000 Author: vmaffione Date: Thu Dec 13 09:40:06 2018 New Revision: 342032 URL: https://svnweb.freebsd.org/changeset/base/342032 Log: MFC r341726 tools: netmap: pkt-gen: check packet length against interface MTU Validate the value of the -l argument (packet length) against the MTU of the netmap port. In case the netmap port does not refer to a physical interface (e.g. VALE port or pipe), then the netmap buffer size is used as MTU. This change also sets a better default value for the -M option, so that pkt-gen uses the largest possible fragments in case of multi-slot packets. Differential Revision: https://reviews.freebsd.org/D18436 Modified: stable/12/tools/tools/netmap/pkt-gen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/netmap/pkt-gen.c ============================================================================== --- stable/12/tools/tools/netmap/pkt-gen.c Thu Dec 13 09:39:05 2018 (r342031) +++ stable/12/tools/tools/netmap/pkt-gen.c Thu Dec 13 09:40:06 2018 (r342032) @@ -195,7 +195,7 @@ struct virt_header { uint8_t fields[VIRT_HDR_MAX]; }; -#define MAX_BODYSIZE 16384 +#define MAX_BODYSIZE 65536 struct pkt { struct virt_header vh; @@ -238,7 +238,6 @@ struct mac_range { /* ifname can be netmap:foo-xxxx */ #define MAX_IFNAMELEN 64 /* our buffer for ifname */ -//#define MAX_PKTSIZE 1536 #define MAX_PKTSIZE MAX_BODYSIZE /* XXX: + IP_HDR + ETH_HDR */ /* compact timestamp to fit into 60 byte packet. (enough to obtain RTT) */ @@ -263,7 +262,7 @@ struct glob_arg { int forever; uint64_t npackets; /* total packets to send */ int frags; /* fragments per packet */ - u_int mtu; /* size of each fragment */ + u_int frag_size; /* size of each fragment */ int nthreads; int cpus; /* cpus used for running */ int system_cpus; /* cpus on the system */ @@ -308,6 +307,11 @@ struct glob_arg { }; enum dev_type { DEV_NONE, DEV_NETMAP, DEV_PCAP, DEV_TAP }; +enum { + TD_TYPE_SENDER = 1, + TD_TYPE_RECEIVER, + TD_TYPE_OTHER, +}; /* * Arguments for a new thread. The same structure is used by @@ -509,6 +513,42 @@ extract_mac_range(struct mac_range *r) return 0; } +static int +get_if_mtu(const struct glob_arg *g) +{ + char ifname[IFNAMSIZ]; + struct ifreq ifreq; + int s, ret; + + if (!strncmp(g->ifname, "netmap:", 7) && !strchr(g->ifname, '{') + && !strchr(g->ifname, '}')) { + /* Parse the interface name and ask the kernel for the + * MTU value. */ + strncpy(ifname, g->ifname+7, IFNAMSIZ-1); + ifname[strcspn(ifname, "-*^{}/@")] = '\0'; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) { + D("socket() failed: %s", strerror(errno)); + return s; + } + + memset(&ifreq, 0, sizeof(ifreq)); + strncpy(ifreq.ifr_name, ifname, IFNAMSIZ); + + ret = ioctl(s, SIOCGIFMTU, &ifreq); + if (ret) { + D("ioctl(SIOCGIFMTU) failed: %s", strerror(errno)); + } + + return ifreq.ifr_mtu; + } + + /* This is a pipe or a VALE port, where the MTU is very large, + * so we use some practical limit. */ + return 65536; +} + static struct targ *targs; static int global_nthreads; @@ -1581,18 +1621,18 @@ sender_body(void *data) #endif /* NO_PCAP */ } else { int tosend = 0; - u_int bufsz, mtu = targ->g->mtu; + u_int bufsz, frag_size = targ->g->frag_size; nifp = targ->nmd->nifp; txring = NETMAP_TXRING(nifp, targ->nmd->first_tx_ring); bufsz = txring->nr_buf_size; - if (bufsz < mtu) - mtu = bufsz; + if (bufsz < frag_size) + frag_size = bufsz; targ->frag_size = targ->g->pkt_size / targ->frags; - if (targ->frag_size > mtu) { - targ->frags = targ->g->pkt_size / mtu; - targ->frag_size = mtu; - if (targ->g->pkt_size % mtu != 0) + if (targ->frag_size > frag_size) { + targ->frags = targ->g->pkt_size / frag_size; + targ->frag_size = frag_size; + if (targ->g->pkt_size % frag_size != 0) targ->frags++; } D("frags %u frag_size %u", targ->frags, targ->frag_size); @@ -2441,12 +2481,6 @@ usage(int errcode) exit(errcode); } -enum { - TD_TYPE_SENDER = 1, - TD_TYPE_RECEIVER, - TD_TYPE_OTHER, -}; - static void start_threads(struct glob_arg *g) { int i; @@ -2779,8 +2813,8 @@ main(int arc, char **argv) g.cpus = 1; /* default */ g.forever = 1; g.tx_rate = 0; - g.frags =1; - g.mtu = 1500; + g.frags = 1; + g.frag_size = (u_int)-1; /* use the netmap buffer size by default */ g.nmr_config = ""; g.virt_header = 0; g.wait_link = 2; /* wait 2 seconds for physical ports */ @@ -2824,7 +2858,7 @@ main(int arc, char **argv) break; case 'M': - g.mtu = atoi(optarg); + g.frag_size = atoi(optarg); break; case 'f': @@ -3102,6 +3136,16 @@ main(int arc, char **argv) if (g.nthreads < 1 || g.nthreads > devqueues) { D("bad nthreads %d, have %d queues", g.nthreads, devqueues); // continue, fail later + } + + if (g.td_type == TD_TYPE_SENDER) { + int mtu = get_if_mtu(&g); + + if (mtu > 0 && g.pkt_size > mtu) { + D("pkt_size (%d) must be <= mtu (%d)", + g.pkt_size, mtu); + return -1; + } } if (verbose) { From owner-svn-src-all@freebsd.org Thu Dec 13 10:13:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3A5113156FB; Thu, 13 Dec 2018 10:13:30 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 60A26809BA; Thu, 13 Dec 2018 10:13:30 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 38DF31E591; Thu, 13 Dec 2018 10:13:30 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDADUDZ093142; Thu, 13 Dec 2018 10:13:30 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDADTjo093138; Thu, 13 Dec 2018 10:13:29 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812131013.wBDADTjo093138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 13 Dec 2018 10:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342033 - in stable/11/sys: conf dev/netmap modules/netmap net X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/11/sys: conf dev/netmap modules/netmap net X-SVN-Commit-Revision: 342033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 60A26809BA X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.55)[-0.553,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 10:13:31 -0000 Author: vmaffione Date: Thu Dec 13 10:13:29 2018 New Revision: 342033 URL: https://svnweb.freebsd.org/changeset/base/342033 Log: MFC r341516, r341589 netmap: align codebase to the current upstream (760279cfb2730a585) Changelist: - Replace netmap passthrough host support with a more general mechanism to call TXSYNC/RXSYNC from an in-kernel event-loop. No kernel threads are used to use this feature: the application is required to spawn a thread (or a process) and issue a SYNC_KLOOP_START (NIOCCTRL) command in the thread body. The kernel loop is executed by the ioctl implementation, which returns to userspace only when a different thread calls SYNC_KLOOP_STOP or the netmap file descriptor is closed. - Update the if_ptnet driver to cope with the new data structures, and prune all the obsolete ptnetmap code. - Add support for "null" netmap ports, useful to allocate netmap_if, netmap_ring and netmap buffers to be used by specialized applications (e.g. hypervisors). TXSYNC/RXSYNC on these ports have no effect. - Various fixes and code refactoring. Sponsored by: Sunny Valley Networks Differential Revision: https://reviews.freebsd.org/D18015 Added: stable/11/sys/dev/netmap/netmap_kloop.c - copied unchanged from r341815, stable/12/sys/dev/netmap/netmap_kloop.c stable/11/sys/dev/netmap/netmap_null.c - copied unchanged from r341815, stable/12/sys/dev/netmap/netmap_null.c Modified: stable/11/sys/conf/files stable/11/sys/dev/netmap/if_ixl_netmap.h stable/11/sys/dev/netmap/if_vtnet_netmap.h stable/11/sys/dev/netmap/netmap.c stable/11/sys/dev/netmap/netmap_bdg.c stable/11/sys/dev/netmap/netmap_bdg.h stable/11/sys/dev/netmap/netmap_freebsd.c stable/11/sys/dev/netmap/netmap_generic.c stable/11/sys/dev/netmap/netmap_kern.h stable/11/sys/dev/netmap/netmap_legacy.c stable/11/sys/dev/netmap/netmap_mem2.c stable/11/sys/dev/netmap/netmap_mem2.h stable/11/sys/dev/netmap/netmap_pipe.c stable/11/sys/dev/netmap/netmap_vale.c stable/11/sys/modules/netmap/Makefile stable/11/sys/net/netmap.h stable/11/sys/net/netmap_user.h stable/11/sys/net/netmap_virt.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Thu Dec 13 09:40:06 2018 (r342032) +++ stable/11/sys/conf/files Thu Dec 13 10:13:29 2018 (r342033) @@ -2469,17 +2469,19 @@ dev/ncr/ncr.c optional ncr pci dev/ncv/ncr53c500.c optional ncv dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/netmap/netmap.c optional netmap +dev/netmap/netmap_bdg.c optional netmap dev/netmap/netmap_freebsd.c optional netmap dev/netmap/netmap_generic.c optional netmap +dev/netmap/netmap_kloop.c optional netmap +dev/netmap/netmap_legacy.c optional netmap dev/netmap/netmap_mbq.c optional netmap dev/netmap/netmap_mem2.c optional netmap dev/netmap/netmap_monitor.c optional netmap +dev/netmap/netmap_null.c optional netmap dev/netmap/netmap_offloadings.c optional netmap dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_pt.c optional netmap dev/netmap/netmap_vale.c optional netmap -dev/netmap/netmap_legacy.c optional netmap -dev/netmap/netmap_bdg.c optional netmap # compile-with "${NORMAL_C} -Wconversion -Wextra" dev/nfsmb/nfsmb.c optional nfsmb pci dev/nge/if_nge.c optional nge Modified: stable/11/sys/dev/netmap/if_ixl_netmap.h ============================================================================== --- stable/11/sys/dev/netmap/if_ixl_netmap.h Thu Dec 13 09:40:06 2018 (r342032) +++ stable/11/sys/dev/netmap/if_ixl_netmap.h Thu Dec 13 10:13:29 2018 (r342033) @@ -130,7 +130,7 @@ ixl_netmap_attach(struct ixl_vsi *vsi) na.ifp = vsi->ifp; na.na_flags = NAF_BDG_MAYSLEEP; // XXX check that queues is set. - nm_prinf("queues is %p\n", vsi->queues); + nm_prinf("queues is %p", vsi->queues); if (vsi->queues) { na.num_tx_desc = vsi->queues[0].num_desc; na.num_rx_desc = vsi->queues[0].num_desc; Modified: stable/11/sys/dev/netmap/if_vtnet_netmap.h ============================================================================== --- stable/11/sys/dev/netmap/if_vtnet_netmap.h Thu Dec 13 09:40:06 2018 (r342032) +++ stable/11/sys/dev/netmap/if_vtnet_netmap.h Thu Dec 13 10:13:29 2018 (r342033) @@ -79,7 +79,7 @@ vtnet_free_used(struct virtqueue *vq, int netmap_bufs, } if (deq) - nm_prinf("%d sgs dequeued from %s-%d (netmap=%d)\n", + nm_prinf("%d sgs dequeued from %s-%d (netmap=%d)", deq, nm_txrx2str(t), idx, netmap_bufs); } @@ -230,7 +230,7 @@ vtnet_netmap_txsync(struct netmap_kring *kring, int fl /*writeable=*/0); if (unlikely(err)) { if (err != ENOSPC) - nm_prerr("virtqueue_enqueue(%s) failed: %d\n", + nm_prerr("virtqueue_enqueue(%s) failed: %d", kring->name, err); break; } @@ -251,7 +251,7 @@ vtnet_netmap_txsync(struct netmap_kring *kring, int fl if (token == NULL) break; if (unlikely(token != (void *)txq)) - nm_prerr("BUG: TX token mismatch\n"); + nm_prerr("BUG: TX token mismatch"); else n++; } @@ -307,7 +307,7 @@ vtnet_netmap_kring_refill(struct netmap_kring *kring, /*readable=*/0, /*writeable=*/sg.sg_nseg); if (unlikely(err)) { if (err != ENOSPC) - nm_prerr("virtqueue_enqueue(%s) failed: %d\n", + nm_prerr("virtqueue_enqueue(%s) failed: %d", kring->name, err); break; } @@ -391,7 +391,7 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int fl break; } if (unlikely(token != (void *)rxq)) { - nm_prerr("BUG: RX token mismatch\n"); + nm_prerr("BUG: RX token mismatch"); } else { /* Skip the virtio-net header. */ len -= sc->vtnet_hdr_size; @@ -533,7 +533,7 @@ vtnet_netmap_attach(struct vtnet_softc *sc) netmap_attach(&na); - nm_prinf("vtnet attached txq=%d, txd=%d rxq=%d, rxd=%d\n", + nm_prinf("vtnet attached txq=%d, txd=%d rxq=%d, rxd=%d", na.num_tx_rings, na.num_tx_desc, na.num_tx_rings, na.num_rx_desc); } Modified: stable/11/sys/dev/netmap/netmap.c ============================================================================== --- stable/11/sys/dev/netmap/netmap.c Thu Dec 13 09:40:06 2018 (r342032) +++ stable/11/sys/dev/netmap/netmap.c Thu Dec 13 10:13:29 2018 (r342033) @@ -478,6 +478,9 @@ ports attached to the switch) /* user-controlled variables */ int netmap_verbose; +#ifdef CONFIG_NETMAP_DEBUG +int netmap_debug; +#endif /* CONFIG_NETMAP_DEBUG */ static int netmap_no_timestamp; /* don't timestamp on rxsync */ int netmap_mitigate = 1; @@ -526,9 +529,6 @@ int netmap_generic_hwcsum = 0; /* Non-zero if ptnet devices are allowed to use virtio-net headers. */ int ptnet_vnet_hdr = 1; -/* 0 if ptnetmap should not use worker threads for TX processing */ -int ptnetmap_tx_workers = 1; - /* * SYSCTL calls are grouped between SYSBEGIN and SYSEND to be emulated * in some other operating systems @@ -539,6 +539,10 @@ SYSCTL_DECL(_dev_netmap); SYSCTL_NODE(_dev, OID_AUTO, netmap, CTLFLAG_RW, 0, "Netmap args"); SYSCTL_INT(_dev_netmap, OID_AUTO, verbose, CTLFLAG_RW, &netmap_verbose, 0, "Verbose mode"); +#ifdef CONFIG_NETMAP_DEBUG +SYSCTL_INT(_dev_netmap, OID_AUTO, debug, + CTLFLAG_RW, &netmap_debug, 0, "Debug messages"); +#endif /* CONFIG_NETMAP_DEBUG */ SYSCTL_INT(_dev_netmap, OID_AUTO, no_timestamp, CTLFLAG_RW, &netmap_no_timestamp, 0, "no_timestamp"); SYSCTL_INT(_dev_netmap, OID_AUTO, no_pendintr, CTLFLAG_RW, &netmap_no_pendintr, @@ -570,8 +574,6 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, generic_txqdisc, CTL #endif SYSCTL_INT(_dev_netmap, OID_AUTO, ptnet_vnet_hdr, CTLFLAG_RW, &ptnet_vnet_hdr, 0, "Allow ptnet devices to use virtio-net headers"); -SYSCTL_INT(_dev_netmap, OID_AUTO, ptnetmap_tx_workers, CTLFLAG_RW, - &ptnetmap_tx_workers, 0, "Use worker threads for pnetmap TX processing"); SYSEND; @@ -693,7 +695,7 @@ nm_bound_var(u_int *v, u_int dflt, u_int lo, u_int hi, op = "Clamp"; } if (op && msg) - nm_prinf("%s %s to %d (was %d)\n", op, msg, *v, oldv); + nm_prinf("%s %s to %d (was %d)", op, msg, *v, oldv); return *v; } @@ -777,13 +779,14 @@ netmap_update_config(struct netmap_adapter *na) na->num_rx_rings = info.num_rx_rings; na->num_rx_desc = info.num_rx_descs; na->rx_buf_maxsize = info.rx_buf_maxsize; - D("configuration changed for %s: txring %d x %d, " - "rxring %d x %d, rxbufsz %d", - na->name, na->num_tx_rings, na->num_tx_desc, - na->num_rx_rings, na->num_rx_desc, na->rx_buf_maxsize); + if (netmap_verbose) + nm_prinf("configuration changed for %s: txring %d x %d, " + "rxring %d x %d, rxbufsz %d", + na->name, na->num_tx_rings, na->num_tx_desc, + na->num_rx_rings, na->num_rx_desc, na->rx_buf_maxsize); return 0; } - D("WARNING: configuration changed for %s while active: " + nm_prerr("WARNING: configuration changed for %s while active: " "txring %d x %d, rxring %d x %d, rxbufsz %d", na->name, info.num_tx_rings, info.num_tx_descs, info.num_rx_rings, info.num_rx_descs, @@ -829,7 +832,8 @@ netmap_krings_create(struct netmap_adapter *na, u_int enum txrx t; if (na->tx_rings != NULL) { - D("warning: krings were already created"); + if (netmap_debug & NM_DEBUG_ON) + nm_prerr("warning: krings were already created"); return 0; } @@ -843,7 +847,7 @@ netmap_krings_create(struct netmap_adapter *na, u_int na->tx_rings = nm_os_malloc((size_t)len); if (na->tx_rings == NULL) { - D("Cannot allocate krings"); + nm_prerr("Cannot allocate krings"); return ENOMEM; } na->rx_rings = na->tx_rings + n[NR_TX]; @@ -911,7 +915,8 @@ netmap_krings_delete(struct netmap_adapter *na) enum txrx t; if (na->tx_rings == NULL) { - D("warning: krings were already deleted"); + if (netmap_debug & NM_DEBUG_ON) + nm_prerr("warning: krings were already deleted"); return; } @@ -1013,11 +1018,11 @@ netmap_do_unregif(struct netmap_priv_d *priv) * happens if the close() occurs while a concurrent * syscall is running. */ - if (netmap_verbose) - D("deleting last instance for %s", na->name); + if (netmap_debug & NM_DEBUG_ON) + nm_prinf("deleting last instance for %s", na->name); if (nm_netmap_on(na)) { - D("BUG: netmap on while going to delete the krings"); + nm_prerr("BUG: netmap on while going to delete the krings"); } na->nm_krings_delete(na); @@ -1034,14 +1039,6 @@ netmap_do_unregif(struct netmap_priv_d *priv) priv->np_nifp = NULL; } -/* call with NMG_LOCK held */ -static __inline int -nm_si_user(struct netmap_priv_d *priv, enum txrx t) -{ - return (priv->np_na != NULL && - (priv->np_qlast[t] - priv->np_qfirst[t] > 1)); -} - struct netmap_priv_d* netmap_priv_new(void) { @@ -1137,8 +1134,8 @@ netmap_send_up(struct ifnet *dst, struct mbq *q) /* Send packets up, outside the lock; head/prev machinery * is only useful for Windows. */ while ((m = mbq_dequeue(q)) != NULL) { - if (netmap_verbose & NM_VERB_HOST) - D("sending up pkt %p size %d", m, MBUF_LEN(m)); + if (netmap_debug & NM_DEBUG_HOST) + nm_prinf("sending up pkt %p size %d", m, MBUF_LEN(m)); prev = nm_os_send_up(dst, m, prev); if (head == NULL) head = prev; @@ -1333,8 +1330,8 @@ netmap_rxsync_from_host(struct netmap_kring *kring, in m_copydata(m, 0, len, NMB(na, slot)); ND("nm %d len %d", nm_i, len); - if (netmap_verbose) - D("%s", nm_dump_buf(NMB(na, slot),len, 128, NULL)); + if (netmap_debug & NM_DEBUG_HOST) + nm_prinf("%s", nm_dump_buf(NMB(na, slot),len, 128, NULL)); slot->len = len; slot->flags = 0; @@ -1501,7 +1498,7 @@ netmap_get_na(struct nmreq_header *hdr, if (req->nr_mode == NR_REG_PIPE_MASTER || req->nr_mode == NR_REG_PIPE_SLAVE) { /* Do not accept deprecated pipe modes. */ - D("Deprecated pipe nr_mode, use xx{yy or xx}yy syntax"); + nm_prerr("Deprecated pipe nr_mode, use xx{yy or xx}yy syntax"); return EINVAL; } @@ -1528,9 +1525,7 @@ netmap_get_na(struct nmreq_header *hdr, * 0 !NULL type matches and na created/found * !0 !NULL impossible */ - - /* try to see if this is a ptnetmap port */ - error = netmap_get_pt_host_na(hdr, na, nmd, create); + error = netmap_get_null_na(hdr, na, nmd, create); if (error || *na != NULL) goto out; @@ -1740,7 +1735,7 @@ nm_rxsync_prologue(struct netmap_kring *kring, struct /* * Error routine called when txsync/rxsync detects an error. - * Can't do much more than resetting head =cur = hwcur, tail = hwtail + * Can't do much more than resetting head = cur = hwcur, tail = hwtail * Return 1 on reinit. * * This routine is only called by the upper half of the kernel. @@ -1811,12 +1806,6 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 enum txrx t; u_int j; - if ((nr_flags & NR_PTNETMAP_HOST) && ((nr_mode != NR_REG_ALL_NIC) || - nr_flags & (NR_RX_RINGS_ONLY|NR_TX_RINGS_ONLY))) { - D("Error: only NR_REG_ALL_NIC supported with netmap passthrough"); - return EINVAL; - } - for_rx_tx(t) { if (nr_flags & excluded_direction[t]) { priv->np_qfirst[t] = priv->np_qlast[t] = 0; @@ -1824,6 +1813,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 } switch (nr_mode) { case NR_REG_ALL_NIC: + case NR_REG_NULL: priv->np_qfirst[t] = 0; priv->np_qlast[t] = nma_get_nrings(na, t); ND("ALL/PIPE: %s %d %d", nm_txrx2str(t), @@ -1832,7 +1822,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 case NR_REG_SW: case NR_REG_NIC_SW: if (!(na->na_flags & NAF_HOST_RINGS)) { - D("host rings not supported"); + nm_prerr("host rings not supported"); return EINVAL; } priv->np_qfirst[t] = (nr_mode == NR_REG_SW ? @@ -1845,7 +1835,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 case NR_REG_ONE_NIC: if (nr_ringid >= na->num_tx_rings && nr_ringid >= na->num_rx_rings) { - D("invalid ring id %d", nr_ringid); + nm_prerr("invalid ring id %d", nr_ringid); return EINVAL; } /* if not enough rings, use the first one */ @@ -1858,11 +1848,11 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 priv->np_qfirst[t], priv->np_qlast[t]); break; default: - D("invalid regif type %d", nr_mode); + nm_prerr("invalid regif type %d", nr_mode); return EINVAL; } } - priv->np_flags = nr_flags | nr_mode; // TODO + priv->np_flags = nr_flags; /* Allow transparent forwarding mode in the host --> nic * direction only if all the TX hw rings have been opened. */ @@ -1872,7 +1862,7 @@ netmap_interp_ringid(struct netmap_priv_d *priv, uint3 } if (netmap_verbose) { - D("%s: tx [%d,%d) rx [%d,%d) id %d", + nm_prinf("%s: tx [%d,%d) rx [%d,%d) id %d", na->name, priv->np_qfirst[NR_TX], priv->np_qlast[NR_TX], @@ -1928,6 +1918,7 @@ netmap_unset_ringid(struct netmap_priv_d *priv) } priv->np_flags = 0; priv->np_txpoll = 0; + priv->np_kloop_state = 0; } @@ -1944,8 +1935,8 @@ netmap_krings_get(struct netmap_priv_d *priv) int excl = (priv->np_flags & NR_EXCLUSIVE); enum txrx t; - if (netmap_verbose) - D("%s: grabbing tx [%d, %d) rx [%d, %d)", + if (netmap_debug & NM_DEBUG_ON) + nm_prinf("%s: grabbing tx [%d, %d) rx [%d, %d)", na->name, priv->np_qfirst[NR_TX], priv->np_qlast[NR_TX], @@ -2022,6 +2013,110 @@ nm_priv_rx_enabled(struct netmap_priv_d *priv) return (priv->np_qfirst[NR_RX] != priv->np_qlast[NR_RX]); } +/* Validate the CSB entries for both directions (atok and ktoa). + * To be called under NMG_LOCK(). */ +static int +netmap_csb_validate(struct netmap_priv_d *priv, struct nmreq_opt_csb *csbo) +{ + struct nm_csb_atok *csb_atok_base = + (struct nm_csb_atok *)(uintptr_t)csbo->csb_atok; + struct nm_csb_ktoa *csb_ktoa_base = + (struct nm_csb_ktoa *)(uintptr_t)csbo->csb_ktoa; + enum txrx t; + int num_rings[NR_TXRX], tot_rings; + size_t entry_size[2]; + void *csb_start[2]; + int i; + + if (priv->np_kloop_state & NM_SYNC_KLOOP_RUNNING) { + nm_prerr("Cannot update CSB while kloop is running"); + return EBUSY; + } + + tot_rings = 0; + for_rx_tx(t) { + num_rings[t] = priv->np_qlast[t] - priv->np_qfirst[t]; + tot_rings += num_rings[t]; + } + if (tot_rings <= 0) + return 0; + + if (!(priv->np_flags & NR_EXCLUSIVE)) { + nm_prerr("CSB mode requires NR_EXCLUSIVE"); + return EINVAL; + } + + entry_size[0] = sizeof(*csb_atok_base); + entry_size[1] = sizeof(*csb_ktoa_base); + csb_start[0] = (void *)csb_atok_base; + csb_start[1] = (void *)csb_ktoa_base; + + for (i = 0; i < 2; i++) { + /* On Linux we could use access_ok() to simplify + * the validation. However, the advantage of + * this approach is that it works also on + * FreeBSD. */ + size_t csb_size = tot_rings * entry_size[i]; + void *tmp; + int err; + + if ((uintptr_t)csb_start[i] & (entry_size[i]-1)) { + nm_prerr("Unaligned CSB address"); + return EINVAL; + } + + tmp = nm_os_malloc(csb_size); + if (!tmp) + return ENOMEM; + if (i == 0) { + /* Application --> kernel direction. */ + err = copyin(csb_start[i], tmp, csb_size); + } else { + /* Kernel --> application direction. */ + memset(tmp, 0, csb_size); + err = copyout(tmp, csb_start[i], csb_size); + } + nm_os_free(tmp); + if (err) { + nm_prerr("Invalid CSB address"); + return err; + } + } + + priv->np_csb_atok_base = csb_atok_base; + priv->np_csb_ktoa_base = csb_ktoa_base; + + /* Initialize the CSB. */ + for_rx_tx(t) { + for (i = 0; i < num_rings[t]; i++) { + struct netmap_kring *kring = + NMR(priv->np_na, t)[i + priv->np_qfirst[t]]; + struct nm_csb_atok *csb_atok = csb_atok_base + i; + struct nm_csb_ktoa *csb_ktoa = csb_ktoa_base + i; + + if (t == NR_RX) { + csb_atok += num_rings[NR_TX]; + csb_ktoa += num_rings[NR_TX]; + } + + CSB_WRITE(csb_atok, head, kring->rhead); + CSB_WRITE(csb_atok, cur, kring->rcur); + CSB_WRITE(csb_atok, appl_need_kick, 1); + CSB_WRITE(csb_atok, sync_flags, 1); + CSB_WRITE(csb_ktoa, hwcur, kring->nr_hwcur); + CSB_WRITE(csb_ktoa, hwtail, kring->nr_hwtail); + CSB_WRITE(csb_ktoa, kern_need_kick, 1); + + nm_prinf("csb_init for kring %s: head %u, cur %u, " + "hwcur %u, hwtail %u", kring->name, + kring->rhead, kring->rcur, kring->nr_hwcur, + kring->nr_hwtail); + } + } + + return 0; +} + /* * possibly move the interface to netmap-mode. * If success it returns a pointer to netmap_if, otherwise NULL. @@ -2138,7 +2233,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net na->name, mtu, na->rx_buf_maxsize, nbs); if (na->rx_buf_maxsize == 0) { - D("%s: error: rx_buf_maxsize == 0", na->name); + nm_prerr("%s: error: rx_buf_maxsize == 0", na->name); error = EIO; goto err_drop_mem; } @@ -2150,7 +2245,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net * cannot be used in this case. */ if (nbs < mtu) { nm_prerr("error: netmap buf size (%u) " - "< device MTU (%u)\n", nbs, mtu); + "< device MTU (%u)", nbs, mtu); error = EINVAL; goto err_drop_mem; } @@ -2163,14 +2258,14 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net if (!(na->na_flags & NAF_MOREFRAG)) { nm_prerr("error: large MTU (%d) needed " "but %s does not support " - "NS_MOREFRAG\n", mtu, + "NS_MOREFRAG", mtu, na->ifp->if_xname); error = EINVAL; goto err_drop_mem; } else if (nbs < na->rx_buf_maxsize) { nm_prerr("error: using NS_MOREFRAG on " "%s requires netmap buf size " - ">= %u\n", na->ifp->if_xname, + ">= %u", na->ifp->if_xname, na->rx_buf_maxsize); error = EINVAL; goto err_drop_mem; @@ -2178,7 +2273,7 @@ netmap_do_regif(struct netmap_priv_d *priv, struct net nm_prinf("info: netmap application on " "%s needs to support " "NS_MOREFRAG " - "(MTU=%u,netmap_buf_size=%u)\n", + "(MTU=%u,netmap_buf_size=%u)", na->ifp->if_xname, mtu, nbs); } } @@ -2308,7 +2403,6 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c struct ifnet *ifp = NULL; int error = 0; u_int i, qfirst, qlast; - struct netmap_if *nifp; struct netmap_kring **krings; int sync_flags; enum txrx t; @@ -2317,14 +2411,10 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c case NIOCCTRL: { struct nmreq_header *hdr = (struct nmreq_header *)data; - if (hdr->nr_version != NETMAP_API) { - D("API mismatch for reqtype %d: got %d need %d", - hdr->nr_version, - hdr->nr_version, NETMAP_API); - hdr->nr_version = NETMAP_API; - } if (hdr->nr_version < NETMAP_MIN_API || hdr->nr_version > NETMAP_MAX_API) { + nm_prerr("API mismatch: got %d need %d", + hdr->nr_version, NETMAP_API); return EINVAL; } @@ -2346,13 +2436,13 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c case NETMAP_REQ_REGISTER: { struct nmreq_register *req = (struct nmreq_register *)(uintptr_t)hdr->nr_body; + struct netmap_if *nifp; + /* Protect access to priv from concurrent requests. */ NMG_LOCK(); do { - u_int memflags; -#ifdef WITH_EXTMEM struct nmreq_option *opt; -#endif /* WITH_EXTMEM */ + u_int memflags; if (priv->np_nifp != NULL) { /* thread already registered */ error = EBUSY; @@ -2383,6 +2473,10 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c /* find the allocator and get a reference */ nmd = netmap_mem_find(req->nr_mem_id); if (nmd == NULL) { + if (netmap_verbose) { + nm_prerr("%s: failed to find mem_id %u", + hdr->nr_name, req->nr_mem_id); + } error = EINVAL; break; } @@ -2398,6 +2492,8 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } if (na->virt_hdr_len && !(req->nr_flags & NR_ACCEPT_VNET_HDR)) { + nm_prerr("virt_hdr_len=%d, but application does " + "not accept it", na->virt_hdr_len); error = EIO; break; } @@ -2407,6 +2503,23 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c if (error) { /* reg. failed, release priv and ref */ break; } + + opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, + NETMAP_REQ_OPT_CSB); + if (opt != NULL) { + struct nmreq_opt_csb *csbo = + (struct nmreq_opt_csb *)opt; + error = nmreq_checkduplicate(opt); + if (!error) { + error = netmap_csb_validate(priv, csbo); + } + opt->nro_status = error; + if (error) { + netmap_do_unregif(priv); + break; + } + } + nifp = priv->np_nifp; priv->np_td = td; /* for debugging purposes */ @@ -2431,12 +2544,12 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c if (req->nr_extra_bufs) { if (netmap_verbose) - D("requested %d extra buffers", + nm_prinf("requested %d extra buffers", req->nr_extra_bufs); req->nr_extra_bufs = netmap_extra_alloc(na, &nifp->ni_bufs_head, req->nr_extra_bufs); if (netmap_verbose) - D("got %d extra buffers", req->nr_extra_bufs); + nm_prinf("got %d extra buffers", req->nr_extra_bufs); } req->nr_offset = netmap_mem_if_offset(na->nm_mem, nifp); @@ -2474,6 +2587,7 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c * so that we can call netmap_get_na(). */ struct nmreq_register regreq; bzero(®req, sizeof(regreq)); + regreq.nr_mode = NR_REG_ALL_NIC; regreq.nr_tx_slots = req->nr_tx_slots; regreq.nr_rx_slots = req->nr_rx_slots; regreq.nr_tx_rings = req->nr_tx_rings; @@ -2495,6 +2609,10 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } else { nmd = netmap_mem_find(req->nr_mem_id ? req->nr_mem_id : 1); if (nmd == NULL) { + if (netmap_verbose) + nm_prerr("%s: failed to find mem_id %u", + hdr->nr_name, + req->nr_mem_id ? req->nr_mem_id : 1); error = EINVAL; break; } @@ -2506,8 +2624,6 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c break; if (na == NULL) /* only memory info */ break; - req->nr_offset = 0; - req->nr_rx_slots = req->nr_tx_slots = 0; netmap_update_config(na); req->nr_rx_rings = na->num_rx_rings; req->nr_tx_rings = na->num_tx_rings; @@ -2520,17 +2636,17 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } #ifdef WITH_VALE case NETMAP_REQ_VALE_ATTACH: { - error = nm_bdg_ctl_attach(hdr, NULL /* userspace request */); + error = netmap_vale_attach(hdr, NULL /* userspace request */); break; } case NETMAP_REQ_VALE_DETACH: { - error = nm_bdg_ctl_detach(hdr, NULL /* userspace request */); + error = netmap_vale_detach(hdr, NULL /* userspace request */); break; } case NETMAP_REQ_VALE_LIST: { - error = netmap_bdg_list(hdr); + error = netmap_vale_list(hdr); break; } @@ -2541,12 +2657,16 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c * so that we can call netmap_get_bdg_na(). */ struct nmreq_register regreq; bzero(®req, sizeof(regreq)); + regreq.nr_mode = NR_REG_ALL_NIC; + /* For now we only support virtio-net headers, and only for * VALE ports, but this may change in future. Valid lengths * for the virtio-net header are 0 (no header), 10 and 12. */ if (req->nr_hdr_len != 0 && req->nr_hdr_len != sizeof(struct nm_vnet_hdr) && req->nr_hdr_len != 12) { + if (netmap_verbose) + nm_prerr("invalid hdr_len %u", req->nr_hdr_len); error = EINVAL; break; } @@ -2563,7 +2683,8 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c if (na->virt_hdr_len) { vpna->mfs = NETMAP_BUF_SIZE(na); } - D("Using vnet_hdr_len %d for %p", na->virt_hdr_len, na); + if (netmap_verbose) + nm_prinf("Using vnet_hdr_len %d for %p", na->virt_hdr_len, na); netmap_adapter_put(na); } else if (!na) { error = ENXIO; @@ -2582,6 +2703,7 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c struct ifnet *ifp; bzero(®req, sizeof(regreq)); + regreq.nr_mode = NR_REG_ALL_NIC; NMG_LOCK(); hdr->nr_reqtype = NETMAP_REQ_REGISTER; hdr->nr_body = (uintptr_t)®req; @@ -2613,22 +2735,80 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } #endif /* WITH_VALE */ case NETMAP_REQ_POOLS_INFO_GET: { + /* Get information from the memory allocator used for + * hdr->nr_name. */ struct nmreq_pools_info *req = (struct nmreq_pools_info *)(uintptr_t)hdr->nr_body; - /* Get information from the memory allocator. This - * netmap device must already be bound to a port. - * Note that hdr->nr_name is ignored. */ NMG_LOCK(); - if (priv->np_na && priv->np_na->nm_mem) { - struct netmap_mem_d *nmd = priv->np_na->nm_mem; + do { + /* Build a nmreq_register out of the nmreq_pools_info, + * so that we can call netmap_get_na(). */ + struct nmreq_register regreq; + bzero(®req, sizeof(regreq)); + regreq.nr_mem_id = req->nr_mem_id; + regreq.nr_mode = NR_REG_ALL_NIC; + + hdr->nr_reqtype = NETMAP_REQ_REGISTER; + hdr->nr_body = (uintptr_t)®req; + error = netmap_get_na(hdr, &na, &ifp, NULL, 1 /* create */); + hdr->nr_reqtype = NETMAP_REQ_POOLS_INFO_GET; /* reset type */ + hdr->nr_body = (uintptr_t)req; /* reset nr_body */ + if (error) { + na = NULL; + ifp = NULL; + break; + } + nmd = na->nm_mem; /* grab the memory allocator */ + if (nmd == NULL) { + error = EINVAL; + break; + } + + /* Finalize the memory allocator, get the pools + * information and release the allocator. */ + error = netmap_mem_finalize(nmd, na); + if (error) { + break; + } error = netmap_mem_pools_info_get(req, nmd); - } else { + netmap_mem_drop(na); + } while (0); + netmap_unget_na(na, ifp); + NMG_UNLOCK(); + break; + } + + case NETMAP_REQ_CSB_ENABLE: { + struct nmreq_option *opt; + + opt = nmreq_findoption((struct nmreq_option *)(uintptr_t)hdr->nr_options, + NETMAP_REQ_OPT_CSB); + if (opt == NULL) { error = EINVAL; + } else { + struct nmreq_opt_csb *csbo = + (struct nmreq_opt_csb *)opt; + error = nmreq_checkduplicate(opt); + if (!error) { + NMG_LOCK(); + error = netmap_csb_validate(priv, csbo); + NMG_UNLOCK(); + } + opt->nro_status = error; } - NMG_UNLOCK(); break; } + case NETMAP_REQ_SYNC_KLOOP_START: { + error = netmap_sync_kloop(priv, hdr); + break; + } + + case NETMAP_REQ_SYNC_KLOOP_STOP: { + error = netmap_sync_kloop_stop(priv); + break; + } + default: { error = EINVAL; break; @@ -2642,22 +2822,20 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c case NIOCTXSYNC: case NIOCRXSYNC: { - nifp = priv->np_nifp; - - if (nifp == NULL) { + if (unlikely(priv->np_nifp == NULL)) { error = ENXIO; break; } mb(); /* make sure following reads are not from cache */ - na = priv->np_na; /* we have a reference */ - - if (na == NULL) { - D("Internal error: nifp != NULL && na == NULL"); - error = ENXIO; + if (unlikely(priv->np_csb_atok_base)) { + nm_prerr("Invalid sync in CSB mode"); + error = EBUSY; break; } + na = priv->np_na; /* we have a reference */ + mbq_init(&q); t = (cmd == NIOCTXSYNC ? NR_TX : NR_RX); krings = NMR(na, t); @@ -2675,8 +2853,8 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } if (cmd == NIOCTXSYNC) { - if (netmap_verbose & NM_VERB_TXSYNC) - D("pre txsync ring %d cur %d hwcur %d", + if (netmap_debug & NM_DEBUG_TXSYNC) + nm_prinf("pre txsync ring %d cur %d hwcur %d", i, ring->cur, kring->nr_hwcur); if (nm_txsync_prologue(kring, ring) >= kring->nkr_num_slots) { @@ -2684,8 +2862,8 @@ netmap_ioctl(struct netmap_priv_d *priv, u_long cmd, c } else if (kring->nm_sync(kring, sync_flags | NAF_FORCE_RECLAIM) == 0) { nm_sync_finalize(kring); } - if (netmap_verbose & NM_VERB_TXSYNC) - D("post txsync ring %d cur %d hwcur %d", + if (netmap_debug & NM_DEBUG_TXSYNC) + nm_prinf("post txsync ring %d cur %d hwcur %d", i, ring->cur, kring->nr_hwcur); } else { @@ -2740,18 +2918,22 @@ nmreq_size_by_type(uint16_t nr_reqtype) case NETMAP_REQ_VALE_NEWIF: return sizeof(struct nmreq_vale_newif); case NETMAP_REQ_VALE_DELIF: + case NETMAP_REQ_SYNC_KLOOP_STOP: + case NETMAP_REQ_CSB_ENABLE: return 0; case NETMAP_REQ_VALE_POLLING_ENABLE: case NETMAP_REQ_VALE_POLLING_DISABLE: return sizeof(struct nmreq_vale_polling); case NETMAP_REQ_POOLS_INFO_GET: return sizeof(struct nmreq_pools_info); + case NETMAP_REQ_SYNC_KLOOP_START: + return sizeof(struct nmreq_sync_kloop_start); } return 0; } static size_t -nmreq_opt_size_by_type(uint16_t nro_reqtype) +nmreq_opt_size_by_type(uint32_t nro_reqtype, uint64_t nro_size) { size_t rv = sizeof(struct nmreq_option); #ifdef NETMAP_REQ_OPT_DEBUG @@ -2764,6 +2946,13 @@ nmreq_opt_size_by_type(uint16_t nro_reqtype) rv = sizeof(struct nmreq_opt_extmem); break; #endif /* WITH_EXTMEM */ + case NETMAP_REQ_OPT_SYNC_KLOOP_EVENTFDS: + if (nro_size >= rv) + rv = nro_size; + break; + case NETMAP_REQ_OPT_CSB: + rv = sizeof(struct nmreq_opt_csb); + break; } /* subtract the common header */ return rv - sizeof(struct nmreq_option); @@ -2779,8 +2968,11 @@ nmreq_copyin(struct nmreq_header *hdr, int nr_body_is_ struct nmreq_option buf; uint64_t *ptrs; - if (hdr->nr_reserved) + if (hdr->nr_reserved) { + if (netmap_verbose) + nm_prerr("nr_reserved must be zero"); return EINVAL; + } if (!nr_body_is_user) return 0; @@ -2797,6 +2989,8 @@ nmreq_copyin(struct nmreq_header *hdr, int nr_body_is_ (!rqsz && hdr->nr_body != (uintptr_t)NULL)) { /* Request body expected, but not found; or * request body found but unexpected. */ + if (netmap_verbose) + nm_prerr("nr_body expected but not found, or vice versa"); error = EINVAL; goto out_err; } @@ -2810,7 +3004,7 @@ nmreq_copyin(struct nmreq_header *hdr, int nr_body_is_ if (error) goto out_err; optsz += sizeof(*src); - optsz += nmreq_opt_size_by_type(buf.nro_reqtype); + optsz += nmreq_opt_size_by_type(buf.nro_reqtype, buf.nro_size); if (rqsz + optsz > NETMAP_REQ_MAXSIZE) { error = EMSGSIZE; goto out_err; @@ -2864,7 +3058,8 @@ nmreq_copyin(struct nmreq_header *hdr, int nr_body_is_ p = (char *)(opt + 1); /* copy the option body */ - optsz = nmreq_opt_size_by_type(opt->nro_reqtype); + optsz = nmreq_opt_size_by_type(opt->nro_reqtype, + opt->nro_size); if (optsz) { /* the option body follows the option header */ error = copyin(src + 1, p, optsz); @@ -2938,7 +3133,8 @@ nmreq_copyout(struct nmreq_header *hdr, int rerror) /* copy the option body only if there was no error */ if (!rerror && !src->nro_status) { - optsz = nmreq_opt_size_by_type(src->nro_reqtype); + optsz = nmreq_opt_size_by_type(src->nro_reqtype, + src->nro_size); if (optsz) { error = copyout(src + 1, dst + 1, optsz); if (error) { @@ -3016,7 +3212,8 @@ netmap_poll(struct netmap_priv_d *priv, int events, NM struct netmap_adapter *na; struct netmap_kring *kring; struct netmap_ring *ring; - u_int i, check_all_tx, check_all_rx, want[NR_TXRX], revents = 0; + u_int i, want[NR_TXRX], revents = 0; + NM_SELINFO_T *si[NR_TXRX]; #define want_tx want[NR_TX] #define want_rx want[NR_RX] struct mbq q; /* packets from RX hw queues to host stack */ @@ -3039,27 +3236,31 @@ netmap_poll(struct netmap_priv_d *priv, int events, NM mbq_init(&q); - if (priv->np_nifp == NULL) { - D("No if registered"); + if (unlikely(priv->np_nifp == NULL)) { return POLLERR; } mb(); /* make sure following reads are not from cache */ na = priv->np_na; - if (!nm_netmap_on(na)) + if (unlikely(!nm_netmap_on(na))) return POLLERR; - if (netmap_verbose & 0x8000) - D("device %s events 0x%x", na->name, events); + if (unlikely(priv->np_csb_atok_base)) { + nm_prerr("Invalid poll in CSB mode"); + return POLLERR; + } + + if (netmap_debug & NM_DEBUG_ON) + nm_prinf("device %s events 0x%x", na->name, events); want_tx = events & (POLLOUT | POLLWRNORM); want_rx = events & (POLLIN | POLLRDNORM); /* - * check_all_{tx|rx} are set if the card has more than one queue AND - * the file descriptor is bound to all of them. If so, we sleep on - * the "global" selinfo, otherwise we sleep on individual selinfo - * (FreeBSD only allows two selinfo's per file descriptor). + * If the card has more than one queue AND the file descriptor is + * bound to all of them, we sleep on the "global" selinfo, otherwise + * we sleep on individual selinfo (FreeBSD only allows two selinfo's + * per file descriptor). * The interrupt routine in the driver wake one or the other * (or both) depending on which clients are active. * @@ -3068,8 +3269,10 @@ netmap_poll(struct netmap_priv_d *priv, int events, NM * there are pending packets to send. The latter can be disabled * passing NETMAP_NO_TX_POLL in the NIOCREG call. */ - check_all_tx = nm_si_user(priv, NR_TX); - check_all_rx = nm_si_user(priv, NR_RX); + si[NR_RX] = nm_si_user(priv, NR_RX) ? &na->si[NR_RX] : + &na->rx_rings[priv->np_qfirst[NR_RX]]->si; + si[NR_TX] = nm_si_user(priv, NR_TX) ? &na->si[NR_TX] : + &na->tx_rings[priv->np_qfirst[NR_TX]]->si; #ifdef __FreeBSD__ /* @@ -3106,10 +3309,8 @@ netmap_poll(struct netmap_priv_d *priv, int events, NM #ifdef linux /* The selrecord must be unconditional on linux. */ - nm_os_selrecord(sr, check_all_tx ? - &na->si[NR_TX] : &na->tx_rings[priv->np_qfirst[NR_TX]]->si); - nm_os_selrecord(sr, check_all_rx ? - &na->si[NR_RX] : &na->rx_rings[priv->np_qfirst[NR_RX]]->si); + nm_os_selrecord(sr, si[NR_RX]); + nm_os_selrecord(sr, si[NR_TX]); #endif /* linux */ /* @@ -3174,8 +3375,7 @@ flush_tx: send_down = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 13 10:17:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 578B2131584B; Thu, 13 Dec 2018 10:17:33 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 DE14A80B7E; Thu, 13 Dec 2018 10:17:32 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C303D1E593; Thu, 13 Dec 2018 10:17:32 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDAHWro093362; Thu, 13 Dec 2018 10:17:32 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDAHWw1093361; Thu, 13 Dec 2018 10:17:32 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812131017.wBDAHWw1093361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 13 Dec 2018 10:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342034 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 342034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DE14A80B7E X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.842,0]; NEURAL_HAM_SHORT(-0.53)[-0.534,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 10:17:33 -0000 Author: vmaffione Date: Thu Dec 13 10:17:32 2018 New Revision: 342034 URL: https://svnweb.freebsd.org/changeset/base/342034 Log: MFC r341624 netmap: netmap_transmit should honor bpf packet tap hook This allows tcpdump to capture outbound kernel packets while in netmap mode Submitted by: Marc de la Gueronniere Reviewed by: vmaffione MFC after: 1 week Sponsored by: Verisign, Inc. Differential Revision: https://reviews.freebsd.org/D17896 Modified: stable/11/sys/dev/netmap/netmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap.c ============================================================================== --- stable/11/sys/dev/netmap/netmap.c Thu Dec 13 10:13:29 2018 (r342033) +++ stable/11/sys/dev/netmap/netmap.c Thu Dec 13 10:17:32 2018 (r342034) @@ -447,6 +447,7 @@ ports attached to the switch) #include /* bus_dmamap_* */ #include #include +#include /* ETHER_BPF_MTAP */ #elif defined(linux) @@ -3860,6 +3861,10 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) RD(1, "%s drop mbuf that needs generic segmentation offload", na->name); goto done; } + +#ifdef __FreeBSD__ + ETHER_BPF_MTAP(ifp, m); +#endif /* __FreeBSD__ */ /* protect against netmap_rxsync_from_host(), netmap_sw_to_nic() * and maybe other instances of netmap_transmit (the latter From owner-svn-src-all@freebsd.org Thu Dec 13 10:18:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED2C313158F3; Thu, 13 Dec 2018 10:18:31 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 93A0C80CCE; Thu, 13 Dec 2018 10:18:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 872181E596; Thu, 13 Dec 2018 10:18:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDAIVaM093455; Thu, 13 Dec 2018 10:18:31 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDAIVhg093454; Thu, 13 Dec 2018 10:18:31 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812131018.wBDAIVhg093454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 13 Dec 2018 10:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342035 - stable/11/tools/tools/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/tools/tools/netmap X-SVN-Commit-Revision: 342035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 93A0C80CCE X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.839,0]; NEURAL_HAM_SHORT(-0.54)[-0.538,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 10:18:32 -0000 Author: vmaffione Date: Thu Dec 13 10:18:31 2018 New Revision: 342035 URL: https://svnweb.freebsd.org/changeset/base/342035 Log: MFC r341726 tools: netmap: pkt-gen: check packet length against interface MTU Validate the value of the -l argument (packet length) against the MTU of the netmap port. In case the netmap port does not refer to a physical interface (e.g. VALE port or pipe), then the netmap buffer size is used as MTU. This change also sets a better default value for the -M option, so that pkt-gen uses the largest possible fragments in case of multi-slot packets. Differential Revision: https://reviews.freebsd.org/D18436 Modified: stable/11/tools/tools/netmap/pkt-gen.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/netmap/pkt-gen.c ============================================================================== --- stable/11/tools/tools/netmap/pkt-gen.c Thu Dec 13 10:17:32 2018 (r342034) +++ stable/11/tools/tools/netmap/pkt-gen.c Thu Dec 13 10:18:31 2018 (r342035) @@ -195,7 +195,7 @@ struct virt_header { uint8_t fields[VIRT_HDR_MAX]; }; -#define MAX_BODYSIZE 16384 +#define MAX_BODYSIZE 65536 struct pkt { struct virt_header vh; @@ -238,7 +238,6 @@ struct mac_range { /* ifname can be netmap:foo-xxxx */ #define MAX_IFNAMELEN 64 /* our buffer for ifname */ -//#define MAX_PKTSIZE 1536 #define MAX_PKTSIZE MAX_BODYSIZE /* XXX: + IP_HDR + ETH_HDR */ /* compact timestamp to fit into 60 byte packet. (enough to obtain RTT) */ @@ -263,7 +262,7 @@ struct glob_arg { int forever; uint64_t npackets; /* total packets to send */ int frags; /* fragments per packet */ - u_int mtu; /* size of each fragment */ + u_int frag_size; /* size of each fragment */ int nthreads; int cpus; /* cpus used for running */ int system_cpus; /* cpus on the system */ @@ -308,6 +307,11 @@ struct glob_arg { }; enum dev_type { DEV_NONE, DEV_NETMAP, DEV_PCAP, DEV_TAP }; +enum { + TD_TYPE_SENDER = 1, + TD_TYPE_RECEIVER, + TD_TYPE_OTHER, +}; /* * Arguments for a new thread. The same structure is used by @@ -509,6 +513,42 @@ extract_mac_range(struct mac_range *r) return 0; } +static int +get_if_mtu(const struct glob_arg *g) +{ + char ifname[IFNAMSIZ]; + struct ifreq ifreq; + int s, ret; + + if (!strncmp(g->ifname, "netmap:", 7) && !strchr(g->ifname, '{') + && !strchr(g->ifname, '}')) { + /* Parse the interface name and ask the kernel for the + * MTU value. */ + strncpy(ifname, g->ifname+7, IFNAMSIZ-1); + ifname[strcspn(ifname, "-*^{}/@")] = '\0'; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) { + D("socket() failed: %s", strerror(errno)); + return s; + } + + memset(&ifreq, 0, sizeof(ifreq)); + strncpy(ifreq.ifr_name, ifname, IFNAMSIZ); + + ret = ioctl(s, SIOCGIFMTU, &ifreq); + if (ret) { + D("ioctl(SIOCGIFMTU) failed: %s", strerror(errno)); + } + + return ifreq.ifr_mtu; + } + + /* This is a pipe or a VALE port, where the MTU is very large, + * so we use some practical limit. */ + return 65536; +} + static struct targ *targs; static int global_nthreads; @@ -1581,18 +1621,18 @@ sender_body(void *data) #endif /* NO_PCAP */ } else { int tosend = 0; - u_int bufsz, mtu = targ->g->mtu; + u_int bufsz, frag_size = targ->g->frag_size; nifp = targ->nmd->nifp; txring = NETMAP_TXRING(nifp, targ->nmd->first_tx_ring); bufsz = txring->nr_buf_size; - if (bufsz < mtu) - mtu = bufsz; + if (bufsz < frag_size) + frag_size = bufsz; targ->frag_size = targ->g->pkt_size / targ->frags; - if (targ->frag_size > mtu) { - targ->frags = targ->g->pkt_size / mtu; - targ->frag_size = mtu; - if (targ->g->pkt_size % mtu != 0) + if (targ->frag_size > frag_size) { + targ->frags = targ->g->pkt_size / frag_size; + targ->frag_size = frag_size; + if (targ->g->pkt_size % frag_size != 0) targ->frags++; } D("frags %u frag_size %u", targ->frags, targ->frag_size); @@ -2441,12 +2481,6 @@ usage(int errcode) exit(errcode); } -enum { - TD_TYPE_SENDER = 1, - TD_TYPE_RECEIVER, - TD_TYPE_OTHER, -}; - static void start_threads(struct glob_arg *g) { int i; @@ -2779,8 +2813,8 @@ main(int arc, char **argv) g.cpus = 1; /* default */ g.forever = 1; g.tx_rate = 0; - g.frags =1; - g.mtu = 1500; + g.frags = 1; + g.frag_size = (u_int)-1; /* use the netmap buffer size by default */ g.nmr_config = ""; g.virt_header = 0; g.wait_link = 2; /* wait 2 seconds for physical ports */ @@ -2824,7 +2858,7 @@ main(int arc, char **argv) break; case 'M': - g.mtu = atoi(optarg); + g.frag_size = atoi(optarg); break; case 'f': @@ -3102,6 +3136,16 @@ main(int arc, char **argv) if (g.nthreads < 1 || g.nthreads > devqueues) { D("bad nthreads %d, have %d queues", g.nthreads, devqueues); // continue, fail later + } + + if (g.td_type == TD_TYPE_SENDER) { + int mtu = get_if_mtu(&g); + + if (mtu > 0 && g.pkt_size > mtu) { + D("pkt_size (%d) must be <= mtu (%d)", + g.pkt_size, mtu); + return -1; + } } if (verbose) { From owner-svn-src-all@freebsd.org Thu Dec 13 10:34:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6036C1316057; Thu, 13 Dec 2018 10:34:27 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 ECF15815FE; Thu, 13 Dec 2018 10:34:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D91B31E90A; Thu, 13 Dec 2018 10:34:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDAYQdc003728; Thu, 13 Dec 2018 10:34:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDAYQm7003726; Thu, 13 Dec 2018 10:34:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812131034.wBDAYQm7003726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 13 Dec 2018 10:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r342037 - in stable/10/sys/dev/usb: . serial X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10/sys/dev/usb: . serial X-SVN-Commit-Revision: 342037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ECF15815FE X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.842,0]; NEURAL_HAM_SHORT(-0.53)[-0.534,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 10:34:27 -0000 Author: hselasky Date: Thu Dec 13 10:34:26 2018 New Revision: 342037 URL: https://svnweb.freebsd.org/changeset/base/342037 Log: MFC r334648: Add support for SIMCom SIM7600E. PR: 226066 Sponsored by: MSI/FUNTORO Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Thu Dec 13 10:33:17 2018 (r342036) +++ stable/10/sys/dev/usb/serial/u3g.c Thu Dec 13 10:34:26 2018 (r342037) @@ -213,6 +213,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3G, 0), U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), + U3G_DEV(ALINK, SIM7600E, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Thu Dec 13 10:33:17 2018 (r342036) +++ stable/10/sys/dev/usb/usbdevs Thu Dec 13 10:34:26 2018 (r342037) @@ -1008,6 +1008,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter /* Alink products */ product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem +product ALINK SIM7600E 0x9001 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From owner-svn-src-all@freebsd.org Thu Dec 13 10:33:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E75B131601E; Thu, 13 Dec 2018 10:33:18 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) 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 24CB5814F6; Thu, 13 Dec 2018 10:33:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 192031E908; Thu, 13 Dec 2018 10:33:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDAXHm5003608; Thu, 13 Dec 2018 10:33:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDAXHtR003607; Thu, 13 Dec 2018 10:33:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201812131033.wBDAXHtR003607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 13 Dec 2018 10:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342036 - in stable/11/sys/dev/usb: . serial X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/usb: . serial X-SVN-Commit-Revision: 342036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 24CB5814F6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.842,0]; NEURAL_HAM_SHORT(-0.53)[-0.534,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 10:33:18 -0000 Author: hselasky Date: Thu Dec 13 10:33:17 2018 New Revision: 342036 URL: https://svnweb.freebsd.org/changeset/base/342036 Log: MFC r334648: Add support for SIMCom SIM7600E. PR: 226066 Sponsored by: MSI/FUNTORO Modified: stable/11/sys/dev/usb/serial/u3g.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/11/sys/dev/usb/serial/u3g.c Thu Dec 13 10:18:31 2018 (r342035) +++ stable/11/sys/dev/usb/serial/u3g.c Thu Dec 13 10:33:17 2018 (r342036) @@ -208,6 +208,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3G, 0), U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), + U3G_DEV(ALINK, SIM7600E, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Thu Dec 13 10:18:31 2018 (r342035) +++ stable/11/sys/dev/usb/usbdevs Thu Dec 13 10:33:17 2018 (r342036) @@ -1011,6 +1011,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter /* Alink products */ product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem +product ALINK SIM7600E 0x9001 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From owner-svn-src-all@freebsd.org Thu Dec 13 10:52:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A34481316DA5; Thu, 13 Dec 2018 10:52:41 +0000 (UTC) (envelope-from eugen@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) server-signature RSA-PSS (4096 bits) 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 49B0D82586; Thu, 13 Dec 2018 10:52:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A7401EC64; Thu, 13 Dec 2018 10:52:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDAqfuD014169; Thu, 13 Dec 2018 10:52:41 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDAqfgM014168; Thu, 13 Dec 2018 10:52:41 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812131052.wBDAqfgM014168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 13 Dec 2018 10:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342038 - stable/12/sbin/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sbin/ipfw X-SVN-Commit-Revision: 342038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 49B0D82586 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.842,0]; NEURAL_HAM_SHORT(-0.53)[-0.534,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 10:52:41 -0000 Author: eugen Date: Thu Dec 13 10:52:40 2018 New Revision: 342038 URL: https://svnweb.freebsd.org/changeset/base/342038 Log: MFC r340394: ipfw.8: Fix part of the SYNOPSIS documenting LIST OF RULES AND PREPROCESSING that is still referred as last section of the SYNOPSIS later but was erroneously situated in the section IN-KERNEL NAT. Modified: stable/12/sbin/ipfw/ipfw.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Thu Dec 13 10:34:26 2018 (r342037) +++ stable/12/sbin/ipfw/ipfw.8 Thu Dec 13 10:52:40 2018 (r342038) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd November 13, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -105,16 +105,6 @@ in-kernel NAT. .Ar number .Cm config .Ar config-options -.Pp -.Nm -.Op Fl cfnNqS -.Oo -.Fl p Ar preproc -.Oo -.Ar preproc-flags -.Oc -.Oc -.Ar pathname .Ss STATEFUL IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION .Nm .Oo Cm set Ar N Oc Cm nat64lsn Ar name Cm create Ar create-options @@ -166,6 +156,16 @@ in-kernel NAT. .Cm internal talist .Nm .Cm internal vlist +.Ss LIST OF RULES AND PREPROCESSING +.Nm +.Op Fl cfnNqS +.Oo +.Fl p Ar preproc +.Oo +.Ar preproc-flags +.Oc +.Oc +.Ar pathname .Sh DESCRIPTION The .Nm From owner-svn-src-all@freebsd.org Thu Dec 13 10:55:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FEA81316E56; Thu, 13 Dec 2018 10:55:49 +0000 (UTC) (envelope-from eugen@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) server-signature RSA-PSS (4096 bits) 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 BBCB9826E0; Thu, 13 Dec 2018 10:55:48 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A08711EC66; Thu, 13 Dec 2018 10:55:48 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDAtmiB014366; Thu, 13 Dec 2018 10:55:48 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDAtmZU014365; Thu, 13 Dec 2018 10:55:48 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812131055.wBDAtmZU014365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 13 Dec 2018 10:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342039 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 342039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BBCB9826E0 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.38 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.842,0]; NEURAL_HAM_SHORT(-0.53)[-0.534,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 10:55:49 -0000 Author: eugen Date: Thu Dec 13 10:55:48 2018 New Revision: 342039 URL: https://svnweb.freebsd.org/changeset/base/342039 Log: MFC r340394: ipfw.8: Fix part of the SYNOPSIS documenting LIST OF RULES AND PREPROCESSING that is still referred as last section of the SYNOPSIS later but was erroneously situated in the section IN-KERNEL NAT. Modified: stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Thu Dec 13 10:52:40 2018 (r342038) +++ stable/11/sbin/ipfw/ipfw.8 Thu Dec 13 10:55:48 2018 (r342039) @@ -105,16 +105,6 @@ in-kernel NAT. .Ar number .Cm config .Ar config-options -.Pp -.Nm -.Op Fl cfnNqS -.Oo -.Fl p Ar preproc -.Oo -.Ar preproc-flags -.Oc -.Oc -.Ar pathname .Ss STATEFUL IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION .Nm .Oo Cm set Ar N Oc Cm nat64lsn Ar name Cm create Ar create-options @@ -166,6 +156,16 @@ in-kernel NAT. .Cm internal talist .Nm .Cm internal vlist +.Ss LIST OF RULES AND PREPROCESSING +.Nm +.Op Fl cfnNqS +.Oo +.Fl p Ar preproc +.Oo +.Ar preproc-flags +.Oc +.Oc +.Ar pathname .Sh DESCRIPTION The .Nm From owner-svn-src-all@freebsd.org Thu Dec 13 11:05:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3732C1317198; Thu, 13 Dec 2018 11:05:01 +0000 (UTC) (envelope-from mm@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) server-signature RSA-PSS (4096 bits) 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 C99ED82BC7; Thu, 13 Dec 2018 11:05:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 666641EE23; Thu, 13 Dec 2018 11:05:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDB503P019304; Thu, 13 Dec 2018 11:05:00 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDB50m2019303; Thu, 13 Dec 2018 11:05:00 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201812131105.wBDB50m2019303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 13 Dec 2018 11:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342040 - vendor/libarchive/dist/libarchive X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: vendor/libarchive/dist/libarchive X-SVN-Commit-Revision: 342040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C99ED82BC7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.35 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.52)[-0.521,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 11:05:01 -0000 Author: mm Date: Thu Dec 13 11:04:59 2018 New Revision: 342040 URL: https://svnweb.freebsd.org/changeset/base/342040 Log: Update vendor/libarchive/dist to git 7d6da880ae3e379d463137510bb4e8c65b6bfb36 Relevant vendor changes: PR #1107: RAR5 reader: removed an unused function: bf_is_last_block Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Thu Dec 13 10:55:48 2018 (r342039) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Thu Dec 13 11:04:59 2018 (r342040) @@ -229,7 +229,14 @@ struct bit_reader { /* RARv5 block header structure. Use bf_* functions to get values from * block_flags_u8 field. I.e. bf_byte_count, etc. */ struct compressed_block_header { - uint8_t block_flags_u8; /* Fields encoded in little-endian bitfield */ + /* block_flags_u8 contain fields encoded in little-endian bitfield: + * + * - table present flag (shr 7, and 1), + * - last block flag (shr 6, and 1), + * - byte_count (shr 3, and 7), + * - bit_size (shr 0, and 7). + */ + uint8_t block_flags_u8; uint8_t block_cksum; }; @@ -430,11 +437,6 @@ uint8_t bf_bit_size(const struct compressed_block_head static inline uint8_t bf_byte_count(const struct compressed_block_header* hdr) { return (hdr->block_flags_u8 >> 3) & 7; -} - -static inline -uint8_t bf_is_last_block(const struct compressed_block_header* hdr) { - return (hdr->block_flags_u8 >> 6) & 1; } static inline From owner-svn-src-all@freebsd.org Thu Dec 13 11:15:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED87213177FA; Thu, 13 Dec 2018 11:15:15 +0000 (UTC) (envelope-from mm@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) server-signature RSA-PSS (4096 bits) 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 8E92E8319A; Thu, 13 Dec 2018 11:15:15 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81B1F1EFDE; Thu, 13 Dec 2018 11:15:15 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDBFFbC024627; Thu, 13 Dec 2018 11:15:15 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDBFEtn024624; Thu, 13 Dec 2018 11:15:14 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201812131115.wBDBFEtn024624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 13 Dec 2018 11:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342041 - vendor/libarchive/dist/libarchive X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: vendor/libarchive/dist/libarchive X-SVN-Commit-Revision: 342041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E92E8319A X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.35 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.53)[-0.526,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 11:15:16 -0000 Author: mm Date: Thu Dec 13 11:15:14 2018 New Revision: 342041 URL: https://svnweb.freebsd.org/changeset/base/342041 Log: Update vendor/libarchive/dist to git cef97307a3f681fcbb2cc02db6df3619a3f8b69c Relevant vendor changes: PR #1105: Fix various crash, memory corruption and infinite loop conditions Modified: vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Modified: vendor/libarchive/dist/libarchive/archive_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_acl.c Thu Dec 13 11:04:59 2018 (r342040) +++ vendor/libarchive/dist/libarchive/archive_acl.c Thu Dec 13 11:15:14 2018 (r342041) @@ -1723,6 +1723,11 @@ archive_acl_from_text_l(struct archive_acl *acl, const st = field[n].start + 1; len = field[n].end - field[n].start; + if (len == 0) { + ret = ARCHIVE_WARN; + continue; + } + switch (*s) { case 'u': if (len == 1 || (len == 4 Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:04:59 2018 (r342040) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:15:14 2018 (r342041) @@ -258,6 +258,7 @@ struct rar struct data_block_offsets *dbo; unsigned int cursor; unsigned int nodes; + char filename_must_match; /* LZSS members */ struct huffman_code maincode; @@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_ent } return ret; } + else if (rar->filename_must_match) + { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Mismatch of file parts split across multi-volume archive"); + return (ARCHIVE_FATAL); + } rar->filename_save = (char*)realloc(rar->filename_save, filename_size + 1); @@ -2300,6 +2307,11 @@ parse_codes(struct archive_read *a) new_size = DICTIONARY_MAX_SIZE; else new_size = rar_fls((unsigned int)rar->unp_size) << 1; + if (new_size == 0) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Zero window size is invalid."); + return (ARCHIVE_FATAL); + } new_window = realloc(rar->lzss.window, new_size); if (new_window == NULL) { archive_set_error(&a->archive, ENOMEM, @@ -2928,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssi else if (*avail == 0 && rar->main_flags & MHD_VOLUME && rar->file_flags & FHD_SPLIT_AFTER) { + rar->filename_must_match = 1; ret = archive_read_format_rar_read_header(a, a->entry); if (ret == (ARCHIVE_EOF)) { rar->has_endarc_header = 1; ret = archive_read_format_rar_read_header(a, a->entry); } + rar->filename_must_match = 0; if (ret != (ARCHIVE_OK)) return NULL; return rar_read_ahead(a, min, avail); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Thu Dec 13 11:04:59 2018 (r342040) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Thu Dec 13 11:15:14 2018 (r342041) @@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, s return (ARCHIVE_EOF); } + if (w->unconsumed) { + __archive_read_consume(a, w->unconsumed); + w->unconsumed = 0U; + } + rab = __archive_read_ahead(a, 1U, &nrd); if (nrd < 0) { *bsz = 0U; From owner-svn-src-all@freebsd.org Thu Dec 13 11:18:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCF701317AAE; Thu, 13 Dec 2018 11:18:47 +0000 (UTC) (envelope-from mm@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) server-signature RSA-PSS (4096 bits) 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 6F3AD83459; Thu, 13 Dec 2018 11:18:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E8A31EFE1; Thu, 13 Dec 2018 11:18:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDBIlGJ024816; Thu, 13 Dec 2018 11:18:47 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDBIkjp024811; Thu, 13 Dec 2018 11:18:46 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201812131118.wBDBIkjp024811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 13 Dec 2018 11:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342042 - in head/contrib/libarchive/libarchive: . test X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head/contrib/libarchive/libarchive: . test X-SVN-Commit-Revision: 342042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6F3AD83459 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.35 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.53)[-0.531,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 11:18:48 -0000 Author: mm Date: Thu Dec 13 11:18:45 2018 New Revision: 342042 URL: https://svnweb.freebsd.org/changeset/base/342042 Log: MFV r341771,342040,342041: Sync libarchive with vendor. Relevant vendor changes: PR #1102: RAR5 reader - fix big-endian problems PR #1105: Fix various crash, memory corruption and infinite loop conditions PR #1107: RAR5 reader: removed an unused function: bf_is_last_block MFC after: 1 week Modified: head/contrib/libarchive/libarchive/archive_acl.c head/contrib/libarchive/libarchive/archive_read_support_format_rar.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_acl.c Thu Dec 13 11:15:14 2018 (r342041) +++ head/contrib/libarchive/libarchive/archive_acl.c Thu Dec 13 11:18:45 2018 (r342042) @@ -1723,6 +1723,11 @@ archive_acl_from_text_l(struct archive_acl *acl, const st = field[n].start + 1; len = field[n].end - field[n].start; + if (len == 0) { + ret = ARCHIVE_WARN; + continue; + } + switch (*s) { case 'u': if (len == 1 || (len == 4 Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:15:14 2018 (r342041) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:18:45 2018 (r342042) @@ -258,6 +258,7 @@ struct rar struct data_block_offsets *dbo; unsigned int cursor; unsigned int nodes; + char filename_must_match; /* LZSS members */ struct huffman_code maincode; @@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_ent } return ret; } + else if (rar->filename_must_match) + { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Mismatch of file parts split across multi-volume archive"); + return (ARCHIVE_FATAL); + } rar->filename_save = (char*)realloc(rar->filename_save, filename_size + 1); @@ -2300,6 +2307,11 @@ parse_codes(struct archive_read *a) new_size = DICTIONARY_MAX_SIZE; else new_size = rar_fls((unsigned int)rar->unp_size) << 1; + if (new_size == 0) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Zero window size is invalid."); + return (ARCHIVE_FATAL); + } new_window = realloc(rar->lzss.window, new_size); if (new_window == NULL) { archive_set_error(&a->archive, ENOMEM, @@ -2928,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssi else if (*avail == 0 && rar->main_flags & MHD_VOLUME && rar->file_flags & FHD_SPLIT_AFTER) { + rar->filename_must_match = 1; ret = archive_read_format_rar_read_header(a, a->entry); if (ret == (ARCHIVE_EOF)) { rar->has_endarc_header = 1; ret = archive_read_format_rar_read_header(a, a->entry); } + rar->filename_must_match = 0; if (ret != (ARCHIVE_OK)) return NULL; return rar_read_ahead(a, min, avail); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Thu Dec 13 11:15:14 2018 (r342041) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Thu Dec 13 11:18:45 2018 (r342042) @@ -24,6 +24,7 @@ */ #include "archive_platform.h" +#include "archive_endian.h" #ifdef HAVE_ERRNO_H #include @@ -225,18 +226,17 @@ struct bit_reader { int in_addr; /* Current byte pointer. */ }; -/* RARv5 block header structure. */ +/* RARv5 block header structure. Use bf_* functions to get values from + * block_flags_u8 field. I.e. bf_byte_count, etc. */ struct compressed_block_header { - union { - struct { - uint8_t bit_size : 3; - uint8_t byte_count : 3; - uint8_t is_last_block : 1; - uint8_t is_table_present : 1; - } block_flags; - uint8_t block_flags_u8; - }; - + /* block_flags_u8 contain fields encoded in little-endian bitfield: + * + * - table present flag (shr 7, and 1), + * - last block flag (shr 6, and 1), + * - byte_count (shr 3, and 7), + * - bit_size (shr 0, and 7). + */ + uint8_t block_flags_u8; uint8_t block_cksum; }; @@ -429,26 +429,35 @@ static void cdeque_free(struct cdeque* d) { d->cap_mask = 0; } +static inline +uint8_t bf_bit_size(const struct compressed_block_header* hdr) { + return hdr->block_flags_u8 & 7; +} + +static inline +uint8_t bf_byte_count(const struct compressed_block_header* hdr) { + return (hdr->block_flags_u8 >> 3) & 7; +} + +static inline +uint8_t bf_is_table_present(const struct compressed_block_header* hdr) { + return (hdr->block_flags_u8 >> 7) & 1; +} + static inline struct rar5* get_context(struct archive_read* a) { return (struct rar5*) a->format->data; } -// TODO: make sure these functions return a little endian number - /* Convenience functions used by filter implementations. */ static uint32_t read_filter_data(struct rar5* rar, uint32_t offset) { - uint32_t* dptr = (uint32_t*) &rar->cstate.window_buf[offset]; - // TODO: bswap if big endian - return *dptr; + return archive_le32dec(&rar->cstate.window_buf[offset]); } static void write_filter_data(struct rar5* rar, uint32_t offset, uint32_t value) { - uint32_t* dptr = (uint32_t*) &rar->cstate.filtered_buf[offset]; - // TODO: bswap if big endian - *dptr = value; + archive_le32enc(&rar->cstate.filtered_buf[offset], value); } static void circular_memcpy(uint8_t* dst, uint8_t* window, const int mask, @@ -995,8 +1004,7 @@ static int read_u32(struct archive_read* a, uint32_t* if(!read_ahead(a, 4, &p)) return 0; - *pvalue = *(const uint32_t*)p; - + *pvalue = archive_le32dec(p); return ARCHIVE_OK == consume(a, 4) ? 1 : 0; } @@ -1005,8 +1013,7 @@ static int read_u64(struct archive_read* a, uint64_t* if(!read_ahead(a, 8, &p)) return 0; - *pvalue = *(const uint64_t*)p; - + *pvalue = archive_le64dec(p); return ARCHIVE_OK == consume(a, 8) ? 1 : 0; } @@ -1936,7 +1943,7 @@ static int create_decode_tables(uint8_t* bit_length, dist = bit_field - table->decode_len[cur_len - 1]; dist >>= (16 - cur_len); - pos = table->decode_pos[cur_len] + dist; + pos = table->decode_pos[cur_len & 15] + dist; if(cur_len < rar5_countof(table->decode_pos) && pos < size) { table->quick_num[code] = table->decode_num[pos]; } else { @@ -2159,17 +2166,17 @@ static int parse_block_header(struct archive_read* a, { memcpy(hdr, p, sizeof(struct compressed_block_header)); - if(hdr->block_flags.byte_count > 2) { + if(bf_byte_count(hdr) > 2) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Unsupported block header size (was %d, max is 2)", - hdr->block_flags.byte_count); + bf_byte_count(hdr)); return ARCHIVE_FATAL; } /* This should probably use bit reader interface in order to be more * future-proof. */ *block_size = 0; - switch(hdr->block_flags.byte_count) { + switch(bf_byte_count(hdr)) { /* 1-byte block size */ case 0: *block_size = *(const uint8_t*) &p[2]; @@ -2177,12 +2184,12 @@ static int parse_block_header(struct archive_read* a, /* 2-byte block size */ case 1: - *block_size = *(const uint16_t*) &p[2]; + *block_size = archive_le16dec(&p[2]); break; /* 3-byte block size */ case 2: - *block_size = *(const uint32_t*) &p[2]; + *block_size = archive_le32dec(&p[2]); *block_size &= 0x00FFFFFF; break; @@ -2379,7 +2386,7 @@ static int do_uncompress_block(struct archive_read* a, const int cmask = rar->cstate.window_mask; const struct compressed_block_header* hdr = &rar->last_block_hdr; - const uint8_t bit_size = 1 + hdr->block_flags.bit_size; + const uint8_t bit_size = 1 + bf_bit_size(hdr); while(1) { if(rar->cstate.write_ptr - rar->cstate.last_write_ptr > @@ -2777,7 +2784,7 @@ static int process_block(struct archive_read* a) { /* Skip block header. Next data is huffman tables, if present. */ ssize_t to_skip = sizeof(struct compressed_block_header) + - rar->last_block_hdr.block_flags.byte_count + 1; + bf_byte_count(&rar->last_block_hdr) + 1; if(ARCHIVE_OK != consume(a, to_skip)) return ARCHIVE_EOF; @@ -2833,7 +2840,7 @@ static int process_block(struct archive_read* a) { rar->bits.in_addr = 0; rar->bits.bit_addr = 0; - if(rar->last_block_hdr.block_flags.is_table_present) { + if(bf_is_table_present(&rar->last_block_hdr)) { /* Load Huffman tables. */ ret = parse_tables(a, rar, p); if(ret != ARCHIVE_OK) { Modified: head/contrib/libarchive/libarchive/archive_read_support_format_warc.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Thu Dec 13 11:15:14 2018 (r342041) +++ head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Thu Dec 13 11:18:45 2018 (r342042) @@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, s return (ARCHIVE_EOF); } + if (w->unconsumed) { + __archive_read_consume(a, w->unconsumed); + w->unconsumed = 0U; + } + rab = __archive_read_ahead(a, 1U, &nrd); if (nrd < 0) { *bsz = 0U; Modified: head/contrib/libarchive/libarchive/test/test_read_format_rar5.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Thu Dec 13 11:15:14 2018 (r342041) +++ head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Thu Dec 13 11:18:45 2018 (r342042) @@ -28,6 +28,7 @@ * help. */ #define __LIBARCHIVE_BUILD #include +#include #define PROLOGUE(reffile) \ struct archive_entry *ae; \ @@ -81,7 +82,7 @@ int verify_data(const uint8_t* data_ptr, int magic, in /* *lptr is a value inside unpacked test file, val is the * value that should be in the unpacked test file. */ - if(*lptr != val) + if(archive_le32dec(lptr) != (uint32_t) val) return 0; } From owner-svn-src-all@freebsd.org Thu Dec 13 12:58:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3A1D13233DF; Thu, 13 Dec 2018 12:58:42 +0000 (UTC) (envelope-from des@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) server-signature RSA-PSS (4096 bits) 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 8ABE58687C; Thu, 13 Dec 2018 12:58:42 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AC7020099; Thu, 13 Dec 2018 12:58:42 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDCwgcO075968; Thu, 13 Dec 2018 12:58:42 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDCwgrY075967; Thu, 13 Dec 2018 12:58:42 GMT (envelope-from des@FreeBSD.org) Message-Id: <201812131258.wBDCwgrY075967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 13 Dec 2018 12:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342045 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 342045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8ABE58687C X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.11 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.832,0]; NEURAL_HAM_SHORT(-0.28)[-0.280,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 12:58:43 -0000 Author: des Date: Thu Dec 13 12:58:42 2018 New Revision: 342045 URL: https://svnweb.freebsd.org/changeset/base/342045 Log: Create /etc/authpf, used by authpf(8) and authpf-noip(8). MFC after: 1 week Modified: head/etc/mtree/BSD.root.dist Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Thu Dec 13 11:55:18 2018 (r342044) +++ head/etc/mtree/BSD.root.dist Thu Dec 13 12:58:42 2018 (r342045) @@ -30,6 +30,8 @@ etc X11 .. + authpf + .. autofs .. bluetooth From owner-svn-src-all@freebsd.org Thu Dec 13 13:25:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FDD01324830; Thu, 13 Dec 2018 13:25:39 +0000 (UTC) (envelope-from chuck@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) server-signature RSA-PSS (4096 bits) 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 CB4C287F65; Thu, 13 Dec 2018 13:25:38 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEAC0205AF; Thu, 13 Dec 2018 13:25:38 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDDPc9d091767; Thu, 13 Dec 2018 13:25:38 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDDPcRu091765; Thu, 13 Dec 2018 13:25:38 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <201812131325.wBDDPcRu091765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Thu, 13 Dec 2018 13:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342046 - in head/sys: cam/nvme dev/nvme X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: in head/sys: cam/nvme dev/nvme X-SVN-Commit-Revision: 342046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CB4C287F65 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.14 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.32)[-0.320,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 13:25:39 -0000 Author: chuck Date: Thu Dec 13 13:25:37 2018 New Revision: 342046 URL: https://svnweb.freebsd.org/changeset/base/342046 Log: nda(4) fix check for Dataset Management support In the nda(4) driver, only set DISKFLAG_CANDELETE (a.k.a. can support BIO_DELETE) if the drive supports Dataset Management. There are reports that without this check, VMWare Workstation does not work reliably. Fix is to check the ONCS field in the NVMe Controller Data structure for support. This check previously existed but did not survive the big-endian changes. Reported by: yuripv@yuripv.net Reviewed by: imp, mav, jimharris Approved by: imp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18493 Modified: head/sys/cam/nvme/nvme_da.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ns.c Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Thu Dec 13 12:58:42 2018 (r342045) +++ head/sys/cam/nvme/nvme_da.c Thu Dec 13 13:25:37 2018 (r342046) @@ -798,7 +798,7 @@ ndaregister(struct cam_periph *periph, void *arg) disk->d_mediasize = (off_t)(disk->d_sectorsize * nsd->nsze); disk->d_delmaxsize = disk->d_mediasize; disk->d_flags = DISKFLAG_DIRECT_COMPLETION; -// if (cd->oncs.dsm) // XXX broken? + if (nvme_ctrlr_has_dataset_mgmt(cd)) disk->d_flags |= DISKFLAG_CANDELETE; vwc_present = (cd->vwc >> NVME_CTRLR_DATA_VWC_PRESENT_SHIFT) & NVME_CTRLR_DATA_VWC_PRESENT_MASK; Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Thu Dec 13 12:58:42 2018 (r342045) +++ head/sys/dev/nvme/nvme.h Thu Dec 13 13:25:37 2018 (r342046) @@ -1259,6 +1259,13 @@ void nvme_unregister_consumer(struct nvme_consumer *c device_t nvme_ctrlr_get_device(struct nvme_controller *ctrlr); const struct nvme_controller_data * nvme_ctrlr_get_data(struct nvme_controller *ctrlr); +static inline bool +nvme_ctrlr_has_dataset_mgmt(const struct nvme_controller_data *cd) +{ + /* Assumes cd was byte swapped by nvme_controller_data_swapbytes() */ + return ((cd->oncs >> NVME_CTRLR_DATA_ONCS_DSM_SHIFT) & + NVME_CTRLR_DATA_ONCS_DSM_MASK); +} /* Namespace helper functions */ uint32_t nvme_ns_get_max_io_xfer_size(struct nvme_namespace *ns); Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Thu Dec 13 12:58:42 2018 (r342045) +++ head/sys/dev/nvme/nvme_ns.c Thu Dec 13 13:25:37 2018 (r342046) @@ -498,8 +498,6 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t struct nvme_completion_poll_status status; int res; int unit; - uint16_t oncs; - uint8_t dsm; uint8_t flbas_fmt; uint8_t vwc_present; @@ -569,9 +567,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t return (ENXIO); } - oncs = ctrlr->cdata.oncs; - dsm = (oncs >> NVME_CTRLR_DATA_ONCS_DSM_SHIFT) & NVME_CTRLR_DATA_ONCS_DSM_MASK; - if (dsm) + if (nvme_ctrlr_has_dataset_mgmt(&ctrlr->cdata)) ns->flags |= NVME_NS_DEALLOCATE_SUPPORTED; vwc_present = (ctrlr->cdata.vwc >> NVME_CTRLR_DATA_VWC_PRESENT_SHIFT) & From owner-svn-src-all@freebsd.org Thu Dec 13 15:51:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E161329719; Thu, 13 Dec 2018 15:51:07 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 7EF7A8D555; Thu, 13 Dec 2018 15:51:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7339021DB0; Thu, 13 Dec 2018 15:51:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDFp7Ko063245; Thu, 13 Dec 2018 15:51:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDFp7LT063244; Thu, 13 Dec 2018 15:51:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812131551.wBDFp7LT063244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Dec 2018 15:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342047 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 342047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7EF7A8D555 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.16 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.842,0]; NEURAL_HAM_SHORT(-0.32)[-0.316,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 15:51:08 -0000 Author: markj Date: Thu Dec 13 15:51:07 2018 New Revision: 342047 URL: https://svnweb.freebsd.org/changeset/base/342047 Log: MFC r341638: Let kern.trap_enotcap be set as a tunable. Modified: stable/12/sys/kern/sys_capability.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sys_capability.c ============================================================================== --- stable/12/sys/kern/sys_capability.c Thu Dec 13 13:25:37 2018 (r342046) +++ stable/12/sys/kern/sys_capability.c Thu Dec 13 15:51:07 2018 (r342047) @@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$"); #include bool __read_frequently trap_enotcap; -SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RW, &trap_enotcap, 0, +SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RWTUN, &trap_enotcap, 0, "Deliver SIGTRAP on ENOTCAPABLE"); #ifdef CAPABILITY_MODE From owner-svn-src-all@freebsd.org Thu Dec 13 16:07:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD7C9132A28B; Thu, 13 Dec 2018 16:07:36 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 518878E21D; Thu, 13 Dec 2018 16:07:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 312D9220DE; Thu, 13 Dec 2018 16:07:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDG7axx073480; Thu, 13 Dec 2018 16:07:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDG7Z42073478; Thu, 13 Dec 2018 16:07:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812131607.wBDG7Z42073478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Dec 2018 16:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342048 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 342048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 518878E21D X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.13 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.84)[-0.835,0]; NEURAL_HAM_SHORT(-0.29)[-0.290,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 16:07:36 -0000 Author: markj Date: Thu Dec 13 16:07:35 2018 New Revision: 342048 URL: https://svnweb.freebsd.org/changeset/base/342048 Log: MFC r340405: Add accounting to per-domain UMA full bucket caches. Modified: stable/12/sys/vm/uma_core.c stable/12/sys/vm/uma_int.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c ============================================================================== --- stable/12/sys/vm/uma_core.c Thu Dec 13 15:51:07 2018 (r342047) +++ stable/12/sys/vm/uma_core.c Thu Dec 13 16:07:35 2018 (r342048) @@ -459,7 +459,37 @@ bucket_zone_drain(void) zone_drain(ubz->ubz_zone); } +static uma_bucket_t +zone_try_fetch_bucket(uma_zone_t zone, uma_zone_domain_t zdom, const bool ws) +{ + uma_bucket_t bucket; + + ZONE_LOCK_ASSERT(zone); + + if ((bucket = LIST_FIRST(&zdom->uzd_buckets)) != NULL) { + MPASS(zdom->uzd_nitems >= bucket->ub_cnt); + LIST_REMOVE(bucket, ub_link); + zdom->uzd_nitems -= bucket->ub_cnt; + if (ws && zdom->uzd_imin > zdom->uzd_nitems) + zdom->uzd_imin = zdom->uzd_nitems; + } + return (bucket); +} + static void +zone_put_bucket(uma_zone_t zone, uma_zone_domain_t zdom, uma_bucket_t bucket, + const bool ws) +{ + + ZONE_LOCK_ASSERT(zone); + + LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); + zdom->uzd_nitems += bucket->ub_cnt; + if (ws && zdom->uzd_imax < zdom->uzd_nitems) + zdom->uzd_imax = zdom->uzd_nitems; +} + +static void zone_log_warning(uma_zone_t zone) { static const struct timeval warninterval = { 300, 0 }; @@ -509,6 +539,23 @@ uma_timeout(void *unused) } /* + * Update the working set size estimate for the zone's bucket cache. + * The constants chosen here are somewhat arbitrary. With an update period of + * 20s (UMA_TIMEOUT), this estimate is dominated by zone activity over the + * last 100s. + */ +static void +zone_domain_update_wss(uma_zone_domain_t zdom) +{ + long wss; + + MPASS(zdom->uzd_imax >= zdom->uzd_imin); + wss = zdom->uzd_imax - zdom->uzd_imin; + zdom->uzd_imax = zdom->uzd_imin = zdom->uzd_nitems; + zdom->uzd_wss = (3 * wss + 2 * zdom->uzd_wss) / 5; +} + +/* * Routine to perform timeout driven calculations. This expands the * hashes and does per cpu statistics aggregation. * @@ -560,8 +607,14 @@ keg_timeout(uma_keg_t keg) static void zone_timeout(uma_zone_t zone) { + int i; zone_foreach_keg(zone, &keg_timeout); + + ZONE_LOCK(zone); + for (i = 0; i < vm_ndomains; i++) + zone_domain_update_wss(&zone->uz_domain[i]); + ZONE_UNLOCK(zone); } /* @@ -772,16 +825,16 @@ cache_drain_safe_cpu(uma_zone_t zone) cache = &zone->uz_cpu[curcpu]; if (cache->uc_allocbucket) { if (cache->uc_allocbucket->ub_cnt != 0) - LIST_INSERT_HEAD(&zone->uz_domain[domain].uzd_buckets, - cache->uc_allocbucket, ub_link); + zone_put_bucket(zone, &zone->uz_domain[domain], + cache->uc_allocbucket, false); else b1 = cache->uc_allocbucket; cache->uc_allocbucket = NULL; } if (cache->uc_freebucket) { if (cache->uc_freebucket->ub_cnt != 0) - LIST_INSERT_HEAD(&zone->uz_domain[domain].uzd_buckets, - cache->uc_freebucket, ub_link); + zone_put_bucket(zone, &zone->uz_domain[domain], + cache->uc_freebucket, false); else b2 = cache->uc_freebucket; cache->uc_freebucket = NULL; @@ -844,8 +897,8 @@ bucket_cache_drain(uma_zone_t zone) */ for (i = 0; i < vm_ndomains; i++) { zdom = &zone->uz_domain[i]; - while ((bucket = LIST_FIRST(&zdom->uzd_buckets)) != NULL) { - LIST_REMOVE(bucket, ub_link); + while ((bucket = zone_try_fetch_bucket(zone, zdom, false)) != + NULL) { ZONE_UNLOCK(zone); bucket_drain(zone, bucket); bucket_free(zone, bucket, NULL); @@ -2523,11 +2576,9 @@ zalloc_start: zdom = &zone->uz_domain[0]; else zdom = &zone->uz_domain[domain]; - if ((bucket = LIST_FIRST(&zdom->uzd_buckets)) != NULL) { + if ((bucket = zone_try_fetch_bucket(zone, zdom, true)) != NULL) { KASSERT(bucket->ub_cnt != 0, ("uma_zalloc_arg: Returning an empty bucket.")); - - LIST_REMOVE(bucket, ub_link); cache->uc_allocbucket = bucket; ZONE_UNLOCK(zone); goto zalloc_start; @@ -2556,6 +2607,7 @@ zalloc_start: critical_enter(); cpu = curcpu; cache = &zone->uz_cpu[cpu]; + /* * See if we lost the race or were migrated. Cache the * initialized bucket to make this less likely or claim @@ -2565,6 +2617,7 @@ zalloc_start: ((zone->uz_flags & UMA_ZONE_NUMA) == 0 || domain == PCPU_GET(domain))) { cache->uc_allocbucket = bucket; + zdom->uzd_imax += bucket->ub_cnt; } else if ((zone->uz_flags & UMA_ZONE_NOBUCKETCACHE) != 0) { critical_exit(); ZONE_UNLOCK(zone); @@ -2572,7 +2625,7 @@ zalloc_start: bucket_free(zone, bucket, udata); goto zalloc_restart; } else - LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); + zone_put_bucket(zone, zdom, bucket, false); ZONE_UNLOCK(zone); goto zalloc_start; } @@ -3200,7 +3253,7 @@ zfree_start: bucket_free(zone, bucket, udata); goto zfree_restart; } else - LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); + zone_put_bucket(zone, zdom, bucket, true); } /* @@ -3649,6 +3702,7 @@ uma_reclaim_locked(bool kmem_danger) cache_drain_safe(NULL); zone_foreach(zone_drain); } + /* * Some slabs may have been freed but this zone will be visited early * we visit again so that we can free pages that are empty once other @@ -3882,7 +3936,7 @@ uma_print_zone(uma_zone_t zone) * directly so that we don't have to. */ static void -uma_zone_sumstat(uma_zone_t z, int *cachefreep, uint64_t *allocsp, +uma_zone_sumstat(uma_zone_t z, long *cachefreep, uint64_t *allocsp, uint64_t *freesp, uint64_t *sleepsp) { uma_cache_t cache; @@ -3937,7 +3991,6 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) struct uma_stream_header ush; struct uma_type_header uth; struct uma_percpu_stat *ups; - uma_bucket_t bucket; uma_zone_domain_t zdom; struct sbuf sbuf; uma_cache_t cache; @@ -3997,9 +4050,7 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) for (i = 0; i < vm_ndomains; i++) { zdom = &z->uz_domain[i]; - LIST_FOREACH(bucket, &zdom->uzd_buckets, - ub_link) - uth.uth_zone_free += bucket->ub_cnt; + uth.uth_zone_free += zdom->uzd_nitems; } uth.uth_allocs = z->uz_allocs; uth.uth_frees = z->uz_frees; @@ -4199,12 +4250,11 @@ uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *i #ifdef DDB DB_SHOW_COMMAND(uma, db_show_uma) { - uma_bucket_t bucket; uma_keg_t kz; uma_zone_t z; - uma_zone_domain_t zdom; uint64_t allocs, frees, sleeps; - int cachefree, i; + long cachefree; + int i; db_printf("%18s %8s %8s %8s %12s %8s %8s\n", "Zone", "Size", "Used", "Free", "Requests", "Sleeps", "Bucket"); @@ -4221,13 +4271,10 @@ DB_SHOW_COMMAND(uma, db_show_uma) if (!((z->uz_flags & UMA_ZONE_SECONDARY) && (LIST_FIRST(&kz->uk_zones) != z))) cachefree += kz->uk_free; - for (i = 0; i < vm_ndomains; i++) { - zdom = &z->uz_domain[i]; - LIST_FOREACH(bucket, &zdom->uzd_buckets, - ub_link) - cachefree += bucket->ub_cnt; - } - db_printf("%18s %8ju %8jd %8d %12ju %8ju %8u\n", + for (i = 0; i < vm_ndomains; i++) + cachefree += z->uz_domain[i].uzd_nitems; + + db_printf("%18s %8ju %8jd %8ld %12ju %8ju %8u\n", z->uz_name, (uintmax_t)kz->uk_size, (intmax_t)(allocs - frees), cachefree, (uintmax_t)allocs, sleeps, z->uz_count); @@ -4239,22 +4286,18 @@ DB_SHOW_COMMAND(uma, db_show_uma) DB_SHOW_COMMAND(umacache, db_show_umacache) { - uma_bucket_t bucket; uma_zone_t z; - uma_zone_domain_t zdom; uint64_t allocs, frees; - int cachefree, i; + long cachefree; + int i; db_printf("%18s %8s %8s %8s %12s %8s\n", "Zone", "Size", "Used", "Free", "Requests", "Bucket"); LIST_FOREACH(z, &uma_cachezones, uz_link) { uma_zone_sumstat(z, &cachefree, &allocs, &frees, NULL); - for (i = 0; i < vm_ndomains; i++) { - zdom = &z->uz_domain[i]; - LIST_FOREACH(bucket, &zdom->uzd_buckets, ub_link) - cachefree += bucket->ub_cnt; - } - db_printf("%18s %8ju %8jd %8d %12ju %8u\n", + for (i = 0; i < vm_ndomains; i++) + cachefree += z->uz_domain[i].uzd_nitems; + db_printf("%18s %8ju %8jd %8ld %12ju %8u\n", z->uz_name, (uintmax_t)z->uz_size, (intmax_t)(allocs - frees), cachefree, (uintmax_t)allocs, z->uz_count); Modified: stable/12/sys/vm/uma_int.h ============================================================================== --- stable/12/sys/vm/uma_int.h Thu Dec 13 15:51:07 2018 (r342047) +++ stable/12/sys/vm/uma_int.h Thu Dec 13 16:07:35 2018 (r342048) @@ -304,6 +304,10 @@ typedef struct uma_klink *uma_klink_t; struct uma_zone_domain { LIST_HEAD(,uma_bucket) uzd_buckets; /* full buckets */ + long uzd_nitems; /* total item count */ + long uzd_imax; /* maximum item count this period */ + long uzd_imin; /* minimum item count this period */ + long uzd_wss; /* working set size estimate */ }; typedef struct uma_zone_domain * uma_zone_domain_t; @@ -423,11 +427,12 @@ void uma_large_free(uma_slab_t slab); mtx_init(&(z)->uz_lock, (z)->uz_name, \ "UMA zone", MTX_DEF | MTX_DUPOK); \ } while (0) - + #define ZONE_LOCK(z) mtx_lock((z)->uz_lockptr) #define ZONE_TRYLOCK(z) mtx_trylock((z)->uz_lockptr) #define ZONE_UNLOCK(z) mtx_unlock((z)->uz_lockptr) #define ZONE_LOCK_FINI(z) mtx_destroy(&(z)->uz_lock) +#define ZONE_LOCK_ASSERT(z) mtx_assert((z)->uz_lockptr, MA_OWNED) /* * Find a slab within a hash table. This is used for OFFPAGE zones to lookup From owner-svn-src-all@freebsd.org Thu Dec 13 19:04:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CE5713309A4; Thu, 13 Dec 2018 19:04:32 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 BD17F6D5D9; Thu, 13 Dec 2018 19:04:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A9852401E; Thu, 13 Dec 2018 19:04:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDJ4Vus067298; Thu, 13 Dec 2018 19:04:31 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDJ4Pw8067267; Thu, 13 Dec 2018 19:04:25 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201812131904.wBDJ4Pw8067267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 13 Dec 2018 19:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342049 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/dispatcher source/components/executer source/components/namespace source/components/parser source/... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/common source/compiler source/components/dispatcher source/components/executer source/components/namespace source/components/parser source/components/utilities sour... X-SVN-Commit-Revision: 342049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD17F6D5D9 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.02 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.81)[-0.814,0]; NEURAL_HAM_SHORT(-0.21)[-0.210,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 19:04:32 -0000 Author: jkim Date: Thu Dec 13 19:04:25 2018 New Revision: 342049 URL: https://svnweb.freebsd.org/changeset/base/342049 Log: Import ACPICA 20181213. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmswitch.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exserial.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/changes.txt Thu Dec 13 19:04:25 2018 (r342049) @@ -1,7 +1,68 @@ ---------------------------------------- -31 October 2018. Summary of changes for version 20181031: +13 December 2018. Summary of changes for version 20181213: -This release is available at https://acpica.org/downloads + +1) ACPICA Kernel-resident Subsystem: + +Fixed some buffer length issues with the GenericSerialBus, related to two +of the bidirectional protocols: AttribRawProcessBytes and AttribRawBytes, +which are rarely seen in the field. For these, the LEN field of the ASL +buffer is now ignored. Hans de Goede + +Implemented a new object evaluation trace mechanism for control methods +and data objects. This includes nested control methods. It is +particularly useful for examining the ACPI execution during system +initialization since the output is relatively terse. The flag below +enables the output of the trace via the ACPI_DEBUG_PRINT_RAW interface: + #define ACPI_LV_EVALUATION 0x00080000 + +Examples: + Enter evaluation : _SB.PCI0._INI (Method) + Exit evaluation : _SB.PCI0._INI + Enter evaluation : _OSI (Method) + Exit evaluation : _OSI + Enter evaluation : _SB.PCI0.TEST (Method) + Nested method call : _SB.PCI0.NST1 + Exit nested method : _SB.PCI0.NST1 + Exit evaluation : _SB.PCI0.TEST + +Added two recently-defined _OSI strings. See +https://docs.microsoft.com/en-us/windows-hardware/drivers/acpi/winacpi- +osi. + "Windows 2018" + "Windows 2018.2" + +Update for buffer-to-string conversions via the ToHexString ASL operator. +A "0x" is now prepended to each of the hex values in the output string. +This provides compatibility with other ACPI implementations. The ACPI +specification is somewhat vague on this issue. + Example output string after conversion: +"0x01,0x02,0x03,0x04,0x05,0x06" + +Return a run-time error for TermArg expressions within individual package +elements. Although this is technically supported by the ASL grammar, +other ACPI implementations do not support this either. Also, this fixes a +fault if this type of construct is ever encountered (it never has been). + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented a new compile option (-ww) that will promote individual +warnings and remarks to errors. This is intended to enhance the firmware +build process. + +AcpiExec: Implemented a new command-line option (-eo) to support the new +object evaluation trace mechanism described above. + +Disassembler: Added support to disassemble OEMx tables as AML/ASL tables +instead of a "unknown table" message. + +AcpiHelp: Improved support for the "special" predefined names such as +_Lxx, _Exx, _EJx, _T_x, etc. For these, any legal hex value can now be +used for "xx" and "x". + +---------------------------------------- +31 October 2018. Summary of changes for version 20181031: An Operation Region regression was fixed by properly adding address Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Thu Dec 13 19:04:25 2018 (r342049) @@ -171,7 +171,7 @@ */ const AH_PREDEFINED_NAME AslPredefinedInfo[] = { - AH_PREDEF ("_ACx", "Active Cooling", "Returns the active cooling policy threshold values"), + AH_PREDEF ("_ACx", "Active Cooling, x=0-9", "Returns the active cooling policy threshold values"), AH_PREDEF ("_ADR", "Address", "Returns address of a device on parent bus, and resource field"), AH_PREDEF ("_AEI", "ACPI Event Interrupts", "Returns a list of GPIO events to be used as ACPI events"), AH_PREDEF ("_ALC", "Ambient Light Chromaticity", "Returns the ambient light color chromaticity"), @@ -180,7 +180,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_ALP", "Ambient Light Polling", "Returns the ambient light sensor polling frequency"), AH_PREDEF ("_ALR", "Ambient Light Response", "Returns the ambient light brightness to display brightness mappings"), AH_PREDEF ("_ALT", "Ambient Light Temperature", "Returns the ambient light color temperature"), - AH_PREDEF ("_ALx", "Active List", "Returns a list of active cooling device objects"), + AH_PREDEF ("_ALx", "Active List, x=0-9", "Returns a list of active cooling device objects"), AH_PREDEF ("_ART", "Active Cooling Relationship Table", "Returns thermal relationship information between platform devices and fan devices"), AH_PREDEF ("_ASI", "Address Space Id", "Resource Descriptor field"), AH_PREDEF ("_ASZ", "Access Size", "Resource Descriptor field"), @@ -237,11 +237,11 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_DSS", "Device Set State", "Sets the display device state"), AH_PREDEF ("_DSW", "Device Sleep Wake", "Sets the sleep and wake transition states for a device"), AH_PREDEF ("_DTI", "Device Temperature Indication", "Conveys native device temperature to the platform"), - AH_PREDEF ("_Exx", "Edge-Triggered GPE", "Method executed as a result of a general-purpose event"), + AH_PREDEF ("_Exx", "Edge-Triggered GPE, xx=0x00-0xFF", "Method executed as a result of a general-purpose event"), AH_PREDEF ("_EC_", "Embedded Controller", "returns EC offset and query information"), AH_PREDEF ("_EDL", "Eject Device List", "Returns a list of devices that are dependent on a device (docking)"), AH_PREDEF ("_EJD", "Ejection Dependent Device", "Returns the name of dependent (parent) device (docking)"), - AH_PREDEF ("_EJx", "Eject Device", "Begin or cancel a device ejection request (docking)"), + AH_PREDEF ("_EJx", "Eject Device, x=0-9", "Begin or cancel a device ejection request (docking)"), AH_PREDEF ("_END", "Endianness", "Endian orientation, Resource Descriptor field"), AH_PREDEF ("_EVT", "Event", "Event method for GPIO events"), AH_PREDEF ("_FDE", "Floppy Disk Enumerate", "Returns floppy disk configuration information"), @@ -281,7 +281,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_INT", "Interrupts", "Interrupt mask bits, Resource Descriptor field"), AH_PREDEF ("_IOR", "I/O Restriction", "Restriction type, Resource Descriptor field"), AH_PREDEF ("_IRC", "Inrush Current", "Presence indicates that a device has a significant inrush current draw"), - AH_PREDEF ("_Lxx", "Level-Triggered GPE", "Control method executed as a result of a general-purpose event"), + AH_PREDEF ("_Lxx", "Level-Triggered GPE, xx=0x00-0xFF", "Control method executed as a result of a general-purpose event"), AH_PREDEF ("_LCK", "Lock Device", "Locks or unlocks a device (docking)"), AH_PREDEF ("_LEN", "Length", "Range length, Resource Descriptor field"), AH_PREDEF ("_LID", "Lid Status", "Returns the open/closed status of the lid on a mobile system"), @@ -358,7 +358,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_PTS", "Prepare To Sleep", "Inform the platform of an impending sleep transition"), AH_PREDEF ("_PUR", "Processor Utilization Request", "Returns the number of processors that the platform would like to idle"), AH_PREDEF ("_PXM", "Device Proximity", "Returns a device's proximity domain identifier"), - AH_PREDEF ("_Qxx", "EC Query", "Embedded Controller query and SMBus Alarm control method"), + AH_PREDEF ("_Qxx", "EC Query, xx=0x00-0xFF", "Embedded Controller query and SMBus Alarm control method"), AH_PREDEF ("_RBO", "Register Bit Offset", "Resource Descriptor field"), AH_PREDEF ("_RBW", "Register Bit Width", "Resource Descriptor field"), AH_PREDEF ("_RDI", "Resource Dependencies for Idle", "Returns a list of dependencies for idle states"), @@ -413,7 +413,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_SUB", "Subsystem ID", "Returns the subsystem ID for a device"), AH_PREDEF ("_SUN", "Slot User Number", "Returns the slot unique ID number"), AH_PREDEF ("_SWS", "System Wake Source", "Returns the source event that caused the system to wake"), - AH_PREDEF ("_T_x", "Emitted by ASL Compiler", "Reserved for use by ASL compilers"), + AH_PREDEF ("_T_x", "Emitted by ASL Compiler, x=0-9, A-Z", "Reserved for use by ASL compilers"), AH_PREDEF ("_TC1", "Thermal Constant 1", "Returns TC1 for the passive cooling formula"), AH_PREDEF ("_TC2", "Thermal Constant 2", "Returns TC2 for the passive cooling formula"), AH_PREDEF ("_TDL", "T-State Depth Limit", "Returns the _TSS entry number of the lowest power throttling state"), @@ -447,7 +447,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_VAL", "Pin Configuration Value", "Resource Descriptor field"), AH_PREDEF ("_VEN", "Vendor Data", "Resource Descriptor field"), AH_PREDEF ("_VPO", "Video Post Options", "Returns the implemented video post options"), - AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"), + AH_PREDEF ("_Wxx", "Wake Event, xx=0x00-0xFF", "Method executed as a result of a wake event"), AH_PREDEF ("_WAK", "Wake", "Inform AML that the system has just awakened"), AH_PREDEF ("_WPC", "Wireless Power Calibration", "Calibrate power and notify wireless device"), AH_PREDEF ("_WPP", "Wireless Power Polling", "Get recommended polling interval"), Modified: vendor-sys/acpica/dist/source/common/dmswitch.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmswitch.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/common/dmswitch.c Thu Dec 13 19:04:25 2018 (r342049) @@ -325,6 +325,8 @@ AcpiDmClearTempList ( * FUNCTION: AcpiDmIsSwitchBlock * * PARAMETERS: Op - While Object + * Temp - Where the compiler temp name is returned + * (_T_x) * * RETURN: TRUE if While block can be converted to a Switch/Case block * @@ -550,6 +552,10 @@ AcpiDmIsSwitchBlock ( if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) { CurrentOp = CurrentOp->Common.Next; + if (!CurrentOp) + { + return (FALSE); + } } /* Ignore the Break Op */ Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Dec 13 19:04:25 2018 (r342049) @@ -773,12 +773,6 @@ CgWriteNode ( return; } - if ((Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && - AslGbl_DoExternals == FALSE) - { - return; - } - Op->Asl.FinalAmlLength = 0; switch (Op->Asl.AmlOpcode) Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Dec 13 19:04:25 2018 (r342049) @@ -388,23 +388,20 @@ CmDoCompile ( /* Resolve External Declarations */ - if (AslGbl_DoExternals) - { - Event = UtBeginEvent ("Resolve all Externals"); - DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n"); + Event = UtBeginEvent ("Resolve all Externals"); + DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n"); - if (AslGbl_DoExternalsInPlace) - { - TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD, - ExAmlExternalWalkBegin, NULL, NULL); - } - else - { - TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE, - ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL); - } - UtEndEvent (Event); + if (AslGbl_DoExternalsInPlace) + { + TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD, + ExAmlExternalWalkBegin, NULL, NULL); } + else + { + TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE, + ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL); + } + UtEndEvent (Event); /* * Semantic analysis. This can happen only after the Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Dec 13 19:04:25 2018 (r342049) @@ -475,6 +475,10 @@ AslExpectException ( char *MessageIdString); ACPI_STATUS +AslElevateException ( + char *MessageIdString); + +ACPI_STATUS AslDisableException ( char *MessageIdString); Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Dec 13 19:04:25 2018 (r342049) @@ -201,7 +201,12 @@ AePrintSubError ( FILE *OutputFile, ASL_ERROR_MSG *Enode); +static UINT8 +GetModifiedLevel ( + UINT8 Level, + UINT16 MessageId); + /******************************************************************************* * * FUNCTION: AslAbort @@ -968,11 +973,12 @@ AslLogNewError ( ASL_ERROR_MSG *SubError) { ASL_ERROR_MSG *Enode = NULL; + UINT8 ModifiedLevel = GetModifiedLevel (Level, MessageId); - AslInitEnode (&Enode, Level, MessageId, LineNumber, LogicalLineNumber, - LogicalByteOffset, Column, Filename, Message, SourceLine, - SubError); + AslInitEnode (&Enode, ModifiedLevel, MessageId, LineNumber, + LogicalLineNumber, LogicalByteOffset, Column, Filename, Message, + SourceLine, SubError); /* Add the new node to the error node list */ @@ -985,7 +991,7 @@ AslLogNewError ( AePrintException (ASL_FILE_STDERR, Enode, NULL); } - AslGbl_ExceptionCount[Level]++; + AslGbl_ExceptionCount[ModifiedLevel]++; if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT) { printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT); @@ -999,8 +1005,46 @@ AslLogNewError ( return; } + /******************************************************************************* * + * FUNCTION: GetModifiedLevel + * + * PARAMETERS: Level - Seriousness (Warning/error, etc.) + * MessageId - Index into global message buffer + * + * RETURN: UINT8 - modified level + * + * DESCRIPTION: Get the modified level of exception codes that are reported as + * errors from the -ww option. + * + ******************************************************************************/ + +static UINT8 +GetModifiedLevel ( + UINT8 Level, + UINT16 MessageId) +{ + UINT16 i; + UINT16 ExceptionCode; + + + ExceptionCode = AeBuildFullExceptionCode (Level, MessageId); + + for (i = 0; i < AslGbl_ElevatedMessagesIndex; i++) + { + if (ExceptionCode == AslGbl_ElevatedMessages[i]) + { + return (ASL_ERROR); + } + } + + return (Level); +} + + +/******************************************************************************* + * * FUNCTION: AslIsExceptionIgnored * * PARAMETERS: Level - Seriousness (Warning/error, etc.) @@ -1154,6 +1198,51 @@ AslDisableException ( return (AE_OK); } + +/******************************************************************************* + * + * FUNCTION: AslElevateException + * + * PARAMETERS: MessageIdString - ID of excepted exception during compile + * + * RETURN: Status + * + * DESCRIPTION: Enter a message ID into the global elevated exceptions table. + * These messages will be considered as compilation errors. + * + ******************************************************************************/ + +ACPI_STATUS +AslElevateException ( + char *MessageIdString) +{ + UINT32 MessageId; + + + /* Convert argument to an integer and validate it */ + + MessageId = (UINT32) strtoul (MessageIdString, NULL, 0); + + if (MessageId > 6999) + { + printf ("\"%s\" is not a valid warning/remark/erro ID\n", + MessageIdString); + return (AE_BAD_PARAMETER); + } + + /* Insert value into the global expected message array */ + + if (AslGbl_ElevatedMessagesIndex >= ASL_MAX_ELEVATED_MESSAGES) + { + printf ("Too many messages have been registered as elevated (max %d)\n", + ASL_MAX_DISABLED_MESSAGES); + return (AE_LIMIT); + } + + AslGbl_ElevatedMessages[AslGbl_ExpectedMessagesIndex] = MessageId; + AslGbl_ElevatedMessagesIndex++; + return (AE_OK); +} /******************************************************************************* * Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Dec 13 19:04:25 2018 (r342049) @@ -255,6 +255,7 @@ extern int AslCompilerdebug; #define ASL_STRING_BUFFER_SIZE (1024 * 32) /* 32k */ #define ASL_MAX_DISABLED_MESSAGES 32 #define ASL_MAX_EXPECTED_MESSAGES 32 +#define ASL_MAX_ELEVATED_MESSAGES 32 #define HEX_TABLE_LINE_SIZE 8 #define HEX_LISTING_LINE_SIZE 8 @@ -319,7 +320,6 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (A ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_PruneParseTree, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoTypechecking, TRUE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_EnableReferenceTypechecking, FALSE); -ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoExternals, TRUE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoExternalsInPlace, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoAslConversion, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_OptimizeTrivialParseNodes, TRUE); @@ -394,6 +394,7 @@ ASL_EXTERN UINT32 ASL_INIT_GLOBAL (A ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentLine, 0); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_DisabledMessagesIndex, 0); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ExpectedMessagesIndex, 0); +ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ElevatedMessagesIndex, 0); ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_HexBytesWereWritten, FALSE); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_NumNamespaceObjects, 0); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ReservedMethods, 0); @@ -435,6 +436,7 @@ ASL_EXTERN char AslGbl_StringBuffe ASL_EXTERN char AslGbl_StringBuffer2[ASL_STRING_BUFFER_SIZE]; ASL_EXTERN UINT32 AslGbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES]; ASL_EXTERN ASL_EXPECTED_MESSAGE AslGbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES]; +ASL_EXTERN UINT32 AslGbl_ElevatedMessages[ASL_MAX_ELEVATED_MESSAGES]; #endif /* __ASLGLOBAL_H */ Modified: vendor-sys/acpica/dist/source/compiler/aslhelp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelp.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/aslhelp.c Thu Dec 13 19:04:25 2018 (r342049) @@ -209,6 +209,7 @@ Usage ( ACPI_OPTION ("-vx ", "Expect a specific warning, remark, or error"); ACPI_OPTION ("-w <1|2|3>", "Set warning reporting level"); ACPI_OPTION ("-we", "Report warnings as errors"); + ACPI_OPTION ("-ww ", "Report specific warning or remark as error"); printf ("\nAML Bytecode Generation (*.aml):\n"); ACPI_OPTION ("-oa", "Disable all optimizations (compatibility mode)"); Modified: vendor-sys/acpica/dist/source/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllength.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/asllength.c Thu Dec 13 19:04:25 2018 (r342049) @@ -519,10 +519,7 @@ CgGenerateAmlLengths ( case PARSEOP_EXTERNAL: - if (AslGbl_DoExternals == TRUE) - { - CgGenerateAmlOpcodeLength (Op); - } + CgGenerateAmlOpcodeLength (Op); break; default: Modified: vendor-sys/acpica/dist/source/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopcodes.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/aslopcodes.c Thu Dec 13 19:04:25 2018 (r342049) @@ -927,15 +927,6 @@ OpcGenerateAmlOpcode ( AslGbl_HasIncludeFiles = TRUE; break; - case PARSEOP_EXTERNAL: - - if (AslGbl_DoExternals == FALSE) - { - Op->Asl.Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - Op->Asl.Child->Asl.Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - } - break; - case PARSEOP_TIMER: if (AcpiGbl_IntegerBitWidth == 32) Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Thu Dec 13 19:04:25 2018 (r342049) @@ -982,6 +982,23 @@ AslDoOptions ( AslGbl_WarningsAsErrors = TRUE; break; + case 'w': + + /* Get the required argument */ + + if (AcpiGetoptArgument (argc, argv)) + { + return (-1); + } + + Status = AslElevateException (AcpiGbl_Optarg); + if (ACPI_FAILURE (Status)) + { + return (-1); + } + break; + + default: printf ("Unknown option: -w%s\n", AcpiGbl_Optarg); Modified: vendor-sys/acpica/dist/source/compiler/asltransform.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltransform.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/compiler/asltransform.c Thu Dec 13 19:04:25 2018 (r342049) @@ -460,11 +460,7 @@ TrTransformSubtree ( case PARSEOP_EXTERNAL: - if (AslGbl_DoExternals == TRUE) - { - ExDoExternal (Op); - } - + ExDoExternal (Op); break; case PARSEOP___METHOD__: Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c Thu Dec 13 19:04:25 2018 (r342049) @@ -720,6 +720,8 @@ AcpiDsCallControlMethod ( goto Cleanup; } + NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1; + /* * Delete the operands on the previous walkstate operand stack * (they were copied to new objects) @@ -737,6 +739,16 @@ AcpiDsCallControlMethod ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "**** Begin nested execution of [%4.4s] **** WalkState=%p\n", MethodNode->Name.Ascii, NextWalkState)); + + ThisWalkState->MethodPathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE); + ThisWalkState->MethodIsNested = TRUE; + + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: %*s%s\n", " Nested method call", + NextWalkState->MethodNestingDepth * 3, " ", + &ThisWalkState->MethodPathname[1])); /* Invoke an internal method if necessary */ Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c Thu Dec 13 19:04:25 2018 (r342049) @@ -161,7 +161,6 @@ ACPI_MODULE_NAME ("dsobject") -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiDsBuildInternalObject @@ -460,7 +459,6 @@ AcpiDsCreateNode ( return_ACPI_STATUS (Status); } -#endif /* ACPI_NO_METHOD_EXECUTION */ /******************************************************************************* @@ -571,9 +569,7 @@ AcpiDsInitObjectFromOp ( /* Truncate value if we are executing from a 32-bit ACPI table */ -#ifndef ACPI_NO_METHOD_EXECUTION (void) AcpiExTruncateFor32bitTable (ObjDesc); -#endif break; case AML_REVISION_OP: @@ -594,7 +590,6 @@ AcpiDsInitObjectFromOp ( ObjDesc->Integer.Value = Op->Common.Value.Integer; -#ifndef ACPI_NO_METHOD_EXECUTION if (AcpiExTruncateFor32bitTable (ObjDesc)) { /* Warn if we found a 64-bit constant in a 32-bit table */ @@ -604,7 +599,6 @@ AcpiDsInitObjectFromOp ( ACPI_FORMAT_UINT64 (Op->Common.Value.Integer), (UINT32) ObjDesc->Integer.Value)); } -#endif break; default: @@ -642,12 +636,10 @@ AcpiDsInitObjectFromOp ( ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_LOCAL_OP; ObjDesc->Reference.Class = ACPI_REFCLASS_LOCAL; -#ifndef ACPI_NO_METHOD_EXECUTION Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_LOCAL, ObjDesc->Reference.Value, WalkState, ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc->Reference.Object)); -#endif break; case AML_TYPE_METHOD_ARGUMENT: @@ -657,12 +649,10 @@ AcpiDsInitObjectFromOp ( ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_ARG_OP; ObjDesc->Reference.Class = ACPI_REFCLASS_ARG; -#ifndef ACPI_NO_METHOD_EXECUTION Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_ARG, ObjDesc->Reference.Value, WalkState, ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc->Reference.Object)); -#endif break; default: /* Object name or Debug object */ Modified: vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Thu Dec 13 19:04:25 2018 (r342049) @@ -308,6 +308,32 @@ AcpiDsBuildInternalPackageObj ( { if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) { + if (!Arg->Common.Node) + { + /* + * This is the case where an expression has returned a value. + * The use of expressions (TermArgs) within individual + * package elements is not supported by the AML interpreter, + * even though the ASL grammar supports it. Example: + * + * Name (INT1, 0x1234) + * + * Name (PKG3, Package () { + * Add (INT1, 0xAAAA0000) + * }) + * + * 1) No known AML interpreter supports this type of construct + * 2) This fixes a fault if the construct is encountered + */ + ACPI_EXCEPTION ((AE_INFO, AE_SUPPORT, + "Expressions within package elements are not supported")); + + /* Cleanup the return object, it is not needed */ + + AcpiUtRemoveReference (WalkState->Results->Results.ObjDesc[0]); + return_ACPI_STATUS (AE_SUPPORT); + } + if (Arg->Common.Node->Type == ACPI_TYPE_METHOD) { /* Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c Thu Dec 13 19:04:25 2018 (r342049) @@ -209,7 +209,6 @@ AcpiDsClearImplicitReturn ( } -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiDsDoImplicitReturn @@ -583,7 +582,6 @@ AcpiDsClearOperands ( WalkState->NumOperands = 0; return_VOID; } -#endif /******************************************************************************* Modified: vendor-sys/acpica/dist/source/components/dispatcher/dswload.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dswload.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/dispatcher/dswload.c Thu Dec 13 19:04:25 2018 (r342049) @@ -221,12 +221,10 @@ AcpiDsInitCallbacks ( /* Execution pass */ -#ifndef ACPI_NO_METHOD_EXECUTION WalkState->ParseFlags |= ACPI_PARSE_EXECUTE | ACPI_PARSE_DELETE_TREE; WalkState->DescendingCallback = AcpiDsExecBeginOp; WalkState->AscendingCallback = AcpiDsExecEndOp; -#endif break; default: @@ -517,7 +515,7 @@ AcpiDsLoad1BeginOp ( /* Initialize the op */ -#if (defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)) +#ifdef ACPI_CONSTANT_EVAL_ONLY Op->Named.Path = Path; #endif @@ -580,7 +578,6 @@ AcpiDsLoad1EndOp ( ObjectType = WalkState->OpInfo->ObjectType; -#ifndef ACPI_NO_METHOD_EXECUTION if (WalkState->OpInfo->Flags & AML_FIELD) { /* @@ -626,7 +623,6 @@ AcpiDsLoad1EndOp ( } } } -#endif if (Op->Common.AmlOpcode == AML_NAME_OP) { Modified: vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c Thu Dec 13 19:04:25 2018 (r342049) @@ -529,10 +529,8 @@ AcpiDsLoad2EndOp ( ACPI_NAMESPACE_NODE *Node; ACPI_PARSE_OBJECT *Arg; ACPI_NAMESPACE_NODE *NewNode; -#ifndef ACPI_NO_METHOD_EXECUTION UINT32 i; UINT8 RegionSpace; -#endif ACPI_FUNCTION_TRACE (DsLoad2EndOp); @@ -622,7 +620,6 @@ AcpiDsLoad2EndOp ( switch (WalkState->OpInfo->Type) { -#ifndef ACPI_NO_METHOD_EXECUTION case AML_TYPE_CREATE_FIELD: /* @@ -718,13 +715,11 @@ AcpiDsLoad2EndOp ( } break; -#endif /* ACPI_NO_METHOD_EXECUTION */ case AML_TYPE_NAMED_COMPLEX: switch (Op->Common.AmlOpcode) { -#ifndef ACPI_NO_METHOD_EXECUTION case AML_REGION_OP: case AML_DATA_REGION_OP: @@ -809,7 +804,6 @@ AcpiDsLoad2EndOp ( } break; -#endif /* ACPI_NO_METHOD_EXECUTION */ default: Modified: vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c Thu Dec 13 19:04:25 2018 (r342049) @@ -733,7 +733,7 @@ AcpiDsCreateWalkState ( /* Init the method args/local */ -#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) +#ifndef ACPI_CONSTANT_EVAL_ONLY AcpiDsMethodDataInit (WalkState); #endif Modified: vendor-sys/acpica/dist/source/components/executer/exconvrt.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/exconvrt.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/executer/exconvrt.c Thu Dec 13 19:04:25 2018 (r342049) @@ -496,7 +496,7 @@ AcpiExConvertToAscii ( /* HexLength: 2 ascii hex chars per data byte */ - HexLength = ACPI_MUL_2 (DataWidth); + HexLength = (DataWidth * 2); for (i = 0, j = (HexLength-1); i < HexLength; i++, j--) { /* Get one hex digit, most significant digits first */ @@ -539,7 +539,8 @@ AcpiExConvertToAscii ( * * RETURN: Status * - * DESCRIPTION: Convert an ACPI Object to a string + * DESCRIPTION: Convert an ACPI Object to a string. Supports both implicit + * and explicit conversions and related rules. * ******************************************************************************/ @@ -574,9 +575,11 @@ AcpiExConvertToString ( switch (Type) { case ACPI_EXPLICIT_CONVERT_DECIMAL: - - /* Make room for maximum decimal number */ - + /* + * From ToDecimalString, integer source. + * + * Make room for the maximum decimal number size + */ StringLength = ACPI_MAX_DECIMAL_DIGITS; Base = 10; break; @@ -620,8 +623,10 @@ AcpiExConvertToString ( { case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by ToDecimalString */ /* - * From ACPI: "If Data is a buffer, it is converted to a string of - * decimal values separated by commas." + * Explicit conversion from the ToDecimalString ASL operator. + * + * From ACPI: "If the input is a buffer, it is converted to a + * a string of decimal values separated by commas." */ Base = 10; @@ -648,20 +653,29 @@ AcpiExConvertToString ( case ACPI_IMPLICIT_CONVERT_HEX: /* + * Implicit buffer-to-string conversion + * * From the ACPI spec: - *"The entire contents of the buffer are converted to a string of + * "The entire contents of the buffer are converted to a string of * two-character hexadecimal numbers, each separated by a space." + * + * Each hex number is prefixed with 0x (11/2018) */ Separator = ' '; - StringLength = (ObjDesc->Buffer.Length * 3); + StringLength = (ObjDesc->Buffer.Length * 5); break; - case ACPI_EXPLICIT_CONVERT_HEX: /* Used by ToHexString */ + case ACPI_EXPLICIT_CONVERT_HEX: /* + * Explicit conversion from the ToHexString ASL operator. + * * From ACPI: "If Data is a buffer, it is converted to a string of * hexadecimal values separated by commas." + * + * Each hex number is prefixed with 0x (11/2018) */ - StringLength = (ObjDesc->Buffer.Length * 3); + Separator = ','; + StringLength = (ObjDesc->Buffer.Length * 5); break; default: @@ -692,9 +706,20 @@ AcpiExConvertToString ( */ for (i = 0; i < ObjDesc->Buffer.Length; i++) { + if (Base == 16) + { + /* Emit 0x prefix for explict/implicit hex conversion */ + + *NewBuf++ = '0'; + *NewBuf++ = 'x'; + } + NewBuf += AcpiExConvertToAscii ( (UINT64) ObjDesc->Buffer.Pointer[i], Base, NewBuf, 1); - *NewBuf++ = Separator; /* each separated by a comma or space */ + + /* Each digit is separated by either a comma or space */ + + *NewBuf++ = Separator; } /* Modified: vendor-sys/acpica/dist/source/components/executer/excreate.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/excreate.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/executer/excreate.c Thu Dec 13 19:04:25 2018 (r342049) @@ -161,7 +161,6 @@ ACPI_MODULE_NAME ("excreate") -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiExCreateAlias @@ -573,7 +572,6 @@ AcpiExCreatePowerResource ( AcpiUtRemoveReference (ObjDesc); return_ACPI_STATUS (Status); } -#endif /******************************************************************************* Modified: vendor-sys/acpica/dist/source/components/executer/exoparg2.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/exoparg2.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/executer/exoparg2.c Thu Dec 13 19:04:25 2018 (r342049) @@ -460,9 +460,9 @@ AcpiExOpcode_2A_1T_1R ( * NOTE: A length of zero is ok, and will create a zero-length, null * terminated string. */ - while ((Length < Operand[0]->Buffer.Length) && - (Length < Operand[1]->Integer.Value) && - (Operand[0]->Buffer.Pointer[Length])) + while ((Length < Operand[0]->Buffer.Length) && /* Length of input buffer */ + (Length < Operand[1]->Integer.Value) && /* Length operand */ + (Operand[0]->Buffer.Pointer[Length])) /* Null terminator */ { Length++; } Modified: vendor-sys/acpica/dist/source/components/executer/exserial.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/exserial.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/executer/exserial.c Thu Dec 13 19:04:25 2018 (r342049) @@ -445,14 +445,12 @@ AcpiExWriteSerialBus ( case ACPI_ADR_SPACE_SMBUS: BufferLength = ACPI_SMBUS_BUFFER_SIZE; - DataLength = ACPI_SMBUS_DATA_SIZE; Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16); break; case ACPI_ADR_SPACE_IPMI: BufferLength = ACPI_IPMI_BUFFER_SIZE; - DataLength = ACPI_IPMI_DATA_SIZE; Function = ACPI_WRITE; break; @@ -471,7 +469,6 @@ AcpiExWriteSerialBus ( /* Add header length to get the full size of the buffer */ BufferLength += ACPI_SERIAL_HEADER_SIZE; - DataLength = SourceDesc->Buffer.Pointer[1]; Function = ACPI_WRITE | (AccessorType << 16); break; @@ -479,21 +476,6 @@ AcpiExWriteSerialBus ( return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID); } -#if 0 -OBSOLETE? - /* Check for possible buffer overflow */ - - if (DataLength > SourceDesc->Buffer.Length) - { - ACPI_ERROR ((AE_INFO, - "Length in buffer header (%u)(%u) is greater than " - "the physical buffer length (%u) and will overflow", - DataLength, BufferLength, SourceDesc->Buffer.Length)); - - return_ACPI_STATUS (AE_AML_BUFFER_LIMIT); - } -#endif - /* Create the transfer/bidirectional/return buffer */ BufferDesc = AcpiUtCreateBufferObject (BufferLength); @@ -505,6 +487,8 @@ OBSOLETE? /* Copy the input buffer data to the transfer buffer */ Buffer = BufferDesc->Buffer.Pointer; + DataLength = (BufferLength < SourceDesc->Buffer.Length ? + BufferLength : SourceDesc->Buffer.Length); memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength); /* Lock entire transaction if requested */ Modified: vendor-sys/acpica/dist/source/components/executer/exutils.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/exutils.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/executer/exutils.c Thu Dec 13 19:04:25 2018 (r342049) @@ -181,7 +181,6 @@ AcpiExDigitsNeeded ( UINT32 Base); -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiExEnterInterpreter @@ -615,4 +614,3 @@ AcpiIsValidSpaceId ( return (TRUE); } -#endif Modified: vendor-sys/acpica/dist/source/components/namespace/nseval.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nseval.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/namespace/nseval.c Thu Dec 13 19:04:25 2018 (r342049) @@ -259,6 +259,12 @@ AcpiNsEvaluate ( return_ACPI_STATUS (AE_NO_MEMORY); } + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: %s (%s)\n", " Enter evaluation", + &Info->FullPathname[1], AcpiUtGetTypeName (Info->Node->Type))); + /* Count the number of arguments being passed in */ Info->ParamCount = 0; @@ -445,6 +451,12 @@ AcpiNsEvaluate ( Info->RelativePathname)); Cleanup: + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: %s\n", " Exit evaluation", + &Info->FullPathname[1])); + /* * Namespace was unlocked by the handling AcpiNs* function, so we * just free the pathname and return Modified: vendor-sys/acpica/dist/source/components/namespace/nsload.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsload.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/namespace/nsload.c Thu Dec 13 19:04:25 2018 (r342049) @@ -173,7 +173,6 @@ AcpiNsDeleteSubtree ( #endif -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiNsLoadTable @@ -476,5 +475,4 @@ AcpiNsUnloadNamespace ( Status = AcpiNsDeleteSubtree (Handle); return_ACPI_STATUS (Status); } -#endif #endif Modified: vendor-sys/acpica/dist/source/components/namespace/nsparse.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsparse.c Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/source/components/namespace/nsparse.c Thu Dec 13 19:04:25 2018 (r342049) @@ -261,7 +261,17 @@ AcpiNsExecuteTable ( goto Cleanup; } + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: (Definition Block level)\n", "Module-level evaluation")); + Status = AcpiPsExecuteTable (Info); + + /* Optional object evaluation log */ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 13 19:05:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63BDC1330A14; Thu, 13 Dec 2018 19:05:03 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 0BFBB6D6F7; Thu, 13 Dec 2018 19:05:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D895324020; Thu, 13 Dec 2018 19:05:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDJ52xx067374; Thu, 13 Dec 2018 19:05:02 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDJ52GE067373; Thu, 13 Dec 2018 19:05:02 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201812131905.wBDJ52GE067373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 13 Dec 2018 19:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342050 - vendor-sys/acpica/20181213 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20181213 X-SVN-Commit-Revision: 342050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0BFBB6D6F7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.03 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.832,0]; NEURAL_HAM_SHORT(-0.19)[-0.194,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 19:05:03 -0000 Author: jkim Date: Thu Dec 13 19:05:02 2018 New Revision: 342050 URL: https://svnweb.freebsd.org/changeset/base/342050 Log: Tag ACPICA 20181213. Added: vendor-sys/acpica/20181213/ - copied from r342049, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Thu Dec 13 20:00:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90BA71332675; Thu, 13 Dec 2018 20:00:12 +0000 (UTC) (envelope-from kp@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) server-signature RSA-PSS (4096 bits) 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 432396F71D; Thu, 13 Dec 2018 20:00:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 377B2248E9; Thu, 13 Dec 2018 20:00:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDK0CkZ094364; Thu, 13 Dec 2018 20:00:12 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDK0CLD094351; Thu, 13 Dec 2018 20:00:12 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812132000.wBDK0CLD094351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 13 Dec 2018 20:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342051 - in stable/12: share/man/man4 sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/netpfil/pf X-SVN-Commit-Revision: 342051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 432396F71D X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.24 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.41)[-0.410,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 20:00:12 -0000 Author: kp Date: Thu Dec 13 20:00:11 2018 New Revision: 342051 URL: https://svnweb.freebsd.org/changeset/base/342051 Log: pfsync: Performance improvement pfsync code is called for every new state, state update and state deletion in pf. While pf itself can operate on multiple states at the same time (on different cores, assuming the states hash to a different hashrow), pfsync only had a single lock. This greatly reduced throughput on multicore systems. Address this by splitting the pfsync queues into buckets, based on the state id. This ensures that updates for a given connection always end up in the same bucket, which allows pfsync to still collapse multiple updates into one, while allowing multiple cores to proceed at the same time. The number of buckets is tunable, but defaults to 2 x number of cpus. Benchmarking has shown improvement, depending on hardware and setup, from ~30% to ~100%. Sponsored by: Orange Business Services Modified: stable/12/share/man/man4/pfsync.4 stable/12/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/pfsync.4 ============================================================================== --- stable/12/share/man/man4/pfsync.4 Thu Dec 13 19:05:02 2018 (r342050) +++ stable/12/share/man/man4/pfsync.4 Thu Dec 13 20:00:11 2018 (r342051) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2017 +.Dd December 6, 2018 .Dt PFSYNC 4 .Os .Sh NAME @@ -130,6 +130,13 @@ See .Xr carp 4 for more information. Default value is 240. +.It Va net.pfsync.pfsync_buckets +The number of +.Nm +buckets. +This affects the performance and memory tradeoff. +Defaults to twice the number of CPUs. +Change only if benchmarks show this helps on your workload. .El .Sh EXAMPLES .Nm Modified: stable/12/sys/netpfil/pf/if_pfsync.c ============================================================================== --- stable/12/sys/netpfil/pf/if_pfsync.c Thu Dec 13 19:05:02 2018 (r342050) +++ stable/12/sys/netpfil/pf/if_pfsync.c Thu Dec 13 20:00:11 2018 (r342051) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -106,6 +107,8 @@ __FBSDID("$FreeBSD$"); sizeof(struct pfsync_header) + \ sizeof(struct pfsync_subheader) ) +struct pfsync_bucket; + struct pfsync_pkt { struct ip *ip; struct in_addr src; @@ -164,7 +167,7 @@ static struct pfsync_q pfsync_qs[] = { }; static void pfsync_q_ins(struct pf_state *, int, bool); -static void pfsync_q_del(struct pf_state *, bool); +static void pfsync_q_del(struct pf_state *, bool, struct pfsync_bucket *); static void pfsync_update_state(struct pf_state *); @@ -183,6 +186,28 @@ struct pfsync_deferral { struct mbuf *pd_m; }; +struct pfsync_sofct; + +struct pfsync_bucket +{ + int b_id; + struct pfsync_softc *b_sc; + struct mtx b_mtx; + struct callout b_tmo; + int b_flags; +#define PFSYNCF_BUCKET_PUSH 0x00000001 + + size_t b_len; + TAILQ_HEAD(, pf_state) b_qs[PFSYNC_S_COUNT]; + TAILQ_HEAD(, pfsync_upd_req_item) b_upd_req_list; + TAILQ_HEAD(, pfsync_deferral) b_deferrals; + u_int b_deferred; + void *b_plus; + size_t b_pluslen; + + struct ifaltq b_snd; +}; + struct pfsync_softc { /* Configuration */ struct ifnet *sc_ifp; @@ -192,20 +217,12 @@ struct pfsync_softc { uint32_t sc_flags; #define PFSYNCF_OK 0x00000001 #define PFSYNCF_DEFER 0x00000002 -#define PFSYNCF_PUSH 0x00000004 uint8_t sc_maxupdates; struct ip sc_template; - struct callout sc_tmo; struct mtx sc_mtx; /* Queued data */ - size_t sc_len; - TAILQ_HEAD(, pf_state) sc_qs[PFSYNC_S_COUNT]; - TAILQ_HEAD(, pfsync_upd_req_item) sc_upd_req_list; - TAILQ_HEAD(, pfsync_deferral) sc_deferrals; - u_int sc_deferred; - void *sc_plus; - size_t sc_pluslen; + struct pfsync_bucket *sc_buckets; /* Bulk update info */ struct mtx sc_bulk_mtx; @@ -223,6 +240,10 @@ struct pfsync_softc { #define PFSYNC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) #define PFSYNC_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define PFSYNC_BUCKET_LOCK(b) mtx_lock(&(b)->b_mtx) +#define PFSYNC_BUCKET_UNLOCK(b) mtx_unlock(&(b)->b_mtx) +#define PFSYNC_BUCKET_LOCK_ASSERT(b) mtx_assert(&(b)->b_mtx, MA_OWNED) + #define PFSYNC_BLOCK(sc) mtx_lock(&(sc)->sc_bulk_mtx) #define PFSYNC_BUNLOCK(sc) mtx_unlock(&(sc)->sc_bulk_mtx) #define PFSYNC_BLOCK_ASSERT(sc) mtx_assert(&(sc)->sc_bulk_mtx, MA_OWNED) @@ -239,7 +260,8 @@ VNET_DEFINE_STATIC(int, pfsync_carp_adj) = CARP_MAXSKE #define V_pfsync_carp_adj VNET(pfsync_carp_adj) static void pfsync_timeout(void *); -static void pfsync_push(struct pfsync_softc *); +static void pfsync_push(struct pfsync_bucket *); +static void pfsync_push_all(struct pfsync_softc *); static void pfsyncintr(void *); static int pfsync_multicast_setup(struct pfsync_softc *, struct ifnet *, void *); @@ -249,12 +271,16 @@ static void pfsync_pointers_uninit(void); static int pfsync_init(void); static void pfsync_uninit(void); +static unsigned long pfsync_buckets; + SYSCTL_NODE(_net, OID_AUTO, pfsync, CTLFLAG_RW, 0, "PFSYNC"); SYSCTL_STRUCT(_net_pfsync, OID_AUTO, stats, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(pfsyncstats), pfsyncstats, "PFSYNC statistics (struct pfsyncstats, net/if_pfsync.h)"); SYSCTL_INT(_net_pfsync, OID_AUTO, carp_demotion_factor, CTLFLAG_RW, &VNET_NAME(pfsync_carp_adj), 0, "pfsync's CARP demotion factor adjustment"); +SYSCTL_ULONG(_net_pfsync, OID_AUTO, pfsync_buckets, CTLFLAG_RDTUN, + &pfsync_buckets, 0, "Number of pfsync hash buckets"); static int pfsync_clone_create(struct if_clone *, int, caddr_t); static void pfsync_clone_destroy(struct ifnet *); @@ -270,10 +296,10 @@ static void pfsync_undefer_state(struct pf_state *, in static void pfsync_defer_tmo(void *); static void pfsync_request_update(u_int32_t, u_int64_t); -static void pfsync_update_state_req(struct pf_state *); +static bool pfsync_update_state_req(struct pf_state *); static void pfsync_drop(struct pfsync_softc *); -static void pfsync_sendout(int); +static void pfsync_sendout(int, int); static void pfsync_send_plus(void *, size_t); static void pfsync_bulk_start(void); @@ -285,7 +311,10 @@ static void pfsync_detach_ifnet(struct ifnet *); #ifdef IPSEC static void pfsync_update_net_tdb(struct pfsync_tdb *); #endif +static struct pfsync_bucket *pfsync_get_bucket(struct pfsync_softc *, + struct pf_state *); + #define PFSYNC_MAX_BULKTRIES 12 VNET_DEFINE(struct if_clone *, pfsync_cloner); @@ -296,21 +325,16 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca { struct pfsync_softc *sc; struct ifnet *ifp; - int q; + struct pfsync_bucket *b; + int c, q; if (unit != 0) return (EINVAL); - sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO); - sc->sc_flags |= PFSYNCF_OK; + if (! pfsync_buckets) + pfsync_buckets = mp_ncpus * 2; - for (q = 0; q < PFSYNC_S_COUNT; q++) - TAILQ_INIT(&sc->sc_qs[q]); - - TAILQ_INIT(&sc->sc_upd_req_list); - TAILQ_INIT(&sc->sc_deferrals); - - sc->sc_len = PFSYNC_MINPKT; + sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO); sc->sc_maxupdates = 128; ifp = sc->sc_ifp = if_alloc(IFT_PFSYNC); @@ -323,12 +347,10 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca ifp->if_ioctl = pfsyncioctl; ifp->if_output = pfsyncoutput; ifp->if_type = IFT_PFSYNC; - ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_hdrlen = sizeof(struct pfsync_header); ifp->if_mtu = ETHERMTU; mtx_init(&sc->sc_mtx, pfsyncname, NULL, MTX_DEF); mtx_init(&sc->sc_bulk_mtx, "pfsync bulk", NULL, MTX_DEF); - callout_init(&sc->sc_tmo, 1); callout_init_mtx(&sc->sc_bulk_tmo, &sc->sc_bulk_mtx, 0); callout_init_mtx(&sc->sc_bulkfail_tmo, &sc->sc_bulk_mtx, 0); @@ -336,6 +358,27 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca bpfattach(ifp, DLT_PFSYNC, PFSYNC_HDRLEN); + sc->sc_buckets = mallocarray(pfsync_buckets, sizeof(*sc->sc_buckets), + M_PFSYNC, M_ZERO | M_WAITOK); + for (c = 0; c < pfsync_buckets; c++) { + b = &sc->sc_buckets[c]; + mtx_init(&b->b_mtx, pfsyncname, NULL, MTX_DEF); + + b->b_id = c; + b->b_sc = sc; + b->b_len = PFSYNC_MINPKT; + + for (q = 0; q < PFSYNC_S_COUNT; q++) + TAILQ_INIT(&b->b_qs[q]); + + TAILQ_INIT(&b->b_upd_req_list); + TAILQ_INIT(&b->b_deferrals); + + callout_init(&b->b_tmo, 1); + + b->b_snd.ifq_maxlen = ifqmaxlen; + } + V_pfsyncif = sc; return (0); @@ -345,29 +388,36 @@ static void pfsync_clone_destroy(struct ifnet *ifp) { struct pfsync_softc *sc = ifp->if_softc; + struct pfsync_bucket *b; + int c; - /* - * At this stage, everything should have already been - * cleared by pfsync_uninit(), and we have only to - * drain callouts. - */ - while (sc->sc_deferred > 0) { - struct pfsync_deferral *pd = TAILQ_FIRST(&sc->sc_deferrals); + for (c = 0; c < pfsync_buckets; c++) { + b = &sc->sc_buckets[c]; + /* + * At this stage, everything should have already been + * cleared by pfsync_uninit(), and we have only to + * drain callouts. + */ + while (b->b_deferred > 0) { + struct pfsync_deferral *pd = + TAILQ_FIRST(&b->b_deferrals); - TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry); - sc->sc_deferred--; - if (callout_stop(&pd->pd_tmo) > 0) { - pf_release_state(pd->pd_st); - m_freem(pd->pd_m); - free(pd, M_PFSYNC); - } else { - pd->pd_refs++; - callout_drain(&pd->pd_tmo); - free(pd, M_PFSYNC); + TAILQ_REMOVE(&b->b_deferrals, pd, pd_entry); + b->b_deferred--; + if (callout_stop(&pd->pd_tmo) > 0) { + pf_release_state(pd->pd_st); + m_freem(pd->pd_m); + free(pd, M_PFSYNC); + } else { + pd->pd_refs++; + callout_drain(&pd->pd_tmo); + free(pd, M_PFSYNC); + } } + + callout_drain(&b->b_tmo); } - callout_drain(&sc->sc_tmo); callout_drain(&sc->sc_bulkfail_tmo); callout_drain(&sc->sc_bulk_tmo); @@ -383,6 +433,8 @@ pfsync_clone_destroy(struct ifnet *ifp) pfsync_multicast_cleanup(sc); mtx_destroy(&sc->sc_mtx); mtx_destroy(&sc->sc_bulk_mtx); + + free(sc->sc_buckets, M_PFSYNC); free(sc, M_PFSYNC); V_pfsyncif = NULL; @@ -546,7 +598,7 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t st->state_flags &= ~PFSTATE_NOSYNC; if (st->state_flags & PFSTATE_ACK) { pfsync_q_ins(st, PFSYNC_S_IACK, true); - pfsync_push(sc); + pfsync_push_all(sc); } } st->state_flags &= ~PFSTATE_ACK; @@ -785,9 +837,7 @@ pfsync_in_iack(struct pfsync_pkt *pkt, struct mbuf *m, continue; if (st->state_flags & PFSTATE_ACK) { - PFSYNC_LOCK(V_pfsyncif); pfsync_undefer_state(st, 0); - PFSYNC_UNLOCK(V_pfsyncif); } PF_STATE_UNLOCK(st); } @@ -876,9 +926,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m, } if (st->state_flags & PFSTATE_ACK) { - PFSYNC_LOCK(sc); pfsync_undefer_state(st, 1); - PFSYNC_UNLOCK(sc); } if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) @@ -912,9 +960,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m, pfsync_update_state(st); PF_STATE_UNLOCK(st); - PFSYNC_LOCK(sc); - pfsync_push(sc); - PFSYNC_UNLOCK(sc); + pfsync_push_all(sc); continue; } PF_STATE_UNLOCK(st); @@ -960,16 +1006,14 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, struct mbuf *m st = pf_find_state_byid(up->id, up->creatorid); if (st == NULL) { /* We don't have this state. Ask for it. */ - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[0]); pfsync_request_update(up->creatorid, up->id); - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[0]); continue; } if (st->state_flags & PFSTATE_ACK) { - PFSYNC_LOCK(sc); pfsync_undefer_state(st, 1); - PFSYNC_UNLOCK(sc); } if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) @@ -1003,9 +1047,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, struct mbuf *m pfsync_update_state(st); PF_STATE_UNLOCK(st); - PFSYNC_LOCK(sc); - pfsync_push(sc); - PFSYNC_UNLOCK(sc); + pfsync_push_all(sc); continue; } PF_STATE_UNLOCK(st); @@ -1283,6 +1325,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat struct ifreq *ifr = (struct ifreq *)data; struct pfsyncreq pfsyncr; int error; + int c; switch (cmd) { case SIOCSIFFLAGS: @@ -1303,10 +1346,12 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat ifr->ifr_mtu > sc->sc_sync_if->if_mtu) return (EINVAL); if (ifr->ifr_mtu < ifp->if_mtu) { - PFSYNC_LOCK(sc); - if (sc->sc_len > PFSYNC_MINPKT) - pfsync_sendout(1); - PFSYNC_UNLOCK(sc); + for (c = 0; c < pfsync_buckets; c++) { + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[c]); + if (sc->sc_buckets[c].b_len > PFSYNC_MINPKT) + pfsync_sendout(1, c); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[c]); + } } ifp->if_mtu = ifr->ifr_mtu; break; @@ -1379,12 +1424,16 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat break; } - if (sc->sc_len > PFSYNC_MINPKT && - (sifp->if_mtu < sc->sc_ifp->if_mtu || - (sc->sc_sync_if != NULL && - sifp->if_mtu < sc->sc_sync_if->if_mtu) || - sifp->if_mtu < MCLBYTES - sizeof(struct ip))) - pfsync_sendout(1); + for (c = 0; c < pfsync_buckets; c++) { + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[c]); + if (sc->sc_buckets[c].b_len > PFSYNC_MINPKT && + (sifp->if_mtu < sc->sc_ifp->if_mtu || + (sc->sc_sync_if != NULL && + sifp->if_mtu < sc->sc_sync_if->if_mtu) || + sifp->if_mtu < MCLBYTES - sizeof(struct ip))) + pfsync_sendout(1, c); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[c]); + } if (imo->imo_membership) pfsync_multicast_cleanup(sc); @@ -1421,8 +1470,10 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat sc->sc_flags &= ~PFSYNCF_OK; if (V_pf_status.debug >= PF_DEBUG_MISC) printf("pfsync: requesting bulk update\n"); - pfsync_request_update(0, 0); PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[0]); + pfsync_request_update(0, 0); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[0]); PFSYNC_BLOCK(sc); sc->sc_ureq_sent = time_uptime; callout_reset(&sc->sc_bulkfail_tmo, 5 * hz, pfsync_bulk_fail, @@ -1483,33 +1534,37 @@ pfsync_drop(struct pfsync_softc *sc) { struct pf_state *st, *next; struct pfsync_upd_req_item *ur; - int q; + struct pfsync_bucket *b; + int c, q; - for (q = 0; q < PFSYNC_S_COUNT; q++) { - if (TAILQ_EMPTY(&sc->sc_qs[q])) - continue; + for (c = 0; c < pfsync_buckets; c++) { + b = &sc->sc_buckets[c]; + for (q = 0; q < PFSYNC_S_COUNT; q++) { + if (TAILQ_EMPTY(&b->b_qs[q])) + continue; - TAILQ_FOREACH_SAFE(st, &sc->sc_qs[q], sync_list, next) { - KASSERT(st->sync_state == q, - ("%s: st->sync_state == q", - __func__)); - st->sync_state = PFSYNC_S_NONE; - pf_release_state(st); + TAILQ_FOREACH_SAFE(st, &b->b_qs[q], sync_list, next) { + KASSERT(st->sync_state == q, + ("%s: st->sync_state == q", + __func__)); + st->sync_state = PFSYNC_S_NONE; + pf_release_state(st); + } + TAILQ_INIT(&b->b_qs[q]); } - TAILQ_INIT(&sc->sc_qs[q]); - } - while ((ur = TAILQ_FIRST(&sc->sc_upd_req_list)) != NULL) { - TAILQ_REMOVE(&sc->sc_upd_req_list, ur, ur_entry); - free(ur, M_PFSYNC); - } + while ((ur = TAILQ_FIRST(&b->b_upd_req_list)) != NULL) { + TAILQ_REMOVE(&b->b_upd_req_list, ur, ur_entry); + free(ur, M_PFSYNC); + } - sc->sc_plus = NULL; - sc->sc_len = PFSYNC_MINPKT; + b->b_len = PFSYNC_MINPKT; + b->b_plus = NULL; + } } static void -pfsync_sendout(int schedswi) +pfsync_sendout(int schedswi, int c) { struct pfsync_softc *sc = V_pfsyncif; struct ifnet *ifp = sc->sc_ifp; @@ -1519,27 +1574,28 @@ pfsync_sendout(int schedswi) struct pfsync_subheader *subh; struct pf_state *st, *st_next; struct pfsync_upd_req_item *ur; + struct pfsync_bucket *b = &sc->sc_buckets[c]; int offset; int q, count = 0; KASSERT(sc != NULL, ("%s: null sc", __func__)); - KASSERT(sc->sc_len > PFSYNC_MINPKT, - ("%s: sc_len %zu", __func__, sc->sc_len)); - PFSYNC_LOCK_ASSERT(sc); + KASSERT(b->b_len > PFSYNC_MINPKT, + ("%s: sc_len %zu", __func__, b->b_len)); + PFSYNC_BUCKET_LOCK_ASSERT(b); if (ifp->if_bpf == NULL && sc->sc_sync_if == NULL) { pfsync_drop(sc); return; } - m = m_get2(max_linkhdr + sc->sc_len, M_NOWAIT, MT_DATA, M_PKTHDR); + m = m_get2(max_linkhdr + b->b_len, M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1); V_pfsyncstats.pfsyncs_onomem++; return; } m->m_data += max_linkhdr; - m->m_len = m->m_pkthdr.len = sc->sc_len; + m->m_len = m->m_pkthdr.len = b->b_len; /* build the ip header */ ip = (struct ip *)m->m_data; @@ -1555,19 +1611,19 @@ pfsync_sendout(int schedswi) offset += sizeof(*ph); ph->version = PFSYNC_VERSION; - ph->len = htons(sc->sc_len - sizeof(*ip)); + ph->len = htons(b->b_len - sizeof(*ip)); bcopy(V_pf_status.pf_chksum, ph->pfcksum, PF_MD5_DIGEST_LENGTH); /* walk the queues */ for (q = 0; q < PFSYNC_S_COUNT; q++) { - if (TAILQ_EMPTY(&sc->sc_qs[q])) + if (TAILQ_EMPTY(&b->b_qs[q])) continue; subh = (struct pfsync_subheader *)(m->m_data + offset); offset += sizeof(*subh); count = 0; - TAILQ_FOREACH_SAFE(st, &sc->sc_qs[q], sync_list, st_next) { + TAILQ_FOREACH_SAFE(st, &b->b_qs[q], sync_list, st_next) { KASSERT(st->sync_state == q, ("%s: st->sync_state == q", __func__)); @@ -1581,7 +1637,7 @@ pfsync_sendout(int schedswi) pf_release_state(st); count++; } - TAILQ_INIT(&sc->sc_qs[q]); + TAILQ_INIT(&b->b_qs[q]); bzero(subh, sizeof(*subh)); subh->action = pfsync_qs[q].action; @@ -1589,13 +1645,13 @@ pfsync_sendout(int schedswi) V_pfsyncstats.pfsyncs_oacts[pfsync_qs[q].action] += count; } - if (!TAILQ_EMPTY(&sc->sc_upd_req_list)) { + if (!TAILQ_EMPTY(&b->b_upd_req_list)) { subh = (struct pfsync_subheader *)(m->m_data + offset); offset += sizeof(*subh); count = 0; - while ((ur = TAILQ_FIRST(&sc->sc_upd_req_list)) != NULL) { - TAILQ_REMOVE(&sc->sc_upd_req_list, ur, ur_entry); + while ((ur = TAILQ_FIRST(&b->b_upd_req_list)) != NULL) { + TAILQ_REMOVE(&b->b_upd_req_list, ur, ur_entry); bcopy(&ur->ur_msg, m->m_data + offset, sizeof(ur->ur_msg)); @@ -1611,11 +1667,11 @@ pfsync_sendout(int schedswi) } /* has someone built a custom region for us to add? */ - if (sc->sc_plus != NULL) { - bcopy(sc->sc_plus, m->m_data + offset, sc->sc_pluslen); - offset += sc->sc_pluslen; + if (b->b_plus != NULL) { + bcopy(b->b_plus, m->m_data + offset, b->b_pluslen); + offset += b->b_pluslen; - sc->sc_plus = NULL; + b->b_plus = NULL; } subh = (struct pfsync_subheader *)(m->m_data + offset); @@ -1629,24 +1685,24 @@ pfsync_sendout(int schedswi) /* we're done, let's put it on the wire */ if (ifp->if_bpf) { m->m_data += sizeof(*ip); - m->m_len = m->m_pkthdr.len = sc->sc_len - sizeof(*ip); + m->m_len = m->m_pkthdr.len = b->b_len - sizeof(*ip); BPF_MTAP(ifp, m); m->m_data -= sizeof(*ip); - m->m_len = m->m_pkthdr.len = sc->sc_len; + m->m_len = m->m_pkthdr.len = b->b_len; } if (sc->sc_sync_if == NULL) { - sc->sc_len = PFSYNC_MINPKT; + b->b_len = PFSYNC_MINPKT; m_freem(m); return; } if_inc_counter(sc->sc_ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(sc->sc_ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); - sc->sc_len = PFSYNC_MINPKT; + b->b_len = PFSYNC_MINPKT; - if (!_IF_QFULL(&sc->sc_ifp->if_snd)) - _IF_ENQUEUE(&sc->sc_ifp->if_snd, m); + if (!_IF_QFULL(&b->b_snd)) + _IF_ENQUEUE(&b->b_snd, m); else { m_freem(m); if_inc_counter(sc->sc_ifp, IFCOUNTER_OQDROPS, 1); @@ -1659,6 +1715,7 @@ static void pfsync_insert_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); if (st->state_flags & PFSTATE_NOSYNC) return; @@ -1672,12 +1729,12 @@ pfsync_insert_state(struct pf_state *st) KASSERT(st->sync_state == PFSYNC_S_NONE, ("%s: st->sync_state %u", __func__, st->sync_state)); - PFSYNC_LOCK(sc); - if (sc->sc_len == PFSYNC_MINPKT) - callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif); + PFSYNC_BUCKET_LOCK(b); + if (b->b_len == PFSYNC_MINPKT) + callout_reset(&b->b_tmo, 1 * hz, pfsync_timeout, b); pfsync_q_ins(st, PFSYNC_S_INS, true); - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(b); st->sync_updates = 0; } @@ -1687,6 +1744,7 @@ pfsync_defer(struct pf_state *st, struct mbuf *m) { struct pfsync_softc *sc = V_pfsyncif; struct pfsync_deferral *pd; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); if (m->m_flags & (M_BCAST|M_MCAST)) return (0); @@ -1699,13 +1757,13 @@ pfsync_defer(struct pf_state *st, struct mbuf *m) return (0); } - if (sc->sc_deferred >= 128) - pfsync_undefer(TAILQ_FIRST(&sc->sc_deferrals), 0); + if (b->b_deferred >= 128) + pfsync_undefer(TAILQ_FIRST(&b->b_deferrals), 0); pd = malloc(sizeof(*pd), M_PFSYNC, M_NOWAIT); if (pd == NULL) return (0); - sc->sc_deferred++; + b->b_deferred++; m->m_flags |= M_SKIP_FIREWALL; st->state_flags |= PFSTATE_ACK; @@ -1716,11 +1774,11 @@ pfsync_defer(struct pf_state *st, struct mbuf *m) pf_ref_state(st); pd->pd_m = m; - TAILQ_INSERT_TAIL(&sc->sc_deferrals, pd, pd_entry); - callout_init_mtx(&pd->pd_tmo, &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + TAILQ_INSERT_TAIL(&b->b_deferrals, pd, pd_entry); + callout_init_mtx(&pd->pd_tmo, &b->b_mtx, CALLOUT_RETURNUNLOCKED); callout_reset(&pd->pd_tmo, 10, pfsync_defer_tmo, pd); - pfsync_push(sc); + pfsync_push(b); return (1); } @@ -1731,11 +1789,12 @@ pfsync_undefer(struct pfsync_deferral *pd, int drop) struct pfsync_softc *sc = pd->pd_sc; struct mbuf *m = pd->pd_m; struct pf_state *st = pd->pd_st; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); - TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry); - sc->sc_deferred--; + TAILQ_REMOVE(&b->b_deferrals, pd, pd_entry); + b->b_deferred--; pd->pd_st->state_flags &= ~PFSTATE_ACK; /* XXX: locking! */ free(pd, M_PFSYNC); pf_release_state(st); @@ -1743,8 +1802,8 @@ pfsync_undefer(struct pfsync_deferral *pd, int drop) if (drop) m_freem(m); else { - _IF_ENQUEUE(&sc->sc_ifp->if_snd, m); - pfsync_push(sc); + _IF_ENQUEUE(&b->b_snd, m); + pfsync_push(b); } } @@ -1755,13 +1814,14 @@ pfsync_defer_tmo(void *arg) struct pfsync_softc *sc = pd->pd_sc; struct mbuf *m = pd->pd_m; struct pf_state *st = pd->pd_st; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); CURVNET_SET(m->m_pkthdr.rcvif->if_vnet); - TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry); - sc->sc_deferred--; + TAILQ_REMOVE(&b->b_deferrals, pd, pd_entry); + b->b_deferred--; pd->pd_st->state_flags &= ~PFSTATE_ACK; /* XXX: locking! */ if (pd->pd_refs == 0) free(pd, M_PFSYNC); @@ -1779,40 +1839,52 @@ pfsync_undefer_state(struct pf_state *st, int drop) { struct pfsync_softc *sc = V_pfsyncif; struct pfsync_deferral *pd; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK(b); - TAILQ_FOREACH(pd, &sc->sc_deferrals, pd_entry) { + TAILQ_FOREACH(pd, &b->b_deferrals, pd_entry) { if (pd->pd_st == st) { if (callout_stop(&pd->pd_tmo) > 0) pfsync_undefer(pd, drop); + + PFSYNC_BUCKET_UNLOCK(b); return; } } + PFSYNC_BUCKET_UNLOCK(b); panic("%s: unable to find deferred state", __func__); } +static struct pfsync_bucket* +pfsync_get_bucket(struct pfsync_softc *sc, struct pf_state *st) +{ + int c = PF_IDHASH(st) % pfsync_buckets; + return &sc->sc_buckets[c]; +} + static void pfsync_update_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; bool sync = false, ref = true; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); PF_STATE_LOCK_ASSERT(st); - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(b); if (st->state_flags & PFSTATE_ACK) pfsync_undefer_state(st, 0); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st, true); - PFSYNC_UNLOCK(sc); + pfsync_q_del(st, true, b); + PFSYNC_BUCKET_UNLOCK(b); return; } - if (sc->sc_len == PFSYNC_MINPKT) - callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif); + if (b->b_len == PFSYNC_MINPKT) + callout_reset(&b->b_tmo, 1 * hz, pfsync_timeout, b); switch (st->sync_state) { case PFSYNC_S_UPD_C: @@ -1828,7 +1900,7 @@ pfsync_update_state(struct pf_state *st) break; case PFSYNC_S_IACK: - pfsync_q_del(st, false); + pfsync_q_del(st, false, b); ref = false; /* FALLTHROUGH */ @@ -1842,26 +1914,27 @@ pfsync_update_state(struct pf_state *st) } if (sync || (time_uptime - st->pfsync_time) < 2) - pfsync_push(sc); + pfsync_push(b); - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(b); } static void pfsync_request_update(u_int32_t creatorid, u_int64_t id) { struct pfsync_softc *sc = V_pfsyncif; + struct pfsync_bucket *b = &sc->sc_buckets[0]; struct pfsync_upd_req_item *item; size_t nlen = sizeof(struct pfsync_upd_req); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); /* * This code does a bit to prevent multiple update requests for the * same state being generated. It searches current subheader queue, * but it doesn't lookup into queue of already packed datagrams. */ - TAILQ_FOREACH(item, &sc->sc_upd_req_list, ur_entry) + TAILQ_FOREACH(item, &b->b_upd_req_list, ur_entry) if (item->ur_msg.id == id && item->ur_msg.creatorid == creatorid) return; @@ -1873,46 +1946,47 @@ pfsync_request_update(u_int32_t creatorid, u_int64_t i item->ur_msg.id = id; item->ur_msg.creatorid = creatorid; - if (TAILQ_EMPTY(&sc->sc_upd_req_list)) + if (TAILQ_EMPTY(&b->b_upd_req_list)) nlen += sizeof(struct pfsync_subheader); - if (sc->sc_len + nlen > sc->sc_ifp->if_mtu) { - pfsync_sendout(1); + if (b->b_len + nlen > sc->sc_ifp->if_mtu) { + pfsync_sendout(1, 0); nlen = sizeof(struct pfsync_subheader) + sizeof(struct pfsync_upd_req); } - TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry); - sc->sc_len += nlen; + TAILQ_INSERT_TAIL(&b->b_upd_req_list, item, ur_entry); + b->b_len += nlen; } -static void +static bool pfsync_update_state_req(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; - bool ref = true; + bool ref = true, full = false; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); PF_STATE_LOCK_ASSERT(st); - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(b); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st, true); - PFSYNC_UNLOCK(sc); - return; + pfsync_q_del(st, true, b); + PFSYNC_BUCKET_UNLOCK(b); + return (full); } switch (st->sync_state) { case PFSYNC_S_UPD_C: case PFSYNC_S_IACK: - pfsync_q_del(st, false); + pfsync_q_del(st, false, b); ref = false; /* FALLTHROUGH */ case PFSYNC_S_NONE: pfsync_q_ins(st, PFSYNC_S_UPD, ref); - pfsync_push(sc); + pfsync_push(b); break; case PFSYNC_S_INS: @@ -1925,38 +1999,44 @@ pfsync_update_state_req(struct pf_state *st) panic("%s: unexpected sync state %d", __func__, st->sync_state); } - PFSYNC_UNLOCK(sc); + if ((sc->sc_ifp->if_mtu - b->b_len) < sizeof(struct pfsync_state)) + full = true; + + PFSYNC_BUCKET_UNLOCK(b); + + return (full); } static void pfsync_delete_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); bool ref = true; - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(b); if (st->state_flags & PFSTATE_ACK) pfsync_undefer_state(st, 1); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st, true); - PFSYNC_UNLOCK(sc); + pfsync_q_del(st, true, b); + PFSYNC_BUCKET_UNLOCK(b); return; } - if (sc->sc_len == PFSYNC_MINPKT) - callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif); + if (b->b_len == PFSYNC_MINPKT) + callout_reset(&b->b_tmo, 1 * hz, pfsync_timeout, b); switch (st->sync_state) { case PFSYNC_S_INS: /* We never got to tell the world so just forget about it. */ - pfsync_q_del(st, true); + pfsync_q_del(st, true, b); break; case PFSYNC_S_UPD_C: case PFSYNC_S_UPD: case PFSYNC_S_IACK: - pfsync_q_del(st, false); + pfsync_q_del(st, false, b); ref = false; /* FALLTHROUGH */ @@ -1968,13 +2048,12 @@ pfsync_delete_state(struct pf_state *st) panic("%s: unexpected sync state %d", __func__, st->sync_state); } - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(b); } static void pfsync_clear_states(u_int32_t creatorid, const char *ifname) { - struct pfsync_softc *sc = V_pfsyncif; struct { struct pfsync_subheader subh; struct pfsync_clr clr; @@ -1989,9 +2068,7 @@ pfsync_clear_states(u_int32_t creatorid, const char *i strlcpy(r.clr.ifname, ifname, sizeof(r.clr.ifname)); r.clr.creatorid = creatorid; - PFSYNC_LOCK(sc); pfsync_send_plus(&r, sizeof(r)); - PFSYNC_UNLOCK(sc); } static void @@ -1999,48 +2076,48 @@ pfsync_q_ins(struct pf_state *st, int q, bool ref) { struct pfsync_softc *sc = V_pfsyncif; size_t nlen = pfsync_qs[q].len; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); KASSERT(st->sync_state == PFSYNC_S_NONE, ("%s: st->sync_state %u", __func__, st->sync_state)); - KASSERT(sc->sc_len >= PFSYNC_MINPKT, ("pfsync pkt len is too low %zu", - sc->sc_len)); + KASSERT(b->b_len >= PFSYNC_MINPKT, ("pfsync pkt len is too low %zu", + b->b_len)); - if (TAILQ_EMPTY(&sc->sc_qs[q])) + if (TAILQ_EMPTY(&b->b_qs[q])) nlen += sizeof(struct pfsync_subheader); - if (sc->sc_len + nlen > sc->sc_ifp->if_mtu) { - pfsync_sendout(1); + if (b->b_len + nlen > sc->sc_ifp->if_mtu) { + pfsync_sendout(1, b->b_id); nlen = sizeof(struct pfsync_subheader) + pfsync_qs[q].len; } - sc->sc_len += nlen; - TAILQ_INSERT_TAIL(&sc->sc_qs[q], st, sync_list); + b->b_len += nlen; + TAILQ_INSERT_TAIL(&b->b_qs[q], st, sync_list); st->sync_state = q; if (ref) pf_ref_state(st); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 13 20:00:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D42D51332691; Thu, 13 Dec 2018 20:00:17 +0000 (UTC) (envelope-from kp@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) server-signature RSA-PSS (4096 bits) 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 7F6136F761; Thu, 13 Dec 2018 20:00:17 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC642248EB; Thu, 13 Dec 2018 20:00:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDK0GGY094523; Thu, 13 Dec 2018 20:00:16 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDK0Gmi094521; Thu, 13 Dec 2018 20:00:16 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201812132000.wBDK0Gmi094521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 13 Dec 2018 20:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342052 - in stable/11: share/man/man4 sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/netpfil/pf X-SVN-Commit-Revision: 342052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7F6136F761 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.24 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.41)[-0.410,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 20:00:18 -0000 Author: kp Date: Thu Dec 13 20:00:16 2018 New Revision: 342052 URL: https://svnweb.freebsd.org/changeset/base/342052 Log: pfsync: Performance improvement pfsync code is called for every new state, state update and state deletion in pf. While pf itself can operate on multiple states at the same time (on different cores, assuming the states hash to a different hashrow), pfsync only had a single lock. This greatly reduced throughput on multicore systems. Address this by splitting the pfsync queues into buckets, based on the state id. This ensures that updates for a given connection always end up in the same bucket, which allows pfsync to still collapse multiple updates into one, while allowing multiple cores to proceed at the same time. The number of buckets is tunable, but defaults to 2 x number of cpus. Benchmarking has shown improvement, depending on hardware and setup, from ~30% to ~100%. Sponsored by: Orange Business Services Modified: stable/11/share/man/man4/pfsync.4 stable/11/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/pfsync.4 ============================================================================== --- stable/11/share/man/man4/pfsync.4 Thu Dec 13 20:00:11 2018 (r342051) +++ stable/11/share/man/man4/pfsync.4 Thu Dec 13 20:00:16 2018 (r342052) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2017 +.Dd December 6, 2018 .Dt PFSYNC 4 .Os .Sh NAME @@ -130,6 +130,13 @@ See .Xr carp 4 for more information. Default value is 240. +.It Va net.pfsync.pfsync_buckets +The number of +.Nm +buckets. +This affects the performance and memory tradeoff. +Defaults to twice the number of CPUs. +Change only if benchmarks show this helps on your workload. .El .Sh EXAMPLES .Nm Modified: stable/11/sys/netpfil/pf/if_pfsync.c ============================================================================== --- stable/11/sys/netpfil/pf/if_pfsync.c Thu Dec 13 20:00:11 2018 (r342051) +++ stable/11/sys/netpfil/pf/if_pfsync.c Thu Dec 13 20:00:16 2018 (r342052) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -104,6 +105,8 @@ __FBSDID("$FreeBSD$"); sizeof(struct pfsync_header) + \ sizeof(struct pfsync_subheader) ) +struct pfsync_bucket; + struct pfsync_pkt { struct ip *ip; struct in_addr src; @@ -162,7 +165,7 @@ static struct pfsync_q pfsync_qs[] = { }; static void pfsync_q_ins(struct pf_state *, int, bool); -static void pfsync_q_del(struct pf_state *, bool); +static void pfsync_q_del(struct pf_state *, bool, struct pfsync_bucket *); static void pfsync_update_state(struct pf_state *); @@ -181,6 +184,28 @@ struct pfsync_deferral { struct mbuf *pd_m; }; +struct pfsync_sofct; + +struct pfsync_bucket +{ + int b_id; + struct pfsync_softc *b_sc; + struct mtx b_mtx; + struct callout b_tmo; + int b_flags; +#define PFSYNCF_BUCKET_PUSH 0x00000001 + + size_t b_len; + TAILQ_HEAD(, pf_state) b_qs[PFSYNC_S_COUNT]; + TAILQ_HEAD(, pfsync_upd_req_item) b_upd_req_list; + TAILQ_HEAD(, pfsync_deferral) b_deferrals; + u_int b_deferred; + void *b_plus; + size_t b_pluslen; + + struct ifaltq b_snd; +}; + struct pfsync_softc { /* Configuration */ struct ifnet *sc_ifp; @@ -190,20 +215,12 @@ struct pfsync_softc { uint32_t sc_flags; #define PFSYNCF_OK 0x00000001 #define PFSYNCF_DEFER 0x00000002 -#define PFSYNCF_PUSH 0x00000004 uint8_t sc_maxupdates; struct ip sc_template; - struct callout sc_tmo; struct mtx sc_mtx; /* Queued data */ - size_t sc_len; - TAILQ_HEAD(, pf_state) sc_qs[PFSYNC_S_COUNT]; - TAILQ_HEAD(, pfsync_upd_req_item) sc_upd_req_list; - TAILQ_HEAD(, pfsync_deferral) sc_deferrals; - u_int sc_deferred; - void *sc_plus; - size_t sc_pluslen; + struct pfsync_bucket *sc_buckets; /* Bulk update info */ struct mtx sc_bulk_mtx; @@ -221,6 +238,10 @@ struct pfsync_softc { #define PFSYNC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) #define PFSYNC_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define PFSYNC_BUCKET_LOCK(b) mtx_lock(&(b)->b_mtx) +#define PFSYNC_BUCKET_UNLOCK(b) mtx_unlock(&(b)->b_mtx) +#define PFSYNC_BUCKET_LOCK_ASSERT(b) mtx_assert(&(b)->b_mtx, MA_OWNED) + #define PFSYNC_BLOCK(sc) mtx_lock(&(sc)->sc_bulk_mtx) #define PFSYNC_BUNLOCK(sc) mtx_unlock(&(sc)->sc_bulk_mtx) #define PFSYNC_BLOCK_ASSERT(sc) mtx_assert(&(sc)->sc_bulk_mtx, MA_OWNED) @@ -237,7 +258,8 @@ static VNET_DEFINE(int, pfsync_carp_adj) = CARP_MAXSKE #define V_pfsync_carp_adj VNET(pfsync_carp_adj) static void pfsync_timeout(void *); -static void pfsync_push(struct pfsync_softc *); +static void pfsync_push(struct pfsync_bucket *); +static void pfsync_push_all(struct pfsync_softc *); static void pfsyncintr(void *); static int pfsync_multicast_setup(struct pfsync_softc *, struct ifnet *, void *); @@ -247,12 +269,16 @@ static void pfsync_pointers_uninit(void); static int pfsync_init(void); static void pfsync_uninit(void); +static unsigned long pfsync_buckets; + SYSCTL_NODE(_net, OID_AUTO, pfsync, CTLFLAG_RW, 0, "PFSYNC"); SYSCTL_STRUCT(_net_pfsync, OID_AUTO, stats, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(pfsyncstats), pfsyncstats, "PFSYNC statistics (struct pfsyncstats, net/if_pfsync.h)"); SYSCTL_INT(_net_pfsync, OID_AUTO, carp_demotion_factor, CTLFLAG_RW, &VNET_NAME(pfsync_carp_adj), 0, "pfsync's CARP demotion factor adjustment"); +SYSCTL_ULONG(_net_pfsync, OID_AUTO, pfsync_buckets, CTLFLAG_RDTUN, + &pfsync_buckets, 0, "Number of pfsync hash buckets"); static int pfsync_clone_create(struct if_clone *, int, caddr_t); static void pfsync_clone_destroy(struct ifnet *); @@ -268,10 +294,10 @@ static void pfsync_undefer_state(struct pf_state *, in static void pfsync_defer_tmo(void *); static void pfsync_request_update(u_int32_t, u_int64_t); -static void pfsync_update_state_req(struct pf_state *); +static bool pfsync_update_state_req(struct pf_state *); static void pfsync_drop(struct pfsync_softc *); -static void pfsync_sendout(int); +static void pfsync_sendout(int, int); static void pfsync_send_plus(void *, size_t); static void pfsync_bulk_start(void); @@ -283,7 +309,10 @@ static void pfsync_detach_ifnet(struct ifnet *); #ifdef IPSEC static void pfsync_update_net_tdb(struct pfsync_tdb *); #endif +static struct pfsync_bucket *pfsync_get_bucket(struct pfsync_softc *, + struct pf_state *); + #define PFSYNC_MAX_BULKTRIES 12 VNET_DEFINE(struct if_clone *, pfsync_cloner); @@ -294,21 +323,16 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca { struct pfsync_softc *sc; struct ifnet *ifp; - int q; + struct pfsync_bucket *b; + int c, q; if (unit != 0) return (EINVAL); - sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO); - sc->sc_flags |= PFSYNCF_OK; + if (! pfsync_buckets) + pfsync_buckets = mp_ncpus * 2; - for (q = 0; q < PFSYNC_S_COUNT; q++) - TAILQ_INIT(&sc->sc_qs[q]); - - TAILQ_INIT(&sc->sc_upd_req_list); - TAILQ_INIT(&sc->sc_deferrals); - - sc->sc_len = PFSYNC_MINPKT; + sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO); sc->sc_maxupdates = 128; ifp = sc->sc_ifp = if_alloc(IFT_PFSYNC); @@ -321,12 +345,10 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca ifp->if_ioctl = pfsyncioctl; ifp->if_output = pfsyncoutput; ifp->if_type = IFT_PFSYNC; - ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_hdrlen = sizeof(struct pfsync_header); ifp->if_mtu = ETHERMTU; mtx_init(&sc->sc_mtx, pfsyncname, NULL, MTX_DEF); mtx_init(&sc->sc_bulk_mtx, "pfsync bulk", NULL, MTX_DEF); - callout_init(&sc->sc_tmo, 1); callout_init_mtx(&sc->sc_bulk_tmo, &sc->sc_bulk_mtx, 0); callout_init_mtx(&sc->sc_bulkfail_tmo, &sc->sc_bulk_mtx, 0); @@ -334,6 +356,27 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca bpfattach(ifp, DLT_PFSYNC, PFSYNC_HDRLEN); + sc->sc_buckets = mallocarray(pfsync_buckets, sizeof(*sc->sc_buckets), + M_PFSYNC, M_ZERO | M_WAITOK); + for (c = 0; c < pfsync_buckets; c++) { + b = &sc->sc_buckets[c]; + mtx_init(&b->b_mtx, pfsyncname, NULL, MTX_DEF); + + b->b_id = c; + b->b_sc = sc; + b->b_len = PFSYNC_MINPKT; + + for (q = 0; q < PFSYNC_S_COUNT; q++) + TAILQ_INIT(&b->b_qs[q]); + + TAILQ_INIT(&b->b_upd_req_list); + TAILQ_INIT(&b->b_deferrals); + + callout_init(&b->b_tmo, 1); + + b->b_snd.ifq_maxlen = ifqmaxlen; + } + V_pfsyncif = sc; return (0); @@ -343,29 +386,36 @@ static void pfsync_clone_destroy(struct ifnet *ifp) { struct pfsync_softc *sc = ifp->if_softc; + struct pfsync_bucket *b; + int c; - /* - * At this stage, everything should have already been - * cleared by pfsync_uninit(), and we have only to - * drain callouts. - */ - while (sc->sc_deferred > 0) { - struct pfsync_deferral *pd = TAILQ_FIRST(&sc->sc_deferrals); + for (c = 0; c < pfsync_buckets; c++) { + b = &sc->sc_buckets[c]; + /* + * At this stage, everything should have already been + * cleared by pfsync_uninit(), and we have only to + * drain callouts. + */ + while (b->b_deferred > 0) { + struct pfsync_deferral *pd = + TAILQ_FIRST(&b->b_deferrals); - TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry); - sc->sc_deferred--; - if (callout_stop(&pd->pd_tmo) > 0) { - pf_release_state(pd->pd_st); - m_freem(pd->pd_m); - free(pd, M_PFSYNC); - } else { - pd->pd_refs++; - callout_drain(&pd->pd_tmo); - free(pd, M_PFSYNC); + TAILQ_REMOVE(&b->b_deferrals, pd, pd_entry); + b->b_deferred--; + if (callout_stop(&pd->pd_tmo) > 0) { + pf_release_state(pd->pd_st); + m_freem(pd->pd_m); + free(pd, M_PFSYNC); + } else { + pd->pd_refs++; + callout_drain(&pd->pd_tmo); + free(pd, M_PFSYNC); + } } + + callout_drain(&b->b_tmo); } - callout_drain(&sc->sc_tmo); callout_drain(&sc->sc_bulkfail_tmo); callout_drain(&sc->sc_bulk_tmo); @@ -381,6 +431,8 @@ pfsync_clone_destroy(struct ifnet *ifp) pfsync_multicast_cleanup(sc); mtx_destroy(&sc->sc_mtx); mtx_destroy(&sc->sc_bulk_mtx); + + free(sc->sc_buckets, M_PFSYNC); free(sc, M_PFSYNC); V_pfsyncif = NULL; @@ -544,7 +596,7 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t st->state_flags &= ~PFSTATE_NOSYNC; if (st->state_flags & PFSTATE_ACK) { pfsync_q_ins(st, PFSYNC_S_IACK, true); - pfsync_push(sc); + pfsync_push_all(sc); } } st->state_flags &= ~PFSTATE_ACK; @@ -783,9 +835,7 @@ pfsync_in_iack(struct pfsync_pkt *pkt, struct mbuf *m, continue; if (st->state_flags & PFSTATE_ACK) { - PFSYNC_LOCK(V_pfsyncif); pfsync_undefer_state(st, 0); - PFSYNC_UNLOCK(V_pfsyncif); } PF_STATE_UNLOCK(st); } @@ -874,9 +924,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m, } if (st->state_flags & PFSTATE_ACK) { - PFSYNC_LOCK(sc); pfsync_undefer_state(st, 1); - PFSYNC_UNLOCK(sc); } if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) @@ -910,9 +958,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m, pfsync_update_state(st); PF_STATE_UNLOCK(st); - PFSYNC_LOCK(sc); - pfsync_push(sc); - PFSYNC_UNLOCK(sc); + pfsync_push_all(sc); continue; } PF_STATE_UNLOCK(st); @@ -958,16 +1004,14 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, struct mbuf *m st = pf_find_state_byid(up->id, up->creatorid); if (st == NULL) { /* We don't have this state. Ask for it. */ - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[0]); pfsync_request_update(up->creatorid, up->id); - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[0]); continue; } if (st->state_flags & PFSTATE_ACK) { - PFSYNC_LOCK(sc); pfsync_undefer_state(st, 1); - PFSYNC_UNLOCK(sc); } if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) @@ -1001,9 +1045,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, struct mbuf *m pfsync_update_state(st); PF_STATE_UNLOCK(st); - PFSYNC_LOCK(sc); - pfsync_push(sc); - PFSYNC_UNLOCK(sc); + pfsync_push_all(sc); continue; } PF_STATE_UNLOCK(st); @@ -1281,6 +1323,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat struct ifreq *ifr = (struct ifreq *)data; struct pfsyncreq pfsyncr; int error; + int c; switch (cmd) { case SIOCSIFFLAGS: @@ -1301,10 +1344,12 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat ifr->ifr_mtu > sc->sc_sync_if->if_mtu) return (EINVAL); if (ifr->ifr_mtu < ifp->if_mtu) { - PFSYNC_LOCK(sc); - if (sc->sc_len > PFSYNC_MINPKT) - pfsync_sendout(1); - PFSYNC_UNLOCK(sc); + for (c = 0; c < pfsync_buckets; c++) { + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[c]); + if (sc->sc_buckets[c].b_len > PFSYNC_MINPKT) + pfsync_sendout(1, c); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[c]); + } } ifp->if_mtu = ifr->ifr_mtu; break; @@ -1377,12 +1422,16 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat break; } - if (sc->sc_len > PFSYNC_MINPKT && - (sifp->if_mtu < sc->sc_ifp->if_mtu || - (sc->sc_sync_if != NULL && - sifp->if_mtu < sc->sc_sync_if->if_mtu) || - sifp->if_mtu < MCLBYTES - sizeof(struct ip))) - pfsync_sendout(1); + for (c = 0; c < pfsync_buckets; c++) { + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[c]); + if (sc->sc_buckets[c].b_len > PFSYNC_MINPKT && + (sifp->if_mtu < sc->sc_ifp->if_mtu || + (sc->sc_sync_if != NULL && + sifp->if_mtu < sc->sc_sync_if->if_mtu) || + sifp->if_mtu < MCLBYTES - sizeof(struct ip))) + pfsync_sendout(1, c); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[c]); + } if (imo->imo_membership) pfsync_multicast_cleanup(sc); @@ -1419,8 +1468,10 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t dat sc->sc_flags &= ~PFSYNCF_OK; if (V_pf_status.debug >= PF_DEBUG_MISC) printf("pfsync: requesting bulk update\n"); - pfsync_request_update(0, 0); PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_LOCK(&sc->sc_buckets[0]); + pfsync_request_update(0, 0); + PFSYNC_BUCKET_UNLOCK(&sc->sc_buckets[0]); PFSYNC_BLOCK(sc); sc->sc_ureq_sent = time_uptime; callout_reset(&sc->sc_bulkfail_tmo, 5 * hz, pfsync_bulk_fail, @@ -1481,33 +1532,37 @@ pfsync_drop(struct pfsync_softc *sc) { struct pf_state *st, *next; struct pfsync_upd_req_item *ur; - int q; + struct pfsync_bucket *b; + int c, q; - for (q = 0; q < PFSYNC_S_COUNT; q++) { - if (TAILQ_EMPTY(&sc->sc_qs[q])) - continue; + for (c = 0; c < pfsync_buckets; c++) { + b = &sc->sc_buckets[c]; + for (q = 0; q < PFSYNC_S_COUNT; q++) { + if (TAILQ_EMPTY(&b->b_qs[q])) + continue; - TAILQ_FOREACH_SAFE(st, &sc->sc_qs[q], sync_list, next) { - KASSERT(st->sync_state == q, - ("%s: st->sync_state == q", - __func__)); - st->sync_state = PFSYNC_S_NONE; - pf_release_state(st); + TAILQ_FOREACH_SAFE(st, &b->b_qs[q], sync_list, next) { + KASSERT(st->sync_state == q, + ("%s: st->sync_state == q", + __func__)); + st->sync_state = PFSYNC_S_NONE; + pf_release_state(st); + } + TAILQ_INIT(&b->b_qs[q]); } - TAILQ_INIT(&sc->sc_qs[q]); - } - while ((ur = TAILQ_FIRST(&sc->sc_upd_req_list)) != NULL) { - TAILQ_REMOVE(&sc->sc_upd_req_list, ur, ur_entry); - free(ur, M_PFSYNC); - } + while ((ur = TAILQ_FIRST(&b->b_upd_req_list)) != NULL) { + TAILQ_REMOVE(&b->b_upd_req_list, ur, ur_entry); + free(ur, M_PFSYNC); + } - sc->sc_plus = NULL; - sc->sc_len = PFSYNC_MINPKT; + b->b_len = PFSYNC_MINPKT; + b->b_plus = NULL; + } } static void -pfsync_sendout(int schedswi) +pfsync_sendout(int schedswi, int c) { struct pfsync_softc *sc = V_pfsyncif; struct ifnet *ifp = sc->sc_ifp; @@ -1517,27 +1572,28 @@ pfsync_sendout(int schedswi) struct pfsync_subheader *subh; struct pf_state *st, *st_next; struct pfsync_upd_req_item *ur; + struct pfsync_bucket *b = &sc->sc_buckets[c]; int offset; int q, count = 0; KASSERT(sc != NULL, ("%s: null sc", __func__)); - KASSERT(sc->sc_len > PFSYNC_MINPKT, - ("%s: sc_len %zu", __func__, sc->sc_len)); - PFSYNC_LOCK_ASSERT(sc); + KASSERT(b->b_len > PFSYNC_MINPKT, + ("%s: sc_len %zu", __func__, b->b_len)); + PFSYNC_BUCKET_LOCK_ASSERT(b); if (ifp->if_bpf == NULL && sc->sc_sync_if == NULL) { pfsync_drop(sc); return; } - m = m_get2(max_linkhdr + sc->sc_len, M_NOWAIT, MT_DATA, M_PKTHDR); + m = m_get2(max_linkhdr + b->b_len, M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1); V_pfsyncstats.pfsyncs_onomem++; return; } m->m_data += max_linkhdr; - m->m_len = m->m_pkthdr.len = sc->sc_len; + m->m_len = m->m_pkthdr.len = b->b_len; /* build the ip header */ ip = (struct ip *)m->m_data; @@ -1553,19 +1609,19 @@ pfsync_sendout(int schedswi) offset += sizeof(*ph); ph->version = PFSYNC_VERSION; - ph->len = htons(sc->sc_len - sizeof(*ip)); + ph->len = htons(b->b_len - sizeof(*ip)); bcopy(V_pf_status.pf_chksum, ph->pfcksum, PF_MD5_DIGEST_LENGTH); /* walk the queues */ for (q = 0; q < PFSYNC_S_COUNT; q++) { - if (TAILQ_EMPTY(&sc->sc_qs[q])) + if (TAILQ_EMPTY(&b->b_qs[q])) continue; subh = (struct pfsync_subheader *)(m->m_data + offset); offset += sizeof(*subh); count = 0; - TAILQ_FOREACH_SAFE(st, &sc->sc_qs[q], sync_list, st_next) { + TAILQ_FOREACH_SAFE(st, &b->b_qs[q], sync_list, st_next) { KASSERT(st->sync_state == q, ("%s: st->sync_state == q", __func__)); @@ -1579,7 +1635,7 @@ pfsync_sendout(int schedswi) pf_release_state(st); count++; } - TAILQ_INIT(&sc->sc_qs[q]); + TAILQ_INIT(&b->b_qs[q]); bzero(subh, sizeof(*subh)); subh->action = pfsync_qs[q].action; @@ -1587,13 +1643,13 @@ pfsync_sendout(int schedswi) V_pfsyncstats.pfsyncs_oacts[pfsync_qs[q].action] += count; } - if (!TAILQ_EMPTY(&sc->sc_upd_req_list)) { + if (!TAILQ_EMPTY(&b->b_upd_req_list)) { subh = (struct pfsync_subheader *)(m->m_data + offset); offset += sizeof(*subh); count = 0; - while ((ur = TAILQ_FIRST(&sc->sc_upd_req_list)) != NULL) { - TAILQ_REMOVE(&sc->sc_upd_req_list, ur, ur_entry); + while ((ur = TAILQ_FIRST(&b->b_upd_req_list)) != NULL) { + TAILQ_REMOVE(&b->b_upd_req_list, ur, ur_entry); bcopy(&ur->ur_msg, m->m_data + offset, sizeof(ur->ur_msg)); @@ -1609,11 +1665,11 @@ pfsync_sendout(int schedswi) } /* has someone built a custom region for us to add? */ - if (sc->sc_plus != NULL) { - bcopy(sc->sc_plus, m->m_data + offset, sc->sc_pluslen); - offset += sc->sc_pluslen; + if (b->b_plus != NULL) { + bcopy(b->b_plus, m->m_data + offset, b->b_pluslen); + offset += b->b_pluslen; - sc->sc_plus = NULL; + b->b_plus = NULL; } subh = (struct pfsync_subheader *)(m->m_data + offset); @@ -1627,24 +1683,24 @@ pfsync_sendout(int schedswi) /* we're done, let's put it on the wire */ if (ifp->if_bpf) { m->m_data += sizeof(*ip); - m->m_len = m->m_pkthdr.len = sc->sc_len - sizeof(*ip); + m->m_len = m->m_pkthdr.len = b->b_len - sizeof(*ip); BPF_MTAP(ifp, m); m->m_data -= sizeof(*ip); - m->m_len = m->m_pkthdr.len = sc->sc_len; + m->m_len = m->m_pkthdr.len = b->b_len; } if (sc->sc_sync_if == NULL) { - sc->sc_len = PFSYNC_MINPKT; + b->b_len = PFSYNC_MINPKT; m_freem(m); return; } if_inc_counter(sc->sc_ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(sc->sc_ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); - sc->sc_len = PFSYNC_MINPKT; + b->b_len = PFSYNC_MINPKT; - if (!_IF_QFULL(&sc->sc_ifp->if_snd)) - _IF_ENQUEUE(&sc->sc_ifp->if_snd, m); + if (!_IF_QFULL(&b->b_snd)) + _IF_ENQUEUE(&b->b_snd, m); else { m_freem(m); if_inc_counter(sc->sc_ifp, IFCOUNTER_OQDROPS, 1); @@ -1657,6 +1713,7 @@ static void pfsync_insert_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); if (st->state_flags & PFSTATE_NOSYNC) return; @@ -1670,12 +1727,12 @@ pfsync_insert_state(struct pf_state *st) KASSERT(st->sync_state == PFSYNC_S_NONE, ("%s: st->sync_state %u", __func__, st->sync_state)); - PFSYNC_LOCK(sc); - if (sc->sc_len == PFSYNC_MINPKT) - callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif); + PFSYNC_BUCKET_LOCK(b); + if (b->b_len == PFSYNC_MINPKT) + callout_reset(&b->b_tmo, 1 * hz, pfsync_timeout, b); pfsync_q_ins(st, PFSYNC_S_INS, true); - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(b); st->sync_updates = 0; } @@ -1685,6 +1742,7 @@ pfsync_defer(struct pf_state *st, struct mbuf *m) { struct pfsync_softc *sc = V_pfsyncif; struct pfsync_deferral *pd; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); if (m->m_flags & (M_BCAST|M_MCAST)) return (0); @@ -1697,13 +1755,13 @@ pfsync_defer(struct pf_state *st, struct mbuf *m) return (0); } - if (sc->sc_deferred >= 128) - pfsync_undefer(TAILQ_FIRST(&sc->sc_deferrals), 0); + if (b->b_deferred >= 128) + pfsync_undefer(TAILQ_FIRST(&b->b_deferrals), 0); pd = malloc(sizeof(*pd), M_PFSYNC, M_NOWAIT); if (pd == NULL) return (0); - sc->sc_deferred++; + b->b_deferred++; m->m_flags |= M_SKIP_FIREWALL; st->state_flags |= PFSTATE_ACK; @@ -1714,11 +1772,11 @@ pfsync_defer(struct pf_state *st, struct mbuf *m) pf_ref_state(st); pd->pd_m = m; - TAILQ_INSERT_TAIL(&sc->sc_deferrals, pd, pd_entry); - callout_init_mtx(&pd->pd_tmo, &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + TAILQ_INSERT_TAIL(&b->b_deferrals, pd, pd_entry); + callout_init_mtx(&pd->pd_tmo, &b->b_mtx, CALLOUT_RETURNUNLOCKED); callout_reset(&pd->pd_tmo, 10, pfsync_defer_tmo, pd); - pfsync_push(sc); + pfsync_push(b); return (1); } @@ -1729,11 +1787,12 @@ pfsync_undefer(struct pfsync_deferral *pd, int drop) struct pfsync_softc *sc = pd->pd_sc; struct mbuf *m = pd->pd_m; struct pf_state *st = pd->pd_st; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); - TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry); - sc->sc_deferred--; + TAILQ_REMOVE(&b->b_deferrals, pd, pd_entry); + b->b_deferred--; pd->pd_st->state_flags &= ~PFSTATE_ACK; /* XXX: locking! */ free(pd, M_PFSYNC); pf_release_state(st); @@ -1741,8 +1800,8 @@ pfsync_undefer(struct pfsync_deferral *pd, int drop) if (drop) m_freem(m); else { - _IF_ENQUEUE(&sc->sc_ifp->if_snd, m); - pfsync_push(sc); + _IF_ENQUEUE(&b->b_snd, m); + pfsync_push(b); } } @@ -1753,13 +1812,14 @@ pfsync_defer_tmo(void *arg) struct pfsync_softc *sc = pd->pd_sc; struct mbuf *m = pd->pd_m; struct pf_state *st = pd->pd_st; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); CURVNET_SET(m->m_pkthdr.rcvif->if_vnet); - TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry); - sc->sc_deferred--; + TAILQ_REMOVE(&b->b_deferrals, pd, pd_entry); + b->b_deferred--; pd->pd_st->state_flags &= ~PFSTATE_ACK; /* XXX: locking! */ if (pd->pd_refs == 0) free(pd, M_PFSYNC); @@ -1777,40 +1837,52 @@ pfsync_undefer_state(struct pf_state *st, int drop) { struct pfsync_softc *sc = V_pfsyncif; struct pfsync_deferral *pd; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK(b); - TAILQ_FOREACH(pd, &sc->sc_deferrals, pd_entry) { + TAILQ_FOREACH(pd, &b->b_deferrals, pd_entry) { if (pd->pd_st == st) { if (callout_stop(&pd->pd_tmo) > 0) pfsync_undefer(pd, drop); + + PFSYNC_BUCKET_UNLOCK(b); return; } } + PFSYNC_BUCKET_UNLOCK(b); panic("%s: unable to find deferred state", __func__); } +static struct pfsync_bucket* +pfsync_get_bucket(struct pfsync_softc *sc, struct pf_state *st) +{ + int c = PF_IDHASH(st) % pfsync_buckets; + return &sc->sc_buckets[c]; +} + static void pfsync_update_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; bool sync = false, ref = true; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); PF_STATE_LOCK_ASSERT(st); - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(b); if (st->state_flags & PFSTATE_ACK) pfsync_undefer_state(st, 0); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st, true); - PFSYNC_UNLOCK(sc); + pfsync_q_del(st, true, b); + PFSYNC_BUCKET_UNLOCK(b); return; } - if (sc->sc_len == PFSYNC_MINPKT) - callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif); + if (b->b_len == PFSYNC_MINPKT) + callout_reset(&b->b_tmo, 1 * hz, pfsync_timeout, b); switch (st->sync_state) { case PFSYNC_S_UPD_C: @@ -1826,7 +1898,7 @@ pfsync_update_state(struct pf_state *st) break; case PFSYNC_S_IACK: - pfsync_q_del(st, false); + pfsync_q_del(st, false, b); ref = false; /* FALLTHROUGH */ @@ -1840,26 +1912,27 @@ pfsync_update_state(struct pf_state *st) } if (sync || (time_uptime - st->pfsync_time) < 2) - pfsync_push(sc); + pfsync_push(b); - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(b); } static void pfsync_request_update(u_int32_t creatorid, u_int64_t id) { struct pfsync_softc *sc = V_pfsyncif; + struct pfsync_bucket *b = &sc->sc_buckets[0]; struct pfsync_upd_req_item *item; size_t nlen = sizeof(struct pfsync_upd_req); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); /* * This code does a bit to prevent multiple update requests for the * same state being generated. It searches current subheader queue, * but it doesn't lookup into queue of already packed datagrams. */ - TAILQ_FOREACH(item, &sc->sc_upd_req_list, ur_entry) + TAILQ_FOREACH(item, &b->b_upd_req_list, ur_entry) if (item->ur_msg.id == id && item->ur_msg.creatorid == creatorid) return; @@ -1871,46 +1944,47 @@ pfsync_request_update(u_int32_t creatorid, u_int64_t i item->ur_msg.id = id; item->ur_msg.creatorid = creatorid; - if (TAILQ_EMPTY(&sc->sc_upd_req_list)) + if (TAILQ_EMPTY(&b->b_upd_req_list)) nlen += sizeof(struct pfsync_subheader); - if (sc->sc_len + nlen > sc->sc_ifp->if_mtu) { - pfsync_sendout(1); + if (b->b_len + nlen > sc->sc_ifp->if_mtu) { + pfsync_sendout(1, 0); nlen = sizeof(struct pfsync_subheader) + sizeof(struct pfsync_upd_req); } - TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry); - sc->sc_len += nlen; + TAILQ_INSERT_TAIL(&b->b_upd_req_list, item, ur_entry); + b->b_len += nlen; } -static void +static bool pfsync_update_state_req(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; - bool ref = true; + bool ref = true, full = false; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); PF_STATE_LOCK_ASSERT(st); - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(b); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st, true); - PFSYNC_UNLOCK(sc); - return; + pfsync_q_del(st, true, b); + PFSYNC_BUCKET_UNLOCK(b); + return (full); } switch (st->sync_state) { case PFSYNC_S_UPD_C: case PFSYNC_S_IACK: - pfsync_q_del(st, false); + pfsync_q_del(st, false, b); ref = false; /* FALLTHROUGH */ case PFSYNC_S_NONE: pfsync_q_ins(st, PFSYNC_S_UPD, ref); - pfsync_push(sc); + pfsync_push(b); break; case PFSYNC_S_INS: @@ -1923,38 +1997,44 @@ pfsync_update_state_req(struct pf_state *st) panic("%s: unexpected sync state %d", __func__, st->sync_state); } - PFSYNC_UNLOCK(sc); + if ((sc->sc_ifp->if_mtu - b->b_len) < sizeof(struct pfsync_state)) + full = true; + + PFSYNC_BUCKET_UNLOCK(b); + + return (full); } static void pfsync_delete_state(struct pf_state *st) { struct pfsync_softc *sc = V_pfsyncif; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); bool ref = true; - PFSYNC_LOCK(sc); + PFSYNC_BUCKET_LOCK(b); if (st->state_flags & PFSTATE_ACK) pfsync_undefer_state(st, 1); if (st->state_flags & PFSTATE_NOSYNC) { if (st->sync_state != PFSYNC_S_NONE) - pfsync_q_del(st, true); - PFSYNC_UNLOCK(sc); + pfsync_q_del(st, true, b); + PFSYNC_BUCKET_UNLOCK(b); return; } - if (sc->sc_len == PFSYNC_MINPKT) - callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif); + if (b->b_len == PFSYNC_MINPKT) + callout_reset(&b->b_tmo, 1 * hz, pfsync_timeout, b); switch (st->sync_state) { case PFSYNC_S_INS: /* We never got to tell the world so just forget about it. */ - pfsync_q_del(st, true); + pfsync_q_del(st, true, b); break; case PFSYNC_S_UPD_C: case PFSYNC_S_UPD: case PFSYNC_S_IACK: - pfsync_q_del(st, false); + pfsync_q_del(st, false, b); ref = false; /* FALLTHROUGH */ @@ -1966,13 +2046,12 @@ pfsync_delete_state(struct pf_state *st) panic("%s: unexpected sync state %d", __func__, st->sync_state); } - PFSYNC_UNLOCK(sc); + PFSYNC_BUCKET_UNLOCK(b); } static void pfsync_clear_states(u_int32_t creatorid, const char *ifname) { - struct pfsync_softc *sc = V_pfsyncif; struct { struct pfsync_subheader subh; struct pfsync_clr clr; @@ -1987,9 +2066,7 @@ pfsync_clear_states(u_int32_t creatorid, const char *i strlcpy(r.clr.ifname, ifname, sizeof(r.clr.ifname)); r.clr.creatorid = creatorid; - PFSYNC_LOCK(sc); pfsync_send_plus(&r, sizeof(r)); - PFSYNC_UNLOCK(sc); } static void @@ -1997,48 +2074,48 @@ pfsync_q_ins(struct pf_state *st, int q, bool ref) { struct pfsync_softc *sc = V_pfsyncif; size_t nlen = pfsync_qs[q].len; + struct pfsync_bucket *b = pfsync_get_bucket(sc, st); - PFSYNC_LOCK_ASSERT(sc); + PFSYNC_BUCKET_LOCK_ASSERT(b); KASSERT(st->sync_state == PFSYNC_S_NONE, ("%s: st->sync_state %u", __func__, st->sync_state)); - KASSERT(sc->sc_len >= PFSYNC_MINPKT, ("pfsync pkt len is too low %zu", - sc->sc_len)); + KASSERT(b->b_len >= PFSYNC_MINPKT, ("pfsync pkt len is too low %zu", + b->b_len)); - if (TAILQ_EMPTY(&sc->sc_qs[q])) + if (TAILQ_EMPTY(&b->b_qs[q])) nlen += sizeof(struct pfsync_subheader); - if (sc->sc_len + nlen > sc->sc_ifp->if_mtu) { - pfsync_sendout(1); + if (b->b_len + nlen > sc->sc_ifp->if_mtu) { + pfsync_sendout(1, b->b_id); nlen = sizeof(struct pfsync_subheader) + pfsync_qs[q].len; } - sc->sc_len += nlen; - TAILQ_INSERT_TAIL(&sc->sc_qs[q], st, sync_list); + b->b_len += nlen; + TAILQ_INSERT_TAIL(&b->b_qs[q], st, sync_list); st->sync_state = q; if (ref) pf_ref_state(st); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 13 20:09:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 982F61332C47; Thu, 13 Dec 2018 20:09:39 +0000 (UTC) (envelope-from mjg@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) server-signature RSA-PSS (4096 bits) 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 2E35A70052; Thu, 13 Dec 2018 20:09:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C8AD24AB5; Thu, 13 Dec 2018 20:09:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDK9cNX099559; Thu, 13 Dec 2018 20:09:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDK9c3l099558; Thu, 13 Dec 2018 20:09:38 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812132009.wBDK9c3l099558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 13 Dec 2018 20:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342053 - head/sys/cddl/dev/dtrace/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/cddl/dev/dtrace/amd64 X-SVN-Commit-Revision: 342053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E35A70052 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.25 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.43)[-0.425,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 20:09:39 -0000 Author: mjg Date: Thu Dec 13 20:09:38 2018 New Revision: 342053 URL: https://svnweb.freebsd.org/changeset/base/342053 Log: dtrace: fix userspace access on boxes with SMAP dtrace has its own routines which were not updated after SMAP support got implemented. Use ifunc just like for other routines. This in particular fixes ustack(). Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18542 Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Thu Dec 13 20:00:16 2018 (r342052) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Thu Dec 13 20:09:38 2018 (r342053) @@ -208,7 +208,7 @@ dtrace_caller(int aframes) void dtrace_copy(uintptr_t src, uintptr_t dest, size_t size) */ - ENTRY(dtrace_copy) + ENTRY(dtrace_copy_nosmap) pushq %rbp movq %rsp, %rbp @@ -218,14 +218,28 @@ dtrace_copy(uintptr_t src, uintptr_t dest, size_t size smovb /* move from %ds:rsi to %ed:rdi */ leave ret - END(dtrace_copy) + END(dtrace_copy_nosmap) + ENTRY(dtrace_copy_smap) + pushq %rbp + movq %rsp, %rbp + + xchgq %rdi, %rsi /* make %rsi source, %rdi dest */ + movq %rdx, %rcx /* load count */ + stac + repz /* repeat for count ... */ + smovb /* move from %ds:rsi to %ed:rdi */ + clac + leave + ret + END(dtrace_copy_smap) + /* void dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size, volatile uint16_t *flags) */ - ENTRY(dtrace_copystr) + ENTRY(dtrace_copystr_nosmap) pushq %rbp movq %rsp, %rbp @@ -248,55 +262,120 @@ dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_ leave ret - END(dtrace_copystr) + END(dtrace_copystr_nosmap) + ENTRY(dtrace_copystr_smap) + pushq %rbp + movq %rsp, %rbp + + stac +0: + movb (%rdi), %al /* load from source */ + movb %al, (%rsi) /* store to destination */ + addq $1, %rdi /* increment source pointer */ + addq $1, %rsi /* increment destination pointer */ + subq $1, %rdx /* decrement remaining count */ + cmpb $0, %al + je 2f + testq $0xfff, %rdx /* test if count is 4k-aligned */ + jnz 1f /* if not, continue with copying */ + testq $CPU_DTRACE_BADADDR, (%rcx) /* load and test dtrace flags */ + jnz 2f +1: + cmpq $0, %rdx + jne 0b +2: + clac + leave + ret + + END(dtrace_copystr_smap) + /* uintptr_t dtrace_fulword(void *addr) */ - ENTRY(dtrace_fulword) + ENTRY(dtrace_fulword_nosmap) movq (%rdi), %rax ret - END(dtrace_fulword) + END(dtrace_fulword_nosmap) + ENTRY(dtrace_fulword_smap) + stac + movq (%rdi), %rax + clac + ret + END(dtrace_fulword_smap) + /* uint8_t dtrace_fuword8_nocheck(void *addr) */ - ENTRY(dtrace_fuword8_nocheck) + ENTRY(dtrace_fuword8_nocheck_nosmap) xorq %rax, %rax movb (%rdi), %al ret - END(dtrace_fuword8_nocheck) + END(dtrace_fuword8_nocheck_nosmap) + ENTRY(dtrace_fuword8_nocheck_smap) + stac + xorq %rax, %rax + movb (%rdi), %al + clac + ret + END(dtrace_fuword8_nocheck_smap) + /* uint16_t dtrace_fuword16_nocheck(void *addr) */ - ENTRY(dtrace_fuword16_nocheck) + ENTRY(dtrace_fuword16_nocheck_nosmap) xorq %rax, %rax movw (%rdi), %ax ret - END(dtrace_fuword16_nocheck) + END(dtrace_fuword16_nocheck_nosmap) + ENTRY(dtrace_fuword16_nocheck_smap) + stac + xorq %rax, %rax + movw (%rdi), %ax + clac + ret + END(dtrace_fuword16_nocheck_smap) + /* uint32_t dtrace_fuword32_nocheck(void *addr) */ - ENTRY(dtrace_fuword32_nocheck) + ENTRY(dtrace_fuword32_nocheck_nosmap) xorq %rax, %rax movl (%rdi), %eax ret - END(dtrace_fuword32_nocheck) + END(dtrace_fuword32_nocheck_nosmap) + ENTRY(dtrace_fuword32_nocheck_smap) + stac + xorq %rax, %rax + movl (%rdi), %eax + clac + ret + END(dtrace_fuword32_nocheck_smap) + /* uint64_t dtrace_fuword64_nocheck(void *addr) */ - ENTRY(dtrace_fuword64_nocheck) + ENTRY(dtrace_fuword64_nocheck_nosmap) movq (%rdi), %rax ret - END(dtrace_fuword64_nocheck) + END(dtrace_fuword64_nocheck_nosmap) + + ENTRY(dtrace_fuword64_nocheck_smap) + stac + movq (%rdi), %rax + clac + ret + END(dtrace_fuword64_nocheck_smap) /* void Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Thu Dec 13 20:00:16 2018 (r342052) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Thu Dec 13 20:09:38 2018 (r342053) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -663,4 +664,71 @@ dtrace_fuword64(void *uaddr) return (0); } return (dtrace_fuword64_nocheck(uaddr)); +} + +/* + * ifunc resolvers for SMAP support + */ +void dtrace_copy_nosmap(uintptr_t, uintptr_t, size_t); +void dtrace_copy_smap(uintptr_t, uintptr_t, size_t); +DEFINE_IFUNC(, void, dtrace_copy, (uintptr_t, uintptr_t, size_t), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? + dtrace_copy_smap : dtrace_copy_nosmap); +} + +void dtrace_copystr_nosmap(uintptr_t, uintptr_t, size_t, volatile uint16_t *); +void dtrace_copystr_smap(uintptr_t, uintptr_t, size_t, volatile uint16_t *); +DEFINE_IFUNC(, void, dtrace_copystr, (uintptr_t, uintptr_t, size_t, + volatile uint16_t *), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? + dtrace_copystr_smap : dtrace_copystr_nosmap); +} + +uintptr_t dtrace_fulword_nosmap(void *); +uintptr_t dtrace_fulword_smap(void *); +DEFINE_IFUNC(, uintptr_t, dtrace_fulword, (void *), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? + dtrace_fulword_smap : dtrace_fulword_nosmap); +} + +uint8_t dtrace_fuword8_nocheck_nosmap(void *); +uint8_t dtrace_fuword8_nocheck_smap(void *); +DEFINE_IFUNC(, uint8_t, dtrace_fuword8_nocheck, (void *), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? + dtrace_fuword8_nocheck_smap : dtrace_fuword8_nocheck_nosmap); +} + +uint16_t dtrace_fuword16_nocheck_nosmap(void *); +uint16_t dtrace_fuword16_nocheck_smap(void *); +DEFINE_IFUNC(, uint16_t, dtrace_fuword16_nocheck, (void *), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? + dtrace_fuword16_nocheck_smap : dtrace_fuword16_nocheck_nosmap); +} + +uint32_t dtrace_fuword32_nocheck_nosmap(void *); +uint32_t dtrace_fuword32_nocheck_smap(void *); +DEFINE_IFUNC(, uint32_t, dtrace_fuword32_nocheck, (void *), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? + dtrace_fuword32_nocheck_smap : dtrace_fuword32_nocheck_nosmap); +} + +uint64_t dtrace_fuword64_nocheck_nosmap(void *); +uint64_t dtrace_fuword64_nocheck_smap(void *); +DEFINE_IFUNC(, uint64_t, dtrace_fuword64_nocheck, (void *), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? + dtrace_fuword64_nocheck_smap : dtrace_fuword64_nocheck_nosmap); } From owner-svn-src-all@freebsd.org Thu Dec 13 23:20:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7480B1337F49; Thu, 13 Dec 2018 23:20:59 +0000 (UTC) (envelope-from bcran@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) server-signature RSA-PSS (4096 bits) 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 121B776F25; Thu, 13 Dec 2018 23:20:59 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F100C26C9F; Thu, 13 Dec 2018 23:20:58 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDNKw13000648; Thu, 13 Dec 2018 23:20:58 GMT (envelope-from bcran@FreeBSD.org) Received: (from bcran@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDNKwQ7000647; Thu, 13 Dec 2018 23:20:58 GMT (envelope-from bcran@FreeBSD.org) Message-Id: <201812132320.wBDNKwQ7000647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcran set sender to bcran@FreeBSD.org using -f From: Rebecca Cran Date: Thu, 13 Dec 2018 23:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342054 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: bcran X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 342054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 121B776F25 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.29 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.46)[-0.458,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 23:20:59 -0000 Author: bcran Date: Thu Dec 13 23:20:58 2018 New Revision: 342054 URL: https://svnweb.freebsd.org/changeset/base/342054 Log: Print an error message in efi_main.c if we can't allocate memory for the heap With the default Qemu parameters, only 128MB RAM gets given to a VM. This causes the loader to be unable to allocate the 64MB it needs for the heap. This change makes the cause of the error more obvious. Differential Revision: https://reviews.freebsd.org/D17958 Modified: head/stand/efi/loader/efi_main.c Modified: head/stand/efi/loader/efi_main.c ============================================================================== --- head/stand/efi/loader/efi_main.c Thu Dec 13 20:09:38 2018 (r342053) +++ head/stand/efi/loader/efi_main.c Thu Dec 13 23:20:58 2018 (r342054) @@ -94,8 +94,10 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy heapsize = 64 * 1024 * 1024; status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, EFI_SIZE_TO_PAGES(heapsize), &heap); - if (status != EFI_SUCCESS) + if (status != EFI_SUCCESS) { + ST->ConOut->OutputString(ST->ConOut, L"Failed to allocate memory for heap.\r\n"); BS->Exit(IH, status, 0, NULL); + } setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); From owner-svn-src-all@freebsd.org Thu Dec 13 23:49:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4103F13388BA; Thu, 13 Dec 2018 23:49:21 +0000 (UTC) (envelope-from bcran@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) server-signature RSA-PSS (4096 bits) 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 D598577B4C; Thu, 13 Dec 2018 23:49:20 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3E412709B; Thu, 13 Dec 2018 23:49:20 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBDNnK4E015393; Thu, 13 Dec 2018 23:49:20 GMT (envelope-from bcran@FreeBSD.org) Received: (from bcran@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBDNnKAo015392; Thu, 13 Dec 2018 23:49:20 GMT (envelope-from bcran@FreeBSD.org) Message-Id: <201812132349.wBDNnKAo015392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcran set sender to bcran@FreeBSD.org using -f From: Rebecca Cran Date: Thu, 13 Dec 2018 23:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342055 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: bcran X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 342055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D598577B4C X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.29 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.46)[-0.458,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 23:49:21 -0000 Author: bcran Date: Thu Dec 13 23:49:20 2018 New Revision: 342055 URL: https://svnweb.freebsd.org/changeset/base/342055 Log: Cast error message in efi_main.c to CHAR16* to avoid build error Modified: head/stand/efi/loader/efi_main.c Modified: head/stand/efi/loader/efi_main.c ============================================================================== --- head/stand/efi/loader/efi_main.c Thu Dec 13 23:20:58 2018 (r342054) +++ head/stand/efi/loader/efi_main.c Thu Dec 13 23:49:20 2018 (r342055) @@ -95,7 +95,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, EFI_SIZE_TO_PAGES(heapsize), &heap); if (status != EFI_SUCCESS) { - ST->ConOut->OutputString(ST->ConOut, L"Failed to allocate memory for heap.\r\n"); + ST->ConOut->OutputString(ST->ConOut, (CHAR16 *)L"Failed to allocate memory for heap.\r\n"); BS->Exit(IH, status, 0, NULL); } From owner-svn-src-all@freebsd.org Fri Dec 14 00:40:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 810D3133A311; Fri, 14 Dec 2018 00:40:44 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 2F05981952; Fri, 14 Dec 2018 00:40:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2140827941; Fri, 14 Dec 2018 00:40:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE0eilK042606; Fri, 14 Dec 2018 00:40:44 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE0ecHY042576; Fri, 14 Dec 2018 00:40:38 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201812140040.wBE0ecHY042576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 14 Dec 2018 00:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342056 - in head/sys/contrib/dev/acpica: . common compiler components/dispatcher components/executer components/namespace components/parser components/utilities include X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . common compiler components/dispatcher components/executer components/namespace components/parser components/utilities include X-SVN-Commit-Revision: 342056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2F05981952 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.34 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.81)[-0.814,0]; NEURAL_HAM_SHORT(-0.52)[-0.522,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 00:40:44 -0000 Author: jkim Date: Fri Dec 14 00:40:38 2018 New Revision: 342056 URL: https://svnweb.freebsd.org/changeset/base/342056 Log: MFV: r342049 Merge ACPICA 20181213. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/dmswitch.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/excreate.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/executer/exserial.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actypes.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/changes.txt Fri Dec 14 00:40:38 2018 (r342056) @@ -1,7 +1,68 @@ ---------------------------------------- -31 October 2018. Summary of changes for version 20181031: +13 December 2018. Summary of changes for version 20181213: -This release is available at https://acpica.org/downloads + +1) ACPICA Kernel-resident Subsystem: + +Fixed some buffer length issues with the GenericSerialBus, related to two +of the bidirectional protocols: AttribRawProcessBytes and AttribRawBytes, +which are rarely seen in the field. For these, the LEN field of the ASL +buffer is now ignored. Hans de Goede + +Implemented a new object evaluation trace mechanism for control methods +and data objects. This includes nested control methods. It is +particularly useful for examining the ACPI execution during system +initialization since the output is relatively terse. The flag below +enables the output of the trace via the ACPI_DEBUG_PRINT_RAW interface: + #define ACPI_LV_EVALUATION 0x00080000 + +Examples: + Enter evaluation : _SB.PCI0._INI (Method) + Exit evaluation : _SB.PCI0._INI + Enter evaluation : _OSI (Method) + Exit evaluation : _OSI + Enter evaluation : _SB.PCI0.TEST (Method) + Nested method call : _SB.PCI0.NST1 + Exit nested method : _SB.PCI0.NST1 + Exit evaluation : _SB.PCI0.TEST + +Added two recently-defined _OSI strings. See +https://docs.microsoft.com/en-us/windows-hardware/drivers/acpi/winacpi- +osi. + "Windows 2018" + "Windows 2018.2" + +Update for buffer-to-string conversions via the ToHexString ASL operator. +A "0x" is now prepended to each of the hex values in the output string. +This provides compatibility with other ACPI implementations. The ACPI +specification is somewhat vague on this issue. + Example output string after conversion: +"0x01,0x02,0x03,0x04,0x05,0x06" + +Return a run-time error for TermArg expressions within individual package +elements. Although this is technically supported by the ASL grammar, +other ACPI implementations do not support this either. Also, this fixes a +fault if this type of construct is ever encountered (it never has been). + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented a new compile option (-ww) that will promote individual +warnings and remarks to errors. This is intended to enhance the firmware +build process. + +AcpiExec: Implemented a new command-line option (-eo) to support the new +object evaluation trace mechanism described above. + +Disassembler: Added support to disassemble OEMx tables as AML/ASL tables +instead of a "unknown table" message. + +AcpiHelp: Improved support for the "special" predefined names such as +_Lxx, _Exx, _EJx, _T_x, etc. For these, any legal hex value can now be +used for "xx" and "x". + +---------------------------------------- +31 October 2018. Summary of changes for version 20181031: An Operation Region regression was fixed by properly adding address Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Fri Dec 14 00:40:38 2018 (r342056) @@ -171,7 +171,7 @@ */ const AH_PREDEFINED_NAME AslPredefinedInfo[] = { - AH_PREDEF ("_ACx", "Active Cooling", "Returns the active cooling policy threshold values"), + AH_PREDEF ("_ACx", "Active Cooling, x=0-9", "Returns the active cooling policy threshold values"), AH_PREDEF ("_ADR", "Address", "Returns address of a device on parent bus, and resource field"), AH_PREDEF ("_AEI", "ACPI Event Interrupts", "Returns a list of GPIO events to be used as ACPI events"), AH_PREDEF ("_ALC", "Ambient Light Chromaticity", "Returns the ambient light color chromaticity"), @@ -180,7 +180,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_ALP", "Ambient Light Polling", "Returns the ambient light sensor polling frequency"), AH_PREDEF ("_ALR", "Ambient Light Response", "Returns the ambient light brightness to display brightness mappings"), AH_PREDEF ("_ALT", "Ambient Light Temperature", "Returns the ambient light color temperature"), - AH_PREDEF ("_ALx", "Active List", "Returns a list of active cooling device objects"), + AH_PREDEF ("_ALx", "Active List, x=0-9", "Returns a list of active cooling device objects"), AH_PREDEF ("_ART", "Active Cooling Relationship Table", "Returns thermal relationship information between platform devices and fan devices"), AH_PREDEF ("_ASI", "Address Space Id", "Resource Descriptor field"), AH_PREDEF ("_ASZ", "Access Size", "Resource Descriptor field"), @@ -237,11 +237,11 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_DSS", "Device Set State", "Sets the display device state"), AH_PREDEF ("_DSW", "Device Sleep Wake", "Sets the sleep and wake transition states for a device"), AH_PREDEF ("_DTI", "Device Temperature Indication", "Conveys native device temperature to the platform"), - AH_PREDEF ("_Exx", "Edge-Triggered GPE", "Method executed as a result of a general-purpose event"), + AH_PREDEF ("_Exx", "Edge-Triggered GPE, xx=0x00-0xFF", "Method executed as a result of a general-purpose event"), AH_PREDEF ("_EC_", "Embedded Controller", "returns EC offset and query information"), AH_PREDEF ("_EDL", "Eject Device List", "Returns a list of devices that are dependent on a device (docking)"), AH_PREDEF ("_EJD", "Ejection Dependent Device", "Returns the name of dependent (parent) device (docking)"), - AH_PREDEF ("_EJx", "Eject Device", "Begin or cancel a device ejection request (docking)"), + AH_PREDEF ("_EJx", "Eject Device, x=0-9", "Begin or cancel a device ejection request (docking)"), AH_PREDEF ("_END", "Endianness", "Endian orientation, Resource Descriptor field"), AH_PREDEF ("_EVT", "Event", "Event method for GPIO events"), AH_PREDEF ("_FDE", "Floppy Disk Enumerate", "Returns floppy disk configuration information"), @@ -281,7 +281,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_INT", "Interrupts", "Interrupt mask bits, Resource Descriptor field"), AH_PREDEF ("_IOR", "I/O Restriction", "Restriction type, Resource Descriptor field"), AH_PREDEF ("_IRC", "Inrush Current", "Presence indicates that a device has a significant inrush current draw"), - AH_PREDEF ("_Lxx", "Level-Triggered GPE", "Control method executed as a result of a general-purpose event"), + AH_PREDEF ("_Lxx", "Level-Triggered GPE, xx=0x00-0xFF", "Control method executed as a result of a general-purpose event"), AH_PREDEF ("_LCK", "Lock Device", "Locks or unlocks a device (docking)"), AH_PREDEF ("_LEN", "Length", "Range length, Resource Descriptor field"), AH_PREDEF ("_LID", "Lid Status", "Returns the open/closed status of the lid on a mobile system"), @@ -358,7 +358,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_PTS", "Prepare To Sleep", "Inform the platform of an impending sleep transition"), AH_PREDEF ("_PUR", "Processor Utilization Request", "Returns the number of processors that the platform would like to idle"), AH_PREDEF ("_PXM", "Device Proximity", "Returns a device's proximity domain identifier"), - AH_PREDEF ("_Qxx", "EC Query", "Embedded Controller query and SMBus Alarm control method"), + AH_PREDEF ("_Qxx", "EC Query, xx=0x00-0xFF", "Embedded Controller query and SMBus Alarm control method"), AH_PREDEF ("_RBO", "Register Bit Offset", "Resource Descriptor field"), AH_PREDEF ("_RBW", "Register Bit Width", "Resource Descriptor field"), AH_PREDEF ("_RDI", "Resource Dependencies for Idle", "Returns a list of dependencies for idle states"), @@ -413,7 +413,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_SUB", "Subsystem ID", "Returns the subsystem ID for a device"), AH_PREDEF ("_SUN", "Slot User Number", "Returns the slot unique ID number"), AH_PREDEF ("_SWS", "System Wake Source", "Returns the source event that caused the system to wake"), - AH_PREDEF ("_T_x", "Emitted by ASL Compiler", "Reserved for use by ASL compilers"), + AH_PREDEF ("_T_x", "Emitted by ASL Compiler, x=0-9, A-Z", "Reserved for use by ASL compilers"), AH_PREDEF ("_TC1", "Thermal Constant 1", "Returns TC1 for the passive cooling formula"), AH_PREDEF ("_TC2", "Thermal Constant 2", "Returns TC2 for the passive cooling formula"), AH_PREDEF ("_TDL", "T-State Depth Limit", "Returns the _TSS entry number of the lowest power throttling state"), @@ -447,7 +447,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_VAL", "Pin Configuration Value", "Resource Descriptor field"), AH_PREDEF ("_VEN", "Vendor Data", "Resource Descriptor field"), AH_PREDEF ("_VPO", "Video Post Options", "Returns the implemented video post options"), - AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"), + AH_PREDEF ("_Wxx", "Wake Event, xx=0x00-0xFF", "Method executed as a result of a wake event"), AH_PREDEF ("_WAK", "Wake", "Inform AML that the system has just awakened"), AH_PREDEF ("_WPC", "Wireless Power Calibration", "Calibrate power and notify wireless device"), AH_PREDEF ("_WPP", "Wireless Power Polling", "Get recommended polling interval"), Modified: head/sys/contrib/dev/acpica/common/dmswitch.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmswitch.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/common/dmswitch.c Fri Dec 14 00:40:38 2018 (r342056) @@ -325,6 +325,8 @@ AcpiDmClearTempList ( * FUNCTION: AcpiDmIsSwitchBlock * * PARAMETERS: Op - While Object + * Temp - Where the compiler temp name is returned + * (_T_x) * * RETURN: TRUE if While block can be converted to a Switch/Case block * @@ -550,6 +552,10 @@ AcpiDmIsSwitchBlock ( if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) { CurrentOp = CurrentOp->Common.Next; + if (!CurrentOp) + { + return (FALSE); + } } /* Ignore the Break Op */ Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Fri Dec 14 00:40:38 2018 (r342056) @@ -773,12 +773,6 @@ CgWriteNode ( return; } - if ((Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && - AslGbl_DoExternals == FALSE) - { - return; - } - Op->Asl.FinalAmlLength = 0; switch (Op->Asl.AmlOpcode) Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Fri Dec 14 00:40:38 2018 (r342056) @@ -388,23 +388,20 @@ CmDoCompile ( /* Resolve External Declarations */ - if (AslGbl_DoExternals) - { - Event = UtBeginEvent ("Resolve all Externals"); - DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n"); + Event = UtBeginEvent ("Resolve all Externals"); + DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n"); - if (AslGbl_DoExternalsInPlace) - { - TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD, - ExAmlExternalWalkBegin, NULL, NULL); - } - else - { - TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE, - ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL); - } - UtEndEvent (Event); + if (AslGbl_DoExternalsInPlace) + { + TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD, + ExAmlExternalWalkBegin, NULL, NULL); } + else + { + TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE, + ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL); + } + UtEndEvent (Event); /* * Semantic analysis. This can happen only after the Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Dec 14 00:40:38 2018 (r342056) @@ -475,6 +475,10 @@ AslExpectException ( char *MessageIdString); ACPI_STATUS +AslElevateException ( + char *MessageIdString); + +ACPI_STATUS AslDisableException ( char *MessageIdString); Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Fri Dec 14 00:40:38 2018 (r342056) @@ -201,7 +201,12 @@ AePrintSubError ( FILE *OutputFile, ASL_ERROR_MSG *Enode); +static UINT8 +GetModifiedLevel ( + UINT8 Level, + UINT16 MessageId); + /******************************************************************************* * * FUNCTION: AslAbort @@ -968,11 +973,12 @@ AslLogNewError ( ASL_ERROR_MSG *SubError) { ASL_ERROR_MSG *Enode = NULL; + UINT8 ModifiedLevel = GetModifiedLevel (Level, MessageId); - AslInitEnode (&Enode, Level, MessageId, LineNumber, LogicalLineNumber, - LogicalByteOffset, Column, Filename, Message, SourceLine, - SubError); + AslInitEnode (&Enode, ModifiedLevel, MessageId, LineNumber, + LogicalLineNumber, LogicalByteOffset, Column, Filename, Message, + SourceLine, SubError); /* Add the new node to the error node list */ @@ -985,7 +991,7 @@ AslLogNewError ( AePrintException (ASL_FILE_STDERR, Enode, NULL); } - AslGbl_ExceptionCount[Level]++; + AslGbl_ExceptionCount[ModifiedLevel]++; if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT) { printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT); @@ -999,8 +1005,46 @@ AslLogNewError ( return; } + /******************************************************************************* * + * FUNCTION: GetModifiedLevel + * + * PARAMETERS: Level - Seriousness (Warning/error, etc.) + * MessageId - Index into global message buffer + * + * RETURN: UINT8 - modified level + * + * DESCRIPTION: Get the modified level of exception codes that are reported as + * errors from the -ww option. + * + ******************************************************************************/ + +static UINT8 +GetModifiedLevel ( + UINT8 Level, + UINT16 MessageId) +{ + UINT16 i; + UINT16 ExceptionCode; + + + ExceptionCode = AeBuildFullExceptionCode (Level, MessageId); + + for (i = 0; i < AslGbl_ElevatedMessagesIndex; i++) + { + if (ExceptionCode == AslGbl_ElevatedMessages[i]) + { + return (ASL_ERROR); + } + } + + return (Level); +} + + +/******************************************************************************* + * * FUNCTION: AslIsExceptionIgnored * * PARAMETERS: Level - Seriousness (Warning/error, etc.) @@ -1154,6 +1198,51 @@ AslDisableException ( return (AE_OK); } + +/******************************************************************************* + * + * FUNCTION: AslElevateException + * + * PARAMETERS: MessageIdString - ID of excepted exception during compile + * + * RETURN: Status + * + * DESCRIPTION: Enter a message ID into the global elevated exceptions table. + * These messages will be considered as compilation errors. + * + ******************************************************************************/ + +ACPI_STATUS +AslElevateException ( + char *MessageIdString) +{ + UINT32 MessageId; + + + /* Convert argument to an integer and validate it */ + + MessageId = (UINT32) strtoul (MessageIdString, NULL, 0); + + if (MessageId > 6999) + { + printf ("\"%s\" is not a valid warning/remark/erro ID\n", + MessageIdString); + return (AE_BAD_PARAMETER); + } + + /* Insert value into the global expected message array */ + + if (AslGbl_ElevatedMessagesIndex >= ASL_MAX_ELEVATED_MESSAGES) + { + printf ("Too many messages have been registered as elevated (max %d)\n", + ASL_MAX_DISABLED_MESSAGES); + return (AE_LIMIT); + } + + AslGbl_ElevatedMessages[AslGbl_ExpectedMessagesIndex] = MessageId; + AslGbl_ElevatedMessagesIndex++; + return (AE_OK); +} /******************************************************************************* * Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Dec 14 00:40:38 2018 (r342056) @@ -255,6 +255,7 @@ extern int AslCompilerdebug; #define ASL_STRING_BUFFER_SIZE (1024 * 32) /* 32k */ #define ASL_MAX_DISABLED_MESSAGES 32 #define ASL_MAX_EXPECTED_MESSAGES 32 +#define ASL_MAX_ELEVATED_MESSAGES 32 #define HEX_TABLE_LINE_SIZE 8 #define HEX_LISTING_LINE_SIZE 8 @@ -319,7 +320,6 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (A ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_PruneParseTree, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoTypechecking, TRUE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_EnableReferenceTypechecking, FALSE); -ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoExternals, TRUE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoExternalsInPlace, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoAslConversion, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_OptimizeTrivialParseNodes, TRUE); @@ -394,6 +394,7 @@ ASL_EXTERN UINT32 ASL_INIT_GLOBAL (A ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentLine, 0); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_DisabledMessagesIndex, 0); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ExpectedMessagesIndex, 0); +ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ElevatedMessagesIndex, 0); ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_HexBytesWereWritten, FALSE); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_NumNamespaceObjects, 0); ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ReservedMethods, 0); @@ -435,6 +436,7 @@ ASL_EXTERN char AslGbl_StringBuffe ASL_EXTERN char AslGbl_StringBuffer2[ASL_STRING_BUFFER_SIZE]; ASL_EXTERN UINT32 AslGbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES]; ASL_EXTERN ASL_EXPECTED_MESSAGE AslGbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES]; +ASL_EXTERN UINT32 AslGbl_ElevatedMessages[ASL_MAX_ELEVATED_MESSAGES]; #endif /* __ASLGLOBAL_H */ Modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelp.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/aslhelp.c Fri Dec 14 00:40:38 2018 (r342056) @@ -208,6 +208,7 @@ Usage ( ACPI_OPTION ("-vx ", "Expect a specific warning, remark, or error"); ACPI_OPTION ("-w <1|2|3>", "Set warning reporting level"); ACPI_OPTION ("-we", "Report warnings as errors"); + ACPI_OPTION ("-ww ", "Report specific warning or remark as error"); printf ("\nAML Bytecode Generation (*.aml):\n"); ACPI_OPTION ("-oa", "Disable all optimizations (compatibility mode)"); Modified: head/sys/contrib/dev/acpica/compiler/asllength.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllength.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/asllength.c Fri Dec 14 00:40:38 2018 (r342056) @@ -519,10 +519,7 @@ CgGenerateAmlLengths ( case PARSEOP_EXTERNAL: - if (AslGbl_DoExternals == TRUE) - { - CgGenerateAmlOpcodeLength (Op); - } + CgGenerateAmlOpcodeLength (Op); break; default: Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Fri Dec 14 00:40:38 2018 (r342056) @@ -927,15 +927,6 @@ OpcGenerateAmlOpcode ( AslGbl_HasIncludeFiles = TRUE; break; - case PARSEOP_EXTERNAL: - - if (AslGbl_DoExternals == FALSE) - { - Op->Asl.Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - Op->Asl.Child->Asl.Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - } - break; - case PARSEOP_TIMER: if (AcpiGbl_IntegerBitWidth == 32) Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Dec 14 00:40:38 2018 (r342056) @@ -976,6 +976,23 @@ AslDoOptions ( AslGbl_WarningsAsErrors = TRUE; break; + case 'w': + + /* Get the required argument */ + + if (AcpiGetoptArgument (argc, argv)) + { + return (-1); + } + + Status = AslElevateException (AcpiGbl_Optarg); + if (ACPI_FAILURE (Status)) + { + return (-1); + } + break; + + default: printf ("Unknown option: -w%s\n", AcpiGbl_Optarg); Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltransform.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/compiler/asltransform.c Fri Dec 14 00:40:38 2018 (r342056) @@ -460,11 +460,7 @@ TrTransformSubtree ( case PARSEOP_EXTERNAL: - if (AslGbl_DoExternals == TRUE) - { - ExDoExternal (Op); - } - + ExDoExternal (Op); break; case PARSEOP___METHOD__: Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c Fri Dec 14 00:40:38 2018 (r342056) @@ -720,6 +720,8 @@ AcpiDsCallControlMethod ( goto Cleanup; } + NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1; + /* * Delete the operands on the previous walkstate operand stack * (they were copied to new objects) @@ -737,6 +739,16 @@ AcpiDsCallControlMethod ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "**** Begin nested execution of [%4.4s] **** WalkState=%p\n", MethodNode->Name.Ascii, NextWalkState)); + + ThisWalkState->MethodPathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE); + ThisWalkState->MethodIsNested = TRUE; + + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: %*s%s\n", " Nested method call", + NextWalkState->MethodNestingDepth * 3, " ", + &ThisWalkState->MethodPathname[1])); /* Invoke an internal method if necessary */ Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c Fri Dec 14 00:40:38 2018 (r342056) @@ -161,7 +161,6 @@ ACPI_MODULE_NAME ("dsobject") -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiDsBuildInternalObject @@ -460,7 +459,6 @@ AcpiDsCreateNode ( return_ACPI_STATUS (Status); } -#endif /* ACPI_NO_METHOD_EXECUTION */ /******************************************************************************* @@ -571,9 +569,7 @@ AcpiDsInitObjectFromOp ( /* Truncate value if we are executing from a 32-bit ACPI table */ -#ifndef ACPI_NO_METHOD_EXECUTION (void) AcpiExTruncateFor32bitTable (ObjDesc); -#endif break; case AML_REVISION_OP: @@ -594,7 +590,6 @@ AcpiDsInitObjectFromOp ( ObjDesc->Integer.Value = Op->Common.Value.Integer; -#ifndef ACPI_NO_METHOD_EXECUTION if (AcpiExTruncateFor32bitTable (ObjDesc)) { /* Warn if we found a 64-bit constant in a 32-bit table */ @@ -604,7 +599,6 @@ AcpiDsInitObjectFromOp ( ACPI_FORMAT_UINT64 (Op->Common.Value.Integer), (UINT32) ObjDesc->Integer.Value)); } -#endif break; default: @@ -642,12 +636,10 @@ AcpiDsInitObjectFromOp ( ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_LOCAL_OP; ObjDesc->Reference.Class = ACPI_REFCLASS_LOCAL; -#ifndef ACPI_NO_METHOD_EXECUTION Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_LOCAL, ObjDesc->Reference.Value, WalkState, ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc->Reference.Object)); -#endif break; case AML_TYPE_METHOD_ARGUMENT: @@ -657,12 +649,10 @@ AcpiDsInitObjectFromOp ( ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_ARG_OP; ObjDesc->Reference.Class = ACPI_REFCLASS_ARG; -#ifndef ACPI_NO_METHOD_EXECUTION Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_ARG, ObjDesc->Reference.Value, WalkState, ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc->Reference.Object)); -#endif break; default: /* Object name or Debug object */ Modified: head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c Fri Dec 14 00:40:38 2018 (r342056) @@ -308,6 +308,32 @@ AcpiDsBuildInternalPackageObj ( { if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) { + if (!Arg->Common.Node) + { + /* + * This is the case where an expression has returned a value. + * The use of expressions (TermArgs) within individual + * package elements is not supported by the AML interpreter, + * even though the ASL grammar supports it. Example: + * + * Name (INT1, 0x1234) + * + * Name (PKG3, Package () { + * Add (INT1, 0xAAAA0000) + * }) + * + * 1) No known AML interpreter supports this type of construct + * 2) This fixes a fault if the construct is encountered + */ + ACPI_EXCEPTION ((AE_INFO, AE_SUPPORT, + "Expressions within package elements are not supported")); + + /* Cleanup the return object, it is not needed */ + + AcpiUtRemoveReference (WalkState->Results->Results.ObjDesc[0]); + return_ACPI_STATUS (AE_SUPPORT); + } + if (Arg->Common.Node->Type == ACPI_TYPE_METHOD) { /* Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c Fri Dec 14 00:40:38 2018 (r342056) @@ -209,7 +209,6 @@ AcpiDsClearImplicitReturn ( } -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiDsDoImplicitReturn @@ -583,7 +582,6 @@ AcpiDsClearOperands ( WalkState->NumOperands = 0; return_VOID; } -#endif /******************************************************************************* Modified: head/sys/contrib/dev/acpica/components/dispatcher/dswload.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dswload.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/dispatcher/dswload.c Fri Dec 14 00:40:38 2018 (r342056) @@ -221,12 +221,10 @@ AcpiDsInitCallbacks ( /* Execution pass */ -#ifndef ACPI_NO_METHOD_EXECUTION WalkState->ParseFlags |= ACPI_PARSE_EXECUTE | ACPI_PARSE_DELETE_TREE; WalkState->DescendingCallback = AcpiDsExecBeginOp; WalkState->AscendingCallback = AcpiDsExecEndOp; -#endif break; default: @@ -517,7 +515,7 @@ AcpiDsLoad1BeginOp ( /* Initialize the op */ -#if (defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)) +#ifdef ACPI_CONSTANT_EVAL_ONLY Op->Named.Path = Path; #endif @@ -580,7 +578,6 @@ AcpiDsLoad1EndOp ( ObjectType = WalkState->OpInfo->ObjectType; -#ifndef ACPI_NO_METHOD_EXECUTION if (WalkState->OpInfo->Flags & AML_FIELD) { /* @@ -626,7 +623,6 @@ AcpiDsLoad1EndOp ( } } } -#endif if (Op->Common.AmlOpcode == AML_NAME_OP) { Modified: head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c Fri Dec 14 00:40:38 2018 (r342056) @@ -529,10 +529,8 @@ AcpiDsLoad2EndOp ( ACPI_NAMESPACE_NODE *Node; ACPI_PARSE_OBJECT *Arg; ACPI_NAMESPACE_NODE *NewNode; -#ifndef ACPI_NO_METHOD_EXECUTION UINT32 i; UINT8 RegionSpace; -#endif ACPI_FUNCTION_TRACE (DsLoad2EndOp); @@ -622,7 +620,6 @@ AcpiDsLoad2EndOp ( switch (WalkState->OpInfo->Type) { -#ifndef ACPI_NO_METHOD_EXECUTION case AML_TYPE_CREATE_FIELD: /* @@ -718,13 +715,11 @@ AcpiDsLoad2EndOp ( } break; -#endif /* ACPI_NO_METHOD_EXECUTION */ case AML_TYPE_NAMED_COMPLEX: switch (Op->Common.AmlOpcode) { -#ifndef ACPI_NO_METHOD_EXECUTION case AML_REGION_OP: case AML_DATA_REGION_OP: @@ -809,7 +804,6 @@ AcpiDsLoad2EndOp ( } break; -#endif /* ACPI_NO_METHOD_EXECUTION */ default: Modified: head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c Fri Dec 14 00:40:38 2018 (r342056) @@ -733,7 +733,7 @@ AcpiDsCreateWalkState ( /* Init the method args/local */ -#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) +#ifndef ACPI_CONSTANT_EVAL_ONLY AcpiDsMethodDataInit (WalkState); #endif Modified: head/sys/contrib/dev/acpica/components/executer/exconvrt.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exconvrt.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/executer/exconvrt.c Fri Dec 14 00:40:38 2018 (r342056) @@ -496,7 +496,7 @@ AcpiExConvertToAscii ( /* HexLength: 2 ascii hex chars per data byte */ - HexLength = ACPI_MUL_2 (DataWidth); + HexLength = (DataWidth * 2); for (i = 0, j = (HexLength-1); i < HexLength; i++, j--) { /* Get one hex digit, most significant digits first */ @@ -539,7 +539,8 @@ AcpiExConvertToAscii ( * * RETURN: Status * - * DESCRIPTION: Convert an ACPI Object to a string + * DESCRIPTION: Convert an ACPI Object to a string. Supports both implicit + * and explicit conversions and related rules. * ******************************************************************************/ @@ -574,9 +575,11 @@ AcpiExConvertToString ( switch (Type) { case ACPI_EXPLICIT_CONVERT_DECIMAL: - - /* Make room for maximum decimal number */ - + /* + * From ToDecimalString, integer source. + * + * Make room for the maximum decimal number size + */ StringLength = ACPI_MAX_DECIMAL_DIGITS; Base = 10; break; @@ -620,8 +623,10 @@ AcpiExConvertToString ( { case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by ToDecimalString */ /* - * From ACPI: "If Data is a buffer, it is converted to a string of - * decimal values separated by commas." + * Explicit conversion from the ToDecimalString ASL operator. + * + * From ACPI: "If the input is a buffer, it is converted to a + * a string of decimal values separated by commas." */ Base = 10; @@ -648,20 +653,29 @@ AcpiExConvertToString ( case ACPI_IMPLICIT_CONVERT_HEX: /* + * Implicit buffer-to-string conversion + * * From the ACPI spec: - *"The entire contents of the buffer are converted to a string of + * "The entire contents of the buffer are converted to a string of * two-character hexadecimal numbers, each separated by a space." + * + * Each hex number is prefixed with 0x (11/2018) */ Separator = ' '; - StringLength = (ObjDesc->Buffer.Length * 3); + StringLength = (ObjDesc->Buffer.Length * 5); break; - case ACPI_EXPLICIT_CONVERT_HEX: /* Used by ToHexString */ + case ACPI_EXPLICIT_CONVERT_HEX: /* + * Explicit conversion from the ToHexString ASL operator. + * * From ACPI: "If Data is a buffer, it is converted to a string of * hexadecimal values separated by commas." + * + * Each hex number is prefixed with 0x (11/2018) */ - StringLength = (ObjDesc->Buffer.Length * 3); + Separator = ','; + StringLength = (ObjDesc->Buffer.Length * 5); break; default: @@ -692,9 +706,20 @@ AcpiExConvertToString ( */ for (i = 0; i < ObjDesc->Buffer.Length; i++) { + if (Base == 16) + { + /* Emit 0x prefix for explict/implicit hex conversion */ + + *NewBuf++ = '0'; + *NewBuf++ = 'x'; + } + NewBuf += AcpiExConvertToAscii ( (UINT64) ObjDesc->Buffer.Pointer[i], Base, NewBuf, 1); - *NewBuf++ = Separator; /* each separated by a comma or space */ + + /* Each digit is separated by either a comma or space */ + + *NewBuf++ = Separator; } /* Modified: head/sys/contrib/dev/acpica/components/executer/excreate.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/excreate.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/executer/excreate.c Fri Dec 14 00:40:38 2018 (r342056) @@ -161,7 +161,6 @@ ACPI_MODULE_NAME ("excreate") -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiExCreateAlias @@ -573,7 +572,6 @@ AcpiExCreatePowerResource ( AcpiUtRemoveReference (ObjDesc); return_ACPI_STATUS (Status); } -#endif /******************************************************************************* Modified: head/sys/contrib/dev/acpica/components/executer/exoparg2.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exoparg2.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/executer/exoparg2.c Fri Dec 14 00:40:38 2018 (r342056) @@ -460,9 +460,9 @@ AcpiExOpcode_2A_1T_1R ( * NOTE: A length of zero is ok, and will create a zero-length, null * terminated string. */ - while ((Length < Operand[0]->Buffer.Length) && - (Length < Operand[1]->Integer.Value) && - (Operand[0]->Buffer.Pointer[Length])) + while ((Length < Operand[0]->Buffer.Length) && /* Length of input buffer */ + (Length < Operand[1]->Integer.Value) && /* Length operand */ + (Operand[0]->Buffer.Pointer[Length])) /* Null terminator */ { Length++; } Modified: head/sys/contrib/dev/acpica/components/executer/exserial.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exserial.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/executer/exserial.c Fri Dec 14 00:40:38 2018 (r342056) @@ -445,14 +445,12 @@ AcpiExWriteSerialBus ( case ACPI_ADR_SPACE_SMBUS: BufferLength = ACPI_SMBUS_BUFFER_SIZE; - DataLength = ACPI_SMBUS_DATA_SIZE; Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16); break; case ACPI_ADR_SPACE_IPMI: BufferLength = ACPI_IPMI_BUFFER_SIZE; - DataLength = ACPI_IPMI_DATA_SIZE; Function = ACPI_WRITE; break; @@ -471,7 +469,6 @@ AcpiExWriteSerialBus ( /* Add header length to get the full size of the buffer */ BufferLength += ACPI_SERIAL_HEADER_SIZE; - DataLength = SourceDesc->Buffer.Pointer[1]; Function = ACPI_WRITE | (AccessorType << 16); break; @@ -479,21 +476,6 @@ AcpiExWriteSerialBus ( return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID); } -#if 0 -OBSOLETE? - /* Check for possible buffer overflow */ - - if (DataLength > SourceDesc->Buffer.Length) - { - ACPI_ERROR ((AE_INFO, - "Length in buffer header (%u)(%u) is greater than " - "the physical buffer length (%u) and will overflow", - DataLength, BufferLength, SourceDesc->Buffer.Length)); - - return_ACPI_STATUS (AE_AML_BUFFER_LIMIT); - } -#endif - /* Create the transfer/bidirectional/return buffer */ BufferDesc = AcpiUtCreateBufferObject (BufferLength); @@ -505,6 +487,8 @@ OBSOLETE? /* Copy the input buffer data to the transfer buffer */ Buffer = BufferDesc->Buffer.Pointer; + DataLength = (BufferLength < SourceDesc->Buffer.Length ? + BufferLength : SourceDesc->Buffer.Length); memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength); /* Lock entire transaction if requested */ Modified: head/sys/contrib/dev/acpica/components/executer/exutils.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exutils.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/executer/exutils.c Fri Dec 14 00:40:38 2018 (r342056) @@ -181,7 +181,6 @@ AcpiExDigitsNeeded ( UINT32 Base); -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiExEnterInterpreter @@ -615,4 +614,3 @@ AcpiIsValidSpaceId ( return (TRUE); } -#endif Modified: head/sys/contrib/dev/acpica/components/namespace/nseval.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nseval.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/namespace/nseval.c Fri Dec 14 00:40:38 2018 (r342056) @@ -259,6 +259,12 @@ AcpiNsEvaluate ( return_ACPI_STATUS (AE_NO_MEMORY); } + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: %s (%s)\n", " Enter evaluation", + &Info->FullPathname[1], AcpiUtGetTypeName (Info->Node->Type))); + /* Count the number of arguments being passed in */ Info->ParamCount = 0; @@ -445,6 +451,12 @@ AcpiNsEvaluate ( Info->RelativePathname)); Cleanup: + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: %s\n", " Exit evaluation", + &Info->FullPathname[1])); + /* * Namespace was unlocked by the handling AcpiNs* function, so we * just free the pathname and return Modified: head/sys/contrib/dev/acpica/components/namespace/nsload.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsload.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/namespace/nsload.c Fri Dec 14 00:40:38 2018 (r342056) @@ -173,7 +173,6 @@ AcpiNsDeleteSubtree ( #endif -#ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* * * FUNCTION: AcpiNsLoadTable @@ -476,5 +475,4 @@ AcpiNsUnloadNamespace ( Status = AcpiNsDeleteSubtree (Handle); return_ACPI_STATUS (Status); } -#endif #endif Modified: head/sys/contrib/dev/acpica/components/namespace/nsparse.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsparse.c Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/components/namespace/nsparse.c Fri Dec 14 00:40:38 2018 (r342056) @@ -261,7 +261,17 @@ AcpiNsExecuteTable ( goto Cleanup; } + /* Optional object evaluation log */ + + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, + "%-26s: (Definition Block level)\n", "Module-level evaluation")); + Status = AcpiPsExecuteTable (Info); + + /* Optional object evaluation log */ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Dec 14 01:06:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2EF8133AA7C; Fri, 14 Dec 2018 01:06:35 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 8664E82916; Fri, 14 Dec 2018 01:06:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A44327E44; Fri, 14 Dec 2018 01:06:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE16Zvn058500; Fri, 14 Dec 2018 01:06:35 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE16Zgr058499; Fri, 14 Dec 2018 01:06:35 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201812140106.wBE16Zgr058499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 14 Dec 2018 01:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342057 - head/crypto/openssl/crypto/engine X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/crypto/openssl/crypto/engine X-SVN-Commit-Revision: 342057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8664E82916 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.29 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.46)[-0.458,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 01:06:36 -0000 Author: jkim Date: Fri Dec 14 01:06:34 2018 New Revision: 342057 URL: https://svnweb.freebsd.org/changeset/base/342057 Log: Do not complain when /dev/crypto does not exist. Now the new devcrypto engine is enabled since r342009, many users started seeing "Could not open /dev/crypto: No such file or directory". Disable the annoying error message as it is not very useful anyway. Note the patch was submitted upstream. https://github.com/openssl/openssl/pull/7896 Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 00:40:38 2018 (r342056) +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 01:06:34 2018 (r342057) @@ -24,6 +24,8 @@ #include "internal/engine.h" +/* #define ENGINE_DEVCRYPTO_DEBUG */ + #ifdef CRYPTO_ALGORITHM_MIN # define CHECK_BSD_STYLE_MACROS #endif @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() ENGINE *e = NULL; if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) { +#ifndef ENGINE_DEVCRYPTO_DEBUG + if (errno != ENOENT) +#endif fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno)); return; } From owner-svn-src-all@freebsd.org Fri Dec 14 02:39:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46778130B663; Fri, 14 Dec 2018 02:39:11 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B868486464; Fri, 14 Dec 2018 02:39:10 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pg1-x531.google.com with SMTP id w7so1957018pgp.13; Thu, 13 Dec 2018 18:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jSmbOrSr3PJSjoNC88DfiDE6RYuzC4fzA1Ue3BJ6a0U=; b=TpR9PSsbAxCipu1uGw1g70zg9k+Q5iZmdgEHF120XlL6QUB3MTKeK/yW42wbx/ma1r YvOQXkaXxRCr28JsxoSXR5J+DA2d04R23kLeZ0zLZjkZqD67ukpnSOilAhT18AQbR8H9 kWxrxrgNA6EwfwEfpQ6KjdnFOsCA1za1sHmV3pc91/0GIsdjsjFbkCkZlplukedLnjl0 m0zm5j70y4zGHaesx5CetZa8dB6etONrZPwO2agywblrMlU6KEvh6+a84RKi3oUaf+5C PL4qtSwaK3OPJkFLTwerA3Ohko/PTUx3IwKpPMnBL03cvaubLb6Hi+aDR+49+4UOthO+ 4v/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=jSmbOrSr3PJSjoNC88DfiDE6RYuzC4fzA1Ue3BJ6a0U=; b=mSI/KeoM51bDm42jiViyiYoQLMn5pYlkD8MQIalvFV3AM/QLuRUL4ugrAuJs3M5iXc DtbvvNjZNRM0JZHFxlY3PMSDuCoRW0hz1gvJLS2jWgtEEnMLZ/T9KNVHH2LMu3y0r0UD mWinpfGLEXQoWCkrBoS78TZoqvCfXst4B1A1jcp0Xz6TAcdrvEuCYDm5cQjqQAedscba G6FoIdQaaizWV9O3YaFQiN5+KZB6JfzeRhjiPJ4Xthqayzfvy+GfN970/famosZsHNOg 8bUYiHv98A6eGVnqonktjxViV3DYRZELfjMmVXeq97dijn+J1zTvi47RksLurGZSr0p8 iCTg== X-Gm-Message-State: AA+aEWbP4lHfQ3AyawXBluMSqGIn1PaBDyKhKXEcfFX4ojPxDV1LKF0n BJE0KBv6smhg5dYM5Z7qQ9u4NFDj X-Google-Smtp-Source: AFSGD/V9pGuA/ZkRL9qBPpEiMSwLGAPQpcuSTci0jSvSZjLcuHRkDY44ptv3jmxp7EC7AzY9382/Jg== X-Received: by 2002:a63:f515:: with SMTP id w21mr1184769pgh.220.1544755149525; Thu, 13 Dec 2018 18:39:09 -0800 (PST) Received: from ?IPv6:2403:5800:7100:5d01:41fd:8f07:9f95:2994? (2403-5800-7100-5d01-41fd-8f07-9f95-2994.ip6.aussiebb.net. [2403:5800:7100:5d01:41fd:8f07:9f95:2994]) by smtp.gmail.com with ESMTPSA id m19sm9863432pgn.35.2018.12.13.18.39.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Dec 2018 18:39:09 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r342057 - head/crypto/openssl/crypto/engine To: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812140106.wBE16Zgr058499@repo.freebsd.org> From: Kubilay Kocak Message-ID: <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> Date: Fri, 14 Dec 2018 13:39:03 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:64.0) Gecko/20100101 Thunderbird/64.0 MIME-Version: 1.0 In-Reply-To: <201812140106.wBE16Zgr058499@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: B868486464 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.89 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.90)[-0.897,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 02:39:11 -0000 On 14/12/2018 12:06 pm, Jung-uk Kim wrote: > Author: jkim > Date: Fri Dec 14 01:06:34 2018 > New Revision: 342057 > URL: https://svnweb.freebsd.org/changeset/base/342057 > > Log: > Do not complain when /dev/crypto does not exist. > > Now the new devcrypto engine is enabled since r342009, many users started > seeing "Could not open /dev/crypto: No such file or directory". Disable > the annoying error message as it is not very useful anyway. > > Note the patch was submitted upstream. > > https://github.com/openssl/openssl/pull/7896 > > Modified: > head/crypto/openssl/crypto/engine/eng_devcrypto.c > > Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c > ============================================================================== > --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 00:40:38 2018 (r342056) > +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 01:06:34 2018 (r342057) > @@ -24,6 +24,8 @@ > > #include "internal/engine.h" > > +/* #define ENGINE_DEVCRYPTO_DEBUG */ > + > #ifdef CRYPTO_ALGORITHM_MIN > # define CHECK_BSD_STYLE_MACROS > #endif > @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() > ENGINE *e = NULL; > > if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) { > +#ifndef ENGINE_DEVCRYPTO_DEBUG > + if (errno != ENOENT) > +#endif > fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno)); > return; > } How trivially could devcrypto_debug be modified to be a runtime configuration (say sysctl) setting? From owner-svn-src-all@freebsd.org Fri Dec 14 03:30:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 369C6130CF7A for ; Fri, 14 Dec 2018 03:30:02 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-it1-x132.google.com (mail-it1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDC1988348 for ; Fri, 14 Dec 2018 03:30:01 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-it1-x132.google.com with SMTP id g85so7043996ita.3 for ; Thu, 13 Dec 2018 19:30:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YvB3iCKfzsRo29xoyUN+pcGywxzI3xMUgq8vlfwS+vU=; b=oycWiqNQiAeaL8O6sPAEeQJTSJaoM3pPr535ihfEGeHgH7RuJUepU2QEIoGxgzt6/z Y1ky54IkQbVHMtZewMN0jpqdKB814TfDWVK7c14+me5igewX88mUEK398ztWg0lYcpMm qM9XoYYXB7JfFwsVZsyQ7v5JLf7C+6IPqcsgg= 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=YvB3iCKfzsRo29xoyUN+pcGywxzI3xMUgq8vlfwS+vU=; b=SpHWC2h2TmBmvvNTlfuD5XLa+uaItMxUnn/QmMYxv/5l1X65AxNT1ZOEgKpEVevwB+ orbJOSUbNrNM7ptVfPHACz23MnCG+TYHK7urho5RpmGW4wAVcCBA3Y/W3OMWwP+y7x8n Ed2qmpOlCE2OqvF+6s0UnEEDfUSKlNGPwvnIXoHsGadd0VIaVycE6/4r6WWB+9PdC2e1 duOTuRAPfNIaaDml2ub7Hf/cS7pDPym5X/EP4cf56tUWo55S6QRqiwH0DsQXzjqh8Ebo yqFDB0XssYAA0n66GIrLVlJ7rkNKoyrMBGOJCySZscVyJuw7dGSh6SyNNCd2NmzRJjUi uw9g== X-Gm-Message-State: AA+aEWaDEh25gEzD8oFS/a0CV/CYaAeMzxRPKR9p78zG0K1HXAenqOOr gkDaM4/m3/Lg6ot3pUAzCInkIpRlPPIkVMcSI60syQ== X-Google-Smtp-Source: AFSGD/VD71d+NHycgCegKm6in6mgIC0A3+RXuQvUVKX+lmg5iPDLdZtza/uVTQUwTEo79ZF32rrv/b8qxrKL4ffanX0= X-Received: by 2002:a24:b50a:: with SMTP id v10mr1925271ite.21.1544758201105; Thu, 13 Dec 2018 19:30:01 -0800 (PST) MIME-Version: 1.0 References: <201812140106.wBE16Zgr058499@repo.freebsd.org> <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> In-Reply-To: <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> From: Kevin Bowling Date: Thu, 13 Dec 2018 20:29:50 -0700 Message-ID: Subject: Re: svn commit: r342057 - head/crypto/openssl/crypto/engine To: koobs@freebsd.org Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: BDC1988348 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.87 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.88)[-0.877,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 03:30:02 -0000 But why, you can trivially see the open() call with truss or more advanced tracers if you are debugging this On Thu, Dec 13, 2018 at 6:39 PM Kubilay Kocak wrote: > On 14/12/2018 12:06 pm, Jung-uk Kim wrote: > > Author: jkim > > Date: Fri Dec 14 01:06:34 2018 > > New Revision: 342057 > > URL: https://svnweb.freebsd.org/changeset/base/342057 > > > > Log: > > Do not complain when /dev/crypto does not exist. > > > > Now the new devcrypto engine is enabled since r342009, many users > started > > seeing "Could not open /dev/crypto: No such file or directory". > Disable > > the annoying error message as it is not very useful anyway. > > > > Note the patch was submitted upstream. > > > > https://github.com/openssl/openssl/pull/7896 > > > > Modified: > > head/crypto/openssl/crypto/engine/eng_devcrypto.c > > > > Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c > > > ============================================================================== > > --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 > 00:40:38 2018 (r342056) > > +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 > 01:06:34 2018 (r342057) > > @@ -24,6 +24,8 @@ > > > > #include "internal/engine.h" > > > > +/* #define ENGINE_DEVCRYPTO_DEBUG */ > > + > > #ifdef CRYPTO_ALGORITHM_MIN > > # define CHECK_BSD_STYLE_MACROS > > #endif > > @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() > > ENGINE *e = NULL; > > > > if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) { > > +#ifndef ENGINE_DEVCRYPTO_DEBUG > > + if (errno != ENOENT) > > +#endif > > fprintf(stderr, "Could not open /dev/crypto: %s\n", > strerror(errno)); > > return; > > } > > How trivially could devcrypto_debug be modified to be a runtime > configuration (say sysctl) setting? > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Fri Dec 14 03:55:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36626130DD77; Fri, 14 Dec 2018 03:55:10 +0000 (UTC) (envelope-from mjg@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) server-signature RSA-PSS (4096 bits) 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 CD7D4892D8; Fri, 14 Dec 2018 03:55:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0E8429C62; Fri, 14 Dec 2018 03:55:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE3t9eG047807; Fri, 14 Dec 2018 03:55:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE3t9aj047804; Fri, 14 Dec 2018 03:55:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201812140355.wBE3t9aj047804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Dec 2018 03:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342058 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 342058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CD7D4892D8 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.44 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.61)[-0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 03:55:10 -0000 Author: mjg Date: Fri Dec 14 03:55:08 2018 New Revision: 342058 URL: https://svnweb.freebsd.org/changeset/base/342058 Log: vfs: mostly depessimize NDINIT_ALL 1) filecaps_init was unnecesarily a function call 2) an asignment at the end was preventing tail calling of cap_rights_init Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_descrip.c head/sys/kern/vfs_lookup.c head/sys/sys/filedesc.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Dec 14 01:06:34 2018 (r342057) +++ head/sys/kern/kern_descrip.c Fri Dec 14 03:55:08 2018 (r342058) @@ -1465,17 +1465,6 @@ out: } /* - * Initialize filecaps structure. - */ -void -filecaps_init(struct filecaps *fcaps) -{ - - bzero(fcaps, sizeof(*fcaps)); - fcaps->fc_nioctls = -1; -} - -/* * Copy filecaps structure allocating memory for ioctls array if needed. * * The last parameter indicates whether the fdtable is locked. If it is not and Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Fri Dec 14 01:06:34 2018 (r342057) +++ head/sys/kern/vfs_lookup.c Fri Dec 14 03:55:08 2018 (r342058) @@ -1302,12 +1302,12 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long fl ndp->ni_dirp = namep; ndp->ni_dirfd = dirfd; ndp->ni_startdir = startdir; + filecaps_init(&ndp->ni_filecaps); + ndp->ni_cnd.cn_thread = td; if (rightsp != NULL) ndp->ni_rightsneeded = *rightsp; else cap_rights_init(&ndp->ni_rightsneeded); - filecaps_init(&ndp->ni_filecaps); - ndp->ni_cnd.cn_thread = td; } /* Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Fri Dec 14 01:06:34 2018 (r342057) +++ head/sys/sys/filedesc.h Fri Dec 14 03:55:08 2018 (r342058) @@ -154,7 +154,13 @@ enum { struct thread; -void filecaps_init(struct filecaps *fcaps); +static __inline void +filecaps_init(struct filecaps *fcaps) +{ + + bzero(fcaps, sizeof(*fcaps)); + fcaps->fc_nioctls = -1; +} bool filecaps_copy(const struct filecaps *src, struct filecaps *dst, bool locked); void filecaps_move(struct filecaps *src, struct filecaps *dst); From owner-svn-src-all@freebsd.org Fri Dec 14 07:57:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51F8813239FB; Fri, 14 Dec 2018 07:57:02 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 EB1F990D18; Fri, 14 Dec 2018 07:57:01 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEDE12C52E; Fri, 14 Dec 2018 07:57:01 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE7v1Um082622; Fri, 14 Dec 2018 07:57:01 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE7v1o8082618; Fri, 14 Dec 2018 07:57:01 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140757.wBE7v1o8082618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 07:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342059 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EB1F990D18 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.72)[-0.722,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 07:57:02 -0000 Author: kadesai Date: Fri Dec 14 07:57:00 2018 New Revision: 342059 URL: https://svnweb.freebsd.org/changeset/base/342059 Log: This patch will add support for next generation(SAS3.5) of Tri mode(SAS, SATA, NVMe) MegaRAID adapters. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 03:55:08 2018 (r342058) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 07:57:00 2018 (r342059) @@ -190,6 +190,12 @@ MRSAS_CTLR_ID device_table[] = { {0x1000, MRSAS_INTRUDER_24, 0xffff, 0xffff, "AVAGO Intruder_24 SAS Controller"}, {0x1000, MRSAS_CUTLASS_52, 0xffff, 0xffff, "AVAGO Cutlass_52 SAS Controller"}, {0x1000, MRSAS_CUTLASS_53, 0xffff, 0xffff, "AVAGO Cutlass_53 SAS Controller"}, + {0x1000, MRSAS_VENTURA, 0xffff, 0xffff, "AVAGO Ventura SAS Controller"}, + {0x1000, MRSAS_CRUSADER, 0xffff, 0xffff, "AVAGO Crusader SAS Controller"}, + {0x1000, MRSAS_HARPOON, 0xffff, 0xffff, "AVAGO Harpoon SAS Controller"}, + {0x1000, MRSAS_TOMCAT, 0xffff, 0xffff, "AVAGO Tomcat SAS Controller"}, + {0x1000, MRSAS_VENTURA_4PORT, 0xffff, 0xffff, "AVAGO Ventura_4Port SAS Controller"}, + {0x1000, MRSAS_CRUSADER_4PORT, 0xffff, 0xffff, "AVAGO Crusader_4Port SAS Controller"}, {0, 0, 0, 0, NULL} }; @@ -815,7 +821,7 @@ static int mrsas_attach(device_t dev) { struct mrsas_softc *sc = device_get_softc(dev); - uint32_t cmd, bar, error; + uint32_t cmd, error; memset(sc, 0, sizeof(struct mrsas_softc)); @@ -830,7 +836,14 @@ mrsas_attach(device_t dev) (sc->device_id == MRSAS_CUTLASS_52) || (sc->device_id == MRSAS_CUTLASS_53)) { sc->mrsas_gen3_ctrl = 1; - } + } else if ((sc->device_id == MRSAS_VENTURA) || + (sc->device_id == MRSAS_CRUSADER) || + (sc->device_id == MRSAS_HARPOON) || + (sc->device_id == MRSAS_TOMCAT) || + (sc->device_id == MRSAS_VENTURA_4PORT) || + (sc->device_id == MRSAS_CRUSADER_4PORT)) { + sc->is_ventura = true; + } mrsas_get_tunables(sc); @@ -845,9 +858,12 @@ mrsas_attach(device_t dev) cmd |= PCIM_CMD_BUSMASTEREN; pci_write_config(dev, PCIR_COMMAND, cmd, 2); - bar = pci_read_config(dev, MRSAS_PCI_BAR1, 4); + /* For Ventura system registers are mapped to BAR0 */ + if (sc->is_ventura) + sc->reg_res_id = PCIR_BAR(0); /* BAR0 offset */ + else + sc->reg_res_id = PCIR_BAR(1); /* BAR1 offset */ - sc->reg_res_id = MRSAS_PCI_BAR1;/* BAR1 offset */ if ((sc->reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &(sc->reg_res_id), RF_ACTIVE)) == NULL) { @@ -1648,7 +1664,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M */ if (threshold_reply_count >= THRESHOLD_REPLY_COUNT) { if (sc->msix_enable) { - if (sc->mrsas_gen3_ctrl) + if (sc->msix_combined) mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -1669,7 +1685,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M /* Clear response interrupt */ if (sc->msix_enable) { - if (sc->mrsas_gen3_ctrl) { + if (sc->msix_combined) { mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -2177,6 +2193,15 @@ mrsas_init_fw(struct mrsas_softc *sc) >> MR_MAX_REPLY_QUEUES_EXT_OFFSET_SHIFT) + 1; fw_msix_count = sc->msix_vectors; + if ((sc->mrsas_gen3_ctrl && (sc->msix_vectors > 8)) || + (sc->is_ventura && (sc->msix_vectors > 16))) + sc->msix_combined = true; + /* + * Save 1-15 reply post index + * address to local memory Index 0 + * is already saved from reg offset + * MPI2_REPLY_POST_HOST_INDEX_OFFSET + */ for (loop = 1; loop < MR_MAX_MSIX_REG_ARRAY; loop++) { sc->msix_reg_offset[loop] = @@ -2199,6 +2224,14 @@ mrsas_init_fw(struct mrsas_softc *sc) "Online CPU %d Current MSIX <%d>\n", fw_msix_count, mp_ncpus, sc->msix_vectors); } + /* + * MSI-X host index 0 is common for all adapter. + * It is used for all MPT based Adapters. + */ + if (sc->msix_combined) { + sc->msix_reg_offset[0] = + MPI2_SUP_REPLY_POST_HOST_INDEX_OFFSET; + } if (mrsas_init_adapter(sc) != SUCCESS) { device_printf(sc->mrsas_dev, "Adapter initialize Fail.\n"); return (1); @@ -2476,7 +2509,7 @@ mrsas_ioc_init(struct mrsas_softc *sc) init_frame->flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE; /* driver support Extended MSIX */ - if (sc->mrsas_gen3_ctrl) { + if (sc->mrsas_gen3_ctrl || sc->is_ventura) { init_frame->driver_operations. mfi_capabilities.support_additional_msix = 1; } @@ -3591,7 +3624,7 @@ mrsas_build_mptmfi_passthru(struct mrsas_softc *sc, st io_req = mpt_cmd->io_request; - if (sc->mrsas_gen3_ctrl) { + if (sc->mrsas_gen3_ctrl || sc->is_ventura) { pMpi25IeeeSgeChain64_t sgl_ptr_end = (pMpi25IeeeSgeChain64_t)&io_req->SGL; sgl_ptr_end += sc->max_sge_in_main_msg - 1; Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 03:55:08 2018 (r342058) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 07:57:00 2018 (r342059) @@ -84,9 +84,13 @@ __FBSDID("$FreeBSD$"); #define MRSAS_INTRUDER_24 0x00cf #define MRSAS_CUTLASS_52 0x0052 #define MRSAS_CUTLASS_53 0x0053 -#define MRSAS_PCI_BAR0 0x10 -#define MRSAS_PCI_BAR1 0x14 -#define MRSAS_PCI_BAR2 0x1C +/* Gen3.5 Conroller */ +#define MRSAS_VENTURA 0x0014 +#define MRSAS_CRUSADER 0x0015 +#define MRSAS_HARPOON 0x0016 +#define MRSAS_TOMCAT 0x0017 +#define MRSAS_VENTURA_4PORT 0x001B +#define MRSAS_CRUSADER_4PORT 0x001C /* * Firmware State Defines @@ -2912,6 +2916,9 @@ struct mrsas_softc { u_int32_t old_map_sz; u_int32_t new_map_sz; u_int32_t drv_map_sz; + + boolean_t is_ventura; + boolean_t msix_combined; /* Non dma-able memory. Driver local copy. */ MR_DRV_RAID_MAP_ALL *ld_drv_map[2]; Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 03:55:08 2018 (r342058) +++ head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 07:57:00 2018 (r342059) @@ -1103,7 +1103,8 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs * Because the NON RW cmds will now go via FW Queue * and not the Exception queue */ - io_request->IoFlags |= MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH; + if (sc->mrsas_gen3_ctrl || sc->is_ventura) + io_request->IoFlags |= MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH; cmd->request_desc->SCSIIO.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_FP_IO << @@ -1233,7 +1234,7 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, io_request = cmd->io_request; sgl_ptr = (pMpi25IeeeSgeChain64_t)&io_request->SGL; - if (sc->mrsas_gen3_ctrl) { + if (sc->mrsas_gen3_ctrl || sc->is_ventura) { pMpi25IeeeSgeChain64_t sgl_ptr_end = sgl_ptr; sgl_ptr_end += sc->max_sge_in_main_msg - 1; @@ -1244,7 +1245,7 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, sgl_ptr->Address = segs[i].ds_addr; sgl_ptr->Length = segs[i].ds_len; sgl_ptr->Flags = 0; - if (sc->mrsas_gen3_ctrl) { + if (sc->mrsas_gen3_ctrl || sc->is_ventura) { if (i == nseg - 1) sgl_ptr->Flags = IEEE_SGE_FLAGS_END_OF_LIST; } @@ -1254,7 +1255,7 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, (nseg > sc->max_sge_in_main_msg)) { pMpi25IeeeSgeChain64_t sg_chain; - if (sc->mrsas_gen3_ctrl) { + if (sc->mrsas_gen3_ctrl || sc->is_ventura) { if ((cmd->io_request->IoFlags & MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) != MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) cmd->io_request->ChainOffset = sc->chain_offset_io_request; @@ -1263,7 +1264,7 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, } else cmd->io_request->ChainOffset = sc->chain_offset_io_request; sg_chain = sgl_ptr; - if (sc->mrsas_gen3_ctrl) + if (sc->mrsas_gen3_ctrl || sc->is_ventura) sg_chain->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT; else sg_chain->Flags = (IEEE_SGE_FLAGS_CHAIN_ELEMENT | MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR); Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 03:55:08 2018 (r342058) +++ head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 07:57:00 2018 (r342059) @@ -773,8 +773,9 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in *pDevHandle = MR_PdDevHandleGet(pd, map); else { *pDevHandle = MR_PD_INVALID; - if ((raid->level >= 5) && ((!sc->mrsas_gen3_ctrl) || (sc->mrsas_gen3_ctrl && - raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) + if ((raid->level >= 5) && ((sc->device_id == MRSAS_TBOLT) || + (sc->mrsas_gen3_ctrl && + raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE; else if (raid->level == 1) { pd = MR_ArPdGet(arRef, physArm + 1, map); @@ -958,7 +959,7 @@ MR_BuildRaidContext(struct mrsas_softc *sc, struct IO_ pRAID_Context->timeoutValue = map->raidMap.fpPdIoTimeoutSec; if (sc->mrsas_gen3_ctrl) pRAID_Context->regLockFlags = (isRead) ? raid->regTypeReqOnRead : raid->regTypeReqOnWrite; - else + else if (sc->device_id == MRSAS_TBOLT) pRAID_Context->regLockFlags = (isRead) ? REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite; pRAID_Context->VirtualDiskTgtId = raid->targetId; pRAID_Context->regLockRowLBA = regStart; @@ -1478,8 +1479,9 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, *pDevHandle = MR_PdDevHandleGet(pd, map); else { *pDevHandle = MR_PD_INVALID; /* set dev handle as invalid. */ - if ((raid->level >= 5) && ((!sc->mrsas_gen3_ctrl) || (sc->mrsas_gen3_ctrl && - raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) + if ((raid->level >= 5) && ((sc->device_id == MRSAS_TBOLT) || + (sc->mrsas_gen3_ctrl && + raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE; else if (raid->level == 1) { /* Get Alternate Pd. */ From owner-svn-src-all@freebsd.org Fri Dec 14 07:59:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A89491323B59; Fri, 14 Dec 2018 07:59:10 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 56DD590EE2; Fri, 14 Dec 2018 07:59:10 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B8362C536; Fri, 14 Dec 2018 07:59:10 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE7xAMU082759; Fri, 14 Dec 2018 07:59:10 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE7x9cn082757; Fri, 14 Dec 2018 07:59:09 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140759.wBE7x9cn082757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 07:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342060 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 56DD590EE2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.818,0]; NEURAL_HAM_SHORT(-0.73)[-0.725,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 07:59:11 -0000 Author: kadesai Date: Fri Dec 14 07:59:09 2018 New Revision: 342060 URL: https://svnweb.freebsd.org/changeset/base/342060 Log: This patch will add support for new Dynamic RaidMap to have different sizes for different number of supported VDs for SAS3.5 MegaRAID adapters. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 07:57:00 2018 (r342059) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 07:59:09 2018 (r342060) @@ -1757,8 +1757,8 @@ mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_ static int mrsas_alloc_mem(struct mrsas_softc *sc) { - u_int32_t verbuf_size, io_req_size, reply_desc_size, sense_size, - chain_frame_size, evt_detail_size, count; + u_int32_t verbuf_size, io_req_size, reply_desc_size, sense_size, chain_frame_size, + evt_detail_size, count; /* * Allocate parent DMA tag @@ -2163,7 +2163,7 @@ mrsas_init_fw(struct mrsas_softc *sc) u_int32_t max_sectors_1; u_int32_t max_sectors_2; u_int32_t tmp_sectors; - u_int32_t scratch_pad_2; + u_int32_t scratch_pad_2, scratch_pad_3; int msix_enable = 0; int fw_msix_count = 0; @@ -2172,6 +2172,15 @@ mrsas_init_fw(struct mrsas_softc *sc) if (ret != SUCCESS) { return (ret); } + if (sc->is_ventura) { + scratch_pad_3 = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_scratch_pad_3)); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, "scratch_pad_3 0x%x\n", scratch_pad_3); +#endif + sc->maxRaidMapSize = ((scratch_pad_3 >> + MR_MAX_RAID_MAP_SIZE_OFFSET_SHIFT) & + MR_MAX_RAID_MAP_SIZE_MASK); + } /* MSI-x index 0- reply post host index register */ sc->msix_reg_offset[0] = MPI2_REPLY_POST_HOST_INDEX_OFFSET; /* Check if MSI-X is supported while in ready state */ @@ -3395,8 +3404,10 @@ dcmd_timeout: static void mrsas_update_ext_vd_details(struct mrsas_softc *sc) { + u_int32_t ventura_map_sz = 0; sc->max256vdSupport = - sc->ctrl_info->adapterOperations3.supportMaxExtLDs; + sc->ctrl_info->adapterOperations3.supportMaxExtLDs; + /* Below is additional check to address future FW enhancement */ if (sc->ctrl_info->max_lds > 64) sc->max256vdSupport = 1; @@ -3413,20 +3424,33 @@ mrsas_update_ext_vd_details(struct mrsas_softc *sc) sc->fw_supported_pd_count = MAX_PHYSICAL_DEVICES; } - sc->old_map_sz = sizeof(MR_FW_RAID_MAP) + - (sizeof(MR_LD_SPAN_MAP) * - (sc->fw_supported_vd_count - 1)); - sc->new_map_sz = sizeof(MR_FW_RAID_MAP_EXT); - sc->drv_map_sz = sizeof(MR_DRV_RAID_MAP) + - (sizeof(MR_LD_SPAN_MAP) * - (sc->drv_supported_vd_count - 1)); + if (sc->maxRaidMapSize) { + ventura_map_sz = sc->maxRaidMapSize * + MR_MIN_MAP_SIZE; + sc->current_map_sz = ventura_map_sz; + sc->max_map_sz = ventura_map_sz; + } else { + sc->old_map_sz = sizeof(MR_FW_RAID_MAP) + + (sizeof(MR_LD_SPAN_MAP) * (sc->fw_supported_vd_count - 1)); + sc->new_map_sz = sizeof(MR_FW_RAID_MAP_EXT); + sc->max_map_sz = max(sc->old_map_sz, sc->new_map_sz); + if (sc->max256vdSupport) + sc->current_map_sz = sc->new_map_sz; + else + sc->current_map_sz = sc->old_map_sz; + } - sc->max_map_sz = max(sc->old_map_sz, sc->new_map_sz); - - if (sc->max256vdSupport) - sc->current_map_sz = sc->new_map_sz; - else - sc->current_map_sz = sc->old_map_sz; + sc->drv_map_sz = sizeof(MR_DRV_RAID_MAP_ALL); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, "sc->maxRaidMapSize 0x%x \n", + sc->maxRaidMapSize); + device_printf(sc->mrsas_dev, + "new_map_sz = 0x%x, old_map_sz = 0x%x, " + "ventura_map_sz = 0x%x, current_map_sz = 0x%x " + "fusion->drv_map_sz =0x%x, size of driver raid map 0x%lx \n", + sc->new_map_sz, sc->old_map_sz, ventura_map_sz, + sc->current_map_sz, sc->drv_map_sz, sizeof(MR_DRV_RAID_MAP_ALL)); +#endif } /* Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 07:57:00 2018 (r342059) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 07:59:09 2018 (r342060) @@ -661,6 +661,7 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define MAX_RAIDMAP_ROW_SIZE (MAX_ROW_SIZE) #define MAX_LOGICAL_DRIVES 64 #define MAX_LOGICAL_DRIVES_EXT 256 +#define MAX_LOGICAL_DRIVES_DYN 512 #define MAX_RAIDMAP_LOGICAL_DRIVES (MAX_LOGICAL_DRIVES) #define MAX_RAIDMAP_VIEWS (MAX_LOGICAL_DRIVES) @@ -670,9 +671,11 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define MAX_ARRAYS_EXT 256 #define MAX_API_ARRAYS_EXT MAX_ARRAYS_EXT +#define MAX_API_ARRAYS_DYN 512 #define MAX_PHYSICAL_DEVICES 256 #define MAX_RAIDMAP_PHYSICAL_DEVICES (MAX_PHYSICAL_DEVICES) +#define MAX_RAIDMAP_PHYSICAL_DEVICES_DYN 512 #define MR_DCMD_LD_MAP_GET_INFO 0x0300e101 #define MR_DCMD_SYSTEM_PD_MAP_GET_INFO 0x0200e102 #define MR_DCMD_PD_MFI_TASK_MGMT 0x0200e100 @@ -889,9 +892,9 @@ typedef struct _MR_DRV_RAID_MAP { u_int16_t spanCount; u_int16_t reserve3; - MR_DEV_HANDLE_INFO devHndlInfo[MAX_RAIDMAP_PHYSICAL_DEVICES]; - u_int8_t ldTgtIdToLd[MAX_LOGICAL_DRIVES_EXT]; - MR_ARRAY_INFO arMapInfo[MAX_API_ARRAYS_EXT]; + MR_DEV_HANDLE_INFO devHndlInfo[MAX_RAIDMAP_PHYSICAL_DEVICES_DYN]; + u_int16_t ldTgtIdToLd[MAX_LOGICAL_DRIVES_DYN]; + MR_ARRAY_INFO arMapInfo[MAX_API_ARRAYS_DYN]; MR_LD_SPAN_MAP ldSpanMap[1]; } MR_DRV_RAID_MAP; @@ -905,7 +908,7 @@ typedef struct _MR_DRV_RAID_MAP { typedef struct _MR_DRV_RAID_MAP_ALL { MR_DRV_RAID_MAP raidMap; - MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_EXT - 1]; + MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_DYN - 1]; } MR_DRV_RAID_MAP_ALL; #pragma pack() @@ -988,6 +991,82 @@ typedef struct _MR_LD_TARGET_SYNC { u_int16_t seqNum; } MR_LD_TARGET_SYNC; + +/* + * RAID Map descriptor Types. + * Each element should uniquely idetify one data structure in the RAID map + */ +typedef enum _MR_RAID_MAP_DESC_TYPE { + RAID_MAP_DESC_TYPE_DEVHDL_INFO = 0, /* MR_DEV_HANDLE_INFO data */ + RAID_MAP_DESC_TYPE_TGTID_INFO = 1, /* target to Ld num Index map */ + RAID_MAP_DESC_TYPE_ARRAY_INFO = 2, /* MR_ARRAY_INFO data */ + RAID_MAP_DESC_TYPE_SPAN_INFO = 3, /* MR_LD_SPAN_MAP data */ + RAID_MAP_DESC_TYPE_COUNT, +} MR_RAID_MAP_DESC_TYPE; + +/* + * This table defines the offset, size and num elements of each descriptor + * type in the RAID Map buffer + */ +typedef struct _MR_RAID_MAP_DESC_TABLE { + /* Raid map descriptor type */ + u_int32_t raidMapDescType; + /* Offset into the RAID map buffer where descriptor data is saved */ + u_int32_t raidMapDescOffset; + /* total size of the descriptor buffer */ + u_int32_t raidMapDescBufferSize; + /* Number of elements contained in the descriptor buffer */ + u_int32_t raidMapDescElements; +} MR_RAID_MAP_DESC_TABLE; + +/* + * Dynamic Raid Map Structure. + */ +typedef struct _MR_FW_RAID_MAP_DYNAMIC { + u_int32_t raidMapSize; + u_int32_t descTableOffset; + u_int32_t descTableSize; + u_int32_t descTableNumElements; + u_int64_t PCIThresholdBandwidth; + u_int32_t reserved2[3]; + + u_int8_t fpPdIoTimeoutSec; + u_int8_t reserved3[3]; + u_int32_t rmwFPSeqNum; + u_int16_t ldCount; + u_int16_t arCount; + u_int16_t spanCount; + u_int16_t reserved4[3]; + + /* + * The below structure of pointers is only to be used by the driver. + * This is added in the API to reduce the amount of code changes needed in + * the driver to support dynamic RAID map. + * Firmware should not update these pointers while preparing the raid map + */ + union { + struct { + MR_DEV_HANDLE_INFO *devHndlInfo; + u_int16_t *ldTgtIdToLd; + MR_ARRAY_INFO *arMapInfo; + MR_LD_SPAN_MAP *ldSpanMap; + } ptrStruct; + u_int64_t ptrStructureSize[RAID_MAP_DESC_TYPE_COUNT]; + } RaidMapDescPtrs; + + /* + * RAID Map descriptor table defines the layout of data in the RAID Map. + * The size of the descriptor table itself could change. + */ + + /* Variable Size descriptor Table. */ + MR_RAID_MAP_DESC_TABLE raidMapDescTable[RAID_MAP_DESC_TYPE_COUNT]; + /* Variable Size buffer containing all data */ + u_int32_t raidMapDescData[1]; + +} MR_FW_RAID_MAP_DYNAMIC; + + #define IEEE_SGE_FLAGS_ADDR_MASK (0x03) #define IEEE_SGE_FLAGS_SYSTEM_ADDR (0x00) #define IEEE_SGE_FLAGS_IOCDDR_ADDR (0x01) @@ -1014,6 +1093,11 @@ struct mrsas_tmp_dcmd { bus_addr_t tmp_dcmd_phys_addr; }; +#define MR_MAX_RAID_MAP_SIZE_OFFSET_SHIFT 16 +#define MR_MAX_RAID_MAP_SIZE_MASK 0x1FF +#define MR_MIN_MAP_SIZE 0x10000 + + /******************************************************************* * Register set, included legacy controllers 1068 and 1078, * structure extended for 1078 registers @@ -1053,8 +1137,9 @@ typedef struct _mrsas_register_set { u_int32_t outbound_scratch_pad; /* 00B0h */ u_int32_t outbound_scratch_pad_2; /* 00B4h */ + u_int32_t outbound_scratch_pad_3; /* 00B8h */ - u_int32_t reserved_4[2]; /* 00B8h */ + u_int32_t reserved_4; /* 00BCh */ u_int32_t inbound_low_queue_port; /* 00C0h */ @@ -2919,6 +3004,7 @@ struct mrsas_softc { boolean_t is_ventura; boolean_t msix_combined; + u_int16_t maxRaidMapSize; /* Non dma-able memory. Driver local copy. */ MR_DRV_RAID_MAP_ALL *ld_drv_map[2]; Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 07:57:00 2018 (r342059) +++ head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 07:59:09 2018 (r342060) @@ -67,7 +67,7 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, u_int64_t stripRow, u_int16_t stripRef, struct IO_REQUEST_INFO *io_info, RAID_CONTEXT * pRAID_Context, MR_DRV_RAID_MAP_ALL * map); -u_int16_t MR_TargetIdToLdGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map); +u_int8_t MR_TargetIdToLdGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL *map); u_int32_t MR_LdBlockSizeGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map); u_int16_t MR_GetLDTgtId(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); u_int16_t @@ -103,7 +103,7 @@ static MR_SPAN_BLOCK_INFO * MR_LdSpanInfoGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); -void MR_PopulateDrvRaidMap(struct mrsas_softc *sc); +static int MR_PopulateDrvRaidMap(struct mrsas_softc *sc); /* @@ -237,7 +237,7 @@ MR_LdSpanInfoGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * m return &map->raidMap.ldSpanMap[ld].spanBlock[0]; } -u_int16_t +u_int8_t MR_TargetIdToLdGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map) { return map->raidMap.ldTgtIdToLd[ldTgtId]; @@ -266,26 +266,203 @@ MR_LdBlockSizeGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_A } /* + * This function will Populate Driver Map using Dynamic firmware raid map + */ +static int +MR_PopulateDrvRaidMapVentura(struct mrsas_softc *sc) +{ + unsigned int i, j; + u_int16_t ld_count; + + MR_FW_RAID_MAP_DYNAMIC *fw_map_dyn; + MR_RAID_MAP_DESC_TABLE *desc_table; + MR_DRV_RAID_MAP_ALL *drv_map = sc->ld_drv_map[(sc->map_id & 1)]; + MR_DRV_RAID_MAP *pDrvRaidMap = &drv_map->raidMap; + void *raid_map_data = NULL; + + fw_map_dyn = (MR_FW_RAID_MAP_DYNAMIC *) sc->raidmap_mem[(sc->map_id & 1)]; + + if (fw_map_dyn == NULL) { + device_printf(sc->mrsas_dev, + "from %s %d map0 %p map1 %p map size %d \n", __func__, __LINE__, + sc->raidmap_mem[0], sc->raidmap_mem[1], sc->maxRaidMapSize); + return 1; + } +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, + " raidMapSize 0x%x, descTableOffset 0x%x, " + " descTableSize 0x%x, descTableNumElements 0x%x \n", + fw_map_dyn->raidMapSize, fw_map_dyn->descTableOffset, + fw_map_dyn->descTableSize, fw_map_dyn->descTableNumElements); +#endif + desc_table = (MR_RAID_MAP_DESC_TABLE *) ((char *)fw_map_dyn + + fw_map_dyn->descTableOffset); + if (desc_table != fw_map_dyn->raidMapDescTable) { + device_printf(sc->mrsas_dev, + "offsets of desc table are not matching returning " + " FW raid map has been changed: desc %p original %p\n", + desc_table, fw_map_dyn->raidMapDescTable); + } + memset(drv_map, 0, sc->drv_map_sz); + ld_count = fw_map_dyn->ldCount; + pDrvRaidMap->ldCount = ld_count; + pDrvRaidMap->fpPdIoTimeoutSec = fw_map_dyn->fpPdIoTimeoutSec; + pDrvRaidMap->totalSize = sizeof(MR_DRV_RAID_MAP_ALL); + /* point to actual data starting point */ + raid_map_data = (char *)fw_map_dyn + + fw_map_dyn->descTableOffset + fw_map_dyn->descTableSize; + + for (i = 0; i < fw_map_dyn->descTableNumElements; ++i) { + if (!desc_table) { + device_printf(sc->mrsas_dev, + "desc table is null, coming out %p \n", desc_table); + return 1; + } +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, "raid_map_data %p \n", raid_map_data); + device_printf(sc->mrsas_dev, + "desc table %p \n", desc_table); + device_printf(sc->mrsas_dev, + "raidmap type %d, raidmapOffset 0x%x, " + " raid map number of elements 0%x, raidmapsize 0x%x\n", + desc_table->raidMapDescType, desc_table->raidMapDescOffset, + desc_table->raidMapDescElements, desc_table->raidMapDescBufferSize); +#endif + switch (desc_table->raidMapDescType) { + case RAID_MAP_DESC_TYPE_DEVHDL_INFO: + fw_map_dyn->RaidMapDescPtrs.ptrStruct.devHndlInfo = (MR_DEV_HANDLE_INFO *) + ((char *)raid_map_data + desc_table->raidMapDescOffset); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, + "devHndlInfo address %p\n", fw_map_dyn->RaidMapDescPtrs.ptrStruct.devHndlInfo); +#endif + memcpy(pDrvRaidMap->devHndlInfo, fw_map_dyn->RaidMapDescPtrs.ptrStruct.devHndlInfo, + sizeof(MR_DEV_HANDLE_INFO) * desc_table->raidMapDescElements); + break; + case RAID_MAP_DESC_TYPE_TGTID_INFO: + fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldTgtIdToLd = (u_int16_t *) + ((char *)raid_map_data + desc_table->raidMapDescOffset); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, + "ldTgtIdToLd address %p\n", fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldTgtIdToLd); +#endif + for (j = 0; j < desc_table->raidMapDescElements; j++) { + pDrvRaidMap->ldTgtIdToLd[j] = fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldTgtIdToLd[j]; +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, + " %d drv ldTgtIdToLd %d\n", j, pDrvRaidMap->ldTgtIdToLd[j]); +#endif + } + break; + case RAID_MAP_DESC_TYPE_ARRAY_INFO: + fw_map_dyn->RaidMapDescPtrs.ptrStruct.arMapInfo = (MR_ARRAY_INFO *) ((char *)raid_map_data + + desc_table->raidMapDescOffset); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, + "arMapInfo address %p\n", fw_map_dyn->RaidMapDescPtrs.ptrStruct.arMapInfo); +#endif + memcpy(pDrvRaidMap->arMapInfo, fw_map_dyn->RaidMapDescPtrs.ptrStruct.arMapInfo, + sizeof(MR_ARRAY_INFO) * desc_table->raidMapDescElements); + break; + case RAID_MAP_DESC_TYPE_SPAN_INFO: + fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldSpanMap = (MR_LD_SPAN_MAP *) ((char *)raid_map_data + + desc_table->raidMapDescOffset); + memcpy(pDrvRaidMap->ldSpanMap, fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldSpanMap, + sizeof(MR_LD_SPAN_MAP) * desc_table->raidMapDescElements); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, + "ldSpanMap address %p\n", fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldSpanMap); + device_printf(sc->mrsas_dev, + "MR_LD_SPAN_MAP size 0x%lx\n", sizeof(MR_LD_SPAN_MAP)); + for (j = 0; j < ld_count; j++) { + printf("mrsas(%d) : fw_map_dyn->ldSpanMap[%d].ldRaid.targetId 0x%x " + "fw_map_dyn->ldSpanMap[%d].ldRaid.seqNum 0x%x size 0x%x\n", + j, j, fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldSpanMap[j].ldRaid.targetId, j, + fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldSpanMap[j].ldRaid.seqNum, + (u_int32_t)fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldSpanMap[j].ldRaid.rowSize); + printf("mrsas(%d) : pDrvRaidMap->ldSpanMap[%d].ldRaid.targetId 0x%x " + "pDrvRaidMap->ldSpanMap[%d].ldRaid.seqNum 0x%x size 0x%x\n", + j, j, pDrvRaidMap->ldSpanMap[j].ldRaid.targetId, j, + pDrvRaidMap->ldSpanMap[j].ldRaid.seqNum, + (u_int32_t)pDrvRaidMap->ldSpanMap[j].ldRaid.rowSize); + printf("mrsas : drv raid map all %p raid map %p LD RAID MAP %p/%p\n", + drv_map, pDrvRaidMap, &fw_map_dyn->RaidMapDescPtrs.ptrStruct.ldSpanMap[j].ldRaid, + &pDrvRaidMap->ldSpanMap[j].ldRaid); + } +#endif + break; + default: + device_printf(sc->mrsas_dev, + "wrong number of desctableElements %d\n", + fw_map_dyn->descTableNumElements); + } + ++desc_table; + } + return 0; +} + +/* * This function will Populate Driver Map using firmware raid map */ -void +static int MR_PopulateDrvRaidMap(struct mrsas_softc *sc) { MR_FW_RAID_MAP_ALL *fw_map_old = NULL; + MR_FW_RAID_MAP_EXT *fw_map_ext; MR_FW_RAID_MAP *pFwRaidMap = NULL; unsigned int i; + u_int16_t ld_count; MR_DRV_RAID_MAP_ALL *drv_map = sc->ld_drv_map[(sc->map_id & 1)]; MR_DRV_RAID_MAP *pDrvRaidMap = &drv_map->raidMap; - if (sc->max256vdSupport) { - memcpy(sc->ld_drv_map[sc->map_id & 1], - sc->raidmap_mem[sc->map_id & 1], - sc->current_map_sz); - /* - * New Raid map will not set totalSize, so keep expected - * value for legacy code in ValidateMapInfo - */ + if (sc->maxRaidMapSize) { + return MR_PopulateDrvRaidMapVentura(sc); + } else if (sc->max256vdSupport) { + fw_map_ext = (MR_FW_RAID_MAP_EXT *) sc->raidmap_mem[(sc->map_id & 1)]; + ld_count = (u_int16_t)(fw_map_ext->ldCount); + if (ld_count > MAX_LOGICAL_DRIVES_EXT) { + device_printf(sc->mrsas_dev, + "mrsas: LD count exposed in RAID map in not valid\n"); + return 1; + } +#if VD_EXT_DEBUG + for (i = 0; i < ld_count; i++) { + printf("mrsas : Index 0x%x Target Id 0x%x Seq Num 0x%x Size 0/%lx\n", + i, fw_map_ext->ldSpanMap[i].ldRaid.targetId, + fw_map_ext->ldSpanMap[i].ldRaid.seqNum, + fw_map_ext->ldSpanMap[i].ldRaid.size); + } +#endif + memset(drv_map, 0, sc->drv_map_sz); + pDrvRaidMap->ldCount = ld_count; + pDrvRaidMap->fpPdIoTimeoutSec = fw_map_ext->fpPdIoTimeoutSec; + for (i = 0; i < (MAX_LOGICAL_DRIVES_EXT); i++) { + pDrvRaidMap->ldTgtIdToLd[i] = (u_int16_t)fw_map_ext->ldTgtIdToLd[i]; + } + memcpy(pDrvRaidMap->ldSpanMap, fw_map_ext->ldSpanMap, sizeof(MR_LD_SPAN_MAP) * ld_count); +#if VD_EXT_DEBUG + for (i = 0; i < ld_count; i++) { + printf("mrsas(%d) : fw_map_ext->ldSpanMap[%d].ldRaid.targetId 0x%x " + "fw_map_ext->ldSpanMap[%d].ldRaid.seqNum 0x%x size 0x%x\n", + i, i, fw_map_ext->ldSpanMap[i].ldRaid.targetId, i, + fw_map_ext->ldSpanMap[i].ldRaid.seqNum, + (u_int32_t)fw_map_ext->ldSpanMap[i].ldRaid.rowSize); + printf("mrsas(%d) : pDrvRaidMap->ldSpanMap[%d].ldRaid.targetId 0x%x" + "pDrvRaidMap->ldSpanMap[%d].ldRaid.seqNum 0x%x size 0x%x\n", i, i, + pDrvRaidMap->ldSpanMap[i].ldRaid.targetId, i, + pDrvRaidMap->ldSpanMap[i].ldRaid.seqNum, + (u_int32_t)pDrvRaidMap->ldSpanMap[i].ldRaid.rowSize); + printf("mrsas : drv raid map all %p raid map %p LD RAID MAP %p/%p\n", + drv_map, pDrvRaidMap, &fw_map_ext->ldSpanMap[i].ldRaid, + &pDrvRaidMap->ldSpanMap[i].ldRaid); + } +#endif + memcpy(pDrvRaidMap->arMapInfo, fw_map_ext->arMapInfo, + sizeof(MR_ARRAY_INFO) * MAX_API_ARRAYS_EXT); + memcpy(pDrvRaidMap->devHndlInfo, fw_map_ext->devHndlInfo, + sizeof(MR_DEV_HANDLE_INFO) * MAX_RAIDMAP_PHYSICAL_DEVICES); + pDrvRaidMap->totalSize = sizeof(MR_FW_RAID_MAP_EXT); } else { fw_map_old = (MR_FW_RAID_MAP_ALL *) sc->raidmap_mem[(sc->map_id & 1)]; @@ -339,6 +516,7 @@ MR_PopulateDrvRaidMap(struct mrsas_softc *sc) sizeof(MR_DEV_HANDLE_INFO) * MAX_RAIDMAP_PHYSICAL_DEVICES); } + return 0; } /* @@ -354,7 +532,8 @@ MR_ValidateMapInfo(struct mrsas_softc *sc) if (!sc) { return 1; } - MR_PopulateDrvRaidMap(sc); + if (MR_PopulateDrvRaidMap(sc)) + return 0; MR_DRV_RAID_MAP_ALL *drv_map = sc->ld_drv_map[(sc->map_id & 1)]; MR_DRV_RAID_MAP *pDrvRaidMap = &drv_map->raidMap; @@ -365,7 +544,9 @@ MR_ValidateMapInfo(struct mrsas_softc *sc) pDrvRaidMap = &drv_map->raidMap; PLD_SPAN_INFO ldSpanInfo = (PLD_SPAN_INFO) & sc->log_to_span; - if (sc->max256vdSupport) + if (sc->maxRaidMapSize) + expected_map_size = sizeof(MR_DRV_RAID_MAP_ALL); + else if (sc->max256vdSupport) expected_map_size = sizeof(MR_FW_RAID_MAP_EXT); else expected_map_size = From owner-svn-src-all@freebsd.org Fri Dec 14 08:00:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C11541323DB2; Fri, 14 Dec 2018 08:00:02 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 7107491055; Fri, 14 Dec 2018 08:00:02 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 641432C53C; Fri, 14 Dec 2018 08:00:02 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE802uf082895; Fri, 14 Dec 2018 08:00:02 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE801vi082890; Fri, 14 Dec 2018 08:00:01 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140800.wBE801vi082890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342061 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7107491055 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.818,0]; NEURAL_HAM_SHORT(-0.73)[-0.725,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:00:03 -0000 Author: kadesai Date: Fri Dec 14 08:00:01 2018 New Revision: 342061 URL: https://svnweb.freebsd.org/changeset/base/342061 Log: This patch will add support for divert bitmap in RAID map. Divert bitmap is supported for SAS3.5 adapters only. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 07:59:09 2018 (r342060) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:00:01 2018 (r342061) @@ -1589,8 +1589,8 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M cmd_mpt = sc->mpt_cmd_list[smid - 1]; scsi_io_req = (MRSAS_RAID_SCSI_IO_REQUEST *) cmd_mpt->io_request; - status = scsi_io_req->RaidContext.status; - extStatus = scsi_io_req->RaidContext.exStatus; + status = scsi_io_req->RaidContext.raid_context.status; + extStatus = scsi_io_req->RaidContext.raid_context.exStatus; switch (scsi_io_req->Function) { case MPI2_FUNCTION_SCSI_TASK_MGMT: @@ -1614,8 +1614,8 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M case MRSAS_MPI2_FUNCTION_LD_IO_REQUEST: mrsas_map_mpt_cmd_status(cmd_mpt, status, extStatus); mrsas_cmd_done(sc, cmd_mpt); - scsi_io_req->RaidContext.status = 0; - scsi_io_req->RaidContext.exStatus = 0; + scsi_io_req->RaidContext.raid_context.status = 0; + scsi_io_req->RaidContext.raid_context.exStatus = 0; mrsas_atomic_dec(&sc->fw_outstanding); break; case MRSAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST: /* MFI command */ @@ -3214,7 +3214,7 @@ mrsas_complete_outstanding_ioctls(struct mrsas_softc * if (cmd_mfi->sync_cmd && cmd_mfi->frame->hdr.cmd != MFI_CMD_ABORT) { for (MSIxIndex = 0; MSIxIndex < count; MSIxIndex++) mrsas_complete_mptmfi_passthru(sc, cmd_mfi, - cmd_mpt->io_request->RaidContext.status); + cmd_mpt->io_request->RaidContext.raid_context.status); } } } Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 07:59:09 2018 (r342060) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:00:01 2018 (r342061) @@ -179,7 +179,54 @@ typedef struct _RAID_CONTEXT { u_int8_t resvd2; /* 0x1F */ } RAID_CONTEXT; +/* + * Raid Context structure which describes ventura MegaRAID specific IO Paramenters + * This resides at offset 0x60 where the SGL normally starts in MPT IO Frames + */ +typedef struct _RAID_CONTEXT_G35 { + u_int16_t Type:4; + u_int16_t nseg:4; + u_int16_t resvd0:8; + u_int16_t timeoutValue; + union { + struct { + u_int16_t reserved:1; + u_int16_t sld:1; + u_int16_t c2f:1; + u_int16_t fwn:1; + u_int16_t sqn:1; + u_int16_t sbs:1; + u_int16_t rw:1; + u_int16_t log:1; + u_int16_t cpuSel:4; + u_int16_t setDivert:4; + } bits; + u_int16_t s; + } routingFlags; + u_int16_t VirtualDiskTgtId; + u_int64_t regLockRowLBA; + u_int32_t regLockLength; + union { + u_int16_t nextLMId; + u_int16_t peerSMID; + } smid; + u_int8_t exStatus; + u_int8_t status; + u_int8_t RAIDFlags; + u_int8_t spanArm; + u_int16_t configSeqNum; + u_int16_t numSGE:12; + u_int16_t reserved:3; + u_int16_t streamDetected:1; + u_int8_t resvd2[2]; +} RAID_CONTEXT_G35; +typedef union _RAID_CONTEXT_UNION { + RAID_CONTEXT raid_context; + RAID_CONTEXT_G35 raid_context_g35; +} RAID_CONTEXT_UNION, *PRAID_CONTEXT_UNION; + + /************************************************************************* * MPI2 Defines ************************************************************************/ @@ -439,7 +486,7 @@ typedef struct _MPI2_RAID_SCSI_IO_REQUEST { u_int8_t LUN[8]; /* 0x34 */ u_int32_t Control; /* 0x3C */ MPI2_SCSI_IO_CDB_UNION CDB; /* 0x40 */ - RAID_CONTEXT RaidContext; /* 0x60 */ + RAID_CONTEXT_UNION RaidContext; /* 0x60 */ MPI2_SGE_IO_UNION SGL; /* 0x80 */ } MRSAS_RAID_SCSI_IO_REQUEST, MPI2_POINTER PTR_MRSAS_RAID_SCSI_IO_REQUEST, MRSASRaidSCSIIORequest_t, MPI2_POINTER pMRSASRaidSCSIIORequest_t; @@ -754,7 +801,8 @@ typedef struct _MR_LD_RAID { u_int32_t fpReadAcrossStripe:1; u_int32_t fpNonRWCapable:1; u_int32_t tmCapable:1; - u_int32_t reserved4:6; + u_int32_t fpCacheBypassCapable:1; + u_int32_t reserved4:5; } capability; u_int32_t reserved6; u_int64_t size; @@ -1448,6 +1496,7 @@ enum MR_EVT_ARGS { #define MR_RL_FLAGS_GRANT_DESTINATION_CPU1 0x10 #define MR_RL_FLAGS_GRANT_DESTINATION_CUDA 0x80 #define MR_RL_FLAGS_SEQ_NUM_ENABLE 0x8 +#define MR_RL_WRITE_BACK_MODE 0x01 /* * T10 PI defines @@ -1469,8 +1518,12 @@ enum MR_EVT_ARGS { typedef enum MR_RAID_FLAGS_IO_SUB_TYPE { MR_RAID_FLAGS_IO_SUB_TYPE_NONE = 0, MR_RAID_FLAGS_IO_SUB_TYPE_SYSTEM_PD = 1, -} MR_RAID_FLAGS_IO_SUB_TYPE; - + MR_RAID_FLAGS_IO_SUB_TYPE_RMW_DATA = 2, + MR_RAID_FLAGS_IO_SUB_TYPE_RMW_P = 3, + MR_RAID_FLAGS_IO_SUB_TYPE_RMW_Q = 4, + MR_RAID_FLAGS_IO_SUB_TYPE_CACHE_BYPASS = 6, + MR_RAID_FLAGS_IO_SUB_TYPE_LDIO_BW_LIMIT = 7 +} MR_RAID_FLAGS_IO_SUB_TYPE; /* * Request descriptor types */ Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 07:59:09 2018 (r342060) +++ head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:00:01 2018 (r342061) @@ -765,9 +765,9 @@ mrsas_build_ldio_rw(struct mrsas_softc *sc, struct mrs device_id = ccb_h->target_id; io_request = cmd->io_request; - io_request->RaidContext.VirtualDiskTgtId = device_id; - io_request->RaidContext.status = 0; - io_request->RaidContext.exStatus = 0; + io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id; + io_request->RaidContext.raid_context.status = 0; + io_request->RaidContext.raid_context.exStatus = 0; /* just the cdb len, other flags zero, and ORed-in later for FP */ io_request->IoFlags = csio->cdb_len; @@ -783,12 +783,16 @@ mrsas_build_ldio_rw(struct mrsas_softc *sc, struct mrs "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); return (FAIL); } - /* - * numSGE store lower 8 bit of sge_count. numSGEExt store - * higher 8 bit of sge_count - */ - io_request->RaidContext.numSGE = cmd->sge_count; - io_request->RaidContext.numSGEExt = (uint8_t)(cmd->sge_count >> 8); + if (sc->is_ventura) + io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; + else { + /* + * numSGE store lower 8 bit of sge_count. numSGEExt store + * higher 8 bit of sge_count + */ + io_request->RaidContext.raid_context.numSGE = cmd->sge_count; + io_request->RaidContext.raid_context.numSGEExt = (uint8_t)(cmd->sge_count >> 8); + } } else { device_printf(sc->mrsas_dev, "Data map/load failed.\n"); @@ -898,10 +902,10 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp ld = MR_TargetIdToLdGet(device_id, map_ptr); if ((ld >= MAX_LOGICAL_DRIVES_EXT) || (!sc->fast_path_io)) { - io_request->RaidContext.regLockFlags = 0; + io_request->RaidContext.raid_context.regLockFlags = 0; fp_possible = 0; } else { - if (MR_BuildRaidContext(sc, &io_info, &io_request->RaidContext, map_ptr)) + if (MR_BuildRaidContext(sc, &io_info, &io_request->RaidContext.raid_context, map_ptr)) fp_possible = io_info.fpOkForIo; } @@ -921,16 +925,26 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp (MPI2_REQ_DESCRIPT_FLAGS_FP_IO << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); if (sc->mrsas_gen3_ctrl) { - if (io_request->RaidContext.regLockFlags == REGION_TYPE_UNUSED) + if (io_request->RaidContext.raid_context.regLockFlags == REGION_TYPE_UNUSED) cmd->request_desc->SCSIIO.RequestFlags = (MRSAS_REQ_DESCRIPT_FLAGS_NO_LOCK << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); - io_request->RaidContext.Type = MPI2_TYPE_CUDA; - io_request->RaidContext.nseg = 0x1; + io_request->RaidContext.raid_context.Type = MPI2_TYPE_CUDA; + io_request->RaidContext.raid_context.nseg = 0x1; io_request->IoFlags |= MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH; - io_request->RaidContext.regLockFlags |= + io_request->RaidContext.raid_context.regLockFlags |= (MR_RL_FLAGS_GRANT_DESTINATION_CUDA | MR_RL_FLAGS_SEQ_NUM_ENABLE); + } else if (sc->is_ventura) { + io_request->RaidContext.raid_context_g35.Type = MPI2_TYPE_CUDA; + io_request->RaidContext.raid_context_g35.nseg = 0x1; + io_request->RaidContext.raid_context_g35.routingFlags.bits.sqn = 1; + io_request->IoFlags |= MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH; + if (io_request->RaidContext.raid_context_g35.routingFlags.bits.sld) { + io_request->RaidContext.raid_context_g35.RAIDFlags = + (MR_RAID_FLAGS_IO_SUB_TYPE_CACHE_BYPASS + << MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT); + } } if ((sc->load_balance_info[device_id].loadBalanceFlag) && (io_info.isRead)) { @@ -939,26 +953,34 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp &sc->load_balance_info[device_id], &io_info); cmd->load_balance = MRSAS_LOAD_BALANCE_FLAG; cmd->pd_r1_lb = io_info.pd_after_lb; + if (sc->is_ventura) + io_request->RaidContext.raid_context_g35.spanArm = io_info.span_arm; + else + io_request->RaidContext.raid_context.spanArm = io_info.span_arm; } else cmd->load_balance = 0; cmd->request_desc->SCSIIO.DevHandle = io_info.devHandle; io_request->DevHandle = io_info.devHandle; } else { /* Not FP IO */ - io_request->RaidContext.timeoutValue = map_ptr->raidMap.fpPdIoTimeoutSec; + io_request->RaidContext.raid_context.timeoutValue = map_ptr->raidMap.fpPdIoTimeoutSec; cmd->request_desc->SCSIIO.RequestFlags = (MRSAS_REQ_DESCRIPT_FLAGS_LD_IO << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); if (sc->mrsas_gen3_ctrl) { - if (io_request->RaidContext.regLockFlags == REGION_TYPE_UNUSED) + if (io_request->RaidContext.raid_context.regLockFlags == REGION_TYPE_UNUSED) cmd->request_desc->SCSIIO.RequestFlags = (MRSAS_REQ_DESCRIPT_FLAGS_NO_LOCK << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); - io_request->RaidContext.Type = MPI2_TYPE_CUDA; - io_request->RaidContext.regLockFlags |= + io_request->RaidContext.raid_context.Type = MPI2_TYPE_CUDA; + io_request->RaidContext.raid_context.regLockFlags |= (MR_RL_FLAGS_GRANT_DESTINATION_CPU0 | MR_RL_FLAGS_SEQ_NUM_ENABLE); - io_request->RaidContext.nseg = 0x1; + io_request->RaidContext.raid_context.nseg = 0x1; + } else if (sc->is_ventura) { + io_request->RaidContext.raid_context_g35.Type = MPI2_TYPE_CUDA; + io_request->RaidContext.raid_context_g35.routingFlags.bits.sqn = 1; + io_request->RaidContext.raid_context_g35.nseg = 0x1; } io_request->Function = MRSAS_MPI2_FUNCTION_LD_IO_REQUEST; io_request->DevHandle = device_id; @@ -1001,7 +1023,7 @@ mrsas_build_ldio_nonrw(struct mrsas_softc *sc, struct (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); - io_request->RaidContext.VirtualDiskTgtId = device_id; + io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id; io_request->LUN[1] = ccb_h->target_lun & 0xF; io_request->DataLength = cmd->length; @@ -1011,12 +1033,16 @@ mrsas_build_ldio_nonrw(struct mrsas_softc *sc, struct "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); return (1); } - /* - * numSGE store lower 8 bit of sge_count. numSGEExt store - * higher 8 bit of sge_count - */ - io_request->RaidContext.numSGE = cmd->sge_count; - io_request->RaidContext.numSGEExt = (uint8_t)(cmd->sge_count >> 8); + if (sc->is_ventura) + io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; + else { + /* + * numSGE store lower 8 bit of sge_count. numSGEExt store + * higher 8 bit of sge_count + */ + io_request->RaidContext.raid_context.numSGE = cmd->sge_count; + io_request->RaidContext.raid_context.numSGEExt = (uint8_t)(cmd->sge_count >> 8); + } } else { device_printf(sc->mrsas_dev, "Data map/load failed.\n"); return (1); @@ -1046,11 +1072,11 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs io_request = cmd->io_request; device_id = ccb_h->target_id; local_map_ptr = sc->ld_drv_map[(sc->map_id & 1)]; - io_request->RaidContext.RAIDFlags = MR_RAID_FLAGS_IO_SUB_TYPE_SYSTEM_PD + io_request->RaidContext.raid_context.RAIDFlags = MR_RAID_FLAGS_IO_SUB_TYPE_SYSTEM_PD << MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT; - io_request->RaidContext.regLockFlags = 0; - io_request->RaidContext.regLockRowLBA = 0; - io_request->RaidContext.regLockLength = 0; + io_request->RaidContext.raid_context.regLockFlags = 0; + io_request->RaidContext.raid_context.regLockRowLBA = 0; + io_request->RaidContext.raid_context.regLockLength = 0; /* If FW supports PD sequence number */ if (sc->use_seqnum_jbod_fp && @@ -1058,25 +1084,28 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs //printf("Using Drv seq num\n"); pd_sync = (void *)sc->jbodmap_mem[(sc->pd_seq_map_id - 1) & 1]; cmd->tmCapable = pd_sync->seq[device_id].capability.tmCapable; - io_request->RaidContext.VirtualDiskTgtId = device_id + 255; - io_request->RaidContext.configSeqNum = pd_sync->seq[device_id].seqNum; + io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id + 255; + io_request->RaidContext.raid_context.configSeqNum = pd_sync->seq[device_id].seqNum; io_request->DevHandle = pd_sync->seq[device_id].devHandle; - io_request->RaidContext.regLockFlags |= - (MR_RL_FLAGS_SEQ_NUM_ENABLE | MR_RL_FLAGS_GRANT_DESTINATION_CUDA); - io_request->RaidContext.Type = MPI2_TYPE_CUDA; - io_request->RaidContext.nseg = 0x1; + if (sc->is_ventura) + io_request->RaidContext.raid_context_g35.routingFlags.bits.sqn = 1; + else + io_request->RaidContext.raid_context.regLockFlags |= + (MR_RL_FLAGS_SEQ_NUM_ENABLE | MR_RL_FLAGS_GRANT_DESTINATION_CUDA); + io_request->RaidContext.raid_context.Type = MPI2_TYPE_CUDA; + io_request->RaidContext.raid_context.nseg = 0x1; } else if (sc->fast_path_io) { //printf("Using LD RAID map\n"); - io_request->RaidContext.VirtualDiskTgtId = device_id; - io_request->RaidContext.configSeqNum = 0; + io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id; + io_request->RaidContext.raid_context.configSeqNum = 0; local_map_ptr = sc->ld_drv_map[(sc->map_id & 1)]; io_request->DevHandle = local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl; } else { //printf("Using FW PATH\n"); /* Want to send all IO via FW path */ - io_request->RaidContext.VirtualDiskTgtId = device_id; - io_request->RaidContext.configSeqNum = 0; + io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id; + io_request->RaidContext.raid_context.configSeqNum = 0; io_request->DevHandle = 0xFFFF; } @@ -1090,13 +1119,13 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs cmd->request_desc->SCSIIO.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); - io_request->RaidContext.timeoutValue = + io_request->RaidContext.raid_context.timeoutValue = local_map_ptr->raidMap.fpPdIoTimeoutSec; - io_request->RaidContext.VirtualDiskTgtId = device_id; + io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id; } else { /* system pd fast path */ io_request->Function = MPI2_FUNCTION_SCSI_IO_REQUEST; - io_request->RaidContext.timeoutValue = local_map_ptr->raidMap.fpPdIoTimeoutSec; + io_request->RaidContext.raid_context.timeoutValue = local_map_ptr->raidMap.fpPdIoTimeoutSec; /* * NOTE - For system pd RW cmds only IoFlags will be FAST_PATH @@ -1120,12 +1149,16 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); return (1); } - /* - * numSGE store lower 8 bit of sge_count. numSGEExt store - * higher 8 bit of sge_count - */ - io_request->RaidContext.numSGE = cmd->sge_count; - io_request->RaidContext.numSGEExt = (uint8_t)(cmd->sge_count >> 8); + if (sc->is_ventura) + io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; + else { + /* + * numSGE store lower 8 bit of sge_count. numSGEExt store + * higher 8 bit of sge_count + */ + io_request->RaidContext.raid_context.numSGE = cmd->sge_count; + io_request->RaidContext.raid_context.numSGEExt = (uint8_t)(cmd->sge_count >> 8); + } } else { device_printf(sc->mrsas_dev, "Data map/load failed.\n"); return (1); Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 07:59:09 2018 (r342060) +++ head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 08:00:01 2018 (r342061) @@ -966,8 +966,14 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in } *pdBlock += stripRef + MR_LdSpanPtrGet(ld, span, map)->startBlk; - pRAID_Context->spanArm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; - io_info->span_arm = pRAID_Context->spanArm; + if (sc->is_ventura) { + ((RAID_CONTEXT_G35 *) pRAID_Context)->spanArm = + (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; + io_info->span_arm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; + } else { + pRAID_Context->spanArm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; + io_info->span_arm = pRAID_Context->spanArm; + } return retval; } @@ -1160,6 +1166,15 @@ MR_BuildRaidContext(struct mrsas_softc *sc, struct IO_ /* If IO on an invalid Pd, then FP is not possible */ if (io_info->devHandle == MR_PD_INVALID) io_info->fpOkForIo = FALSE; + /* + * if FP possible, set the SLUD bit in regLockFlags for + * ventura + */ + else if ((sc->is_ventura) && !isRead && + (raid->writeMode == MR_RL_WRITE_BACK_MODE) && (raid->level <= 1) && + raid->capability.fpCacheBypassCapable) { + ((RAID_CONTEXT_G35 *) pRAID_Context)->routingFlags.bits.sld = 1; + } return retval; } else if (isRead) { for (stripIdx = 0; stripIdx < num_strips; stripIdx++) { @@ -1674,8 +1689,14 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, } *pdBlock += stripRef + MR_LdSpanPtrGet(ld, span, map)->startBlk; - pRAID_Context->spanArm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; - io_info->span_arm = pRAID_Context->spanArm; + if (sc->is_ventura) { + ((RAID_CONTEXT_G35 *) pRAID_Context)->spanArm = + (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; + io_info->span_arm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; + } else { + pRAID_Context->spanArm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm; + io_info->span_arm = pRAID_Context->spanArm; + } return retval; } From owner-svn-src-all@freebsd.org Fri Dec 14 08:00:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2A621323EDD; Fri, 14 Dec 2018 08:00:46 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 980EA91205; Fri, 14 Dec 2018 08:00:46 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87F842C552; Fri, 14 Dec 2018 08:00:46 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE80kW6085958; Fri, 14 Dec 2018 08:00:46 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE80kig085955; Fri, 14 Dec 2018 08:00:46 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140800.wBE80kig085955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342062 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 980EA91205 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.825,0]; NEURAL_HAM_SHORT(-0.72)[-0.719,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:00:47 -0000 Author: kadesai Date: Fri Dec 14 08:00:45 2018 New Revision: 342062 URL: https://svnweb.freebsd.org/changeset/base/342062 Log: This patch will add new interface to support more than 256 JBODs. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:00:01 2018 (r342061) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:00:45 2018 (r342062) @@ -2272,6 +2272,9 @@ mrsas_init_fw(struct mrsas_softc *sc) if (sc->use_seqnum_jbod_fp) device_printf(sc->mrsas_dev, "FW supports JBOD Map \n"); + if (sc->support_morethan256jbod) + device_printf(sc->mrsas_dev, "FW supports JBOD Map Ext \n"); + if (mrsas_setup_raidmap(sc) != SUCCESS) { device_printf(sc->mrsas_dev, "Error: RAID map setup FAILED !!! " "There seems to be some problem in the controller\n" @@ -3381,6 +3384,9 @@ mrsas_get_ctrl_info(struct mrsas_softc *sc) sc->use_seqnum_jbod_fp = sc->ctrl_info->adapterOperations3.useSeqNumJbodFP; + sc->support_morethan256jbod = + sc->ctrl_info->adapterOperations4.supportPdMapTargetId; + sc->disableOnlineCtrlReset = sc->ctrl_info->properties.OnOffProperties.disableOnlineCtrlReset; Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:00:01 2018 (r342061) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:00:45 2018 (r342062) @@ -1023,7 +1023,8 @@ struct MR_PD_CFG_SEQ { u_int8_t tmCapable:1; u_int8_t reserved:7; } capability; - u_int8_t reserved[3]; + u_int8_t reserved; + u_int16_t pdTargetId; } __packed; struct MR_PD_CFG_SEQ_NUM_SYNC { @@ -2197,7 +2198,21 @@ struct mrsas_ctrl_info { u_int32_t reserved:7; } adapterOperations3; - u_int8_t pad[0x800 - 0x7EC]; /* 0x7EC */ + u_int8_t pad_cpld[16]; + + struct { + u_int16_t ctrlInfoExtSupported:1; + u_int16_t supportIbuttonLess:1; + u_int16_t supportedEncAlgo:1; + u_int16_t supportEncryptedMfc:1; + u_int16_t imageUploadSupported:1; + u_int16_t supportSESCtrlInMultipathCfg:1; + u_int16_t supportPdMapTargetId:1; + u_int16_t FWSwapsBBUVPDInfo:1; + u_int16_t reserved:8; + } adapterOperations4; + + u_int8_t pad[0x800 - 0x7FE]; /* 0x7FE */ } __packed; /* @@ -3042,6 +3057,8 @@ struct mrsas_softc { u_int8_t mrsas_gen3_ctrl; u_int8_t secure_jbod_support; u_int8_t use_seqnum_jbod_fp; + /* FW suport for more than 256 PD/JBOD */ + u_int32_t support_morethan256jbod; u_int8_t max256vdSupport; u_int16_t fw_supported_vd_count; u_int16_t fw_supported_pd_count; Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:00:01 2018 (r342061) +++ head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:00:45 2018 (r342062) @@ -1084,7 +1084,13 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs //printf("Using Drv seq num\n"); pd_sync = (void *)sc->jbodmap_mem[(sc->pd_seq_map_id - 1) & 1]; cmd->tmCapable = pd_sync->seq[device_id].capability.tmCapable; - io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id + 255; + /* More than 256 PD/JBOD support for Ventura */ + if (sc->support_morethan256jbod) + io_request->RaidContext.raid_context.VirtualDiskTgtId = + pd_sync->seq[device_id].pdTargetId; + else + io_request->RaidContext.raid_context.VirtualDiskTgtId = + device_id + 255; io_request->RaidContext.raid_context.configSeqNum = pd_sync->seq[device_id].seqNum; io_request->DevHandle = pd_sync->seq[device_id].devHandle; if (sc->is_ventura) From owner-svn-src-all@freebsd.org Fri Dec 14 08:01:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81849132417E; Fri, 14 Dec 2018 08:01:51 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 23D4191552; Fri, 14 Dec 2018 08:01:51 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FBE42C597; Fri, 14 Dec 2018 08:01:51 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE81o6Z086045; Fri, 14 Dec 2018 08:01:50 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE81o1H086042; Fri, 14 Dec 2018 08:01:50 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140801.wBE81o1H086042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:01:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342063 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 23D4191552 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.72)[-0.722,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:01:51 -0000 Author: kadesai Date: Fri Dec 14 08:01:49 2018 New Revision: 342063 URL: https://svnweb.freebsd.org/changeset/base/342063 Log: Detect sequential Write IOs and pass the hint that it is part of sequential stream to help HBA Firmware do the Full Stripe Writes. For read IOs on certain RAID volumes like Read Ahead volumes,this will help driver to send it to Firmware even if the IOs can potentially be sent to hardware directly (called fast path) bypassing firmware. Design: 8 streams are maintained per RAID volume as per the combined firmware/driver design. When there is no stream detected the LRU stream is used for next potential stream and LRU/MRU map is updated to make this as MRU stream. Every time a stream is detected the MRU map is updated to make the current stream as MRU stream. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:00:45 2018 (r342062) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:01:49 2018 (r342063) @@ -442,7 +442,10 @@ mrsas_setup_sysctl(struct mrsas_softc *sc) OID_AUTO, "block_sync_cache", CTLFLAG_RW, &sc->block_sync_cache, 0, "Block SYNC CACHE at driver. "); - + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "stream detection", CTLFLAG_RW, + &sc->drv_stream_detection, 0, + "Disable/Enable Stream detection. "); } /* @@ -463,6 +466,7 @@ mrsas_get_tunables(struct mrsas_softc *sc) sc->reset_count = 0; sc->reset_in_progress = 0; sc->block_sync_cache = 0; + sc->drv_stream_detection = 1; /* * Grab the global variables. @@ -882,6 +886,7 @@ mrsas_attach(device_t dev) mtx_init(&sc->mpt_cmd_pool_lock, "mrsas_mpt_cmd_pool_lock", NULL, MTX_DEF); mtx_init(&sc->mfi_cmd_pool_lock, "mrsas_mfi_cmd_pool_lock", NULL, MTX_DEF); mtx_init(&sc->raidmap_lock, "mrsas_raidmap_lock", NULL, MTX_DEF); + mtx_init(&sc->stream_lock, "mrsas_stream_lock", NULL, MTX_DEF); /* Intialize linked list */ TAILQ_INIT(&sc->mrsas_mpt_cmd_list_head); @@ -948,6 +953,7 @@ attach_fail_fw: mtx_destroy(&sc->mpt_cmd_pool_lock); mtx_destroy(&sc->mfi_cmd_pool_lock); mtx_destroy(&sc->raidmap_lock); + mtx_destroy(&sc->stream_lock); attach_fail: if (sc->reg_res) { bus_release_resource(sc->mrsas_dev, SYS_RES_MEMORY, @@ -1070,6 +1076,14 @@ mrsas_detach(device_t dev) mrsas_flush_cache(sc); mrsas_shutdown_ctlr(sc, MR_DCMD_CTRL_SHUTDOWN); mrsas_disable_intr(sc); + + if (sc->is_ventura && sc->streamDetectByLD) { + for (i = 0; i < MAX_LOGICAL_DRIVES_EXT; ++i) + free(sc->streamDetectByLD[i], M_MRSAS); + free(sc->streamDetectByLD, M_MRSAS); + sc->streamDetectByLD = NULL; + } + mrsas_cam_detach(sc); mrsas_teardown_intr(sc); mrsas_free_mem(sc); @@ -1081,6 +1095,7 @@ mrsas_detach(device_t dev) mtx_destroy(&sc->mpt_cmd_pool_lock); mtx_destroy(&sc->mfi_cmd_pool_lock); mtx_destroy(&sc->raidmap_lock); + mtx_destroy(&sc->stream_lock); /* Wait for all the semaphores to be released */ while (sema_value(&sc->ioctl_count_sema) != MRSAS_MAX_IOCTL_CMDS) @@ -2166,6 +2181,7 @@ mrsas_init_fw(struct mrsas_softc *sc) u_int32_t scratch_pad_2, scratch_pad_3; int msix_enable = 0; int fw_msix_count = 0; + int i, j; /* Make sure Firmware is ready */ ret = mrsas_transition_to_ready(sc, ocr); @@ -2294,6 +2310,30 @@ mrsas_init_fw(struct mrsas_softc *sc) device_printf(sc->mrsas_dev, "Get LD lsit failed.\n"); return (1); } + + if (sc->is_ventura && sc->drv_stream_detection) { + sc->streamDetectByLD = malloc(sizeof(PTR_LD_STREAM_DETECT) * + MAX_LOGICAL_DRIVES_EXT, M_MRSAS, M_NOWAIT); + if (!sc->streamDetectByLD) { + device_printf(sc->mrsas_dev, + "unable to allocate stream detection for pool of LDs\n"); + return (1); + } + for (i = 0; i < MAX_LOGICAL_DRIVES_EXT; ++i) { + sc->streamDetectByLD[i] = malloc(sizeof(LD_STREAM_DETECT), M_MRSAS, M_NOWAIT); + if (!sc->streamDetectByLD[i]) { + device_printf(sc->mrsas_dev, "unable to allocate stream detect by LD\n"); + for (j = 0; j < i; ++j) + free(sc->streamDetectByLD[j], M_MRSAS); + free(sc->streamDetectByLD, M_MRSAS); + sc->streamDetectByLD = NULL; + return (1); + } + memset(sc->streamDetectByLD[i], 0, sizeof(LD_STREAM_DETECT)); + sc->streamDetectByLD[i]->mruBitMap = MR_STREAM_BITMAP; + } + } + /* * Compute the max allowed sectors per IO: The controller info has * two limits on max sectors. Driver should use the minimum of these @@ -3132,6 +3172,13 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese mrsas_sync_map_info(sc); megasas_setup_jbod_map(sc); + + if (sc->is_ventura && sc->streamDetectByLD) { + for (j = 0; j < MAX_LOGICAL_DRIVES_EXT; ++j) { + memset(sc->streamDetectByLD[i], 0, sizeof(LD_STREAM_DETECT)); + sc->streamDetectByLD[i]->mruBitMap = MR_STREAM_BITMAP; + } + } mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_enable_intr(sc); Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:00:45 2018 (r342062) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:01:49 2018 (r342063) @@ -121,6 +121,12 @@ __FBSDID("$FreeBSD$"); #define THRESHOLD_REPLY_COUNT 50 #define MAX_MSIX_COUNT 128 +#define MAX_STREAMS_TRACKED 8 +#define MR_STREAM_BITMAP 0x76543210 +#define BITS_PER_INDEX_STREAM 4 /* number of bits per index in U32 TrackStream */ +#define STREAM_MASK ((1 << BITS_PER_INDEX_STREAM) - 1) +#define ZERO_LAST_STREAM 0x0fffffff + /* * Boolean types */ @@ -791,7 +797,8 @@ typedef struct _MR_SPAN_BLOCK_INFO { typedef struct _MR_LD_RAID { struct { u_int32_t fpCapable:1; - u_int32_t reserved5:3; + u_int32_t raCapable:1; + u_int32_t reserved5:2; u_int32_t ldPiMode:4; u_int32_t pdPiMode:4; u_int32_t encryptionType:8; @@ -1011,6 +1018,7 @@ struct IO_REQUEST_INFO { /* span[7:5], arm[4:0] */ u_int8_t span_arm; u_int8_t pd_after_lb; + boolean_t raCapable; }; /* @@ -1033,7 +1041,30 @@ struct MR_PD_CFG_SEQ_NUM_SYNC { struct MR_PD_CFG_SEQ seq[1]; } __packed; +typedef struct _STREAM_DETECT { + u_int64_t nextSeqLBA; + struct megasas_cmd_fusion *first_cmd_fusion; + struct megasas_cmd_fusion *last_cmd_fusion; + u_int32_t countCmdsInStream; + u_int16_t numSGEsInGroup; + u_int8_t isRead; + u_int8_t groupDepth; + boolean_t groupFlush; + u_int8_t reserved[7]; +} STREAM_DETECT, *PTR_STREAM_DETECT; +typedef struct _LD_STREAM_DETECT { + boolean_t writeBack; + boolean_t FPWriteEnabled; + boolean_t membersSSDs; + boolean_t fpCacheBypassCapable; + u_int32_t mruBitMap; + volatile long iosToFware; + volatile long writeBytesOutstanding; + STREAM_DETECT streamTrack[MAX_STREAMS_TRACKED]; +} LD_STREAM_DETECT, *PTR_LD_STREAM_DETECT; + + typedef struct _MR_LD_TARGET_SYNC { u_int8_t targetId; u_int8_t reserved; @@ -2950,6 +2981,7 @@ struct mrsas_softc { struct mtx mfi_cmd_pool_lock; struct mtx raidmap_lock; struct mtx aen_lock; + struct mtx stream_lock; struct selinfo mrsas_select; uint32_t mrsas_aen_triggered; uint32_t mrsas_poll_waiting; @@ -3002,6 +3034,7 @@ struct mrsas_softc { u_int32_t reset_in_progress; u_int32_t reset_count; u_int32_t block_sync_cache; + u_int32_t drv_stream_detection; u_int8_t fw_sync_cache_support; mrsas_atomic_t target_reset_outstanding; #define MRSAS_MAX_TM_TARGETS (MRSAS_MAX_PD + MRSAS_MAX_LD_IDS) @@ -3078,6 +3111,7 @@ struct mrsas_softc { /* Non dma-able memory. Driver local copy. */ MR_DRV_RAID_MAP_ALL *ld_drv_map[2]; + PTR_LD_STREAM_DETECT *streamDetectByLD; }; /* Compatibility shims for different OS versions */ Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:00:45 2018 (r342062) +++ head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:01:49 2018 (r342063) @@ -801,6 +801,70 @@ mrsas_build_ldio_rw(struct mrsas_softc *sc, struct mrs return (0); } +/* stream detection on read and and write IOs */ +static void +mrsas_stream_detect(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd, + struct IO_REQUEST_INFO *io_info) +{ + u_int32_t device_id = io_info->ldTgtId; + LD_STREAM_DETECT *current_ld_SD = sc->streamDetectByLD[device_id]; + u_int32_t *track_stream = ¤t_ld_SD->mruBitMap; + u_int32_t streamNum, shiftedValues, unshiftedValues; + u_int32_t indexValueMask, shiftedValuesMask; + int i; + boolean_t isReadAhead = false; + STREAM_DETECT *current_SD; + + /* find possible stream */ + for (i = 0; i < MAX_STREAMS_TRACKED; ++i) { + streamNum = (*track_stream >> (i * BITS_PER_INDEX_STREAM)) & + STREAM_MASK; + current_SD = ¤t_ld_SD->streamTrack[streamNum]; + /* + * if we found a stream, update the raid context and + * also update the mruBitMap + */ + if (current_SD->nextSeqLBA && + io_info->ldStartBlock >= current_SD->nextSeqLBA && + (io_info->ldStartBlock <= (current_SD->nextSeqLBA+32)) && + (current_SD->isRead == io_info->isRead)) { + if (io_info->ldStartBlock != current_SD->nextSeqLBA && + (!io_info->isRead || !isReadAhead)) { + /* + * Once the API availible we need to change this. + * At this point we are not allowing any gap + */ + continue; + } + cmd->io_request->RaidContext.raid_context_g35.streamDetected = TRUE; + current_SD->nextSeqLBA = io_info->ldStartBlock + io_info->numBlocks; + /* + * update the mruBitMap LRU + */ + shiftedValuesMask = (1 << i * BITS_PER_INDEX_STREAM) - 1 ; + shiftedValues = ((*track_stream & shiftedValuesMask) << + BITS_PER_INDEX_STREAM); + indexValueMask = STREAM_MASK << i * BITS_PER_INDEX_STREAM; + unshiftedValues = (*track_stream) & + (~(shiftedValuesMask | indexValueMask)); + *track_stream = + (unshiftedValues | shiftedValues | streamNum); + return; + } + } + /* + * if we did not find any stream, create a new one from the least recently used + */ + streamNum = (*track_stream >> + ((MAX_STREAMS_TRACKED - 1) * BITS_PER_INDEX_STREAM)) & STREAM_MASK; + current_SD = ¤t_ld_SD->streamTrack[streamNum]; + current_SD->isRead = io_info->isRead; + current_SD->nextSeqLBA = io_info->ldStartBlock + io_info->numBlocks; + *track_stream = (((*track_stream & ZERO_LAST_STREAM) << 4) | streamNum); + return; +} + + /* * mrsas_setup_io: Set up data including Fast Path I/O * input: Adapter instance soft state @@ -916,6 +980,15 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp cmd->request_desc->SCSIIO.MSIxIndex = sc->msix_vectors ? smp_processor_id() % sc->msix_vectors : 0; + if (sc->is_ventura && sc->streamDetectByLD) { + mtx_lock(&sc->stream_lock); + mrsas_stream_detect(sc, cmd, &io_info); + mtx_unlock(&sc->stream_lock); + /* In ventura if stream detected for a read and it is read ahead capable make this IO as LDIO */ + if (io_request->RaidContext.raid_context_g35.streamDetected && + io_info.isRead && io_info.raCapable) + fp_possible = FALSE; + } if (fp_possible) { mrsas_set_pd_lba(io_request, csio->cdb_len, &io_info, ccb, map_ptr, Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 08:00:45 2018 (r342062) +++ head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 08:01:49 2018 (r342063) @@ -1014,6 +1014,9 @@ MR_BuildRaidContext(struct mrsas_softc *sc, struct IO_ ld = MR_TargetIdToLdGet(ldTgtId, map); raid = MR_LdRaidGet(ld, map); + /* check read ahead bit */ + io_info->raCapable = raid->capability.raCapable; + if (raid->rowDataSize == 0) { if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0) return FALSE; From owner-svn-src-all@freebsd.org Fri Dec 14 08:02:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA884132424A; Fri, 14 Dec 2018 08:02:45 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 6FB2691746; Fri, 14 Dec 2018 08:02:45 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30A7A2C6DE; Fri, 14 Dec 2018 08:02:45 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE82jl3087650; Fri, 14 Dec 2018 08:02:45 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE82ip3087646; Fri, 14 Dec 2018 08:02:44 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140802.wBE82ip3087646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342064 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6FB2691746 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.81)[-0.814,0]; NEURAL_HAM_SHORT(-0.73)[-0.728,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:02:46 -0000 Author: kadesai Date: Fri Dec 14 08:02:44 2018 New Revision: 342064 URL: https://svnweb.freebsd.org/changeset/base/342064 Log: To improve RAID 1/10 Write performance, OS drivers need to issue the required Write IOs as Fast Path IOs (after the appropriate checks allowing Fast Path to be used) to the appropriate physical drives (translated from the OS logical IO) and wait for all Write IOs to complete. Design: A write IO on RAID volume will be examined if it can be sent in Fast Path based on IO size and starting LBA and ending LBA falling on to a Physical Drive boundary. If the underlying RAID volume is a RAID 1/10, driver issues two fast path write IOs one for each corresponding physical drive after computing the corresponding start LBA for each physical drive. Both write IOs will have the same payload and are posted to HW such that replies land in the same reply queue. If there are no resources available for sending two IOs, driver will send the original IO from upper layer to RAID volume through the Firmware. When both IOs are completed by HW, the resources will be released and SCSI IO completion handler will be called. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:01:49 2018 (r342063) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:02:44 2018 (r342064) @@ -141,9 +141,6 @@ void mrsas_free_ctlr_info_cmd(struct mrsas_softc *sc); void mrsas_complete_mptmfi_passthru(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd, u_int8_t status); -void -mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_int8_t status, - u_int8_t extStatus); struct mrsas_mfi_cmd *mrsas_get_mfi_cmd(struct mrsas_softc *sc); MRSAS_REQUEST_DESCRIPTOR_UNION *mrsas_build_mpt_cmd @@ -167,7 +164,13 @@ mrsas_get_request_desc(struct mrsas_softc *sc, extern int mrsas_bus_scan_sim(struct mrsas_softc *sc, struct cam_sim *sim); static int mrsas_alloc_evt_log_info_cmd(struct mrsas_softc *sc); static void mrsas_free_evt_log_info_cmd(struct mrsas_softc *sc); +void mrsas_release_mpt_cmd(struct mrsas_mpt_cmd *cmd); +void mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, + union ccb *ccb_ptr, u_int8_t status, u_int8_t extStatus, + u_int32_t data_length, u_int8_t *sense); + + SYSCTL_NODE(_hw, OID_AUTO, mrsas, CTLFLAG_RD, 0, "MRSAS Driver Parameters"); /* @@ -1125,7 +1128,7 @@ void mrsas_free_mem(struct mrsas_softc *sc) { int i; - u_int32_t max_cmd; + u_int32_t max_fw_cmds; struct mrsas_mfi_cmd *mfi_cmd; struct mrsas_mpt_cmd *mpt_cmd; @@ -1227,9 +1230,9 @@ mrsas_free_mem(struct mrsas_softc *sc) /* * Free MPT internal command list */ - max_cmd = sc->max_fw_cmds; + max_fw_cmds = sc->max_fw_cmds; if (sc->mpt_cmd_list) { - for (i = 0; i < max_cmd; i++) { + for (i = 0; i < max_fw_cmds; i++) { mpt_cmd = sc->mpt_cmd_list[i]; bus_dmamap_destroy(sc->data_tag, mpt_cmd->data_dmamap); free(sc->mpt_cmd_list[i], M_MRSAS); @@ -1569,14 +1572,14 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M Mpi2ReplyDescriptorsUnion_t *desc; MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR *reply_desc; MRSAS_RAID_SCSI_IO_REQUEST *scsi_io_req; - struct mrsas_mpt_cmd *cmd_mpt; + struct mrsas_mpt_cmd *cmd_mpt, *r1_cmd = NULL; struct mrsas_mfi_cmd *cmd_mfi; - u_int8_t reply_descript_type; + u_int8_t reply_descript_type, *sense; u_int16_t smid, num_completed; u_int8_t status, extStatus; union desc_value desc_val; PLD_LOAD_BALANCE_INFO lbinfo; - u_int32_t device_id; + u_int32_t device_id, data_length; int threshold_reply_count = 0; #if TM_DEBUG MR_TASK_MANAGE_REQUEST *mr_tm_req; @@ -1606,6 +1609,8 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M status = scsi_io_req->RaidContext.raid_context.status; extStatus = scsi_io_req->RaidContext.raid_context.exStatus; + sense = cmd_mpt->sense; + data_length = scsi_io_req->DataLength; switch (scsi_io_req->Function) { case MPI2_FUNCTION_SCSI_TASK_MGMT: @@ -1621,16 +1626,45 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M case MPI2_FUNCTION_SCSI_IO_REQUEST: /* Fast Path IO. */ device_id = cmd_mpt->ccb_ptr->ccb_h.target_id; lbinfo = &sc->load_balance_info[device_id]; + /* R1 load balancing for READ */ if (cmd_mpt->load_balance == MRSAS_LOAD_BALANCE_FLAG) { mrsas_atomic_dec(&lbinfo->scsi_pending_cmds[cmd_mpt->pd_r1_lb]); cmd_mpt->load_balance &= ~MRSAS_LOAD_BALANCE_FLAG; } /* Fall thru and complete IO */ case MRSAS_MPI2_FUNCTION_LD_IO_REQUEST: - mrsas_map_mpt_cmd_status(cmd_mpt, status, extStatus); - mrsas_cmd_done(sc, cmd_mpt); - scsi_io_req->RaidContext.raid_context.status = 0; - scsi_io_req->RaidContext.raid_context.exStatus = 0; + if (cmd_mpt->r1_alt_dev_handle == MR_DEVHANDLE_INVALID) { + mrsas_map_mpt_cmd_status(cmd_mpt, cmd_mpt->ccb_ptr, status, + extStatus, data_length, sense); + mrsas_cmd_done(sc, cmd_mpt); + } else { + /* + * If the peer Raid 1/10 fast path failed, + * mark IO as failed to the scsi layer. + * Overwrite the current status by the failed status + * and make sure that if any command fails, + * driver returns fail status to CAM. + */ + cmd_mpt->cmd_completed = 1; + r1_cmd = cmd_mpt->peer_cmd; + if (r1_cmd->cmd_completed) { + if (r1_cmd->io_request->RaidContext.raid_context.status != MFI_STAT_OK) { + status = r1_cmd->io_request->RaidContext.raid_context.status; + extStatus = r1_cmd->io_request->RaidContext.raid_context.exStatus; + data_length = r1_cmd->io_request->DataLength; + sense = r1_cmd->sense; + } + r1_cmd->ccb_ptr = NULL; + if (r1_cmd->callout_owner) { + callout_stop(&r1_cmd->cm_callout); + r1_cmd->callout_owner = false; + } + mrsas_release_mpt_cmd(r1_cmd); + mrsas_map_mpt_cmd_status(cmd_mpt, cmd_mpt->ccb_ptr, status, + extStatus, data_length, sense); + mrsas_cmd_done(sc, cmd_mpt); + } + } mrsas_atomic_dec(&sc->fw_outstanding); break; case MRSAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST: /* MFI command */ @@ -1723,40 +1757,41 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M * CCB. */ void -mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_int8_t status, u_int8_t extStatus) +mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, union ccb *ccb_ptr, u_int8_t status, + u_int8_t extStatus, u_int32_t data_length, u_int8_t *sense) { struct mrsas_softc *sc = cmd->sc; u_int8_t *sense_data; switch (status) { case MFI_STAT_OK: - cmd->ccb_ptr->ccb_h.status = CAM_REQ_CMP; + ccb_ptr->ccb_h.status = CAM_REQ_CMP; break; case MFI_STAT_SCSI_IO_FAILED: case MFI_STAT_SCSI_DONE_WITH_ERROR: - cmd->ccb_ptr->ccb_h.status = CAM_SCSI_STATUS_ERROR; - sense_data = (u_int8_t *)&cmd->ccb_ptr->csio.sense_data; + ccb_ptr->ccb_h.status = CAM_SCSI_STATUS_ERROR; + sense_data = (u_int8_t *)&ccb_ptr->csio.sense_data; if (sense_data) { /* For now just copy 18 bytes back */ - memcpy(sense_data, cmd->sense, 18); - cmd->ccb_ptr->csio.sense_len = 18; - cmd->ccb_ptr->ccb_h.status |= CAM_AUTOSNS_VALID; + memcpy(sense_data, sense, 18); + ccb_ptr->csio.sense_len = 18; + ccb_ptr->ccb_h.status |= CAM_AUTOSNS_VALID; } break; case MFI_STAT_LD_OFFLINE: case MFI_STAT_DEVICE_NOT_FOUND: - if (cmd->ccb_ptr->ccb_h.target_lun) - cmd->ccb_ptr->ccb_h.status |= CAM_LUN_INVALID; + if (ccb_ptr->ccb_h.target_lun) + ccb_ptr->ccb_h.status |= CAM_LUN_INVALID; else - cmd->ccb_ptr->ccb_h.status |= CAM_DEV_NOT_THERE; + ccb_ptr->ccb_h.status |= CAM_DEV_NOT_THERE; break; case MFI_STAT_CONFIG_SEQ_MISMATCH: - cmd->ccb_ptr->ccb_h.status |= CAM_REQUEUE_REQ; + ccb_ptr->ccb_h.status |= CAM_REQUEUE_REQ; break; default: device_printf(sc->mrsas_dev, "FW cmd complete status %x\n", status); - cmd->ccb_ptr->ccb_h.status = CAM_REQ_CMP_ERR; - cmd->ccb_ptr->csio.scsi_status = status; + ccb_ptr->ccb_h.status = CAM_REQ_CMP_ERR; + ccb_ptr->csio.scsi_status = status; } return; } @@ -1943,6 +1978,7 @@ mrsas_alloc_mem(struct mrsas_softc *sc) device_printf(sc->mrsas_dev, "Cannot load sense buf memory\n"); return (ENOMEM); } + /* * Allocate for Event detail structure */ @@ -2383,25 +2419,26 @@ int mrsas_init_adapter(struct mrsas_softc *sc) { uint32_t status; - u_int32_t max_cmd, scratch_pad_2; + u_int32_t scratch_pad_2; int ret; int i = 0; /* Read FW status register */ status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_scratch_pad)); - /* Get operational params from status register */ sc->max_fw_cmds = status & MRSAS_FWSTATE_MAXCMD_MASK; /* Decrement the max supported by 1, to correlate with FW */ sc->max_fw_cmds = sc->max_fw_cmds - 1; - max_cmd = sc->max_fw_cmds; + sc->max_scsi_cmds = sc->max_fw_cmds - + (MRSAS_FUSION_INT_CMDS + MRSAS_MAX_IOCTL_CMDS); /* Determine allocation size of command frames */ - sc->reply_q_depth = ((max_cmd + 1 + 15) / 16 * 16) * 2; - sc->request_alloc_sz = sizeof(MRSAS_REQUEST_DESCRIPTOR_UNION) * max_cmd; + sc->reply_q_depth = ((sc->max_fw_cmds + 1 + 15) / 16 * 16) * 2; + sc->request_alloc_sz = sizeof(MRSAS_REQUEST_DESCRIPTOR_UNION) * sc->max_fw_cmds; sc->reply_alloc_sz = sizeof(MPI2_REPLY_DESCRIPTORS_UNION) * (sc->reply_q_depth); - sc->io_frames_alloc_sz = MRSAS_MPI2_RAID_DEFAULT_IO_FRAME_SIZE + (MRSAS_MPI2_RAID_DEFAULT_IO_FRAME_SIZE * (max_cmd + 1)); + sc->io_frames_alloc_sz = MRSAS_MPI2_RAID_DEFAULT_IO_FRAME_SIZE + + (MRSAS_MPI2_RAID_DEFAULT_IO_FRAME_SIZE * (sc->max_fw_cmds + 1)); scratch_pad_2 = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_scratch_pad_2)); /* @@ -2419,15 +2456,17 @@ mrsas_init_adapter(struct mrsas_softc *sc) ((scratch_pad_2 & MEGASAS_MAX_CHAIN_SIZE_MASK) >> 5) * MEGASAS_256K_IO; - sc->chain_frames_alloc_sz = sc->max_chain_frame_sz * max_cmd; + sc->chain_frames_alloc_sz = sc->max_chain_frame_sz * sc->max_fw_cmds; sc->max_sge_in_main_msg = (MRSAS_MPI2_RAID_DEFAULT_IO_FRAME_SIZE - offsetof(MRSAS_RAID_SCSI_IO_REQUEST, SGL)) / 16; sc->max_sge_in_chain = sc->max_chain_frame_sz / sizeof(MPI2_SGE_IO_UNION); sc->max_num_sge = sc->max_sge_in_main_msg + sc->max_sge_in_chain - 2; - mrsas_dprint(sc, MRSAS_INFO, "Avago Debug: MAX sge 0x%X MAX chain frame size 0x%X \n", - sc->max_num_sge, sc->max_chain_frame_sz); + mrsas_dprint(sc, MRSAS_INFO, + "max sge: 0x%x, max chain frame size: 0x%x, " + "max fw cmd: 0x%x\n", sc->max_num_sge, + sc->max_chain_frame_sz, sc->max_fw_cmds); /* Used for pass thru MFI frame (DCMD) */ sc->chain_offset_mfi_pthru = offsetof(MRSAS_RAID_SCSI_IO_REQUEST, SGL) / 16; @@ -2630,14 +2669,14 @@ int mrsas_alloc_mpt_cmds(struct mrsas_softc *sc) { int i, j; - u_int32_t max_cmd, count; + u_int32_t max_fw_cmds, count; struct mrsas_mpt_cmd *cmd; pMpi2ReplyDescriptorsUnion_t reply_desc; u_int32_t offset, chain_offset, sense_offset; bus_addr_t io_req_base_phys, chain_frame_base_phys, sense_base_phys; u_int8_t *io_req_base, *chain_frame_base, *sense_base; - max_cmd = sc->max_fw_cmds; + max_fw_cmds = sc->max_fw_cmds; sc->req_desc = malloc(sc->request_alloc_sz, M_MRSAS, M_NOWAIT); if (!sc->req_desc) { @@ -2651,13 +2690,14 @@ mrsas_alloc_mpt_cmds(struct mrsas_softc *sc) * Allocate the dynamic array first and then allocate individual * commands. */ - sc->mpt_cmd_list = malloc(sizeof(struct mrsas_mpt_cmd *) * max_cmd, M_MRSAS, M_NOWAIT); + sc->mpt_cmd_list = malloc(sizeof(struct mrsas_mpt_cmd *) * max_fw_cmds, + M_MRSAS, M_NOWAIT); if (!sc->mpt_cmd_list) { device_printf(sc->mrsas_dev, "Cannot alloc memory for mpt_cmd_list.\n"); return (ENOMEM); } - memset(sc->mpt_cmd_list, 0, sizeof(struct mrsas_mpt_cmd *) * max_cmd); - for (i = 0; i < max_cmd; i++) { + memset(sc->mpt_cmd_list, 0, sizeof(struct mrsas_mpt_cmd *) * max_fw_cmds); + for (i = 0; i < max_fw_cmds; i++) { sc->mpt_cmd_list[i] = malloc(sizeof(struct mrsas_mpt_cmd), M_MRSAS, M_NOWAIT); if (!sc->mpt_cmd_list[i]) { @@ -2675,7 +2715,7 @@ mrsas_alloc_mpt_cmds(struct mrsas_softc *sc) chain_frame_base_phys = (bus_addr_t)sc->chain_frame_phys_addr; sense_base = (u_int8_t *)sc->sense_mem; sense_base_phys = (bus_addr_t)sc->sense_phys_addr; - for (i = 0; i < max_cmd; i++) { + for (i = 0; i < max_fw_cmds; i++) { cmd = sc->mpt_cmd_list[i]; offset = MRSAS_MPI2_RAID_DEFAULT_IO_FRAME_SIZE * i; chain_offset = sc->max_chain_frame_sz * i; @@ -2683,6 +2723,7 @@ mrsas_alloc_mpt_cmds(struct mrsas_softc *sc) memset(cmd, 0, sizeof(struct mrsas_mpt_cmd)); cmd->index = i + 1; cmd->ccb_ptr = NULL; + cmd->r1_alt_dev_handle = MR_DEVHANDLE_INVALID; callout_init_mtx(&cmd->cm_callout, &sc->sim_lock, 0); cmd->sync_cmd_idx = (u_int32_t)MRSAS_ULONG_MAX; cmd->sc = sc; @@ -3034,13 +3075,27 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese mtx_unlock(&sc->sim_lock); for (i = 0; i < sc->max_fw_cmds; i++) { mpt_cmd = sc->mpt_cmd_list[i]; + + if (mpt_cmd->peer_cmd) { + mrsas_dprint(sc, MRSAS_OCR, + "R1 FP command [%d] - (mpt_cmd) %p, (peer_cmd) %p\n", + i, mpt_cmd, mpt_cmd->peer_cmd); + } + if (mpt_cmd->ccb_ptr) { - ccb = (union ccb *)(mpt_cmd->ccb_ptr); - ccb->ccb_h.status = CAM_SCSI_BUS_RESET; - mrsas_cmd_done(sc, mpt_cmd); - mrsas_atomic_dec(&sc->fw_outstanding); + if (mpt_cmd->callout_owner) { + ccb = (union ccb *)(mpt_cmd->ccb_ptr); + ccb->ccb_h.status = CAM_SCSI_BUS_RESET; + mrsas_cmd_done(sc, mpt_cmd); + } else { + mpt_cmd->ccb_ptr = NULL; + mrsas_release_mpt_cmd(mpt_cmd); + } } } + + mrsas_atomic_set(&sc->fw_outstanding, 0); + mtx_lock(&sc->sim_lock); status_reg = mrsas_read_reg(sc, offsetof(mrsas_reg_set, Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:01:49 2018 (r342063) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:02:44 2018 (r342064) @@ -672,6 +672,12 @@ typedef union { #define mrsas_atomic_dec(v) atomic_subtract_int(&(v)->val, 1) #define mrsas_atomic_inc(v) atomic_add_int(&(v)->val, 1) +static inline int +mrsas_atomic_inc_return(mrsas_atomic_t *v) +{ + return 1 + atomic_fetchadd_int(&(v)->val, 1); +} + /* IOCInit Request message */ typedef struct _MPI2_IOC_INIT_REQUEST { u_int8_t WhoInit; /* 0x00 */ @@ -707,6 +713,7 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest * MR private defines */ #define MR_PD_INVALID 0xFFFF +#define MR_DEVHANDLE_INVALID 0xFFFF #define MAX_SPAN_DEPTH 8 #define MAX_QUAD_DEPTH MAX_SPAN_DEPTH #define MAX_RAIDMAP_SPAN_DEPTH (MAX_SPAN_DEPTH) @@ -1019,6 +1026,7 @@ struct IO_REQUEST_INFO { u_int8_t span_arm; u_int8_t pd_after_lb; boolean_t raCapable; + u_int16_t r1_alt_dev_handle; }; /* @@ -1528,6 +1536,7 @@ enum MR_EVT_ARGS { #define MR_RL_FLAGS_GRANT_DESTINATION_CPU1 0x10 #define MR_RL_FLAGS_GRANT_DESTINATION_CUDA 0x80 #define MR_RL_FLAGS_SEQ_NUM_ENABLE 0x8 +#define MR_RL_WRITE_THROUGH_MODE 0x00 #define MR_RL_WRITE_BACK_MODE 0x01 /* @@ -1591,6 +1600,7 @@ typedef enum _REGION_TYPE { #define MRSAS_SCSI_MAX_CDB_LEN 16 #define MRSAS_SCSI_SENSE_BUFFERSIZE 96 #define MRSAS_INTERNAL_CMDS 32 +#define MRSAS_FUSION_INT_CMDS 8 #define MEGASAS_MAX_CHAIN_SIZE_UNITS_MASK 0x400000 #define MEGASAS_MAX_CHAIN_SIZE_MASK 0x3E0 @@ -1662,6 +1672,10 @@ struct mrsas_mpt_cmd { struct callout cm_callout; struct mrsas_softc *sc; boolean_t tmCapable; + u_int16_t r1_alt_dev_handle; + boolean_t cmd_completed; + struct mrsas_mpt_cmd *peer_cmd; + bool callout_owner; TAILQ_ENTRY(mrsas_mpt_cmd) next; }; @@ -2988,6 +3002,7 @@ struct mrsas_softc { struct sema ioctl_count_sema; uint32_t max_fw_cmds; + uint16_t max_scsi_cmds; uint32_t max_num_sge; struct resource *mrsas_irq[MAX_MSIX_COUNT]; void *intr_handle[MAX_MSIX_COUNT]; @@ -3063,6 +3078,7 @@ struct mrsas_softc { u_int32_t max_sectors_per_req; u_int32_t disableOnlineCtrlReset; mrsas_atomic_t fw_outstanding; + u_int32_t mrsas_debug; u_int32_t mrsas_io_timeout; u_int32_t mrsas_fw_fault_check_delay; Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:01:49 2018 (r342063) +++ head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:02:44 2018 (r342064) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include /* XXX for pcpu.h */ #include /* XXX for PCPU_GET */ @@ -110,9 +109,6 @@ struct mrsas_mpt_cmd *mrsas_get_mpt_cmd(struct mrsas_s MRSAS_REQUEST_DESCRIPTOR_UNION * mrsas_get_request_desc(struct mrsas_softc *sc, u_int16_t index); -extern void -mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_int8_t status, - u_int8_t extStatus); extern int mrsas_reset_targets(struct mrsas_softc *sc); extern u_int16_t MR_TargetIdToLdGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map); extern u_int32_t @@ -129,15 +125,13 @@ MR_LdSpanArrayGet(u_int32_t ld, u_int32_t span, extern u_int16_t mrsas_get_updated_dev_handle(struct mrsas_softc *sc, PLD_LOAD_BALANCE_INFO lbInfo, struct IO_REQUEST_INFO *io_info); -extern u_int8_t -megasas_get_best_arm(PLD_LOAD_BALANCE_INFO lbInfo, u_int8_t arm, - u_int64_t block, u_int32_t count); extern int mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex); extern MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); extern void mrsas_disable_intr(struct mrsas_softc *sc); extern void mrsas_enable_intr(struct mrsas_softc *sc); +void mrsas_prepare_secondRaid1_IO(struct mrsas_softc *sc, + struct mrsas_mpt_cmd *cmd); - /* * mrsas_cam_attach: Main entry to CAM subsystem * input: Adapter instance soft state @@ -152,7 +146,7 @@ mrsas_cam_attach(struct mrsas_softc *sc) struct cam_devq *devq; int mrsas_cam_depth; - mrsas_cam_depth = sc->max_fw_cmds - MRSAS_INTERNAL_CMDS; + mrsas_cam_depth = sc->max_scsi_cmds; if ((devq = cam_simq_alloc(mrsas_cam_depth)) == NULL) { device_printf(sc->mrsas_dev, "Cannot allocate SIM queue\n"); @@ -452,7 +446,7 @@ static int32_t mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, union ccb *ccb) { - struct mrsas_mpt_cmd *cmd; + struct mrsas_mpt_cmd *cmd, *r1_cmd = NULL; struct ccb_hdr *ccb_h = &(ccb->ccb_h); struct ccb_scsiio *csio = &(ccb->csio); MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc; @@ -472,6 +466,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * xpt_done(ccb); return (0); } + if ((ccb_h->flags & CAM_DIR_MASK) != CAM_DIR_NONE) { if (ccb_h->flags & CAM_DIR_IN) cmd->flags |= MRSAS_DIR_IN; @@ -572,6 +567,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * if (mrsas_build_ldio_rw(sc, cmd, ccb)) { device_printf(sc->mrsas_dev, "Build RW LDIO failed.\n"); mtx_unlock(&sc->raidmap_lock); + mrsas_release_mpt_cmd(cmd); return (1); } break; @@ -580,6 +576,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * if (mrsas_build_ldio_nonrw(sc, cmd, ccb)) { device_printf(sc->mrsas_dev, "Build NON-RW LDIO failed.\n"); mtx_unlock(&sc->raidmap_lock); + mrsas_release_mpt_cmd(cmd); return (1); } break; @@ -592,6 +589,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * device_printf(sc->mrsas_dev, "Build SYSPDIO failed.\n"); mtx_unlock(&sc->raidmap_lock); + mrsas_release_mpt_cmd(cmd); return (1); } } else { @@ -600,6 +598,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * device_printf(sc->mrsas_dev, "Build SYSPDIO failed.\n"); mtx_unlock(&sc->raidmap_lock); + mrsas_release_mpt_cmd(cmd); return (1); } } @@ -622,6 +621,7 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * /* * Start timer for IO timeout. Default timeout value is 90 second. */ + cmd->callout_owner = true; #if (__FreeBSD_version >= 1000510) callout_reset_sbt(&cmd->cm_callout, SBT_1S * 180, 0, mrsas_scsiio_timeout, cmd, 0); @@ -629,12 +629,34 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim * callout_reset(&cmd->cm_callout, (180000 * hz) / 1000, mrsas_scsiio_timeout, cmd); #endif - mrsas_atomic_inc(&sc->fw_outstanding); - if (mrsas_atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater) + if (mrsas_atomic_inc_return(&sc->fw_outstanding) > sc->io_cmds_highwater) sc->io_cmds_highwater++; - mrsas_fire_cmd(sc, req_desc->addr.u.low, req_desc->addr.u.high); + /* + * if it is raid 1/10 fp write capable. + * try to get second command from pool and construct it. + * From FW, it has confirmed that lba values of two PDs corresponds to + * single R1/10 LD are always same + * + */ + /* + * driver side count always should be less than max_fw_cmds to get + * new command + */ + if (cmd->r1_alt_dev_handle != MR_DEVHANDLE_INVALID) { + mrsas_atomic_inc(&sc->fw_outstanding); + mrsas_prepare_secondRaid1_IO(sc, cmd); + mrsas_fire_cmd(sc, req_desc->addr.u.low, + req_desc->addr.u.high); + r1_cmd = cmd->peer_cmd; + mrsas_fire_cmd(sc, r1_cmd->request_desc->addr.u.low, + r1_cmd->request_desc->addr.u.high); + } else { + mrsas_fire_cmd(sc, req_desc->addr.u.low, + req_desc->addr.u.high); + } + return (0); done: @@ -698,7 +720,6 @@ mrsas_get_mpt_cmd(struct mrsas_softc *sc) cmd->error_code = 0; cmd->load_balance = 0; cmd->ccb_ptr = NULL; - out: mtx_unlock(&sc->mpt_cmd_pool_lock); return cmd; @@ -716,7 +737,12 @@ mrsas_release_mpt_cmd(struct mrsas_mpt_cmd *cmd) struct mrsas_softc *sc = cmd->sc; mtx_lock(&sc->mpt_cmd_pool_lock); + cmd->r1_alt_dev_handle = MR_DEVHANDLE_INVALID; cmd->sync_cmd_idx = (u_int32_t)MRSAS_ULONG_MAX; + cmd->peer_cmd = NULL; + cmd->cmd_completed = 0; + memset((uint8_t *)cmd->io_request, 0, + sizeof(MRSAS_RAID_SCSI_IO_REQUEST)); TAILQ_INSERT_HEAD(&(sc->mrsas_mpt_cmd_list_head), cmd, next); mtx_unlock(&sc->mpt_cmd_pool_lock); @@ -735,15 +761,65 @@ mrsas_get_request_desc(struct mrsas_softc *sc, u_int16 { u_int8_t *p; - if (index >= sc->max_fw_cmds) { - device_printf(sc->mrsas_dev, "Invalid SMID (0x%x)request for desc\n", index); - return NULL; - } + KASSERT(index < sc->max_fw_cmds, ("req_desc is out of range")); p = sc->req_desc + sizeof(MRSAS_REQUEST_DESCRIPTOR_UNION) * index; return (MRSAS_REQUEST_DESCRIPTOR_UNION *) p; } + + + +/* mrsas_prepare_secondRaid1_IO + * It prepares the raid 1 second IO + */ +void +mrsas_prepare_secondRaid1_IO(struct mrsas_softc *sc, + struct mrsas_mpt_cmd *cmd) +{ + MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc, *req_desc2 = NULL; + struct mrsas_mpt_cmd *r1_cmd; + + r1_cmd = cmd->peer_cmd; + req_desc = cmd->request_desc; + + /* + * copy the io request frame as well as 8 SGEs data for r1 + * command + */ + memcpy(r1_cmd->io_request, cmd->io_request, + (sizeof(MRSAS_RAID_SCSI_IO_REQUEST))); + memcpy(&r1_cmd->io_request->SGL, &cmd->io_request->SGL, + (sc->max_sge_in_main_msg * sizeof(MPI2_SGE_IO_UNION))); + + /* sense buffer is different for r1 command */ + r1_cmd->io_request->SenseBufferLowAddress = r1_cmd->sense_phys_addr; + r1_cmd->ccb_ptr = cmd->ccb_ptr; + + req_desc2 = mrsas_get_request_desc(sc, r1_cmd->index - 1); + req_desc2->addr.Words = 0; + r1_cmd->request_desc = req_desc2; + req_desc2->SCSIIO.SMID = r1_cmd->index; + req_desc2->SCSIIO.RequestFlags = req_desc->SCSIIO.RequestFlags; + r1_cmd->request_desc->SCSIIO.DevHandle = cmd->r1_alt_dev_handle; + r1_cmd->r1_alt_dev_handle = cmd->io_request->DevHandle; + r1_cmd->io_request->DevHandle = cmd->r1_alt_dev_handle; + cmd->io_request->RaidContext.raid_context_g35.smid.peerSMID = + r1_cmd->index; + r1_cmd->io_request->RaidContext.raid_context_g35.smid.peerSMID = + cmd->index; + /* + * MSIxIndex of both commands request descriptors + * should be same + */ + r1_cmd->request_desc->SCSIIO.MSIxIndex = cmd->request_desc->SCSIIO.MSIxIndex; + /* span arm is different for r1 cmd */ + r1_cmd->io_request->RaidContext.raid_context_g35.spanArm = + cmd->io_request->RaidContext.raid_context_g35.spanArm + 1; + +} + + /* * mrsas_build_ldio_rw: Builds an LDIO command * input: Adapter instance soft state @@ -883,11 +959,15 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp struct ccb_scsiio *csio = &(ccb->csio); struct IO_REQUEST_INFO io_info; MR_DRV_RAID_MAP_ALL *map_ptr; + struct mrsas_mpt_cmd *r1_cmd = NULL; + MR_LD_RAID *raid; u_int8_t fp_possible; u_int32_t start_lba_hi, start_lba_lo, ld_block_size, ld; u_int32_t datalength = 0; + io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id; + start_lba_lo = 0; start_lba_hi = 0; fp_possible = 0; @@ -947,7 +1027,10 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp io_info.ldStartBlock = ((u_int64_t)start_lba_hi << 32) | start_lba_lo; io_info.numBlocks = datalength; io_info.ldTgtId = device_id; + io_info.r1_alt_dev_handle = MR_DEVHANDLE_INVALID; + io_request->DataLength = cmd->length; + switch (ccb_h->flags & CAM_DIR_MASK) { case CAM_DIR_IN: io_info.isRead = 1; @@ -980,14 +1063,36 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp cmd->request_desc->SCSIIO.MSIxIndex = sc->msix_vectors ? smp_processor_id() % sc->msix_vectors : 0; - if (sc->is_ventura && sc->streamDetectByLD) { - mtx_lock(&sc->stream_lock); - mrsas_stream_detect(sc, cmd, &io_info); - mtx_unlock(&sc->stream_lock); - /* In ventura if stream detected for a read and it is read ahead capable make this IO as LDIO */ - if (io_request->RaidContext.raid_context_g35.streamDetected && - io_info.isRead && io_info.raCapable) - fp_possible = FALSE; + if (sc->is_ventura) { + if (sc->streamDetectByLD) { + mtx_lock(&sc->stream_lock); + mrsas_stream_detect(sc, cmd, &io_info); + mtx_unlock(&sc->stream_lock); + /* In ventura if stream detected for a read and + * it is read ahead capable make this IO as LDIO */ + if (io_request->RaidContext.raid_context_g35.streamDetected && + io_info.isRead && io_info.raCapable) + fp_possible = FALSE; + } + + /* Set raid 1/10 fast path write capable bit in io_info. + * Note - reset peer_cmd and r1_alt_dev_handle if fp_possible + * disabled after this point. Try not to add more check for + * fp_possible toggle after this. + */ + if (fp_possible && + (io_info.r1_alt_dev_handle != MR_DEVHANDLE_INVALID) && + (raid->level == 1) && !io_info.isRead) { + r1_cmd = mrsas_get_mpt_cmd(sc); + if (!r1_cmd) { + fp_possible = FALSE; + printf("Avago debug fp disable from %s %d \n", + __func__, __LINE__); + } else { + cmd->peer_cmd = r1_cmd; + r1_cmd->peer_cmd = cmd; + } + } } if (fp_possible) { @@ -1032,6 +1137,12 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp io_request->RaidContext.raid_context.spanArm = io_info.span_arm; } else cmd->load_balance = 0; + + if (sc->is_ventura) + cmd->r1_alt_dev_handle = io_info.r1_alt_dev_handle; + else + cmd->r1_alt_dev_handle = MR_DEVHANDLE_INVALID; + cmd->request_desc->SCSIIO.DevHandle = io_info.devHandle; io_request->DevHandle = io_info.devHandle; } else { @@ -1078,6 +1189,7 @@ mrsas_build_ldio_nonrw(struct mrsas_softc *sc, struct u_int32_t device_id, ld; MR_DRV_RAID_MAP_ALL *map_ptr; MR_LD_RAID *raid; + RAID_CONTEXT *pRAID_Context; MRSAS_RAID_SCSI_IO_REQUEST *io_request; io_request = cmd->io_request; @@ -1086,6 +1198,8 @@ mrsas_build_ldio_nonrw(struct mrsas_softc *sc, struct map_ptr = sc->ld_drv_map[(sc->map_id & 1)]; ld = MR_TargetIdToLdGet(device_id, map_ptr); raid = MR_LdRaidGet(ld, map_ptr); + /* get RAID_Context pointer */ + pRAID_Context = &io_request->RaidContext.raid_context; /* Store the TM capability value in cmd */ cmd->tmCapable = raid->capability.tmCapable; @@ -1140,9 +1254,12 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs u_int32_t device_id; MR_DRV_RAID_MAP_ALL *local_map_ptr; MRSAS_RAID_SCSI_IO_REQUEST *io_request; + RAID_CONTEXT *pRAID_Context; struct MR_PD_CFG_SEQ_NUM_SYNC *pd_sync; io_request = cmd->io_request; + /* get RAID_Context pointer */ + pRAID_Context = &io_request->RaidContext.raid_context; device_id = ccb_h->target_id; local_map_ptr = sc->ld_drv_map[(sc->map_id & 1)]; io_request->RaidContext.raid_context.RAIDFlags = MR_RAID_FLAGS_IO_SUB_TYPE_SYSTEM_PD @@ -1171,6 +1288,9 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs else io_request->RaidContext.raid_context.regLockFlags |= (MR_RL_FLAGS_SEQ_NUM_ENABLE | MR_RL_FLAGS_GRANT_DESTINATION_CUDA); + /* raid_context.Type = MPI2_TYPE_CUDA is valid only, + * if FW support Jbod Sequence number + */ io_request->RaidContext.raid_context.Type = MPI2_TYPE_CUDA; io_request->RaidContext.raid_context.nseg = 0x1; } else if (sc->fast_path_io) { @@ -1185,7 +1305,7 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs /* Want to send all IO via FW path */ io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id; io_request->RaidContext.raid_context.configSeqNum = 0; - io_request->DevHandle = 0xFFFF; + io_request->DevHandle = MR_DEVHANDLE_INVALID; } cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle; @@ -1432,7 +1552,10 @@ mrsas_cmd_done(struct mrsas_softc *sc, struct mrsas_mp mrsas_unmap_request(sc, cmd); mtx_lock(&sc->sim_lock); - callout_stop(&cmd->cm_callout); + if (cmd->callout_owner) { + callout_stop(&cmd->cm_callout); + cmd->callout_owner = false; + } xpt_done(cmd->ccb_ptr); cmd->ccb_ptr = NULL; mtx_unlock(&sc->sim_lock); Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 08:01:49 2018 (r342063) +++ head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 08:02:44 2018 (r342064) @@ -921,7 +921,7 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in RAID_CONTEXT * pRAID_Context, MR_DRV_RAID_MAP_ALL * map) { MR_LD_RAID *raid = MR_LdRaidGet(ld, map); - u_int32_t pd, arRef; + u_int32_t pd, arRef, r1_alt_pd; u_int8_t physArm, span; u_int64_t row; u_int8_t retval = TRUE; @@ -950,10 +950,16 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in arRef = MR_LdSpanArrayGet(ld, span, map); pd = MR_ArPdGet(arRef, physArm, map); - if (pd != MR_PD_INVALID) + if (pd != MR_PD_INVALID) { *pDevHandle = MR_PdDevHandleGet(pd, map); - else { - *pDevHandle = MR_PD_INVALID; + /* get second pd also for raid 1/10 fast path writes */ + if ((raid->level == 1) && !io_info->isRead) { + r1_alt_pd = MR_ArPdGet(arRef, physArm + 1, map); + if (r1_alt_pd != MR_PD_INVALID) + io_info->r1_alt_dev_handle = MR_PdDevHandleGet(r1_alt_pd, map); + } + } else { + *pDevHandle = MR_DEVHANDLE_INVALID; if ((raid->level >= 5) && ((sc->device_id == MRSAS_TBOLT) || (sc->mrsas_gen3_ctrl && raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) @@ -1167,7 +1173,7 @@ MR_BuildRaidContext(struct mrsas_softc *sc, struct IO_ MR_GetPhyParams(sc, ld, start_strip, ref_in_start_stripe, io_info, pRAID_Context, map); /* If IO on an invalid Pd, then FP is not possible */ - if (io_info->devHandle == MR_PD_INVALID) + if (io_info->devHandle == MR_DEVHANDLE_INVALID) io_info->fpOkForIo = FALSE; /* * if FP possible, set the SLUD bit in regLockFlags for @@ -1178,6 +1184,7 @@ MR_BuildRaidContext(struct mrsas_softc *sc, struct IO_ raid->capability.fpCacheBypassCapable) { ((RAID_CONTEXT_G35 *) pRAID_Context)->routingFlags.bits.sld = 1; } + return retval; } else if (isRead) { for (stripIdx = 0; stripIdx < num_strips; stripIdx++) { @@ -1535,6 +1542,7 @@ mrsas_get_best_arm_pd(struct mrsas_softc *sc, { MR_LD_RAID *raid; MR_DRV_RAID_MAP_ALL *drv_map; + u_int16_t pd1_devHandle; u_int16_t pend0, pend1, ld; u_int64_t diff0, diff1; u_int8_t bestArm, pd0, pd1, span, arm; @@ -1558,23 +1566,30 @@ mrsas_get_best_arm_pd(struct mrsas_softc *sc, pd1 = MR_ArPdGet(arRef, (arm + 1) >= span_row_size ? (arm + 1 - span_row_size) : arm + 1, drv_map); - /* get the pending cmds for the data and mirror arms */ - pend0 = mrsas_atomic_read(&lbInfo->scsi_pending_cmds[pd0]); - pend1 = mrsas_atomic_read(&lbInfo->scsi_pending_cmds[pd1]); + /* Get PD1 Dev Handle */ + pd1_devHandle = MR_PdDevHandleGet(pd1, drv_map); + if (pd1_devHandle == MR_DEVHANDLE_INVALID) { + bestArm = arm; + } else { + /* get the pending cmds for the data and mirror arms */ + pend0 = mrsas_atomic_read(&lbInfo->scsi_pending_cmds[pd0]); + pend1 = mrsas_atomic_read(&lbInfo->scsi_pending_cmds[pd1]); - /* Determine the disk whose head is nearer to the req. block */ - diff0 = ABS_DIFF(block, lbInfo->last_accessed_block[pd0]); - diff1 = ABS_DIFF(block, lbInfo->last_accessed_block[pd1]); - bestArm = (diff0 <= diff1 ? arm : arm ^ 1); + /* Determine the disk whose head is nearer to the req. block */ + diff0 = ABS_DIFF(block, lbInfo->last_accessed_block[pd0]); + diff1 = ABS_DIFF(block, lbInfo->last_accessed_block[pd1]); + bestArm = (diff0 <= diff1 ? arm : arm ^ 1); - if ((bestArm == arm && pend0 > pend1 + sc->lb_pending_cmds) || - (bestArm != arm && pend1 > pend0 + sc->lb_pending_cmds)) - bestArm ^= 1; + if ((bestArm == arm && pend0 > pend1 + sc->lb_pending_cmds) || + (bestArm != arm && pend1 > pend0 + sc->lb_pending_cmds)) + bestArm ^= 1; - /* Update the last accessed block on the correct pd */ + /* Update the last accessed block on the correct pd */ + io_info->span_arm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | bestArm; + io_info->pd_after_lb = (bestArm == arm) ? pd0 : pd1; + } + lbInfo->last_accessed_block[bestArm == arm ? pd0 : pd1] = block + count - 1; - io_info->span_arm = (span << RAID_CTX_SPANARM_SPAN_SHIFT) | bestArm; - io_info->pd_after_lb = (bestArm == arm) ? pd0 : pd1; #if SPAN_DEBUG if (arm != bestArm) printf("AVAGO Debug R1 Load balance occur - span 0x%x arm 0x%x bestArm 0x%x " @@ -1631,7 +1646,7 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, RAID_CONTEXT * pRAID_Context, MR_DRV_RAID_MAP_ALL * map) { MR_LD_RAID *raid = MR_LdRaidGet(ld, map); - u_int32_t pd, arRef; + u_int32_t pd, arRef, r1_alt_pd; u_int8_t physArm, span; u_int64_t row; u_int8_t retval = TRUE; @@ -1673,11 +1688,17 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, pd = MR_ArPdGet(arRef, physArm, map); /* Get the Pd. */ - if (pd != MR_PD_INVALID) + if (pd != MR_PD_INVALID) { /* Get dev handle from Pd */ *pDevHandle = MR_PdDevHandleGet(pd, map); - else { - *pDevHandle = MR_PD_INVALID; /* set dev handle as invalid. */ + /* get second pd also for raid 1/10 fast path writes */ + if ((raid->level == 1) && !io_info->isRead) { + r1_alt_pd = MR_ArPdGet(arRef, physArm + 1, map); + if (r1_alt_pd != MR_PD_INVALID) + io_info->r1_alt_dev_handle = MR_PdDevHandleGet(r1_alt_pd, map); + } + } else { + *pDevHandle = MR_DEVHANDLE_INVALID; /* set dev handle as invalid. */ if ((raid->level >= 5) && ((sc->device_id == MRSAS_TBOLT) || (sc->mrsas_gen3_ctrl && raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) From owner-svn-src-all@freebsd.org Fri Dec 14 08:03:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 877951324329; Fri, 14 Dec 2018 08:03:29 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 36665918AB; Fri, 14 Dec 2018 08:03:29 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29F112C6E0; Fri, 14 Dec 2018 08:03:29 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE83TAn087740; Fri, 14 Dec 2018 08:03:29 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE83SKw087738; Fri, 14 Dec 2018 08:03:28 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140803.wBE83SKw087738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342065 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36665918AB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.821,0]; NEURAL_HAM_SHORT(-0.72)[-0.722,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:03:29 -0000 Author: kadesai Date: Fri Dec 14 08:03:28 2018 New Revision: 342065 URL: https://svnweb.freebsd.org/changeset/base/342065 Log: This patch will add support for new DCMD to get PD information and a single data structure to specify LD and JBOD. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:02:44 2018 (r342064) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:03:28 2018 (r342065) @@ -90,6 +90,8 @@ static void mrsas_update_ext_vd_details(struct mrsas_s static int mrsas_issue_blocked_abort_cmd(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd_to_abort); +static void +mrsas_get_pd_info(struct mrsas_softc *sc, u_int16_t device_id); static struct mrsas_softc * mrsas_get_softc_instance(struct cdev *dev, u_long cmd, caddr_t arg); @@ -971,6 +973,7 @@ attach_fail: static void mrsas_ich_startup(void *arg) { + int i = 0; struct mrsas_softc *sc = (struct mrsas_softc *)arg; /* @@ -1006,6 +1009,13 @@ mrsas_ich_startup(void *arg) /* Enable Interrupts */ mrsas_enable_intr(sc); + /* Call DCMD get_pd_info for all system PDs */ + for (i = 0; i < MRSAS_MAX_PD; i++) { + if ((sc->target_list[i].target_id != 0xffff) && + sc->pd_info_mem) + mrsas_get_pd_info(sc, sc->target_list[i].target_id); + } + /* Initiate AEN (Asynchronous Event Notification) */ if (mrsas_start_aen(sc)) { device_printf(sc->mrsas_dev, "Error: AEN registration FAILED !!! " @@ -1216,6 +1226,16 @@ mrsas_free_mem(struct mrsas_softc *sc) bus_dma_tag_destroy(sc->evt_detail_tag); /* + * Free PD info memory + */ + if (sc->pd_info_phys_addr) + bus_dmamap_unload(sc->pd_info_tag, sc->pd_info_dmamap); + if (sc->pd_info_mem != NULL) + bus_dmamem_free(sc->pd_info_tag, sc->pd_info_mem, sc->pd_info_dmamap); + if (sc->pd_info_tag != NULL) + bus_dma_tag_destroy(sc->pd_info_tag); + + /* * Free MFI frames */ if (sc->mfi_cmd_list) { @@ -1808,7 +1828,7 @@ static int mrsas_alloc_mem(struct mrsas_softc *sc) { u_int32_t verbuf_size, io_req_size, reply_desc_size, sense_size, chain_frame_size, - evt_detail_size, count; + evt_detail_size, count, pd_info_size; /* * Allocate parent DMA tag @@ -2009,7 +2029,39 @@ mrsas_alloc_mem(struct mrsas_softc *sc) device_printf(sc->mrsas_dev, "Cannot load Event detail buffer memory\n"); return (ENOMEM); } + /* + * Allocate for PD INFO structure + */ + pd_info_size = sizeof(struct mrsas_pd_info); + if (bus_dma_tag_create(sc->mrsas_parent_tag, + 1, 0, + BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, + NULL, NULL, + pd_info_size, + 1, + pd_info_size, + BUS_DMA_ALLOCNOW, + NULL, NULL, + &sc->pd_info_tag)) { + device_printf(sc->mrsas_dev, "Cannot create PD INFO tag\n"); + return (ENOMEM); + } + if (bus_dmamem_alloc(sc->pd_info_tag, (void **)&sc->pd_info_mem, + BUS_DMA_NOWAIT, &sc->pd_info_dmamap)) { + device_printf(sc->mrsas_dev, "Cannot alloc PD INFO buffer memory\n"); + return (ENOMEM); + } + bzero(sc->pd_info_mem, pd_info_size); + if (bus_dmamap_load(sc->pd_info_tag, sc->pd_info_dmamap, + sc->pd_info_mem, pd_info_size, mrsas_addr_cb, + &sc->pd_info_phys_addr, BUS_DMA_NOWAIT)) { + device_printf(sc->mrsas_dev, "Cannot load PD INFO buffer memory\n"); + return (ENOMEM); + } + + /* * Create a dma tag for data buffers; size will be the maximum * possible I/O size (280kB). */ @@ -2297,6 +2349,7 @@ mrsas_init_fw(struct mrsas_softc *sc) device_printf(sc->mrsas_dev, "Adapter initialize Fail.\n"); return (1); } + /* Allocate internal commands for pass-thru */ if (mrsas_alloc_mfi_cmds(sc) != SUCCESS) { device_printf(sc->mrsas_dev, "Allocate MFI cmd failed.\n"); @@ -2334,6 +2387,12 @@ mrsas_init_fw(struct mrsas_softc *sc) } megasas_setup_jbod_map(sc); + + memset(sc->target_list, 0, + MRSAS_MAX_TM_TARGETS * sizeof(struct mrsas_target)); + for (i = 0; i < MRSAS_MAX_TM_TARGETS; i++) + sc->target_list[i].target_id = 0xffff; + /* For pass-thru, get PD/LD list and controller info */ memset(sc->pd_list, 0, MRSAS_MAX_PD * sizeof(struct mrsas_pd_list)); @@ -4271,7 +4330,114 @@ mrsas_sync_map_info(struct mrsas_softc *sc) return (retcode); } +/* Input: dcmd.opcode - MR_DCMD_PD_GET_INFO + * dcmd.mbox.s[0] - deviceId for this physical drive + * dcmd.sge IN - ptr to returned MR_PD_INFO structure + * Desc: Firmware return the physical drive info structure + * + */ +static void +mrsas_get_pd_info(struct mrsas_softc *sc, u_int16_t device_id) +{ + int retcode; + u_int8_t do_ocr = 1; + struct mrsas_mfi_cmd *cmd; + struct mrsas_dcmd_frame *dcmd; + + cmd = mrsas_get_mfi_cmd(sc); + + if (!cmd) { + device_printf(sc->mrsas_dev, + "Cannot alloc for get PD info cmd\n"); + return; + } + dcmd = &cmd->frame->dcmd; + + memset(sc->pd_info_mem, 0, sizeof(struct mrsas_pd_info)); + memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); + + dcmd->mbox.s[0] = device_id; + dcmd->cmd = MFI_CMD_DCMD; + dcmd->cmd_status = 0xFF; + dcmd->sge_count = 1; + dcmd->flags = MFI_FRAME_DIR_READ; + dcmd->timeout = 0; + dcmd->pad_0 = 0; + dcmd->data_xfer_len = sizeof(struct mrsas_pd_info); + dcmd->opcode = MR_DCMD_PD_GET_INFO; + dcmd->sgl.sge32[0].phys_addr = (u_int32_t)sc->pd_info_phys_addr; + dcmd->sgl.sge32[0].length = sizeof(struct mrsas_pd_info); + + if (!sc->mask_interrupts) + retcode = mrsas_issue_blocked_cmd(sc, cmd); + else + retcode = mrsas_issue_polled(sc, cmd); + + if (retcode == ETIMEDOUT) + goto dcmd_timeout; + + sc->target_list[device_id].interface_type = + sc->pd_info_mem->state.ddf.pdType.intf; + + do_ocr = 0; + +dcmd_timeout: + + if (do_ocr) + sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; + + if (!sc->mask_interrupts) + mrsas_release_mfi_cmd(cmd); +} + /* + * mrsas_add_target: Add target ID of system PD/VD to driver's data structure. + * sc: Adapter's soft state + * target_id: Unique target id per controller(managed by driver) + * for system PDs- target ID ranges from 0 to (MRSAS_MAX_PD - 1) + * for VDs- target ID ranges from MRSAS_MAX_PD to MRSAS_MAX_TM_TARGETS + * return: void + * Descripton: This function will be called whenever system PD or VD is created. + */ +static void mrsas_add_target(struct mrsas_softc *sc, + u_int16_t target_id) +{ + sc->target_list[target_id].target_id = target_id; + + device_printf(sc->mrsas_dev, + "%s created target ID: 0x%x\n", + (target_id < MRSAS_MAX_PD ? "System PD" : "VD"), + (target_id < MRSAS_MAX_PD ? target_id : (target_id - MRSAS_MAX_PD))); + /* + * If interrupts are enabled, then only fire DCMD to get pd_info + * for system PDs + */ + if (!sc->mask_interrupts && sc->pd_info_mem && + (target_id < MRSAS_MAX_PD)) + mrsas_get_pd_info(sc, target_id); + +} + +/* + * mrsas_remove_target: Remove target ID of system PD/VD from driver's data structure. + * sc: Adapter's soft state + * target_id: Unique target id per controller(managed by driver) + * for system PDs- target ID ranges from 0 to (MRSAS_MAX_PD - 1) + * for VDs- target ID ranges from MRSAS_MAX_PD to MRSAS_MAX_TM_TARGETS + * return: void + * Descripton: This function will be called whenever system PD or VD is deleted + */ +static void mrsas_remove_target(struct mrsas_softc *sc, + u_int16_t target_id) +{ + sc->target_list[target_id].target_id = 0xffff; + device_printf(sc->mrsas_dev, + "%s deleted target ID: 0x%x\n", + (target_id < MRSAS_MAX_PD ? "System PD" : "VD"), + (target_id < MRSAS_MAX_PD ? target_id : (target_id - MRSAS_MAX_PD))); +} + +/* * mrsas_get_pd_list: Returns FW's PD list structure input: * Adapter soft state * @@ -4347,8 +4513,18 @@ mrsas_get_pd_list(struct mrsas_softc *sc) pd_addr->scsiDevType; sc->local_pd_list[pd_addr->deviceId].driveState = MR_PD_STATE_SYSTEM; + if (sc->target_list[pd_addr->deviceId].target_id == 0xffff) + mrsas_add_target(sc, pd_addr->deviceId); pd_addr++; } + for (pd_index = 0; pd_index < MRSAS_MAX_PD; pd_index++) { + if ((sc->local_pd_list[pd_index].driveState != + MR_PD_STATE_SYSTEM) && + (sc->target_list[pd_index].target_id != + 0xffff)) { + mrsas_remove_target(sc, pd_index); + } + } /* * Use mutext/spinlock if pd_list component size increase more than * 32 bit. @@ -4380,7 +4556,7 @@ dcmd_timeout: static int mrsas_get_ld_list(struct mrsas_softc *sc) { - int ld_list_size, retcode = 0, ld_index = 0, ids = 0; + int ld_list_size, retcode = 0, ld_index = 0, ids = 0, drv_tgt_id; u_int8_t do_ocr = 1; struct mrsas_mfi_cmd *cmd; struct mrsas_dcmd_frame *dcmd; @@ -4442,11 +4618,21 @@ mrsas_get_ld_list(struct mrsas_softc *sc) sc->CurLdCount = ld_list_mem->ldCount; memset(sc->ld_ids, 0xff, MAX_LOGICAL_DRIVES_EXT); for (ld_index = 0; ld_index < ld_list_mem->ldCount; ld_index++) { + ids = ld_list_mem->ldList[ld_index].ref.ld_context.targetId; + drv_tgt_id = ids + MRSAS_MAX_PD; if (ld_list_mem->ldList[ld_index].state != 0) { - ids = ld_list_mem->ldList[ld_index].ref.ld_context.targetId; sc->ld_ids[ids] = ld_list_mem->ldList[ld_index].ref.ld_context.targetId; + if (sc->target_list[drv_tgt_id].target_id == + 0xffff) + mrsas_add_target(sc, drv_tgt_id); + } else { + if (sc->target_list[drv_tgt_id].target_id != + 0xffff) + mrsas_remove_target(sc, + drv_tgt_id); } } + do_ocr = 0; } dcmd_timeout: Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:02:44 2018 (r342064) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:03:28 2018 (r342065) @@ -740,6 +740,7 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define MR_DCMD_SYSTEM_PD_MAP_GET_INFO 0x0200e102 #define MR_DCMD_PD_MFI_TASK_MGMT 0x0200e100 +#define MR_DCMD_PD_GET_INFO 0x02020000 #define MRSAS_MAX_PD_CHANNELS 1 #define MRSAS_MAX_LD_CHANNELS 1 #define MRSAS_MAX_DEV_PER_CHANNEL 256 @@ -2944,6 +2945,210 @@ typedef struct _MRSAS_DRV_PCI_INFORMATION { u_int8_t reserved2[28]; } MRSAS_DRV_PCI_INFORMATION, *PMRSAS_DRV_PCI_INFORMATION; +typedef enum _MR_PD_TYPE { + UNKNOWN_DRIVE = 0, + PARALLEL_SCSI = 1, + SAS_PD = 2, + SATA_PD = 3, + FC_PD = 4, + NVME_PD = 5, +} MR_PD_TYPE; + +typedef union _MR_PD_REF { + struct { + u_int16_t deviceId; + u_int16_t seqNum; + } mrPdRef; + u_int32_t ref; +} MR_PD_REF; + +/* + * define the DDF Type bit structure + */ +union MR_PD_DDF_TYPE { + struct { + union { + struct { + u_int16_t forcedPDGUID:1; + u_int16_t inVD:1; + u_int16_t isGlobalSpare:1; + u_int16_t isSpare:1; + u_int16_t isForeign:1; + u_int16_t reserved:7; + u_int16_t intf:4; + } pdType; + u_int16_t type; + }; + u_int16_t reserved; + } ddf; + struct { + u_int32_t reserved; + } nonDisk; + u_int32_t type; +} __packed; + +/* + * defines the progress structure + */ +union MR_PROGRESS { + struct { + u_int16_t progress; + union { + u_int16_t elapsedSecs; + u_int16_t elapsedSecsForLastPercent; + }; + } mrProgress; + u_int32_t w; +} __packed; + +/* + * defines the physical drive progress structure + */ +struct MR_PD_PROGRESS { + struct { + u_int32_t rbld:1; + u_int32_t patrol:1; + u_int32_t clear:1; + u_int32_t copyBack:1; + u_int32_t erase:1; + u_int32_t locate:1; + u_int32_t reserved:26; + } active; + union MR_PROGRESS rbld; + union MR_PROGRESS patrol; + union { + union MR_PROGRESS clear; + union MR_PROGRESS erase; + }; + + struct { + u_int32_t rbld:1; + u_int32_t patrol:1; + u_int32_t clear:1; + u_int32_t copyBack:1; + u_int32_t erase:1; + u_int32_t reserved:27; + } pause; + + union MR_PROGRESS reserved[3]; +} __packed; + + +struct mrsas_pd_info { + MR_PD_REF ref; + u_int8_t inquiryData[96]; + u_int8_t vpdPage83[64]; + + u_int8_t notSupported; + u_int8_t scsiDevType; + + union { + u_int8_t connectedPortBitmap; + u_int8_t connectedPortNumbers; + }; + + u_int8_t deviceSpeed; + u_int32_t mediaErrCount; + u_int32_t otherErrCount; + u_int32_t predFailCount; + u_int32_t lastPredFailEventSeqNum; + + u_int16_t fwState; + u_int8_t disabledForRemoval; + u_int8_t linkSpeed; + union MR_PD_DDF_TYPE state; + + struct { + u_int8_t count; + u_int8_t isPathBroken:4; + u_int8_t reserved3:3; + u_int8_t widePortCapable:1; + + u_int8_t connectorIndex[2]; + u_int8_t reserved[4]; + u_int64_t sasAddr[2]; + u_int8_t reserved2[16]; + } pathInfo; + + u_int64_t rawSize; + u_int64_t nonCoercedSize; + u_int64_t coercedSize; + u_int16_t enclDeviceId; + u_int8_t enclIndex; + + union { + u_int8_t slotNumber; + u_int8_t enclConnectorIndex; + }; + + struct MR_PD_PROGRESS progInfo; + u_int8_t badBlockTableFull; + u_int8_t unusableInCurrentConfig; + u_int8_t vpdPage83Ext[64]; + u_int8_t powerState; + u_int8_t enclPosition; + u_int32_t allowedOps; + u_int16_t copyBackPartnerId; + u_int16_t enclPartnerDeviceId; + struct { + u_int16_t fdeCapable:1; + u_int16_t fdeEnabled:1; + u_int16_t secured:1; + u_int16_t locked:1; + u_int16_t foreign:1; + u_int16_t needsEKM:1; + u_int16_t reserved:10; + } security; + u_int8_t mediaType; + u_int8_t notCertified; + u_int8_t bridgeVendor[8]; + u_int8_t bridgeProductIdentification[16]; + u_int8_t bridgeProductRevisionLevel[4]; + u_int8_t satBridgeExists; + + u_int8_t interfaceType; + u_int8_t temperature; + u_int8_t emulatedBlockSize; + u_int16_t userDataBlockSize; + u_int16_t reserved2; + + struct { + u_int32_t piType:3; + u_int32_t piFormatted:1; + u_int32_t piEligible:1; + u_int32_t NCQ:1; + u_int32_t WCE:1; + u_int32_t commissionedSpare:1; + u_int32_t emergencySpare:1; + u_int32_t ineligibleForSSCD:1; + u_int32_t ineligibleForLd:1; + u_int32_t useSSEraseType:1; + u_int32_t wceUnchanged:1; + u_int32_t supportScsiUnmap:1; + u_int32_t reserved:18; + } properties; + + u_int64_t shieldDiagCompletionTime; + u_int8_t shieldCounter; + + u_int8_t linkSpeedOther; + u_int8_t reserved4[2]; + + struct { + u_int32_t bbmErrCountSupported:1; + u_int32_t bbmErrCount:31; + } bbmErr; + + u_int8_t reserved1[512-428]; +} __packed; + +struct mrsas_target { + u_int16_t target_id; + u_int32_t queue_depth; + u_int8_t interface_type; + u_int32_t max_io_size_kb; +} __packed; + /******************************************************************* * per-instance data ********************************************************************/ @@ -3066,10 +3271,14 @@ struct mrsas_softc { bus_addr_t raidmap_phys_addr[2]; bus_dma_tag_t mficmd_frame_tag; bus_dma_tag_t mficmd_sense_tag; + bus_addr_t evt_detail_phys_addr; bus_dma_tag_t evt_detail_tag; bus_dmamap_t evt_detail_dmamap; struct mrsas_evt_detail *evt_detail_mem; - bus_addr_t evt_detail_phys_addr; + bus_addr_t pd_info_phys_addr; + bus_dma_tag_t pd_info_tag; + bus_dmamap_t pd_info_dmamap; + struct mrsas_pd_info *pd_info_mem; struct mrsas_ctrl_info *ctrl_info; bus_dma_tag_t ctlr_info_tag; bus_dmamap_t ctlr_info_dmamap; @@ -3094,6 +3303,7 @@ struct mrsas_softc { bus_addr_t el_info_phys_addr; struct mrsas_pd_list pd_list[MRSAS_MAX_PD]; struct mrsas_pd_list local_pd_list[MRSAS_MAX_PD]; + struct mrsas_target target_list[MRSAS_MAX_TM_TARGETS]; u_int8_t ld_ids[MRSAS_MAX_LD_IDS]; struct taskqueue *ev_tq; struct task ev_task; From owner-svn-src-all@freebsd.org Fri Dec 14 08:04:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08762132443A; Fri, 14 Dec 2018 08:04:18 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 AF0F591AEB; Fri, 14 Dec 2018 08:04:17 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 829F52C6E5; Fri, 14 Dec 2018 08:04:17 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE84HUm087960; Fri, 14 Dec 2018 08:04:17 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE84Gis087956; Fri, 14 Dec 2018 08:04:16 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140804.wBE84Gis087956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342066 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF0F591AEB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.82)[-0.818,0]; NEURAL_HAM_SHORT(-0.73)[-0.725,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:04:18 -0000 Author: kadesai Date: Fri Dec 14 08:04:16 2018 New Revision: 342066 URL: https://svnweb.freebsd.org/changeset/base/342066 Log: This patch will add support for NVME PRPs creation by driver for fastpath capable IOs. NVME specification supports specific type of scatter gather list called as PRP (Physical Region Page) for IO data buffers. Since NVME drive is connected behind SAS3.5 tri-mode adapter, MegaRAID driver/firmware has to convert OS SGLs in native NVMe PRP format. For IOs sent to firmware, MegaRAID firmware does this job of OS SGLs to PRP translation and send PRPs to backend NVME device. For fastpath IOs, driver will do this OS SGLs to PRP translation. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:03:28 2018 (r342065) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:04:16 2018 (r342066) @@ -451,6 +451,12 @@ mrsas_setup_sysctl(struct mrsas_softc *sc) OID_AUTO, "stream detection", CTLFLAG_RW, &sc->drv_stream_detection, 0, "Disable/Enable Stream detection. "); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "prp_count", CTLFLAG_RD, + &sc->prp_count.val_rdonly, 0, "Number of IOs for which PRPs are built"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "SGE holes", CTLFLAG_RD, + &sc->sge_holes.val_rdonly, 0, "Number of IOs with holes in SGEs"); } /* @@ -899,6 +905,8 @@ mrsas_attach(device_t dev) mrsas_atomic_set(&sc->fw_outstanding, 0); mrsas_atomic_set(&sc->target_reset_outstanding, 0); + mrsas_atomic_set(&sc->prp_count, 0); + mrsas_atomic_set(&sc->sge_holes, 0); sc->io_cmds_highwater = 0; @@ -2266,7 +2274,7 @@ mrsas_init_fw(struct mrsas_softc *sc) u_int32_t max_sectors_1; u_int32_t max_sectors_2; u_int32_t tmp_sectors; - u_int32_t scratch_pad_2, scratch_pad_3; + u_int32_t scratch_pad_2, scratch_pad_3, scratch_pad_4; int msix_enable = 0; int fw_msix_count = 0; int i, j; @@ -2350,6 +2358,15 @@ mrsas_init_fw(struct mrsas_softc *sc) return (1); } + if (sc->is_ventura) { + scratch_pad_4 = mrsas_read_reg(sc, offsetof(mrsas_reg_set, + outbound_scratch_pad_4)); + if ((scratch_pad_4 & MR_NVME_PAGE_SIZE_MASK) >= MR_DEFAULT_NVME_PAGE_SHIFT) + sc->nvme_page_size = 1 << (scratch_pad_4 & MR_NVME_PAGE_SIZE_MASK); + + device_printf(sc->mrsas_dev, "NVME page size\t: (%d)\n", sc->nvme_page_size); + } + /* Allocate internal commands for pass-thru */ if (mrsas_alloc_mfi_cmds(sc) != SUCCESS) { device_printf(sc->mrsas_dev, "Allocate MFI cmd failed.\n"); @@ -2652,6 +2669,7 @@ mrsas_ioc_init(struct mrsas_softc *sc) IOCInitMsg->ReplyDescriptorPostQueueAddress = sc->reply_desc_phys_addr; IOCInitMsg->SystemRequestFrameBaseAddress = sc->io_request_phys_addr; IOCInitMsg->HostMSIxVectors = (sc->msix_vectors > 0 ? sc->msix_vectors : 0); + IOCInitMsg->HostPageSize = MR_DEFAULT_NVME_PAGE_SHIFT; init_frame = (struct mrsas_init_frame *)sc->ioc_init_mem; init_frame->cmd = MFI_CMD_INIT; Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:03:28 2018 (r342065) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:04:16 2018 (r342066) @@ -694,7 +694,7 @@ typedef struct _MPI2_IOC_INIT_REQUEST { u_int16_t HeaderVersion; /* 0x0E */ u_int32_t Reserved5; /* 0x10 */ u_int16_t Reserved6; /* 0x14 */ - u_int8_t Reserved7; /* 0x16 */ + u_int8_t HostPageSize; /* 0x16 */ u_int8_t HostMSIxVectors; /* 0x17 */ u_int16_t Reserved8; /* 0x18 */ u_int16_t SystemRequestFrameSize; /* 0x1A */ @@ -763,7 +763,7 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest typedef struct _MR_DEV_HANDLE_INFO { u_int16_t curDevHdl; u_int8_t validHandles; - u_int8_t reserved; + u_int8_t interfaceType; u_int16_t devHandle[2]; } MR_DEV_HANDLE_INFO; @@ -1017,6 +1017,7 @@ struct IO_REQUEST_INFO { u_int16_t ldTgtId; u_int8_t isRead; u_int16_t devHandle; + u_int8_t pdInterface; u_int64_t pdBlock; u_int8_t fpOkForIo; u_int8_t IoforUnevenSpan; @@ -1164,6 +1165,22 @@ typedef struct _MR_FW_RAID_MAP_DYNAMIC { #define IEEE_SGE_FLAGS_CHAIN_ELEMENT (0x80) #define IEEE_SGE_FLAGS_END_OF_LIST (0x40) +/* Few NVME flags defines*/ +#define MPI2_SGE_FLAGS_SHIFT (0x02) +#define IEEE_SGE_FLAGS_FORMAT_MASK (0xC0) +#define IEEE_SGE_FLAGS_FORMAT_IEEE (0x00) +#define IEEE_SGE_FLAGS_FORMAT_PQI (0x01) +#define IEEE_SGE_FLAGS_FORMAT_NVME (0x02) +#define IEEE_SGE_FLAGS_FORMAT_AHCI (0x03) + + +#define MPI26_IEEE_SGE_FLAGS_NSF_MASK (0x1C) +#define MPI26_IEEE_SGE_FLAGS_NSF_MPI_IEEE (0x00) +#define MPI26_IEEE_SGE_FLAGS_NSF_PQI (0x04) +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP (0x08) +#define MPI26_IEEE_SGE_FLAGS_NSF_AHCI_PRDT (0x0C) +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_SGL (0x10) + union desc_value { u_int64_t word; struct { @@ -1227,9 +1244,8 @@ typedef struct _mrsas_register_set { u_int32_t outbound_scratch_pad; /* 00B0h */ u_int32_t outbound_scratch_pad_2; /* 00B4h */ u_int32_t outbound_scratch_pad_3; /* 00B8h */ + u_int32_t outbound_scratch_pad_4; /* 00BCh */ - u_int32_t reserved_4; /* 00BCh */ - u_int32_t inbound_low_queue_port; /* 00C0h */ u_int32_t inbound_high_queue_port; /* 00C4h */ @@ -1678,6 +1694,7 @@ struct mrsas_mpt_cmd { struct mrsas_mpt_cmd *peer_cmd; bool callout_owner; TAILQ_ENTRY(mrsas_mpt_cmd) next; + u_int8_t pdInterface; }; /* @@ -3149,6 +3166,10 @@ struct mrsas_target { u_int32_t max_io_size_kb; } __packed; +#define MR_NVME_PAGE_SIZE_MASK 0x000000FF +#define MR_DEFAULT_NVME_PAGE_SIZE 4096 +#define MR_DEFAULT_NVME_PAGE_SHIFT 12 + /******************************************************************* * per-instance data ********************************************************************/ @@ -3287,6 +3308,8 @@ struct mrsas_softc { u_int32_t max_sectors_per_req; u_int32_t disableOnlineCtrlReset; mrsas_atomic_t fw_outstanding; + mrsas_atomic_t prp_count; + mrsas_atomic_t sge_holes; u_int32_t mrsas_debug; u_int32_t mrsas_io_timeout; @@ -3331,6 +3354,7 @@ struct mrsas_softc { u_int32_t new_map_sz; u_int32_t drv_map_sz; + u_int32_t nvme_page_size; boolean_t is_ventura; boolean_t msix_combined; u_int16_t maxRaidMapSize; Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:03:28 2018 (r342065) +++ head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 08:04:16 2018 (r342066) @@ -105,6 +105,14 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, static int32_t mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, union ccb *ccb); + +static boolean_t mrsas_is_prp_possible(struct mrsas_mpt_cmd *cmd, + bus_dma_segment_t *segs, int nsegs); +static void mrsas_build_ieee_sgl(struct mrsas_mpt_cmd *cmd, + bus_dma_segment_t *segs, int nseg); +static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd *cmd, + bus_dma_segment_t *segs, int nseg); + struct mrsas_mpt_cmd *mrsas_get_mpt_cmd(struct mrsas_softc *sc); MRSAS_REQUEST_DESCRIPTOR_UNION * mrsas_get_request_desc(struct mrsas_softc *sc, u_int16_t index); @@ -1145,6 +1153,7 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp cmd->request_desc->SCSIIO.DevHandle = io_info.devHandle; io_request->DevHandle = io_info.devHandle; + cmd->pdInterface = io_info.pdInterface; } else { /* Not FP IO */ io_request->RaidContext.raid_context.timeoutValue = map_ptr->raidMap.fpPdIoTimeoutSec; @@ -1268,6 +1277,8 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs io_request->RaidContext.raid_context.regLockRowLBA = 0; io_request->RaidContext.raid_context.regLockLength = 0; + cmd->pdInterface = sc->target_list[device_id].interface_type; + /* If FW supports PD sequence number */ if (sc->use_seqnum_jbod_fp && sc->pd_list[device_id].driveType == 0x00) { @@ -1366,6 +1377,72 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrs } /* + * mrsas_is_prp_possible: This function will tell whether PRPs should be built or not + * sc: Adapter instance soft state + * cmd: MPT command frame pointer + * nsesg: Number of OS SGEs + * + * This function will check whether IO is qualified to build PRPs + * return: true: if PRP should be built + * false: if IEEE SGLs should be built + */ +static boolean_t mrsas_is_prp_possible(struct mrsas_mpt_cmd *cmd, + bus_dma_segment_t *segs, int nsegs) +{ + struct mrsas_softc *sc = cmd->sc; + int i; + u_int32_t data_length = 0; + bool build_prp = false; + u_int32_t mr_nvme_pg_size; + + mr_nvme_pg_size = max(sc->nvme_page_size, MR_DEFAULT_NVME_PAGE_SIZE); + data_length = cmd->length; + + if (data_length > (mr_nvme_pg_size * 5)) + build_prp = true; + else if ((data_length > (mr_nvme_pg_size * 4)) && + (data_length <= (mr_nvme_pg_size * 5))) { + /* check if 1st SG entry size is < residual beyond 4 pages */ + if ((segs[0].ds_len) < (data_length - (mr_nvme_pg_size * 4))) + build_prp = true; + } + + /*check for SGE holes here*/ + for (i = 0; i < nsegs; i++) { + /* check for mid SGEs */ + if ((i != 0) && (i != (nsegs - 1))) { + if ((segs[i].ds_addr % mr_nvme_pg_size) || + (segs[i].ds_len % mr_nvme_pg_size)) { + build_prp = false; + mrsas_atomic_inc(&sc->sge_holes); + break; + } + } + + /* check for first SGE*/ + if ((nsegs > 1) && (i == 0)) { + if ((segs[i].ds_addr + segs[i].ds_len) % mr_nvme_pg_size) { + build_prp = false; + mrsas_atomic_inc(&sc->sge_holes); + break; + } + } + + /* check for Last SGE*/ + if ((nsegs > 1) && (i == (nsegs - 1))) { + if (segs[i].ds_addr % mr_nvme_pg_size) { + build_prp = false; + mrsas_atomic_inc(&sc->sge_holes); + break; + } + } + + } + + return build_prp; +} + +/* * mrsas_map_request: Map and load data * input: Adapter instance soft state * Pointer to command packet @@ -1427,42 +1504,21 @@ mrsas_unmap_request(struct mrsas_softc *sc, struct mrs } } -/* - * mrsas_data_load_cb: Callback entry point - * input: Pointer to command packet as argument - * Pointer to segment - * Number of segments Error - * - * This is the callback function of the bus dma map load. It builds the SG - * list. +/** + * mrsas_build_ieee_sgl - Prepare IEEE SGLs + * @sc: Adapter soft state + * @segs: OS SGEs pointers + * @nseg: Number of OS SGEs + * @cmd: Fusion command frame + * return: void */ -static void -mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) +static void mrsas_build_ieee_sgl(struct mrsas_mpt_cmd *cmd, bus_dma_segment_t *segs, int nseg) { - struct mrsas_mpt_cmd *cmd = (struct mrsas_mpt_cmd *)arg; struct mrsas_softc *sc = cmd->sc; MRSAS_RAID_SCSI_IO_REQUEST *io_request; pMpi25IeeeSgeChain64_t sgl_ptr; int i = 0, sg_processed = 0; - if (error) { - cmd->error_code = error; - device_printf(sc->mrsas_dev, "mrsas_data_load_cb: error=%d\n", error); - if (error == EFBIG) { - cmd->ccb_ptr->ccb_h.status = CAM_REQ_TOO_BIG; - return; - } - } - if (cmd->flags & MRSAS_DIR_IN) - bus_dmamap_sync(cmd->sc->data_tag, cmd->data_dmamap, - BUS_DMASYNC_PREREAD); - if (cmd->flags & MRSAS_DIR_OUT) - bus_dmamap_sync(cmd->sc->data_tag, cmd->data_dmamap, - BUS_DMASYNC_PREWRITE); - if (nseg > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "SGE count is too large or 0.\n"); - return; - } io_request = cmd->io_request; sgl_ptr = (pMpi25IeeeSgeChain64_t)&io_request->SGL; @@ -1484,12 +1540,12 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, sgl_ptr++; sg_processed = i + 1; if ((sg_processed == (sc->max_sge_in_main_msg - 1)) && - (nseg > sc->max_sge_in_main_msg)) { + (nseg > sc->max_sge_in_main_msg)) { pMpi25IeeeSgeChain64_t sg_chain; if (sc->mrsas_gen3_ctrl || sc->is_ventura) { if ((cmd->io_request->IoFlags & MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) - != MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) + != MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) cmd->io_request->ChainOffset = sc->chain_offset_io_request; else cmd->io_request->ChainOffset = 0; @@ -1506,6 +1562,166 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, } } } +} + +/** + * mrsas_build_prp_nvme - Prepare PRPs(Physical Region Page)- SGLs specific to NVMe drives only + * @sc: Adapter soft state + * @segs: OS SGEs pointers + * @nseg: Number of OS SGEs + * @cmd: Fusion command frame + * return: void + */ +static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd *cmd, bus_dma_segment_t *segs, int nseg) +{ + struct mrsas_softc *sc = cmd->sc; + int sge_len, offset, num_prp_in_chain = 0; + pMpi25IeeeSgeChain64_t main_chain_element, ptr_first_sgl, sgl_ptr; + u_int64_t *ptr_sgl, *ptr_sgl_phys; + u_int64_t sge_addr; + u_int32_t page_mask, page_mask_result, i = 0; + u_int32_t first_prp_len; + int data_len = cmd->length; + u_int32_t mr_nvme_pg_size = max(sc->nvme_page_size, + MR_DEFAULT_NVME_PAGE_SIZE); + + sgl_ptr = (pMpi25IeeeSgeChain64_t) &cmd->io_request->SGL; + /* + * NVMe has a very convoluted PRP format. One PRP is required + * for each page or partial page. We need to split up OS SG + * entries if they are longer than one page or cross a page + * boundary. We also have to insert a PRP list pointer entry as + * the last entry in each physical page of the PRP list. + * + * NOTE: The first PRP "entry" is actually placed in the first + * SGL entry in the main message in IEEE 64 format. The 2nd + * entry in the main message is the chain element, and the rest + * of the PRP entries are built in the contiguous PCIe buffer. + */ + page_mask = mr_nvme_pg_size - 1; + ptr_sgl = (u_int64_t *) cmd->chain_frame; + ptr_sgl_phys = (u_int64_t *) cmd->chain_frame_phys_addr;; + + /* Build chain frame element which holds all PRPs except first*/ + main_chain_element = (pMpi25IeeeSgeChain64_t) + ((u_int8_t *)sgl_ptr + sizeof(MPI25_IEEE_SGE_CHAIN64)); + + + main_chain_element->Address = (u_int64_t) ptr_sgl_phys; + main_chain_element->NextChainOffset = 0; + main_chain_element->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT | + IEEE_SGE_FLAGS_SYSTEM_ADDR | + MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP; + + + /* Build first PRP, SGE need not to be PAGE aligned*/ + ptr_first_sgl = sgl_ptr; + sge_addr = segs[i].ds_addr; + sge_len = segs[i].ds_len; + i++; + + offset = (u_int32_t) (sge_addr & page_mask); + first_prp_len = mr_nvme_pg_size - offset; + + ptr_first_sgl->Address = sge_addr; + ptr_first_sgl->Length = first_prp_len; + + data_len -= first_prp_len; + + if (sge_len > first_prp_len) { + sge_addr += first_prp_len; + sge_len -= first_prp_len; + } else if (sge_len == first_prp_len) { + sge_addr = segs[i].ds_addr; + sge_len = segs[i].ds_len; + i++; + } + + for (;;) { + + offset = (u_int32_t) (sge_addr & page_mask); + + /* Put PRP pointer due to page boundary*/ + page_mask_result = (uintptr_t)(ptr_sgl + 1) & page_mask; + if (!page_mask_result) { + device_printf(sc->mrsas_dev, "BRCM: Put prp pointer as we are at page boundary" + " ptr_sgl: 0x%p\n", ptr_sgl); + ptr_sgl_phys++; + *ptr_sgl = (uintptr_t)ptr_sgl_phys; + ptr_sgl++; + num_prp_in_chain++; + } + + *ptr_sgl = sge_addr; + ptr_sgl++; + ptr_sgl_phys++; + num_prp_in_chain++; + + + sge_addr += mr_nvme_pg_size; + sge_len -= mr_nvme_pg_size; + data_len -= mr_nvme_pg_size; + + if (data_len <= 0) + break; + + if (sge_len > 0) + continue; + + sge_addr = segs[i].ds_addr; + sge_len = segs[i].ds_len; + i++; + } + + main_chain_element->Length = num_prp_in_chain * sizeof(u_int64_t); + mrsas_atomic_inc(&sc->prp_count); + +} + +/* + * mrsas_data_load_cb: Callback entry point to build SGLs + * input: Pointer to command packet as argument + * Pointer to segment + * Number of segments Error + * + * This is the callback function of the bus dma map load. It builds SG list + */ +static void +mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + struct mrsas_mpt_cmd *cmd = (struct mrsas_mpt_cmd *)arg; + struct mrsas_softc *sc = cmd->sc; + boolean_t build_prp = false; + + if (error) { + cmd->error_code = error; + device_printf(sc->mrsas_dev, "mrsas_data_load_cb_prp: error=%d\n", error); + if (error == EFBIG) { + cmd->ccb_ptr->ccb_h.status = CAM_REQ_TOO_BIG; + return; + } + } + if (cmd->flags & MRSAS_DIR_IN) + bus_dmamap_sync(cmd->sc->data_tag, cmd->data_dmamap, + BUS_DMASYNC_PREREAD); + if (cmd->flags & MRSAS_DIR_OUT) + bus_dmamap_sync(cmd->sc->data_tag, cmd->data_dmamap, + BUS_DMASYNC_PREWRITE); + if (nseg > sc->max_num_sge) { + device_printf(sc->mrsas_dev, "SGE count is too large or 0.\n"); + return; + } + + /* Check for whether PRPs should be built or IEEE SGLs*/ + if ((cmd->io_request->IoFlags & MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) && + (cmd->pdInterface == NVME_PD)) + build_prp = mrsas_is_prp_possible(cmd, segs, nseg); + + if (build_prp == true) + mrsas_build_prp_nvme(cmd, segs, nseg); + else + mrsas_build_ieee_sgl(cmd, segs, nseg); + cmd->sge_count = nseg; } Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 08:03:28 2018 (r342065) +++ head/sys/dev/mrsas/mrsas_fp.c Fri Dec 14 08:04:16 2018 (r342066) @@ -219,6 +219,12 @@ MR_PdDevHandleGet(u_int32_t pd, MR_DRV_RAID_MAP_ALL * return map->raidMap.devHndlInfo[pd].curDevHdl; } +static u_int8_t MR_PdInterfaceTypeGet(u_int32_t pd, MR_DRV_RAID_MAP_ALL *map) +{ + return map->raidMap.devHndlInfo[pd].interfaceType; +} + + static u_int16_t MR_ArPdGet(u_int32_t ar, u_int32_t arm, MR_DRV_RAID_MAP_ALL * map) { @@ -927,6 +933,8 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in u_int8_t retval = TRUE; u_int64_t *pdBlock = &io_info->pdBlock; u_int16_t *pDevHandle = &io_info->devHandle; + u_int8_t *pPdInterface = &io_info->pdInterface; + u_int32_t logArm, rowMod, armQ, arm; /* Get row and span from io_info for Uneven Span IO. */ @@ -952,6 +960,7 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in if (pd != MR_PD_INVALID) { *pDevHandle = MR_PdDevHandleGet(pd, map); + *pPdInterface = MR_PdInterfaceTypeGet(pd, map); /* get second pd also for raid 1/10 fast path writes */ if ((raid->level == 1) && !io_info->isRead) { r1_alt_pd = MR_ArPdGet(arRef, physArm + 1, map); @@ -966,8 +975,10 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE; else if (raid->level == 1) { pd = MR_ArPdGet(arRef, physArm + 1, map); - if (pd != MR_PD_INVALID) + if (pd != MR_PD_INVALID) { *pDevHandle = MR_PdDevHandleGet(pd, map); + *pPdInterface = MR_PdInterfaceTypeGet(pd, map); + } } } @@ -1622,6 +1633,7 @@ mrsas_get_updated_dev_handle(struct mrsas_softc *sc, /* get best new arm */ arm_pd = mrsas_get_best_arm_pd(sc, lbInfo, io_info); devHandle = MR_PdDevHandleGet(arm_pd, drv_map); + io_info->pdInterface = MR_PdInterfaceTypeGet(arm_pd, drv_map); mrsas_atomic_inc(&lbInfo->scsi_pending_cmds[arm_pd]); return devHandle; @@ -1653,6 +1665,7 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, int error_code = 0; u_int64_t *pdBlock = &io_info->pdBlock; u_int16_t *pDevHandle = &io_info->devHandle; + u_int8_t *pPdInterface = &io_info->pdInterface; u_int32_t rowMod, armQ, arm, logArm; row = mega_div64_32(stripRow, raid->rowDataSize); @@ -1691,6 +1704,7 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, if (pd != MR_PD_INVALID) { /* Get dev handle from Pd */ *pDevHandle = MR_PdDevHandleGet(pd, map); + *pPdInterface = MR_PdInterfaceTypeGet(pd, map); /* get second pd also for raid 1/10 fast path writes */ if ((raid->level == 1) && !io_info->isRead) { r1_alt_pd = MR_ArPdGet(arRef, physArm + 1, map); @@ -1706,9 +1720,11 @@ MR_GetPhyParams(struct mrsas_softc *sc, u_int32_t ld, else if (raid->level == 1) { /* Get Alternate Pd. */ pd = MR_ArPdGet(arRef, physArm + 1, map); - if (pd != MR_PD_INVALID) + if (pd != MR_PD_INVALID) { /* Get dev handle from Pd. */ *pDevHandle = MR_PdDevHandleGet(pd, map); + *pPdInterface = MR_PdInterfaceTypeGet(pd, map); + } } } From owner-svn-src-all@freebsd.org Fri Dec 14 08:05:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCA57132450B; Fri, 14 Dec 2018 08:05:02 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 7353591C75; Fri, 14 Dec 2018 08:05:02 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 660332C6E6; Fri, 14 Dec 2018 08:05:02 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE852ai088044; Fri, 14 Dec 2018 08:05:02 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE851lf088042; Fri, 14 Dec 2018 08:05:01 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140805.wBE851lf088042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342067 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7353591C75 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.72)[-0.715,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:05:03 -0000 Author: kadesai Date: Fri Dec 14 08:05:01 2018 New Revision: 342067 URL: https://svnweb.freebsd.org/changeset/base/342067 Log: Change IOC INIT wait time to 180 secs to keep it inline with timeout used by internal DCMDs. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:04:16 2018 (r342066) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:05:01 2018 (r342067) @@ -2641,7 +2641,7 @@ mrsas_ioc_init(struct mrsas_softc *sc) struct mrsas_init_frame *init_frame; pMpi2IOCInitRequest_t IOCInitMsg; MRSAS_REQUEST_DESCRIPTOR_UNION req_desc; - u_int8_t max_wait = MRSAS_IOC_INIT_WAIT_TIME; + u_int8_t max_wait = MRSAS_INTERNAL_CMD_WAIT_TIME; bus_addr_t phys_addr; int i, retcode = 0; u_int32_t scratch_pad_2; Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:04:16 2018 (r342066) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:05:01 2018 (r342067) @@ -2287,7 +2287,6 @@ struct mrsas_ctrl_info { */ #define MRSAS_RESET_WAIT_TIME 180 #define MRSAS_INTERNAL_CMD_WAIT_TIME 180 -#define MRSAS_IOC_INIT_WAIT_TIME 60 #define MRSAS_RESET_NOTICE_INTERVAL 5 #define MRSAS_IOCTL_CMD 0 #define MRSAS_DEFAULT_CMD_TIMEOUT 90 From owner-svn-src-all@freebsd.org Fri Dec 14 08:05:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78BBE13245E2; Fri, 14 Dec 2018 08:05:50 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 1ED2591DFE; Fri, 14 Dec 2018 08:05:50 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04C4D2C6EA; Fri, 14 Dec 2018 08:05:50 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE85n1p088123; Fri, 14 Dec 2018 08:05:49 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE85nEo088122; Fri, 14 Dec 2018 08:05:49 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140805.wBE85nEo088122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342068 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1ED2591DFE X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.72)[-0.715,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:05:50 -0000 Author: kadesai Date: Fri Dec 14 08:05:49 2018 New Revision: 342068 URL: https://svnweb.freebsd.org/changeset/base/342068 Log: This patch will increase debug level as current logging level has very minimal prints and even few important messages will not get logged. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:05:01 2018 (r342067) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 08:05:49 2018 (r342068) @@ -471,7 +471,8 @@ mrsas_get_tunables(struct mrsas_softc *sc) char tmpstr[80]; /* XXX default to some debugging for now */ - sc->mrsas_debug = MRSAS_FAULT; + sc->mrsas_debug = + (MRSAS_FAULT | MRSAS_OCR | MRSAS_INFO | MRSAS_TRACE | MRSAS_AEN); sc->mrsas_io_timeout = MRSAS_IO_TIMEOUT; sc->mrsas_fw_fault_check_delay = 1; sc->reset_count = 0; From owner-svn-src-all@freebsd.org Fri Dec 14 08:06:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20F2F13246AD; Fri, 14 Dec 2018 08:06:40 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 BD22391F5A; Fri, 14 Dec 2018 08:06:39 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFA002C6EC; Fri, 14 Dec 2018 08:06:39 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE86ddd088198; Fri, 14 Dec 2018 08:06:39 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE86dqC088197; Fri, 14 Dec 2018 08:06:39 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812140806.wBE86dqC088197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 08:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342069 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD22391F5A X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.828,0]; NEURAL_HAM_SHORT(-0.72)[-0.715,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:06:40 -0000 Author: kadesai Date: Fri Dec 14 08:06:39 2018 New Revision: 342069 URL: https://svnweb.freebsd.org/changeset/base/342069 Log: Driver version upgrade 07.708.02.00-fbsd Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.h Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:05:49 2018 (r342068) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 08:06:39 2018 (r342069) @@ -110,7 +110,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "06.712.04.00-fbsd" +#define MRSAS_VERSION "07.708.02.00-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 /* Temporarily set */ #define DONE 0 From owner-svn-src-all@freebsd.org Fri Dec 14 08:44:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C481F13257AD for ; Fri, 14 Dec 2018 08:44:03 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-it1-x12a.google.com (mail-it1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FC6F933BD for ; Fri, 14 Dec 2018 08:44:02 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-it1-x12a.google.com with SMTP id b5so8197350iti.2 for ; Fri, 14 Dec 2018 00:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=aaE2yZ6Pj+MW6RclUYAS+Yze8gVMNSwgNIT8CI/ksvk=; b=plv3AQ6qu9/oG4TBPZojd8mhcD8FF89cSG7b0sA+pP1kY+/n7JHSx77OhZUSHVlAG7 y8RmlIoQylPYZ9zIpxOMC+g6ye0qTvLtXpaI6O1tEVb4fVH/dKnIFfToTsTyik9maLmN Dh/FfAMSFLQHtIO6moVb0rcWQ0wJkcYJ5Iwg3J1gVcZWgEpY2OTlmvQ51LlNHG8/znUs 8S6Viz8MbFUyWZ/5sS95wsLhjPzETfA2XE+reUkU2g4BjObCB9USYiNj2BNtbuiVLv1o DbviEd8jNaK7mvwTz2S9cLRrU2xn12gNRwFyDOgCg796L1LKT98v/xSN/9/DomUyRde+ dezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=aaE2yZ6Pj+MW6RclUYAS+Yze8gVMNSwgNIT8CI/ksvk=; b=HrkN54sXUUSs4nYgmCO9fCtHkY4T+a2vyUZcDAA6DxvAaNkebmid4jMpPjJv5kZ9Cl VpRrrf/KgUAHLdmog7FE9MNqcYqaO6CQx+6zVKtQ3ZxKTFoqtyAkMUbpHcRfHPNkDLMq GcW1uAADC7Wv29pc9jDFsbF1HPxK1mhD9mRzIJvvQsYTn1Jmz9x4vYlhOEMHzvFNspO8 qWuLBK5ol9gWXpW5QJsbJYQosBKpakN10XaD+mJ383HfyL31/8xAcn5c+/tEezpi1uAd H9csXLOzoiK2T11zFVUH7qbr62zzy1JNTJaCNb/xYf6NyhfZxF4ICr/OtEbuVlDmpN84 XnZw== X-Gm-Message-State: AA+aEWZVU6CXsDUL+6ZY3MeRBW/pOFVFAOQrqN687rLnr5jN2WbOsbjw KjTm2TwkzVdGTX3h+CACiIXR49E4vZrO39O1p0FJlA== X-Google-Smtp-Source: AFSGD/UGFWCaSY5ZgZmhcRglWGYR6Gc7fsdXA51eXq2A2k+XWXnzvcs/4iSmlHUD/7D6PL8EvpETlCr5r8MqKtgrnrQ= X-Received: by 2002:a02:5ec9:: with SMTP id h192mr1835025jab.112.1544777041763; Fri, 14 Dec 2018 00:44:01 -0800 (PST) MIME-Version: 1.0 References: <201812122233.wBCMX5hg025508@repo.freebsd.org> In-Reply-To: <201812122233.wBCMX5hg025508@repo.freebsd.org> From: Marcin Wojtas Date: Fri, 14 Dec 2018 09:43:49 +0100 Message-ID: Subject: Re: svn commit: r342020 - in head/sys: arm/mv arm64/conf conf To: manu@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 8FC6F933BD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=plv3AQ6q X-Spamd-Result: default: False [-4.23 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; R_DKIM_ALLOW(-0.20)[semihalf-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[semihalf.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[semihalf-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[ASPMX2.GOOGLEMAIL.com,ALT2.ASPMX.L.GOOGLE.com,ASPMX.L.GOOGLE.com,ALT1.ASPMX.L.GOOGLE.com,ASPMX3.GOOGLEMAIL.com]; RCVD_IN_DNSWL_NONE(0.00)[a.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.93)[-0.932,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.00)[ip: (-6.97), ipnet: 2607:f8b0::/32(-1.60), asn: 15169(-1.32), country: US(-0.09)] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 08:44:04 -0000 Hi Manu, Imo the new driver is adding code duplication - please check sys/arm/mv/armada/thermal.c. It contains support for armada38x (which has BTW exactly same coefficients as CP110). Basically it would be enough to add 2 structures for ap806 and cp110. Best regards, Marcin=C5=9Br., 12 gru 2018 o 23:33 Emmanuel Vadot napis= a=C5=82(a): > > Author: manu > Date: Wed Dec 12 22:33:05 2018 > New Revision: 342020 > URL: https://svnweb.freebsd.org/changeset/base/342020 > > Log: > mv_thermal: Add thermal driver for AP806 and CP110 thermal sensor > > Sponsored by: Rubicon Communications, LLC ("Netgate") > > Added: > head/sys/arm/mv/mv_thermal.c (contents, props changed) > Modified: > head/sys/arm64/conf/GENERIC > head/sys/conf/files.arm64 > > Added: head/sys/arm/mv/mv_thermal.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/arm/mv/mv_thermal.c Wed Dec 12 22:33:05 2018 (= r342020) > @@ -0,0 +1,381 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in th= e > + * documentation and/or other materials provided with the distributio= n. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AN= D > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PU= RPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIAB= LE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUE= NTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOO= DS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S= TRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY= WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O= F > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include > + > +#include > +#include > + > +#define CONTROL0 0x00 > +#define CONTROL0_TSEN_START (1 << 0) > +#define CONTROL0_TSEN_RESET (1 << 1) > +#define CONTROL0_TSEN_EN (1 << 2) > +#define CONTROL0_CHANNEL_SHIFT 13 > +#define CONTROL0_CHANNEL_MASK 0xF > +#define CONTROL0_OSR_SHIFT 24 > +#define CONTROL0_OSR_MAX 3 /* OSR =3D 512 * 4uS =3D = ~2mS */ > +#define CONTROL0_MODE_SHIFT 30 > +#define CONTROL0_MODE_EXTERNAL 0x2 > +#define CONTROL0_MODE_MASK 0x3 > + > +#define CONTROL1 0x04 > +/* This doesn't seems to work */ > +#define CONTROL1_TSEN_SENS_SHIFT 21 > +#define CONTROL1_TSEN_SENS_MASK 0x7 > + > +#define STATUS 0x00 > +#define STATUS_TEMP_MASK 0x3FF > + > +enum mv_thermal_type { > + MV_AP806 =3D 1, > + MV_CP110, > +}; > + > +struct mv_thermal_config { > + enum mv_thermal_type type; > + int ncpus; > + int64_t calib_mul; > + int64_t calib_add; > + int64_t calib_div; > + uint32_t valid_mask; > + bool signed_value; > +}; > + > +struct mv_thermal_softc { > + device_t dev; > + struct resource *res[2]; > + struct mtx mtx; > + > + struct mv_thermal_config *config; > + int cur_sensor; > +}; > + > +static struct mv_thermal_config mv_ap806_config =3D { > + .type =3D MV_AP806, > + .ncpus =3D 4, > + .calib_mul =3D 423, > + .calib_add =3D -150000, > + .calib_div =3D 100, > + .valid_mask =3D (1 << 16), > + .signed_value =3D true, > +}; > + > +static struct mv_thermal_config mv_cp110_config =3D { > + .type =3D MV_CP110, > + .calib_mul =3D 2000096, > + .calib_add =3D 1172499100, > + .calib_div =3D 420100, > + .valid_mask =3D (1 << 10), > + .signed_value =3D false, > +}; > + > +static struct resource_spec mv_thermal_res_spec[] =3D { > + { SYS_RES_MEMORY, 0, RF_ACTIVE }, > + { SYS_RES_MEMORY, 1, RF_ACTIVE }, > + { -1, 0 } > +}; > + > +static struct ofw_compat_data compat_data[] =3D { > + {"marvell,armada-ap806-thermal", (uintptr_t) &mv_ap806_config}, > + {"marvell,armada-cp110-thermal", (uintptr_t) &mv_cp110_config}, > + {NULL, 0} > +}; > + > +#define RD_STA(sc, reg) bus_read_4((sc)->res[0], (reg)) > +#define WR_STA(sc, reg, val) bus_write_4((sc)->res[0], (reg), = (val)) > +#define RD_CON(sc, reg) bus_read_4((sc)->res[1], (reg)) > +#define WR_CON(sc, reg, val) bus_write_4((sc)->res[1], (reg), = (val)) > + > +static inline int32_t sign_extend(uint32_t value, int index) > +{ > + uint8_t shift; > + > + shift =3D 31 - index; > + return ((int32_t)(value << shift) >> shift); > +} > + > +static int > +mv_thermal_wait_sensor(struct mv_thermal_softc *sc) > +{ > + uint32_t reg; > + uint32_t timeout; > + > + timeout =3D 100000; > + while (--timeout > 0) { > + reg =3D RD_STA(sc, STATUS); > + if ((reg & sc->config->valid_mask) =3D=3D sc->config->val= id_mask) > + break; > + DELAY(100); > + } > + if (timeout =3D=3D 0) { > + return (ETIMEDOUT); > + } > + > + return (0); > +} > + > +static int > +mv_thermal_select_sensor(struct mv_thermal_softc *sc, int sensor) > +{ > + uint32_t reg; > + > + if (sc->cur_sensor =3D=3D sensor) > + return (0); > + > + /* Stop the current reading and reset the module */ > + reg =3D RD_CON(sc, CONTROL0); > + reg &=3D ~(CONTROL0_TSEN_START | CONTROL0_TSEN_EN); > + WR_CON(sc, CONTROL0, reg); > + > + /* Switch to the selected sensor */ > + /* > + * NOTE : Datasheet says to use CONTROL1 for selecting > + * but when doing so the sensors >0 are never ready > + * Do what Linux does using undocumented bits in CONTROL0 > + */ > + /* This reset automatically to the sensor 0 */ > + reg &=3D ~(CONTROL0_MODE_MASK << CONTROL0_MODE_SHIFT); > + if (sensor) { > + /* Select external sensor */ > + reg |=3D CONTROL0_MODE_EXTERNAL << CONTROL0_MODE_SHIFT; > + reg &=3D ~(CONTROL0_CHANNEL_MASK << CONTROL0_CHANNEL_SHIF= T); > + reg |=3D (sensor - 1) << CONTROL0_CHANNEL_SHIFT; > + } > + WR_CON(sc, CONTROL0, reg); > + sc->cur_sensor =3D sensor; > + > + /* Start the reading */ > + reg =3D RD_CON(sc, CONTROL0); > + reg |=3D CONTROL0_TSEN_START | CONTROL0_TSEN_EN; > + WR_CON(sc, CONTROL0, reg); > + > + return (mv_thermal_wait_sensor(sc)); > +} > + > +static int > +mv_thermal_read_sensor(struct mv_thermal_softc *sc, int sensor, int *tem= p) > +{ > + uint32_t reg; > + int64_t sample, rv; > + > + rv =3D mv_thermal_select_sensor(sc, sensor); > + if (rv !=3D 0) > + return (rv); > + > + reg =3D RD_STA(sc, STATUS) & STATUS_TEMP_MASK; > + > + if (sc->config->signed_value) > + sample =3D sign_extend(reg, fls(STATUS_TEMP_MASK) - 1); > + else > + sample =3D reg; > + > + *temp =3D ((sample * sc->config->calib_mul) - sc->config->calib_a= dd) / > + sc->config->calib_div; > + > + return (0); > +} > + > +static int > +ap806_init(struct mv_thermal_softc *sc) > +{ > + uint32_t reg; > + > + /* Start the temp capture/conversion */ > + reg =3D RD_CON(sc, CONTROL0); > + reg &=3D ~CONTROL0_TSEN_RESET; > + reg |=3D CONTROL0_TSEN_START | CONTROL0_TSEN_EN; > + > + /* Sample every ~2ms */ > + reg |=3D CONTROL0_OSR_MAX << CONTROL0_OSR_SHIFT; > + > + WR_CON(sc, CONTROL0, reg); > + > + /* Since we just started the module wait for the sensor to be rea= dy */ > + mv_thermal_wait_sensor(sc); > + > + return (0); > +} > + > +static int > +cp110_init(struct mv_thermal_softc *sc) > +{ > + uint32_t reg; > + > + reg =3D RD_CON(sc, CONTROL1); > + reg &=3D (1 << 7); > + reg |=3D (1 << 8); > + WR_CON(sc, CONTROL1, reg); > + > + /* Sample every ~2ms */ > + reg =3D RD_CON(sc, CONTROL0); > + reg |=3D CONTROL0_OSR_MAX << CONTROL0_OSR_SHIFT; > + WR_CON(sc, CONTROL0, reg); > + > + return (0); > +} > + > +static int > +mv_thermal_sysctl(SYSCTL_HANDLER_ARGS) > +{ > + struct mv_thermal_softc *sc; > + device_t dev =3D arg1; > + int sensor =3D arg2; > + int val =3D 0; > + > + sc =3D device_get_softc(dev); > + mtx_lock(&(sc)->mtx); > + > + if (mv_thermal_read_sensor(sc, sensor, &val) =3D=3D 0) { > + /* Convert to Kelvin */ > + val =3D val + 2732; > + } else { > + device_printf(dev, "Timeout waiting for sensor\n"); > + } > + > + mtx_unlock(&(sc)->mtx); > + return sysctl_handle_opaque(oidp, &val, sizeof(val), req); > +} > + > +static int > +mv_thermal_probe(device_t dev) > +{ > + > + if (!ofw_bus_status_okay(dev)) > + return (ENXIO); > + > + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data =3D=3D = 0) > + return (ENXIO); > + > + device_set_desc(dev, "Marvell Thermal Sensor Controller"); > + return (BUS_PROBE_DEFAULT); > +} > + > +static int > +mv_thermal_attach(device_t dev) > +{ > + struct mv_thermal_softc *sc; > + struct sysctl_ctx_list *ctx; > + struct sysctl_oid_list *oid; > + char name[255]; > + char desc[255]; > + int i; > + > + sc =3D device_get_softc(dev); > + sc->dev =3D dev; > + > + sc->config =3D (struct mv_thermal_config *)ofw_bus_search_compati= ble(dev, compat_data)->ocd_data; > + > + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); > + > + if (bus_alloc_resources(dev, mv_thermal_res_spec, sc->res) !=3D 0= ) { > + device_printf(dev, "cannot allocate resources for device\= n"); > + return (ENXIO); > + } > + > + sc->cur_sensor =3D -1; > + switch (sc->config->type) { > + case MV_AP806: > + ap806_init(sc); > + break; > + case MV_CP110: > + cp110_init(sc); > + break; > + } > + > + ctx =3D device_get_sysctl_ctx(dev); > + oid =3D SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); > + /* There is always at least one sensor */ > + SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, "internal", > + CTLTYPE_INT | CTLFLAG_RD, > + dev, 0, mv_thermal_sysctl, > + "IK", > + "Internal Temperature"); > + > + for (i =3D 0; i < sc->config->ncpus; i++) { > + snprintf(name, sizeof(name), "cpu%d", i); > + snprintf(desc, sizeof(desc), "CPU%d Temperature", i); > + SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, name, > + CTLTYPE_INT | CTLFLAG_RD, > + dev, i + 1, mv_thermal_sysctl, > + "IK", > + desc); > + } > + > + return (0); > +} > + > +static int > +mv_thermal_detach(device_t dev) > +{ > + struct mv_thermal_softc *sc; > + > + sc =3D device_get_softc(dev); > + > + bus_release_resources(dev, mv_thermal_res_spec, sc->res); > + > + return (0); > +} > + > +static device_method_t mv_thermal_methods[] =3D { > + /* Device interface */ > + DEVMETHOD(device_probe, mv_thermal_probe), > + DEVMETHOD(device_attach, mv_thermal_attach), > + DEVMETHOD(device_detach, mv_thermal_detach), > + > + DEVMETHOD_END > +}; > + > +static devclass_t mv_thermal_devclass; > + > +static driver_t mv_thermal_driver =3D { > + "mv_thermal", > + mv_thermal_methods, > + sizeof(struct mv_thermal_softc), > +}; > + > +DRIVER_MODULE(mv_thermal, simplebus, mv_thermal_driver, > + mv_thermal_devclass, 0, 0); > > Modified: head/sys/arm64/conf/GENERIC > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/arm64/conf/GENERIC Wed Dec 12 22:24:30 2018 (r342019) > +++ head/sys/arm64/conf/GENERIC Wed Dec 12 22:33:05 2018 (r342020) > @@ -240,6 +240,7 @@ device aw_sid # Allwinner Secur= e ID EFUSE > > # Thermal sensors > device aw_thermal # Allwinner Thermal Sensor Controller > +device mv_thermal # Marvell Thermal Sensor Controller > > # SPI > device spibus > > Modified: head/sys/conf/files.arm64 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/files.arm64 Wed Dec 12 22:24:30 2018 (r342019) > +++ head/sys/conf/files.arm64 Wed Dec 12 22:33:05 2018 (r342020) > @@ -95,6 +95,7 @@ arm/mv/mv_cp110_icu.c optional = mv_cp110_icu fdt > arm/mv/mv_ap806_gicp.c optional mv_ap806_gicp fd= t > arm/mv/mv_ap806_clock.c optional SOC_MARV= ELL_8K fdt > arm/mv/mv_cp110_clock.c optional SOC_MARV= ELL_8K fdt > +arm/mv/mv_thermal.c optional SOC_MARVELL_8K m= v_thermal fdt > arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt > arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_= zynq > arm64/acpica/acpi_machdep.c optional acpi > From owner-svn-src-all@freebsd.org Fri Dec 14 09:06:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B811F13269CD; Fri, 14 Dec 2018 09:06:57 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 5CBC694187; Fri, 14 Dec 2018 09:06:57 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C7582D124; Fri, 14 Dec 2018 09:06:57 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE96vsb020009; Fri, 14 Dec 2018 09:06:57 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE96vYx020008; Fri, 14 Dec 2018 09:06:57 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812140906.wBE96vYx020008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Fri, 14 Dec 2018 09:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342070 - stable/12/sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/netmap X-SVN-Commit-Revision: 342070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5CBC694187 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.57 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.866,0]; NEURAL_HAM_SHORT(-0.71)[-0.708,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 09:06:57 -0000 Author: vmaffione Date: Fri Dec 14 09:06:56 2018 New Revision: 342070 URL: https://svnweb.freebsd.org/changeset/base/342070 Log: MFC r341680 netmap: remove dead code obsoleted by iflib The iflib subsystem implements netmap support in a driver-independent way (sys/net/iflib.c). We can therefore remove the headers that used to implement netmap support for all the drivers now supported by iflib (em, igb, ixl, ixgbe, lem). Deleted: stable/12/sys/dev/netmap/if_em_netmap.h stable/12/sys/dev/netmap/if_igb_netmap.h stable/12/sys/dev/netmap/if_ixl_netmap.h stable/12/sys/dev/netmap/if_lem_netmap.h stable/12/sys/dev/netmap/ixgbe_netmap.h Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-all@freebsd.org Fri Dec 14 09:24:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9452213279AD; Fri, 14 Dec 2018 09:24:15 +0000 (UTC) (envelope-from eugen@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) server-signature RSA-PSS (4096 bits) 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 E6E3E94EA0; Fri, 14 Dec 2018 09:24:14 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9CDB2D4B1; Fri, 14 Dec 2018 09:24:14 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE9OEtr030196; Fri, 14 Dec 2018 09:24:14 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE9OE0Q030195; Fri, 14 Dec 2018 09:24:14 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812140924.wBE9OE0Q030195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 14 Dec 2018 09:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342071 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 342071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E6E3E94EA0 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.55 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.69)[-0.692,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 09:24:15 -0000 Author: eugen Date: Fri Dec 14 09:24:14 2018 New Revision: 342071 URL: https://svnweb.freebsd.org/changeset/base/342071 Log: ng_bpf.4: fix EXAMPLES: do not activate promiscuous mode PR: 102719 MFC after: 3 days Modified: head/share/man/man4/ng_bpf.4 Modified: head/share/man/man4/ng_bpf.4 ============================================================================== --- head/share/man/man4/ng_bpf.4 Fri Dec 14 09:06:56 2018 (r342070) +++ head/share/man/man4/ng_bpf.4 Fri Dec 14 09:24:14 2018 (r342071) @@ -156,7 +156,7 @@ INHOOK="hook1" MATCHHOOK="hook2" NOTMATCHHOOK="hook3" -BPFPROG=$( tcpdump -s 8192 -ddd ${PATTERN} | \\ +BPFPROG=$( tcpdump -s 8192 -p -ddd ${PATTERN} | \\ ( read len ; \\ echo -n "bpf_prog_len=$len" ; \\ echo -n "bpf_prog=[" ; \\ From owner-svn-src-all@freebsd.org Fri Dec 14 09:28:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 520451327C00; Fri, 14 Dec 2018 09:28:21 +0000 (UTC) (envelope-from avg@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) server-signature RSA-PSS (4096 bits) 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 E867D950A1; Fri, 14 Dec 2018 09:28:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC4942D4B8; Fri, 14 Dec 2018 09:28:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE9SKkm030417; Fri, 14 Dec 2018 09:28:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE9SKeQ030414; Fri, 14 Dec 2018 09:28:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201812140928.wBE9SKeQ030414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 14 Dec 2018 09:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342072 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 342072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E867D950A1 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.55 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.85)[-0.853,0]; NEURAL_HAM_SHORT(-0.70)[-0.700,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 09:28:21 -0000 Author: avg Date: Fri Dec 14 09:28:20 2018 New Revision: 342072 URL: https://svnweb.freebsd.org/changeset/base/342072 Log: ichwd: add support for clearing No Reboot bit in TCOv4 This is based on a patch developed by Tetsuya Uemura . Many thanks! Submitted by: Tetsuya Uemura (earlier version) Tested by: Tetsuya Uemura MFC after: 2 weeks Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Fri Dec 14 09:24:14 2018 (r342071) +++ head/sys/dev/ichwd/ichwd.c Fri Dec 14 09:28:20 2018 (r342072) @@ -76,6 +76,10 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include + static struct ichwd_device ichwd_devices[] = { { DEVICEID_82801AA, "Intel 82801AA watchdog timer", 1, 1 }, { DEVICEID_82801AB, "Intel 82801AB watchdog timer", 1, 1 }, @@ -309,6 +313,8 @@ static devclass_t ichwd_devclass; /* NB: TCO version 3 devices use the gcs_res resource for the PMC register. */ #define ichwd_read_pmc_4(sc, off) \ bus_read_4((sc)->gcs_res, (off)) +#define ichwd_read_gc_4(sc, off) \ + bus_read_4((sc)->gc_res, (off)) #define ichwd_write_tco_1(sc, off, val) \ bus_write_1((sc)->tco_res, (off), (val)) @@ -323,6 +329,8 @@ static devclass_t ichwd_devclass; /* NB: TCO version 3 devices use the gcs_res resource for the PMC register. */ #define ichwd_write_pmc_4(sc, off, val) \ bus_write_4((sc)->gcs_res, (off), (val)) +#define ichwd_write_gc_4(sc, off, val) \ + bus_write_4((sc)->gc_res, (off), (val)) #define ichwd_verbose_printf(dev, ...) \ do { \ @@ -495,9 +503,12 @@ ichwd_clear_noreboot(struct ichwd_softc *sc) rc = EIO; break; case 4: - /* - * TODO. This needs access to a hidden PCI device at 31:1. - */ + status = ichwd_read_gc_4(sc, 0); + status &= ~SMB_GC_NO_REBOOT; + ichwd_write_gc_4(sc, 0, status); + status = ichwd_read_gc_4(sc, 0); + if (status & SMB_GC_NO_REBOOT) + rc = EIO; break; default: ichwd_verbose_printf(sc->device, @@ -611,6 +622,7 @@ ichwd_identify(driver_t *driver, device_t parent) struct ichwd_device *id_p; device_t ich, smb; device_t dev; + uint64_t base_address64; uint32_t base_address; uint32_t ctl; int rc; @@ -671,6 +683,33 @@ ichwd_identify(driver_t *driver, device_t parent) "Can not set TCO v%d I/O resource (err = %d)\n", id_p->tco_version, rc); } + + /* + * Unhide Primary to Sideband Bridge (P2SB) PCI device, so that + * we can discover the base address of Private Configuration + * Space via the bridge's BAR. + * Then hide back the bridge. + */ + pci_cfgregwrite(0, 31, 1, 0xe1, 0, 1); + base_address64 = pci_cfgregread(0, 31, 1, SBREG_BAR + 4, 4); + base_address64 <<= 32; + base_address64 |= pci_cfgregread(0, 31, 1, SBREG_BAR, 4); + base_address64 &= ~0xfull; + pci_cfgregwrite(0, 31, 1, 0xe1, 1, 1); + + /* + * No Reboot bit is in General Control register, offset 0xc, + * within the SMBus target port, ID 0xc6. + */ + base_address64 += PCR_REG_OFF(SMB_PORT_ID, SMB_GC_REG); + rc = bus_set_resource(dev, SYS_RES_MEMORY, 1, base_address64, + SMB_GC_SIZE); + if (rc != 0) { + ichwd_verbose_printf(dev, + "Can not set TCO v%d PCR I/O resource (err = %d)\n", + id_p->tco_version, rc); + } + break; default: ichwd_verbose_printf(dev, @@ -723,6 +762,18 @@ ichwd_smb_attach(device_t dev) return (ENXIO); } + /* + * Allocate General Control I/O register in PCH + * Private Configuration Space (PCR). + */ + sc->gc_rid = 1; + sc->gc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->gc_rid, + RF_ACTIVE | RF_SHAREABLE); + if (sc->gc_res == NULL) { + device_printf(dev, "unable to reserve hidden P2SB registers\n"); + return (ENXIO); + } + /* Get ACPI base address. */ isab = device_get_parent(device_get_parent(dev)); pmdev = pci_find_dbsf(pci_get_domain(isab), pci_get_bus(isab), 31, 2); @@ -737,7 +788,7 @@ ichwd_smb_attach(device_t dev) } /* Allocate SMI control I/O register space. */ - sc->smi_rid = 1; + sc->smi_rid = 2; sc->smi_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->smi_rid, acpi_base + SMI_BASE, acpi_base + SMI_BASE + SMI_LEN - 1, SMI_LEN, RF_ACTIVE | RF_SHAREABLE); @@ -854,6 +905,9 @@ ichwd_attach(device_t dev) if (sc->gcs_res != NULL) bus_release_resource(sc->ich, SYS_RES_MEMORY, sc->gcs_rid, sc->gcs_res); + if (sc->gc_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + sc->gc_rid, sc->gc_res); return (ENXIO); } @@ -889,6 +943,9 @@ ichwd_detach(device_t dev) if (sc->gcs_res) bus_release_resource(sc->ich, SYS_RES_MEMORY, sc->gcs_rid, sc->gcs_res); + if (sc->gc_res) + bus_release_resource(dev, SYS_RES_MEMORY, sc->gc_rid, + sc->gc_res); return (0); } Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Fri Dec 14 09:24:14 2018 (r342071) +++ head/sys/dev/ichwd/ichwd.h Fri Dec 14 09:28:20 2018 (r342072) @@ -59,6 +59,9 @@ struct ichwd_softc { int gcs_rid; struct resource *gcs_res; + int gc_rid; + struct resource *gc_res; + eventhandler_tag ev_tag; }; @@ -299,6 +302,18 @@ struct ichwd_softc { #define ICH_TCOCTL 0x54 /* TCO Control */ #define ICH_TCOCTL_TCO_BASE_EN 0x0100 /* TCO Base decoding enabled */ #define ICH_TCOCTL_TCO_BASE_LOCK 0x0001 /* TCOBASE is locked */ + +/* + * Configuration registers in Sunrise Point and Lewisburg PCH Sideband Interface + * and Private Configuration Space. + */ +#define SBREG_BAR 0x10 +#define SMB_GC_REG 0xc +#define SMB_GC_SIZE 4 +#define SMB_GC_NO_REBOOT 0x2 +#define SMB_PORT_ID 0xc6 +#define PCR_PORTID_SHIFT 16 +#define PCR_REG_OFF(pid, reg) (((pid) << PCR_PORTID_SHIFT) | (reg)) /* register names and locations (relative to PMBASE) */ #define SMI_BASE 0x30 /* base address for SMI registers */ From owner-svn-src-all@freebsd.org Fri Dec 14 09:30:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 122C41327E0C; Fri, 14 Dec 2018 09:30:44 +0000 (UTC) (envelope-from avg@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) server-signature RSA-PSS (4096 bits) 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 ACAF59554F; Fri, 14 Dec 2018 09:30:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F4D02D4C8; Fri, 14 Dec 2018 09:30:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBE9Uh2q030676; Fri, 14 Dec 2018 09:30:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBE9UhIt030673; Fri, 14 Dec 2018 09:30:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201812140930.wBE9UhIt030673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 14 Dec 2018 09:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342073 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 342073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ACAF59554F X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.55 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.69)[-0.692,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 09:30:44 -0000 Author: avg Date: Fri Dec 14 09:30:43 2018 New Revision: 342073 URL: https://svnweb.freebsd.org/changeset/base/342073 Log: ichwd: add Sunrise Point-LP ID Submitted by: Tetsuya Uemura Tested by: Tetsuya Uemura MFC after: 2 weeks Relnotes: maybe Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Fri Dec 14 09:28:20 2018 (r342072) +++ head/sys/dev/ichwd/ichwd.c Fri Dec 14 09:30:43 2018 (r342073) @@ -295,6 +295,7 @@ static struct ichwd_device ichwd_devices[] = { static struct ichwd_device ichwd_smb_devices[] = { { DEVICEID_LEWISBURG_SMB, "Lewisburg watchdog timer", 10, 4 }, + { DEVICEID_SRPTLP_SMB, "Sunrise Point-LP watchdog timer", 10, 4 }, { 0, NULL, 0, 0 }, }; Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Fri Dec 14 09:28:20 2018 (r342072) +++ head/sys/dev/ichwd/ichwd.h Fri Dec 14 09:30:43 2018 (r342073) @@ -276,6 +276,7 @@ struct ichwd_softc { #define DEVICEID_WCPT_LP7 0x9cc7 #define DEVICEID_WCPT_LP9 0x9cc9 #define DEVICEID_LEWISBURG_SMB 0xa1a3 +#define DEVICEID_SRPTLP_SMB 0x9d23 /* ICH LPC Interface Bridge Registers (ICH5 and older) */ #define ICH_GEN_STA 0xd4 From owner-svn-src-all@freebsd.org Fri Dec 14 10:20:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB2E813299C7; Fri, 14 Dec 2018 10:20:27 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 5B87997376; Fri, 14 Dec 2018 10:20:27 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3525D2DD3B; Fri, 14 Dec 2018 10:20:27 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEAKRpi057421; Fri, 14 Dec 2018 10:20:27 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEAKQVD057420; Fri, 14 Dec 2018 10:20:26 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812141020.wBEAKQVD057420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 14 Dec 2018 10:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342074 - stable/12/libexec/rtld-elf/aarch64 X-SVN-Group: stable-12 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/12/libexec/rtld-elf/aarch64 X-SVN-Commit-Revision: 342074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5B87997376 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.58 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.864,0]; NEURAL_HAM_SHORT(-0.71)[-0.715,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 10:20:28 -0000 Author: mmel Date: Fri Dec 14 10:20:26 2018 New Revision: 342074 URL: https://svnweb.freebsd.org/changeset/base/342074 Log: MFC r341511,r341512,r341513: r341511: Fix style(9). Not a functional change. r341512: Implement arm64 version of __tls_get_addr(). r341513: Tidy up arm64 reloc_jmpslots() implementation. - don't relocate jump slots multiple times (if LD_BIND_NOW is defined). - process only R_AARCH64_JUMP_SLOT here, other relocation types are handled by reloc_plt(). Modified: stable/12/libexec/rtld-elf/aarch64/reloc.c stable/12/libexec/rtld-elf/aarch64/rtld_start.S Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- stable/12/libexec/rtld-elf/aarch64/reloc.c Fri Dec 14 09:30:43 2018 (r342073) +++ stable/12/libexec/rtld-elf/aarch64/reloc.c Fri Dec 14 10:20:26 2018 (r342074) @@ -109,9 +109,8 @@ do_copy_relocations(Obj_Entry *dstobj) } } if (srcobj == NULL) { - _rtld_error( -"Undefined symbol \"%s\" referenced from COPY relocation in %s", - name, dstobj->path); + _rtld_error("Undefined symbol \"%s\" referenced from " + "COPY relocation in %s", name, dstobj->path); return (-1); } @@ -241,8 +240,10 @@ reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockStat const Elf_Rela *relalim; const Elf_Rela *rela; const Elf_Sym *def; - struct tls_data *tlsdesc; + if (obj->jmpslots_done) + return (0); + relalim = (const Elf_Rela *)((char *)obj->pltrela + obj->pltrelasize); for (rela = obj->pltrela; rela < relalim; rela++) { Elf_Addr *where, target; @@ -262,20 +263,9 @@ reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockStat reloc_jmpslot(where, target, defobj, obj, (const Elf_Rel *)rela); break; - case R_AARCH64_TLSDESC: - if (ELF_R_SYM(rela->r_info) != 0) { - tlsdesc = (struct tls_data *)where[1]; - if (tlsdesc->index == -1) - rtld_tlsdesc_handle_locked(tlsdesc, - SYMLOOK_IN_PLT | flags, lockstate); - } - break; - default: - _rtld_error("Unknown relocation type %x in jmpslot", - (unsigned int)ELF_R_TYPE(rela->r_info)); - return (-1); } } + obj->jmpslots_done = true; return (0); } @@ -511,4 +501,16 @@ allocate_initial_tls(Obj_Entry *objs) tp = (Elf_Addr **) allocate_tls(objs, NULL, TLS_TCB_SIZE, 16); asm volatile("msr tpidr_el0, %0" : : "r"(tp)); +} + +void * +__tls_get_addr(tls_index* ti) +{ + char *p; + void *_tp; + + __asm __volatile("mrs %0, tpidr_el0" : "=r" (_tp)); + p = tls_get_addr_common((Elf_Addr **)(_tp), ti->ti_module, ti->ti_offset); + + return (p); } Modified: stable/12/libexec/rtld-elf/aarch64/rtld_start.S ============================================================================== --- stable/12/libexec/rtld-elf/aarch64/rtld_start.S Fri Dec 14 09:30:43 2018 (r342073) +++ stable/12/libexec/rtld-elf/aarch64/rtld_start.S Fri Dec 14 10:20:26 2018 (r342074) @@ -57,7 +57,7 @@ END(.rtld_start) ENTRY(_rtld_bind_start) .cfi_startproc mov x17, sp - + /* Save frame pointer and SP */ stp x29, x30, [sp, #-16]! mov x29, sp From owner-svn-src-all@freebsd.org Fri Dec 14 10:25:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 848071329D0B; Fri, 14 Dec 2018 10:25:23 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 273F997849; Fri, 14 Dec 2018 10:25:23 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2E392DEF2; Fri, 14 Dec 2018 10:25:22 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEAPM7M062491; Fri, 14 Dec 2018 10:25:22 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEAPMwW062489; Fri, 14 Dec 2018 10:25:22 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812141025.wBEAPMwW062489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 14 Dec 2018 10:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342075 - stable/11/libexec/rtld-elf/aarch64 X-SVN-Group: stable-11 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/11/libexec/rtld-elf/aarch64 X-SVN-Commit-Revision: 342075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 273F997849 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.58 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.864,0]; NEURAL_HAM_SHORT(-0.71)[-0.715,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 10:25:23 -0000 Author: mmel Date: Fri Dec 14 10:25:22 2018 New Revision: 342075 URL: https://svnweb.freebsd.org/changeset/base/342075 Log: MFC r341511,r341512,r341513: r341511: Fix style(9). Not a functional change. r341512: Implement arm64 version of __tls_get_addr(). r341513: Tidy up arm64 reloc_jmpslots() implementation. - don't relocate jump slots multiple times (if LD_BIND_NOW is defined). - process only R_AARCH64_JUMP_SLOT here, other relocation types are handled by reloc_plt(). Modified: stable/11/libexec/rtld-elf/aarch64/reloc.c stable/11/libexec/rtld-elf/aarch64/rtld_start.S Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- stable/11/libexec/rtld-elf/aarch64/reloc.c Fri Dec 14 10:20:26 2018 (r342074) +++ stable/11/libexec/rtld-elf/aarch64/reloc.c Fri Dec 14 10:25:22 2018 (r342075) @@ -109,9 +109,8 @@ do_copy_relocations(Obj_Entry *dstobj) } } if (srcobj == NULL) { - _rtld_error( -"Undefined symbol \"%s\" referenced from COPY relocation in %s", - name, dstobj->path); + _rtld_error("Undefined symbol \"%s\" referenced from " + "COPY relocation in %s", name, dstobj->path); return (-1); } @@ -238,8 +237,10 @@ reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockStat const Elf_Rela *relalim; const Elf_Rela *rela; const Elf_Sym *def; - struct tls_data *tlsdesc; + if (obj->jmpslots_done) + return (0); + relalim = (const Elf_Rela *)((char *)obj->pltrela + obj->pltrelasize); for (rela = obj->pltrela; rela < relalim; rela++) { Elf_Addr *where; @@ -256,20 +257,9 @@ reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockStat *where = (Elf_Addr)(defobj->relocbase + def->st_value); break; - case R_AARCH64_TLSDESC: - if (ELF_R_SYM(rela->r_info) != 0) { - tlsdesc = (struct tls_data *)where[1]; - if (tlsdesc->index == -1) - rtld_tlsdesc_handle_locked(tlsdesc, - SYMLOOK_IN_PLT | flags, lockstate); - } - break; - default: - _rtld_error("Unknown relocation type %x in jmpslot", - (unsigned int)ELF_R_TYPE(rela->r_info)); - return (-1); } } + obj->jmpslots_done = true; return (0); } @@ -431,4 +421,16 @@ allocate_initial_tls(Obj_Entry *objs) tp = (Elf_Addr **) allocate_tls(objs, NULL, TLS_TCB_SIZE, 16); asm volatile("msr tpidr_el0, %0" : : "r"(tp)); +} + +void * +__tls_get_addr(tls_index* ti) +{ + char *p; + void *_tp; + + __asm __volatile("mrs %0, tpidr_el0" : "=r" (_tp)); + p = tls_get_addr_common((Elf_Addr **)(_tp), ti->ti_module, ti->ti_offset); + + return (p); } Modified: stable/11/libexec/rtld-elf/aarch64/rtld_start.S ============================================================================== --- stable/11/libexec/rtld-elf/aarch64/rtld_start.S Fri Dec 14 10:20:26 2018 (r342074) +++ stable/11/libexec/rtld-elf/aarch64/rtld_start.S Fri Dec 14 10:25:22 2018 (r342075) @@ -57,7 +57,7 @@ END(.rtld_start) ENTRY(_rtld_bind_start) .cfi_startproc mov x17, sp - + /* Save frame pointer and SP */ stp x29, x30, [sp, #-16]! mov x29, sp From owner-svn-src-all@freebsd.org Fri Dec 14 10:26:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA3F91329DC0; Fri, 14 Dec 2018 10:26:18 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 5AFFB979AF; Fri, 14 Dec 2018 10:26:18 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C0BF2DEF6; Fri, 14 Dec 2018 10:26:18 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEAQIRO062581; Fri, 14 Dec 2018 10:26:18 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEAQI0H062580; Fri, 14 Dec 2018 10:26:18 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812141026.wBEAQI0H062580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 14 Dec 2018 10:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342076 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 342076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5AFFB979AF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.55 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.69)[-0.692,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 10:26:18 -0000 Author: manu Date: Fri Dec 14 10:26:17 2018 New Revision: 342076 URL: https://svnweb.freebsd.org/changeset/base/342076 Log: arm64: allwinner: axp81x: Fix double invertion for FLDO1 This fix booting on A64 boards when disabling the unused regulators at boot. We did disable all the regulator handled by register 0x13 which of course contain mandatory regulators for the board to be up. Reported by: Mark Millard X-MFC-With: r340848 Modified: head/sys/arm/allwinner/axp81x.c Modified: head/sys/arm/allwinner/axp81x.c ============================================================================== --- head/sys/arm/allwinner/axp81x.c Fri Dec 14 10:25:22 2018 (r342075) +++ head/sys/arm/allwinner/axp81x.c Fri Dec 14 10:26:17 2018 (r342076) @@ -437,7 +437,7 @@ static struct axp8xx_regdef axp8xx_common_regdefs[] = .id = AXP8XX_REG_ID_FLDO1, .name = "fldo1", .enable_reg = AXP_POWERCTL3, - .enable_mask = (uint8_t) ~AXP_POWERCTL3_FLDO1, + .enable_mask = (uint8_t) AXP_POWERCTL3_FLDO1, .enable_value = AXP_POWERCTL3_FLDO1, .voltage_min = 700, .voltage_max = 1450, From owner-svn-src-all@freebsd.org Fri Dec 14 10:27:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C77D1329F5E; Fri, 14 Dec 2018 10:27:49 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 999FC97BCF; Fri, 14 Dec 2018 10:27:48 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 14231876; Fri, 14 Dec 2018 11:27:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=Ho+LrKzC36Bvt3mNF39nL84tVx8=; b=XlyC/UN303P5JilpgMHR5Z7pWHb4 nWbwq37L/qqUMEbgP3r7TyFNElMfujBoMbiQ5JKmzINjufp5B3ZLo6vCjWsIKXeN X5ICH6allxoVSatFTpbXq4F6SP8UvM5OnEKTYEiAkpapDU4iM7m2WNOWxKqiFvxw CgPJ/b1grRBqJsA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=fluThiYP3+EsyzeAFiBPvvu3/DliFWQs4mVMmIshmsAKRbtSU7HE06eY 056Jv3U0u6fIDYGaj165J6Y9YPlFoFpo/KuMzZ7VL6kTsuhwH6TUaKbe72FaIj5S 7duoROSz0+1m7xcwfJ1TKING47D6YZqkcrj0KRuZfk+6ftiFuVw= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 5daeb2ed TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Fri, 14 Dec 2018 11:27:40 +0100 (CET) Date: Fri, 14 Dec 2018 11:27:40 +0100 From: Emmanuel Vadot To: Marcin Wojtas Cc: manu@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342020 - in head/sys: arm/mv arm64/conf conf Message-Id: <20181214112740.a1b7899f964500fae8c6a6fe@bidouilliste.com> In-Reply-To: References: <201812122233.wBCMX5hg025508@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 999FC97BCF X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 10:27:49 -0000 Hi Marcin, On Fri, 14 Dec 2018 09:43:49 +0100 Marcin Wojtas wrote: > Hi Manu, >=20 > Imo the new driver is adding code duplication - please check > sys/arm/mv/armada/thermal.c. It contains support for armada38x (which > has BTW exactly same coefficients as CP110). Basically it would be > enough to add 2 structures for ap806 and cp110. >=20 > Best regards, Oops, I somehow miss this driver when I added this one, I'll make the AP806 and CP110 work with this one and revert mine soon. Thanks for reporting. > Marcin?r., 12 gru 2018 o 23:33 Emmanuel Vadot napisa?(= a): > > > > Author: manu > > Date: Wed Dec 12 22:33:05 2018 > > New Revision: 342020 > > URL: https://svnweb.freebsd.org/changeset/base/342020 > > > > Log: > > mv_thermal: Add thermal driver for AP806 and CP110 thermal sensor > > > > Sponsored by: Rubicon Communications, LLC ("Netgate") > > > > Added: > > head/sys/arm/mv/mv_thermal.c (contents, props changed) > > Modified: > > head/sys/arm64/conf/GENERIC > > head/sys/conf/files.arm64 > > > > Added: head/sys/arm/mv/mv_thermal.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/sys/arm/mv/mv_thermal.c Wed Dec 12 22:33:05 2018 = (r342020) > > @@ -0,0 +1,381 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2018 Rubicon Communications, LLC (Netgate) > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in = the > > + * documentation and/or other materials provided with the distribut= ion. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, T= HE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LI= ABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQ= UENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE G= OODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTIO= N) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,= STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN A= NY WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY= OF > > + * SUCH DAMAGE. > > + * > > + * $FreeBSD$ > > + */ > > + > > +#include > > +__FBSDID("$FreeBSD$"); > > + > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > + > > +#include > > + > > +#include > > +#include > > + > > +#define CONTROL0 0x00 > > +#define CONTROL0_TSEN_START (1 << 0) > > +#define CONTROL0_TSEN_RESET (1 << 1) > > +#define CONTROL0_TSEN_EN (1 << 2) > > +#define CONTROL0_CHANNEL_SHIFT 13 > > +#define CONTROL0_CHANNEL_MASK 0xF > > +#define CONTROL0_OSR_SHIFT 24 > > +#define CONTROL0_OSR_MAX 3 /* OSR =3D 512 * 4uS = =3D ~2mS */ > > +#define CONTROL0_MODE_SHIFT 30 > > +#define CONTROL0_MODE_EXTERNAL 0x2 > > +#define CONTROL0_MODE_MASK 0x3 > > + > > +#define CONTROL1 0x04 > > +/* This doesn't seems to work */ > > +#define CONTROL1_TSEN_SENS_SHIFT 21 > > +#define CONTROL1_TSEN_SENS_MASK 0x7 > > + > > +#define STATUS 0x00 > > +#define STATUS_TEMP_MASK 0x3FF > > + > > +enum mv_thermal_type { > > + MV_AP806 =3D 1, > > + MV_CP110, > > +}; > > + > > +struct mv_thermal_config { > > + enum mv_thermal_type type; > > + int ncpus; > > + int64_t calib_mul; > > + int64_t calib_add; > > + int64_t calib_div; > > + uint32_t valid_mask; > > + bool signed_value; > > +}; > > + > > +struct mv_thermal_softc { > > + device_t dev; > > + struct resource *res[2]; > > + struct mtx mtx; > > + > > + struct mv_thermal_config *config; > > + int cur_sensor; > > +}; > > + > > +static struct mv_thermal_config mv_ap806_config =3D { > > + .type =3D MV_AP806, > > + .ncpus =3D 4, > > + .calib_mul =3D 423, > > + .calib_add =3D -150000, > > + .calib_div =3D 100, > > + .valid_mask =3D (1 << 16), > > + .signed_value =3D true, > > +}; > > + > > +static struct mv_thermal_config mv_cp110_config =3D { > > + .type =3D MV_CP110, > > + .calib_mul =3D 2000096, > > + .calib_add =3D 1172499100, > > + .calib_div =3D 420100, > > + .valid_mask =3D (1 << 10), > > + .signed_value =3D false, > > +}; > > + > > +static struct resource_spec mv_thermal_res_spec[] =3D { > > + { SYS_RES_MEMORY, 0, RF_ACTIVE }, > > + { SYS_RES_MEMORY, 1, RF_ACTIVE }, > > + { -1, 0 } > > +}; > > + > > +static struct ofw_compat_data compat_data[] =3D { > > + {"marvell,armada-ap806-thermal", (uintptr_t) &mv_ap806_config}, > > + {"marvell,armada-cp110-thermal", (uintptr_t) &mv_cp110_config}, > > + {NULL, 0} > > +}; > > + > > +#define RD_STA(sc, reg) bus_read_4((sc)->res[0], (reg)) > > +#define WR_STA(sc, reg, val) bus_write_4((sc)->res[0], (reg)= , (val)) > > +#define RD_CON(sc, reg) bus_read_4((sc)->res[1], (reg)) > > +#define WR_CON(sc, reg, val) bus_write_4((sc)->res[1], (reg)= , (val)) > > + > > +static inline int32_t sign_extend(uint32_t value, int index) > > +{ > > + uint8_t shift; > > + > > + shift =3D 31 - index; > > + return ((int32_t)(value << shift) >> shift); > > +} > > + > > +static int > > +mv_thermal_wait_sensor(struct mv_thermal_softc *sc) > > +{ > > + uint32_t reg; > > + uint32_t timeout; > > + > > + timeout =3D 100000; > > + while (--timeout > 0) { > > + reg =3D RD_STA(sc, STATUS); > > + if ((reg & sc->config->valid_mask) =3D=3D sc->config->v= alid_mask) > > + break; > > + DELAY(100); > > + } > > + if (timeout =3D=3D 0) { > > + return (ETIMEDOUT); > > + } > > + > > + return (0); > > +} > > + > > +static int > > +mv_thermal_select_sensor(struct mv_thermal_softc *sc, int sensor) > > +{ > > + uint32_t reg; > > + > > + if (sc->cur_sensor =3D=3D sensor) > > + return (0); > > + > > + /* Stop the current reading and reset the module */ > > + reg =3D RD_CON(sc, CONTROL0); > > + reg &=3D ~(CONTROL0_TSEN_START | CONTROL0_TSEN_EN); > > + WR_CON(sc, CONTROL0, reg); > > + > > + /* Switch to the selected sensor */ > > + /* > > + * NOTE : Datasheet says to use CONTROL1 for selecting > > + * but when doing so the sensors >0 are never ready > > + * Do what Linux does using undocumented bits in CONTROL0 > > + */ > > + /* This reset automatically to the sensor 0 */ > > + reg &=3D ~(CONTROL0_MODE_MASK << CONTROL0_MODE_SHIFT); > > + if (sensor) { > > + /* Select external sensor */ > > + reg |=3D CONTROL0_MODE_EXTERNAL << CONTROL0_MODE_SHIFT; > > + reg &=3D ~(CONTROL0_CHANNEL_MASK << CONTROL0_CHANNEL_SH= IFT); > > + reg |=3D (sensor - 1) << CONTROL0_CHANNEL_SHIFT; > > + } > > + WR_CON(sc, CONTROL0, reg); > > + sc->cur_sensor =3D sensor; > > + > > + /* Start the reading */ > > + reg =3D RD_CON(sc, CONTROL0); > > + reg |=3D CONTROL0_TSEN_START | CONTROL0_TSEN_EN; > > + WR_CON(sc, CONTROL0, reg); > > + > > + return (mv_thermal_wait_sensor(sc)); > > +} > > + > > +static int > > +mv_thermal_read_sensor(struct mv_thermal_softc *sc, int sensor, int *t= emp) > > +{ > > + uint32_t reg; > > + int64_t sample, rv; > > + > > + rv =3D mv_thermal_select_sensor(sc, sensor); > > + if (rv !=3D 0) > > + return (rv); > > + > > + reg =3D RD_STA(sc, STATUS) & STATUS_TEMP_MASK; > > + > > + if (sc->config->signed_value) > > + sample =3D sign_extend(reg, fls(STATUS_TEMP_MASK) - 1); > > + else > > + sample =3D reg; > > + > > + *temp =3D ((sample * sc->config->calib_mul) - sc->config->calib= _add) / > > + sc->config->calib_div; > > + > > + return (0); > > +} > > + > > +static int > > +ap806_init(struct mv_thermal_softc *sc) > > +{ > > + uint32_t reg; > > + > > + /* Start the temp capture/conversion */ > > + reg =3D RD_CON(sc, CONTROL0); > > + reg &=3D ~CONTROL0_TSEN_RESET; > > + reg |=3D CONTROL0_TSEN_START | CONTROL0_TSEN_EN; > > + > > + /* Sample every ~2ms */ > > + reg |=3D CONTROL0_OSR_MAX << CONTROL0_OSR_SHIFT; > > + > > + WR_CON(sc, CONTROL0, reg); > > + > > + /* Since we just started the module wait for the sensor to be r= eady */ > > + mv_thermal_wait_sensor(sc); > > + > > + return (0); > > +} > > + > > +static int > > +cp110_init(struct mv_thermal_softc *sc) > > +{ > > + uint32_t reg; > > + > > + reg =3D RD_CON(sc, CONTROL1); > > + reg &=3D (1 << 7); > > + reg |=3D (1 << 8); > > + WR_CON(sc, CONTROL1, reg); > > + > > + /* Sample every ~2ms */ > > + reg =3D RD_CON(sc, CONTROL0); > > + reg |=3D CONTROL0_OSR_MAX << CONTROL0_OSR_SHIFT; > > + WR_CON(sc, CONTROL0, reg); > > + > > + return (0); > > +} > > + > > +static int > > +mv_thermal_sysctl(SYSCTL_HANDLER_ARGS) > > +{ > > + struct mv_thermal_softc *sc; > > + device_t dev =3D arg1; > > + int sensor =3D arg2; > > + int val =3D 0; > > + > > + sc =3D device_get_softc(dev); > > + mtx_lock(&(sc)->mtx); > > + > > + if (mv_thermal_read_sensor(sc, sensor, &val) =3D=3D 0) { > > + /* Convert to Kelvin */ > > + val =3D val + 2732; > > + } else { > > + device_printf(dev, "Timeout waiting for sensor\n"); > > + } > > + > > + mtx_unlock(&(sc)->mtx); > > + return sysctl_handle_opaque(oidp, &val, sizeof(val), req); > > +} > > + > > +static int > > +mv_thermal_probe(device_t dev) > > +{ > > + > > + if (!ofw_bus_status_okay(dev)) > > + return (ENXIO); > > + > > + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data =3D= =3D 0) > > + return (ENXIO); > > + > > + device_set_desc(dev, "Marvell Thermal Sensor Controller"); > > + return (BUS_PROBE_DEFAULT); > > +} > > + > > +static int > > +mv_thermal_attach(device_t dev) > > +{ > > + struct mv_thermal_softc *sc; > > + struct sysctl_ctx_list *ctx; > > + struct sysctl_oid_list *oid; > > + char name[255]; > > + char desc[255]; > > + int i; > > + > > + sc =3D device_get_softc(dev); > > + sc->dev =3D dev; > > + > > + sc->config =3D (struct mv_thermal_config *)ofw_bus_search_compa= tible(dev, compat_data)->ocd_data; > > + > > + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); > > + > > + if (bus_alloc_resources(dev, mv_thermal_res_spec, sc->res) !=3D= 0) { > > + device_printf(dev, "cannot allocate resources for devic= e\n"); > > + return (ENXIO); > > + } > > + > > + sc->cur_sensor =3D -1; > > + switch (sc->config->type) { > > + case MV_AP806: > > + ap806_init(sc); > > + break; > > + case MV_CP110: > > + cp110_init(sc); > > + break; > > + } > > + > > + ctx =3D device_get_sysctl_ctx(dev); > > + oid =3D SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); > > + /* There is always at least one sensor */ > > + SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, "internal", > > + CTLTYPE_INT | CTLFLAG_RD, > > + dev, 0, mv_thermal_sysctl, > > + "IK", > > + "Internal Temperature"); > > + > > + for (i =3D 0; i < sc->config->ncpus; i++) { > > + snprintf(name, sizeof(name), "cpu%d", i); > > + snprintf(desc, sizeof(desc), "CPU%d Temperature", i); > > + SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, name, > > + CTLTYPE_INT | CTLFLAG_RD, > > + dev, i + 1, mv_thermal_sysctl, > > + "IK", > > + desc); > > + } > > + > > + return (0); > > +} > > + > > +static int > > +mv_thermal_detach(device_t dev) > > +{ > > + struct mv_thermal_softc *sc; > > + > > + sc =3D device_get_softc(dev); > > + > > + bus_release_resources(dev, mv_thermal_res_spec, sc->res); > > + > > + return (0); > > +} > > + > > +static device_method_t mv_thermal_methods[] =3D { > > + /* Device interface */ > > + DEVMETHOD(device_probe, mv_thermal_probe), > > + DEVMETHOD(device_attach, mv_thermal_attach), > > + DEVMETHOD(device_detach, mv_thermal_detach), > > + > > + DEVMETHOD_END > > +}; > > + > > +static devclass_t mv_thermal_devclass; > > + > > +static driver_t mv_thermal_driver =3D { > > + "mv_thermal", > > + mv_thermal_methods, > > + sizeof(struct mv_thermal_softc), > > +}; > > + > > +DRIVER_MODULE(mv_thermal, simplebus, mv_thermal_driver, > > + mv_thermal_devclass, 0, 0); > > > > Modified: head/sys/arm64/conf/GENERIC > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/arm64/conf/GENERIC Wed Dec 12 22:24:30 2018 (r34201= 9) > > +++ head/sys/arm64/conf/GENERIC Wed Dec 12 22:33:05 2018 (r34202= 0) > > @@ -240,6 +240,7 @@ device aw_sid # Allwinner Sec= ure ID EFUSE > > > > # Thermal sensors > > device aw_thermal # Allwinner Thermal Sensor Controller > > +device mv_thermal # Marvell Thermal Sensor Controller > > > > # SPI > > device spibus > > > > Modified: head/sys/conf/files.arm64 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/conf/files.arm64 Wed Dec 12 22:24:30 2018 (r34201= 9) > > +++ head/sys/conf/files.arm64 Wed Dec 12 22:33:05 2018 (r34202= 0) > > @@ -95,6 +95,7 @@ arm/mv/mv_cp110_icu.c optiona= l mv_cp110_icu fdt > > arm/mv/mv_ap806_gicp.c optional mv_ap806_gicp = fdt > > arm/mv/mv_ap806_clock.c optional SOC_MA= RVELL_8K fdt > > arm/mv/mv_cp110_clock.c optional SOC_MA= RVELL_8K fdt > > +arm/mv/mv_thermal.c optional SOC_MARVELL_8K= mv_thermal fdt > > arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt > > arm/xilinx/uart_dev_cdnc.c optional uart soc_xilin= x_zynq > > arm64/acpica/acpi_machdep.c optional acpi > > --=20 Emmanuel Vadot From owner-svn-src-all@freebsd.org Fri Dec 14 10:30:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81142132A172; Fri, 14 Dec 2018 10:30:10 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 27E5C97E75; Fri, 14 Dec 2018 10:30:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A5412DF01; Fri, 14 Dec 2018 10:30:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEAU9jg062825; Fri, 14 Dec 2018 10:30:09 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEAU9de062824; Fri, 14 Dec 2018 10:30:09 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812141030.wBEAU9de062824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 14 Dec 2018 10:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342077 - stable/12/sys/arm/include X-SVN-Group: stable-12 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/12/sys/arm/include X-SVN-Commit-Revision: 342077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 27E5C97E75 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.57 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.866,0]; NEURAL_HAM_SHORT(-0.71)[-0.708,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 10:30:10 -0000 Author: mmel Date: Fri Dec 14 10:30:09 2018 New Revision: 342077 URL: https://svnweb.freebsd.org/changeset/base/342077 Log: MFC r341679: Fix cut&paste typo in atomic_fetchadd_64(). Modified: stable/12/sys/arm/include/atomic-v6.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/include/atomic-v6.h ============================================================================== --- stable/12/sys/arm/include/atomic-v6.h Fri Dec 14 10:26:17 2018 (r342076) +++ stable/12/sys/arm/include/atomic-v6.h Fri Dec 14 10:30:09 2018 (r342077) @@ -435,7 +435,7 @@ atomic_fetchadd_64(volatile uint64_t *p, uint64_t val) __asm __volatile( "1: \n" - " ldrexd %Q[tmp], %R[tmp], [%[ptr]] \n" + " ldrexd %Q[ret], %R[ret], [%[ptr]] \n" " adds %Q[tmp], %Q[ret], %Q[val] \n" " adc %R[tmp], %R[ret], %R[val] \n" " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]] \n" From owner-svn-src-all@freebsd.org Fri Dec 14 10:45:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D95B1132AF07; Fri, 14 Dec 2018 10:45:46 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 7FC866A0D9; Fri, 14 Dec 2018 10:45:46 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 732F42E24D; Fri, 14 Dec 2018 10:45:46 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEAjkuV072838; Fri, 14 Dec 2018 10:45:46 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEAjkv7072837; Fri, 14 Dec 2018 10:45:46 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812141045.wBEAjkv7072837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 14 Dec 2018 10:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342078 - stable/11/sys/arm/include X-SVN-Group: stable-11 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/11/sys/arm/include X-SVN-Commit-Revision: 342078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7FC866A0D9 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.57 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.866,0]; NEURAL_HAM_SHORT(-0.71)[-0.708,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 10:45:47 -0000 Author: mmel Date: Fri Dec 14 10:45:46 2018 New Revision: 342078 URL: https://svnweb.freebsd.org/changeset/base/342078 Log: MFC r341679: Fix cut&paste typo in atomic_fetchadd_64(). Modified: stable/11/sys/arm/include/atomic-v6.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/atomic-v6.h ============================================================================== --- stable/11/sys/arm/include/atomic-v6.h Fri Dec 14 10:30:09 2018 (r342077) +++ stable/11/sys/arm/include/atomic-v6.h Fri Dec 14 10:45:46 2018 (r342078) @@ -435,7 +435,7 @@ atomic_fetchadd_64(volatile uint64_t *p, uint64_t val) __asm __volatile( "1: \n" - " ldrexd %Q[tmp], %R[tmp], [%[ptr]] \n" + " ldrexd %Q[ret], %R[ret], [%[ptr]] \n" " adds %Q[tmp], %Q[ret], %Q[val] \n" " adc %R[tmp], %R[ret], %R[val] \n" " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]] \n" From owner-svn-src-all@freebsd.org Fri Dec 14 10:49:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49791132B2C0; Fri, 14 Dec 2018 10:49:49 +0000 (UTC) (envelope-from kadesai@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) server-signature RSA-PSS (4096 bits) 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 E349C6A572; Fri, 14 Dec 2018 10:49:48 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7F382E251; Fri, 14 Dec 2018 10:49:48 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEAnmvn073051; Fri, 14 Dec 2018 10:49:48 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEAnmOQ073050; Fri, 14 Dec 2018 10:49:48 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201812141049.wBEAnmOQ073050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 14 Dec 2018 10:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342079 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: kadesai X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 342079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E349C6A572 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.55 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.69)[-0.692,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 10:49:49 -0000 Author: kadesai Date: Fri Dec 14 10:49:48 2018 New Revision: 342079 URL: https://svnweb.freebsd.org/changeset/base/342079 Log: Compilation failure on ppc and mips due to Revision 342066. Adding extra memset on chain frame. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas_cam.c Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 10:45:46 2018 (r342078) +++ head/sys/dev/mrsas/mrsas_cam.c Fri Dec 14 10:49:48 2018 (r342079) @@ -1577,7 +1577,8 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd struct mrsas_softc *sc = cmd->sc; int sge_len, offset, num_prp_in_chain = 0; pMpi25IeeeSgeChain64_t main_chain_element, ptr_first_sgl, sgl_ptr; - u_int64_t *ptr_sgl, *ptr_sgl_phys; + u_int64_t *ptr_sgl; + bus_addr_t ptr_sgl_phys; u_int64_t sge_addr; u_int32_t page_mask, page_mask_result, i = 0; u_int32_t first_prp_len; @@ -1600,14 +1601,15 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd */ page_mask = mr_nvme_pg_size - 1; ptr_sgl = (u_int64_t *) cmd->chain_frame; - ptr_sgl_phys = (u_int64_t *) cmd->chain_frame_phys_addr;; + ptr_sgl_phys = cmd->chain_frame_phys_addr; + memset(ptr_sgl, 0, sc->max_chain_frame_sz); /* Build chain frame element which holds all PRPs except first*/ main_chain_element = (pMpi25IeeeSgeChain64_t) ((u_int8_t *)sgl_ptr + sizeof(MPI25_IEEE_SGE_CHAIN64)); - main_chain_element->Address = (u_int64_t) ptr_sgl_phys; + main_chain_element->Address = cmd->chain_frame_phys_addr; main_chain_element->NextChainOffset = 0; main_chain_element->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT | IEEE_SGE_FLAGS_SYSTEM_ADDR | From owner-svn-src-all@freebsd.org Fri Dec 14 14:44:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE5741335D84; Fri, 14 Dec 2018 14:44:39 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) 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 50D07779AB; Fri, 14 Dec 2018 14:44:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46DB9BFD; Fri, 14 Dec 2018 14:44:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEEidTP000971; Fri, 14 Dec 2018 14:44:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEEicw3000968; Fri, 14 Dec 2018 14:44:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201812141444.wBEEicw3000968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Dec 2018 14:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342080 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 342080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 50D07779AB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.19 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.864,0]; NEURAL_HAM_SHORT(-0.32)[-0.321,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 14:44:39 -0000 Author: mav Date: Fri Dec 14 14:44:38 2018 New Revision: 342080 URL: https://svnweb.freebsd.org/changeset/base/342080 Log: MFC r341705: Fix several iov handling bugs in bhyve virtio-scsi backend. - buf_to_iov() does not use buflen parameter, allowing out of bound read. - buf_to_iov() leaks memory if seek argument > 0. - iov_to_buf() doesn't need to reallocate buffer for every segment. - there is no point to use size_t for iov counts, int is more then enough. - some iov function arguments can be constified. - pci_vtscsi_request_handle() used truncate_iov() incorrectly, allowing getting out of buffer and possibly corrupting data. - pci_vtscsi_controlq_notify() written returned status at wrong offset. - pci_vtscsi_controlq_notify() leaked one buffer per event. Modified: stable/12/usr.sbin/bhyve/iov.c stable/12/usr.sbin/bhyve/iov.h stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/iov.c ============================================================================== --- stable/12/usr.sbin/bhyve/iov.c Fri Dec 14 10:49:48 2018 (r342079) +++ stable/12/usr.sbin/bhyve/iov.c Fri Dec 14 14:44:38 2018 (r342080) @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2016 Jakub Klama . + * Copyright (c) 2018 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,12 +40,12 @@ __FBSDID("$FreeBSD$"); #include "iov.h" void -seek_iov(struct iovec *iov1, size_t niov1, struct iovec *iov2, size_t *niov2, +seek_iov(const struct iovec *iov1, int niov1, struct iovec *iov2, int *niov2, size_t seek) { size_t remainder = 0; size_t left = seek; - size_t i, j; + int i, j; for (i = 0; i < niov1; i++) { size_t toseek = MIN(left, iov1[i].iov_len); @@ -69,9 +70,10 @@ seek_iov(struct iovec *iov1, size_t niov1, struct iove } size_t -count_iov(struct iovec *iov, size_t niov) +count_iov(const struct iovec *iov, int niov) { - size_t i, total = 0; + size_t total = 0; + int i; for (i = 0; i < niov; i++) total += iov[i].iov_len; @@ -79,35 +81,36 @@ count_iov(struct iovec *iov, size_t niov) return (total); } -size_t -truncate_iov(struct iovec *iov, size_t niov, size_t length) +void +truncate_iov(struct iovec *iov, int *niov, size_t length) { - size_t i, done = 0; + size_t done = 0; + int i; - for (i = 0; i < niov; i++) { + for (i = 0; i < *niov; i++) { size_t toseek = MIN(length - done, iov[i].iov_len); done += toseek; - if (toseek < iov[i].iov_len) { + if (toseek <= iov[i].iov_len) { iov[i].iov_len = toseek; - return (i + 1); + *niov = i + 1; + return; } } - - return (niov); } ssize_t -iov_to_buf(struct iovec *iov, size_t niov, void **buf) +iov_to_buf(const struct iovec *iov, int niov, void **buf) { - size_t i, ptr = 0, total = 0; + size_t ptr, total; + int i; - for (i = 0; i < niov; i++) { - total += iov[i].iov_len; - *buf = realloc(*buf, total); - if (*buf == NULL) - return (-1); + total = count_iov(iov, niov); + *buf = realloc(*buf, total); + if (*buf == NULL) + return (-1); + for (i = 0, ptr = 0; i < niov; i++) { memcpy(*buf + ptr, iov[i].iov_base, iov[i].iov_len); ptr += iov[i].iov_len; } @@ -116,12 +119,12 @@ iov_to_buf(struct iovec *iov, size_t niov, void **buf) } ssize_t -buf_to_iov(void *buf, size_t buflen, struct iovec *iov, size_t niov, +buf_to_iov(const void *buf, size_t buflen, struct iovec *iov, int niov, size_t seek) { struct iovec *diov; - size_t ndiov, i; - uintptr_t off = 0; + int ndiov, i; + size_t off = 0, len; if (seek > 0) { diov = malloc(sizeof(struct iovec) * niov); @@ -131,10 +134,14 @@ buf_to_iov(void *buf, size_t buflen, struct iovec *iov ndiov = niov; } - for (i = 0; i < ndiov; i++) { - memcpy(diov[i].iov_base, buf + off, diov[i].iov_len); - off += diov[i].iov_len; + for (i = 0; i < ndiov && off < buflen; i++) { + len = MIN(diov[i].iov_len, buflen - off); + memcpy(diov[i].iov_base, buf + off, len); + off += len; } + + if (seek > 0) + free(diov); return ((ssize_t)off); } Modified: stable/12/usr.sbin/bhyve/iov.h ============================================================================== --- stable/12/usr.sbin/bhyve/iov.h Fri Dec 14 10:49:48 2018 (r342079) +++ stable/12/usr.sbin/bhyve/iov.h Fri Dec 14 14:44:38 2018 (r342080) @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2016 Jakub Klama . + * Copyright (c) 2018 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,12 +33,12 @@ #ifndef _IOV_H_ #define _IOV_H_ -void seek_iov(struct iovec *iov1, size_t niov1, struct iovec *iov2, - size_t *niov2, size_t seek); -size_t truncate_iov(struct iovec *iov, size_t niov, size_t length); -size_t count_iov(struct iovec *iov, size_t niov); -ssize_t iov_to_buf(struct iovec *iov, size_t niov, void **buf); -ssize_t buf_to_iov(void *buf, size_t buflen, struct iovec *iov, size_t niov, +void seek_iov(const struct iovec *iov1, int niov1, struct iovec *iov2, + int *niov2, size_t seek); +void truncate_iov(struct iovec *iov, int *niov, size_t length); +size_t count_iov(const struct iovec *iov, int niov); +ssize_t iov_to_buf(const struct iovec *iov, int niov, void **buf); +ssize_t buf_to_iov(const void *buf, size_t buflen, struct iovec *iov, int niov, size_t seek); #endif /* _IOV_H_ */ Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 10:49:48 2018 (r342079) +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:44:38 2018 (r342080) @@ -462,7 +462,7 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, struct pci_vtscsi_req_cmd_wr *cmd_wr; struct iovec data_iov_in[VTSCSI_MAXSEG], data_iov_out[VTSCSI_MAXSEG]; union ctl_io *io; - size_t data_niov_in, data_niov_out; + int data_niov_in, data_niov_out; void *ext_data_ptr = NULL; uint32_t ext_data_len = 0, ext_sg_entries = 0; int err; @@ -472,8 +472,8 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, seek_iov(iov_out, niov_out, data_iov_out, &data_niov_out, VTSCSI_OUT_HEADER_LEN(sc)); - truncate_iov(iov_in, niov_in, VTSCSI_IN_HEADER_LEN(sc)); - truncate_iov(iov_out, niov_out, VTSCSI_OUT_HEADER_LEN(sc)); + truncate_iov(iov_in, &niov_in, VTSCSI_IN_HEADER_LEN(sc)); + truncate_iov(iov_out, &niov_out, VTSCSI_OUT_HEADER_LEN(sc)); iov_to_buf(iov_in, niov_in, (void **)&cmd_rd); cmd_wr = malloc(VTSCSI_OUT_HEADER_LEN(sc)); @@ -552,7 +552,8 @@ pci_vtscsi_controlq_notify(void *vsc, struct vqueue_in n = vq_getchain(vq, &idx, iov, VTSCSI_MAXSEG, NULL); bufsize = iov_to_buf(iov, n, &buf); iolen = pci_vtscsi_control_handle(sc, buf, bufsize); - buf_to_iov(buf + bufsize - iolen, iolen, iov, n, iolen); + buf_to_iov(buf + bufsize - iolen, iolen, iov, n, + bufsize - iolen); /* * Release this chain and handle more @@ -560,6 +561,7 @@ pci_vtscsi_controlq_notify(void *vsc, struct vqueue_in vq_relchain(vq, idx, iolen); } vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ + free(buf); } static void From owner-svn-src-all@freebsd.org Fri Dec 14 14:45:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48BC51335E20; Fri, 14 Dec 2018 14:45:55 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) 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 DF4DF77B0B; Fri, 14 Dec 2018 14:45:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D326BBFF; Fri, 14 Dec 2018 14:45:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEEjstm001094; Fri, 14 Dec 2018 14:45:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEEjsm1001093; Fri, 14 Dec 2018 14:45:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201812141445.wBEEjsm1001093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Dec 2018 14:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342081 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 342081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF4DF77B0B X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.19 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.866,0]; NEURAL_HAM_SHORT(-0.32)[-0.321,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 14:45:55 -0000 Author: mav Date: Fri Dec 14 14:45:54 2018 New Revision: 342081 URL: https://svnweb.freebsd.org/changeset/base/342081 Log: MFC r341704: Fill initid explicitly on requests. Unfortunately ctl_scsi_zero_io() wipes that field, so it was always zero. While there, targ_port is set by kernel, so user-space should not fill it. Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:44:38 2018 (r342080) +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:45:54 2018 (r342081) @@ -389,7 +389,7 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, ctl_scsi_zero_io(io); io->io_hdr.io_type = CTL_IO_TASK; - io->io_hdr.nexus.targ_port = tmf->lun[1]; + io->io_hdr.nexus.initid = sc->vss_iid; io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(tmf->lun); io->taskio.tag_type = CTL_TAG_SIMPLE; io->taskio.tag_num = (uint32_t)tmf->id; @@ -480,7 +480,7 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, io = ctl_scsi_alloc_io(sc->vss_iid); ctl_scsi_zero_io(io); - io->io_hdr.nexus.targ_port = cmd_rd->lun[1]; + io->io_hdr.nexus.initid = sc->vss_iid; io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(cmd_rd->lun); io->io_hdr.io_type = CTL_IO_SCSI; From owner-svn-src-all@freebsd.org Fri Dec 14 14:46:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04BEC1335EB7; Fri, 14 Dec 2018 14:46:36 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) 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 9BE6D77C3B; Fri, 14 Dec 2018 14:46:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8524BC00; Fri, 14 Dec 2018 14:46:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEEkZRq001186; Fri, 14 Dec 2018 14:46:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEEkZtU001185; Fri, 14 Dec 2018 14:46:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201812141446.wBEEkZtU001185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Dec 2018 14:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342082 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 342082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BE6D77C3B X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.19 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.866,0]; NEURAL_HAM_SHORT(-0.32)[-0.321,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 14:46:36 -0000 Author: mav Date: Fri Dec 14 14:46:35 2018 New Revision: 342082 URL: https://svnweb.freebsd.org/changeset/base/342082 Log: MFC r341706: Make virtio-scsi pass SCSI Task Attributes to CTL. Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:45:54 2018 (r342081) +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:46:35 2018 (r342082) @@ -499,7 +499,21 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, io->scsiio.sense_len = sc->vss_config.sense_size; io->scsiio.tag_num = (uint32_t)cmd_rd->id; - io->scsiio.tag_type = CTL_TAG_SIMPLE; + switch (cmd_rd->task_attr) { + case VIRTIO_SCSI_S_ORDERED: + io->scsiio.tag_type = CTL_TAG_ORDERED; + break; + case VIRTIO_SCSI_S_HEAD: + io->scsiio.tag_type = CTL_TAG_HEAD_OF_QUEUE; + break; + case VIRTIO_SCSI_S_ACA: + io->scsiio.tag_type = CTL_TAG_ACA; + break; + case VIRTIO_SCSI_S_SIMPLE: + default: + io->scsiio.tag_type = CTL_TAG_SIMPLE; + break; + } io->scsiio.ext_sg_entries = ext_sg_entries; io->scsiio.ext_data_ptr = ext_data_ptr; io->scsiio.ext_data_len = ext_data_len; From owner-svn-src-all@freebsd.org Fri Dec 14 14:49:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD8C9133600F; Fri, 14 Dec 2018 14:49:05 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) 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 7E21577DF8; Fri, 14 Dec 2018 14:49:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72C2FC05; Fri, 14 Dec 2018 14:49:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEEn5eH001339; Fri, 14 Dec 2018 14:49:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEEn5eQ001337; Fri, 14 Dec 2018 14:49:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201812141449.wBEEn5eQ001337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Dec 2018 14:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342083 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 342083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7E21577DF8 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.19 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.864,0]; NEURAL_HAM_SHORT(-0.32)[-0.321,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 14:49:06 -0000 Author: mav Date: Fri Dec 14 14:49:04 2018 New Revision: 342083 URL: https://svnweb.freebsd.org/changeset/base/342083 Log: MFC r341829: Allow CTL device specification in bhyve virtio-scsi. There was a large refactoring done in CTL to allow multiple ioctl frontend ports (and respective devices) to be created, particularly for bhyve. Unfortunately, respective part of bhyve functionality got lost somehow from the original virtio-scsi commit. This change allows wanted device path to be specified in either of two ways: -s 6,virtio-scsi,/dev/cam/ctl1.1 -s 6,virtio-scsi,dev=/dev/cam/ctl2.3 If neither is specified, the default /dev/cam/ctl device is used. While there, remove per-queue CTL device opening, which makes no sense at this point. Modified: stable/12/usr.sbin/bhyve/bhyve.8 stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/12/usr.sbin/bhyve/bhyve.8 Fri Dec 14 14:46:35 2018 (r342082) +++ stable/12/usr.sbin/bhyve/bhyve.8 Fri Dec 14 14:49:04 2018 (r342083) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2018 +.Dd December 11, 2018 .Dt BHYVE 8 .Os .Sh NAME @@ -298,7 +298,16 @@ if not explicitly specified. .Pp SCSI devices: .Bl -tag -width 10n -.It Pa /dev/cam/ Ns Oo , Ns Ar port and initiator_id Oc +.It Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ns Oo , Ns Ar scsi-device-options Oc +.El +.Pp +The +.Ar scsi-device-options +are: +.Bl -tag -width 10n +.It Li iid= Ns Ar IID +Initiator ID to use when sending requests to specified CTL port. +The default value is 0. .El .Pp TTY devices: Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:46:35 2018 (r342082) +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:49:04 2018 (r342083) @@ -105,7 +105,6 @@ struct pci_vtscsi_config { struct pci_vtscsi_queue { struct pci_vtscsi_softc * vsq_sc; struct vqueue_info * vsq_vq; - int vsq_ctl_fd; pthread_mutex_t vsq_mtx; pthread_mutex_t vsq_qmtx; pthread_cond_t vsq_cv; @@ -529,7 +528,7 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, sbuf_delete(sb); } - err = ioctl(q->vsq_ctl_fd, CTL_IO, io); + err = ioctl(sc->vss_ctl_fd, CTL_IO, io); if (err != 0) { WPRINTF(("CTL_IO: err=%d (%s)\n", errno, strerror(errno))); cmd_wr->response = VIRTIO_SCSI_S_FAILURE; @@ -639,14 +638,8 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, int i; queue->vsq_sc = sc; - queue->vsq_ctl_fd = open("/dev/cam/ctl", O_RDWR); queue->vsq_vq = &sc->vss_vq[num + 2]; - if (queue->vsq_ctl_fd < 0) { - WPRINTF(("cannot open /dev/cam/ctl: %s\n", strerror(errno))); - return (-1); - } - pthread_mutex_init(&queue->vsq_mtx, NULL); pthread_mutex_init(&queue->vsq_qmtx, NULL); pthread_cond_init(&queue->vsq_cv, NULL); @@ -672,24 +665,34 @@ static int pci_vtscsi_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { struct pci_vtscsi_softc *sc; - char *optname = NULL; - char *opt; - int i; + char *opt, *optname; + const char *devname; + int i, optidx = 0; sc = calloc(1, sizeof(struct pci_vtscsi_softc)); - sc->vss_ctl_fd = open("/dev/cam/ctl", O_RDWR); + devname = "/dev/cam/ctl"; + while ((opt = strsep(&opts, ",")) != NULL) { + optname = strsep(&opt, "="); + if (opt == NULL && optidx == 0) { + if (optname[0] != 0) + devname = optname; + } else if (strcmp(optname, "dev") == 0 && opt != NULL) { + devname = opt; + } else if (strcmp(optname, "iid") == 0 && opt != NULL) { + sc->vss_iid = strtoul(opt, NULL, 10); + } else { + fprintf(stderr, "Invalid option %s\n", optname); + free(sc); + return (1); + } + optidx++; + } + sc->vss_ctl_fd = open(devname, O_RDWR); if (sc->vss_ctl_fd < 0) { - WPRINTF(("cannot open /dev/cam/ctl: %s\n", strerror(errno))); + WPRINTF(("cannot open %s: %s\n", devname, strerror(errno))); + free(sc); return (1); - } - - while ((opt = strsep(&opts, ",")) != NULL) { - if ((optname = strsep(&opt, "=")) != NULL) { - if (strcmp(optname, "iid") == 0) { - sc->vss_iid = strtoul(opt, NULL, 10); - } - } } vi_softc_linkup(&sc->vss_vs, &vtscsi_vi_consts, sc, pi, sc->vss_vq); From owner-svn-src-all@freebsd.org Fri Dec 14 16:14:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31AA9133A6F2; Fri, 14 Dec 2018 16:14:38 +0000 (UTC) (envelope-from mw@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) server-signature RSA-PSS (4096 bits) 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 D8435847BE; Fri, 14 Dec 2018 16:14:37 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8CAA1C34; Fri, 14 Dec 2018 16:14:37 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEGEbkZ048439; Fri, 14 Dec 2018 16:14:37 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEGEaFO048433; Fri, 14 Dec 2018 16:14:36 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201812141614.wBEGEaFO048433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Fri, 14 Dec 2018 16:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342084 - in head/sys: conf dev/tpm X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: in head/sys: conf dev/tpm X-SVN-Commit-Revision: 342084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8435847BE X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-1.52 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.85)[-0.846,0]; NEURAL_HAM_SHORT(-0.68)[-0.677,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 16:14:38 -0000 Author: mw Date: Fri Dec 14 16:14:36 2018 New Revision: 342084 URL: https://svnweb.freebsd.org/changeset/base/342084 Log: Introduce driver for TPM 2.0 in CRB and FIFO (TIS) modes It was written basing on: TCG PC Client Platform TPM Profile (PTP) Specification Version 22, Revision 1.03. It only supports Locality 0. Interrupts are only supported in FIFO mode. The driver in FIFO mode was tested on x86 with Infineon SLB9665 discrete TPM chip. Driver in both modes was also tested on qemu with swtpm running on host. Submitted by: Kornel Duleba Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D18048 Added: head/sys/dev/tpm/tpm20.c (contents, props changed) head/sys/dev/tpm/tpm20.h (contents, props changed) head/sys/dev/tpm/tpm_crb.c (contents, props changed) head/sys/dev/tpm/tpm_tis.c (contents, props changed) Modified: head/sys/conf/files.amd64 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Dec 14 14:49:04 2018 (r342083) +++ head/sys/conf/files.amd64 Fri Dec 14 16:14:36 2018 (r342084) @@ -491,6 +491,9 @@ dev/syscons/scvesactl.c optional sc vga vesa dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc dev/tpm/tpm.c optional tpm +dev/tpm/tpm20.c optional tpm +dev/tpm/tpm_crb.c optional tpm acpi +dev/tpm/tpm_tis.c optional tpm acpi dev/tpm/tpm_acpi.c optional tpm acpi dev/tpm/tpm_isa.c optional tpm isa dev/uart/uart_cpu_x86.c optional uart Added: head/sys/dev/tpm/tpm20.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/tpm/tpm20.c Fri Dec 14 16:14:36 2018 (r342084) @@ -0,0 +1,260 @@ +/*- + * Copyright (c) 2018 Stormshield. + * Copyright (c) 2018 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "tpm20.h" + +MALLOC_DECLARE(M_TPM20); +MALLOC_DEFINE(M_TPM20, "tpm_buffer", "buffer for tpm 2.0 driver"); + +static void tpm20_discard_buffer(void *arg); +static int tpm20_save_state(device_t dev, bool suspend); + +int +tpm20_read(struct cdev *dev, struct uio *uio, int flags) +{ + struct tpm_sc *sc; + size_t bytes_to_transfer; + int result = 0; + + sc = (struct tpm_sc *)dev->si_drv1; + + callout_stop(&sc->discard_buffer_callout); + sx_xlock(&sc->dev_lock); + + bytes_to_transfer = MIN(sc->pending_data_length, uio->uio_resid); + if (bytes_to_transfer > 0) { + result = uiomove((caddr_t) sc->buf, bytes_to_transfer, uio); + memset(sc->buf, 0, TPM_BUFSIZE); + sc->pending_data_length = 0; + cv_signal(&sc->buf_cv); + } else { + result = ETIMEDOUT; + } + + sx_xunlock(&sc->dev_lock); + + return (result); +} + +int +tpm20_write(struct cdev *dev, struct uio *uio, int flags) +{ + struct tpm_sc *sc; + size_t byte_count; + int result = 0; + + sc = (struct tpm_sc *)dev->si_drv1; + + byte_count = uio->uio_resid; + if (byte_count < TPM_HEADER_SIZE) { + device_printf(sc->dev, + "Requested transfer is too small\n"); + return (EINVAL); + } + + if (byte_count > TPM_BUFSIZE) { + device_printf(sc->dev, + "Requested transfer is too large\n"); + return (E2BIG); + } + + sx_xlock(&sc->dev_lock); + + while (sc->pending_data_length != 0) + cv_wait(&sc->buf_cv, &sc->dev_lock); + + result = uiomove(sc->buf, byte_count, uio); + if (result != 0) { + sx_xunlock(&sc->dev_lock); + return (result); + } + + result = sc->transmit(sc, byte_count); + + if (result == 0) + callout_reset(&sc->discard_buffer_callout, + TPM_READ_TIMEOUT / tick, tpm20_discard_buffer, sc); + + sx_xunlock(&sc->dev_lock); + return (result); +} + +static void tpm20_discard_buffer(void *arg) +{ + struct tpm_sc *sc; + + sc = (struct tpm_sc *)arg; + if (callout_pending(&sc->discard_buffer_callout)) + return; + + sx_xlock(&sc->dev_lock); + + memset(sc->buf, 0, TPM_BUFSIZE); + sc->pending_data_length = 0; + + cv_signal(&sc->buf_cv); + sx_xunlock(&sc->dev_lock); + + device_printf(sc->dev, + "User failed to read buffer in time\n"); +} + +int +tpm20_open(struct cdev *dev, int flag, int mode, struct thread *td) +{ + + return (0); +} + +int +tpm20_close(struct cdev *dev, int flag, int mode, struct thread *td) +{ + + return (0); +} + + +int +tpm20_ioctl(struct cdev *dev, u_long cmd, caddr_t data, + int flags, struct thread *td) +{ + + return (ENOTTY); +} + +int +tpm20_init(struct tpm_sc *sc) +{ + struct make_dev_args args; + int result; + + sc->buf = malloc(TPM_BUFSIZE, M_TPM20, M_WAITOK); + sx_init(&sc->dev_lock, "TPM driver lock"); + cv_init(&sc->buf_cv, "TPM buffer cv"); + callout_init(&sc->discard_buffer_callout, 1); + sc->pending_data_length = 0; + + make_dev_args_init(&args); + args.mda_devsw = &tpm_cdevsw; + args.mda_uid = UID_ROOT; + args.mda_gid = GID_WHEEL; + args.mda_mode = TPM_CDEV_PERM_FLAG; + args.mda_si_drv1 = sc; + result = make_dev_s(&args, &sc->sc_cdev, TPM_CDEV_NAME); + if (result != 0) + tpm20_release(sc); + + return (result); + +} + +void +tpm20_release(struct tpm_sc *sc) +{ + + if (sc->buf != NULL) + free(sc->buf, M_TPM20); + + sx_destroy(&sc->dev_lock); + cv_destroy(&sc->buf_cv); + if (sc->sc_cdev != NULL) + destroy_dev(sc->sc_cdev); +} + + +int +tpm20_suspend(device_t dev) +{ + return (tpm20_save_state(dev, true)); +} + +int +tpm20_shutdown(device_t dev) +{ + return (tpm20_save_state(dev, false)); +} + +static int +tpm20_save_state(device_t dev, bool suspend) +{ + struct tpm_sc *sc; + uint8_t save_cmd[] = { + 0x80, 0x01, /* TPM_ST_NO_SESSIONS tag*/ + 0x00, 0x00, 0x00, 0x0C, /* cmd length */ + 0x00, 0x00, 0x01, 0x45, 0x00, 0x00 /* cmd TPM_CC_Shutdown */ + }; + + sc = device_get_softc(dev); + + /* + * Inform the TPM whether we are going to suspend or reboot/shutdown. + */ + if (suspend) + save_cmd[11] = 1; /* TPM_SU_STATE */ + + if (sc == NULL || sc->buf == NULL) + return (0); + + sx_xlock(&sc->dev_lock); + + memcpy(sc->buf, save_cmd, sizeof(save_cmd)); + sc->transmit(sc, sizeof(save_cmd)); + + sx_xunlock(&sc->dev_lock); + + return (0); +} + +int32_t +tpm20_get_timeout(uint32_t command) +{ + int32_t timeout; + + switch (command) { + case TPM_CC_CreatePrimary: + case TPM_CC_Create: + case TPM_CC_CreateLoaded: + timeout = TPM_TIMEOUT_LONG; + break; + case TPM_CC_SequenceComplete: + case TPM_CC_Startup: + case TPM_CC_SequenceUpdate: + case TPM_CC_GetCapability: + case TPM_CC_PCR_Extend: + case TPM_CC_EventSequenceComplete: + case TPM_CC_HashSequenceStart: + timeout = TPM_TIMEOUT_C; + break; + default: + timeout = TPM_TIMEOUT_B; + break; + } + return timeout; +} Added: head/sys/dev/tpm/tpm20.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/tpm/tpm20.h Fri Dec 14 16:14:36 2018 (r342084) @@ -0,0 +1,192 @@ +/*- + * Copyright (c) 2018 Stormshield. + * Copyright (c) 2018 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT 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. + */ + +#ifndef _TPM20_H_ +#define _TPM20_H_ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include "opt_acpi.h" + +#define BIT(x) (1 << (x)) + +/* Timeouts in us */ +#define TPM_TIMEOUT_A 750000 +#define TPM_TIMEOUT_B 2000000 +#define TPM_TIMEOUT_C 200000 +#define TPM_TIMEOUT_D 30000 + +/* + * Generating RSA key pair takes ~(10-20s), which is significantly longer than + * any timeout defined in spec. Because of that we need a new one. + */ +#define TPM_TIMEOUT_LONG 40000000 + +/* List of commands that require TPM_TIMEOUT_LONG time to complete */ +#define TPM_CC_CreatePrimary 0x00000131 +#define TPM_CC_Create 0x00000153 +#define TPM_CC_CreateLoaded 0x00000191 + +/* List of commands that require only TPM_TIMEOUT_C time to complete */ +#define TPM_CC_SequenceComplete 0x0000013e +#define TPM_CC_Startup 0x00000144 +#define TPM_CC_SequenceUpdate 0x0000015c +#define TPM_CC_GetCapability 0x0000017a +#define TPM_CC_PCR_Extend 0x00000182 +#define TPM_CC_EventSequenceComplete 0x00000185 +#define TPM_CC_HashSequenceStart 0x00000186 + +/* Timeout before data in read buffer is discarded */ +#define TPM_READ_TIMEOUT 500000 + +#define TPM_BUFSIZE 0x1000 + +#define TPM_HEADER_SIZE 10 + +#define TPM_CDEV_NAME "tpm0" +#define TPM_CDEV_PERM_FLAG 0600 + +struct tpm_sc { + device_t dev; + + struct resource *mem_res; + struct resource *irq_res; + int mem_rid; + int irq_rid; + + struct cdev *sc_cdev; + + struct sx dev_lock; + struct cv buf_cv; + + void *intr_cookie; + int intr_type; /* Current event type */ + bool interrupts; + + uint8_t *buf; + size_t pending_data_length; + + struct callout discard_buffer_callout; + + int (*transmit)(struct tpm_sc *, size_t); +}; + +int tpm20_suspend(device_t dev); +int tpm20_shutdown(device_t dev); +int32_t tpm20_get_timeout(uint32_t command); +int tpm20_init(struct tpm_sc *sc); +void tpm20_release(struct tpm_sc *sc); + +d_open_t tpm20_open; +d_close_t tpm20_close; +d_read_t tpm20_read; +d_write_t tpm20_write; +d_ioctl_t tpm20_ioctl; + +static struct cdevsw tpm_cdevsw = { + .d_version = D_VERSION, + .d_open = tpm20_open, + .d_close = tpm20_close, + .d_read = tpm20_read, + .d_write = tpm20_write, + .d_ioctl = tpm20_ioctl, + .d_name = "tpm20", +}; + +/* Small helper routines for io ops */ +static inline uint8_t +RD1(struct tpm_sc *sc, bus_size_t off) +{ + + return (bus_read_1(sc->mem_res, off)); +} +static inline uint32_t +RD4(struct tpm_sc *sc, bus_size_t off) +{ + + return (bus_read_4(sc->mem_res, off)); +} +static inline uint64_t +RD8(struct tpm_sc *sc, bus_size_t off) +{ + + return (bus_read_8(sc->mem_res, off)); +} +static inline void +WR1(struct tpm_sc *sc, bus_size_t off, uint8_t val) +{ + + bus_write_1(sc->mem_res, off, val); +} +static inline void +WR4(struct tpm_sc *sc, bus_size_t off, uint32_t val) +{ + + bus_write_4(sc->mem_res, off, val); +} +static inline void +AND4(struct tpm_sc *sc, bus_size_t off, uint32_t val) +{ + + WR4(sc, off, RD4(sc, off) & val); +} +static inline void +OR1(struct tpm_sc *sc, bus_size_t off, uint8_t val) +{ + + WR1(sc, off, RD1(sc, off) | val); +} +static inline void +OR4(struct tpm_sc *sc, bus_size_t off, uint32_t val) +{ + + WR4(sc, off, RD4(sc, off) | val); +} +#endif /* _TPM20_H_ */ Added: head/sys/dev/tpm/tpm_crb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/tpm/tpm_crb.c Fri Dec 14 16:14:36 2018 (r342084) @@ -0,0 +1,419 @@ +/*- + * Copyright (c) 2018 Stormshield. + * Copyright (c) 2018 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "tpm20.h" + +/* + * CRB register space as defined in + * TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22 + */ +#define TPM_LOC_STATE 0x0 +#define TPM_LOC_CTRL 0x8 +#define TPM_LOC_STS 0xC +#define TPM_CRB_INTF_ID 0x30 +#define TPM_CRB_CTRL_EXT 0x38 +#define TPM_CRB_CTRL_REQ 0x40 +#define TPM_CRB_CTRL_STS 0x44 +#define TPM_CRB_CTRL_CANCEL 0x48 +#define TPM_CRB_CTRL_START 0x4C +#define TPM_CRB_INT_ENABLE 0x50 +#define TPM_CRB_INT_STS 0x54 +#define TPM_CRB_CTRL_CMD_SIZE 0x58 +#define TPM_CRB_CTRL_CMD_LADDR 0x5C +#define TPM_CRB_CTRL_CMD_HADDR 0x60 +#define TPM_CRB_CTRL_RSP_SIZE 0x64 +#define TPM_CRB_CTRL_RSP_ADDR 0x68 +#define TPM_CRB_DATA_BUFFER 0x80 + +#define TPM_LOC_STATE_ESTB BIT(0) +#define TPM_LOC_STATE_ASSIGNED BIT(1) +#define TPM_LOC_STATE_ACTIVE_MASK 0x9C +#define TPM_LOC_STATE_VALID BIT(7) + +#define TPM_CRB_INTF_ID_TYPE_CRB 0x1 +#define TPM_CRB_INTF_ID_TYPE 0x7 + +#define TPM_LOC_CTRL_REQUEST BIT(0) +#define TPM_LOC_CTRL_RELINQUISH BIT(1) + +#define TPM_CRB_CTRL_REQ_GO_READY BIT(0) +#define TPM_CRB_CTRL_REQ_GO_IDLE BIT(1) + +#define TPM_CRB_CTRL_STS_ERR_BIT BIT(0) +#define TPM_CRB_CTRL_STS_IDLE_BIT BIT(1) + +#define TPM_CRB_CTRL_CANCEL_CMD BIT(0) + +#define TPM_CRB_CTRL_START_CMD BIT(0) + +#define TPM_CRB_INT_ENABLE_BIT BIT(31) + +struct tpmcrb_sc { + struct tpm_sc base; + bus_size_t cmd_off; + bus_size_t rsp_off; + size_t cmd_buf_size; + size_t rsp_buf_size; +}; + + +int tpmcrb_transmit(struct tpm_sc *sc, size_t size); + +static int tpmcrb_acpi_probe(device_t dev); +static int tpmcrb_attach(device_t dev); +static int tpmcrb_detach(device_t dev); + +static ACPI_STATUS tpmcrb_fix_buff_offsets(ACPI_RESOURCE *res, void *arg); + +static bool tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, + uint32_t mask, uint32_t val, int32_t timeout); +static bool tpmcrb_request_locality(struct tpm_sc *sc, int locality); +static void tpmcrb_relinquish_locality(struct tpm_sc *sc); +static bool tpmcrb_cancel_cmd(struct tpm_sc *sc); + +char *tpmcrb_ids[] = {"MSFT0101", NULL}; + +static int +tpmcrb_acpi_probe(device_t dev) +{ + struct resource *res; + int rid = 0; + uint32_t caps; + + if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids) == NULL) + return (ENXIO); + + /* Check if device is in CRB mode */ + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (res == NULL) + return (ENXIO); + + caps = bus_read_4(res, TPM_CRB_INTF_ID); + bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + + if ((caps & TPM_CRB_INTF_ID_TYPE) != TPM_CRB_INTF_ID_TYPE_CRB) + return (ENXIO); + + device_set_desc(dev, "Trusted Platform Module 2.0, CRB mode"); + return (BUS_PROBE_DEFAULT); +} + +static ACPI_STATUS +tpmcrb_fix_buff_offsets(ACPI_RESOURCE *res, void *arg) +{ + struct tpmcrb_sc *crb_sc; + size_t length; + uint32_t base_addr; + + crb_sc = (struct tpmcrb_sc *)arg; + + if (res->Type != ACPI_RESOURCE_TYPE_FIXED_MEMORY32) + return (AE_OK); + + base_addr = res->Data.FixedMemory32.Address; + length = res->Data.FixedMemory32.AddressLength; + + if (crb_sc->cmd_off > base_addr && crb_sc->cmd_off < base_addr + length) + crb_sc->cmd_off -= base_addr; + if (crb_sc->rsp_off > base_addr && crb_sc->rsp_off < base_addr + length) + crb_sc->rsp_off -= base_addr; + + return (AE_OK); +} + +static int +tpmcrb_attach(device_t dev) +{ + struct tpmcrb_sc *crb_sc; + struct tpm_sc *sc; + ACPI_HANDLE handle; + ACPI_STATUS status; + int result; + + crb_sc = device_get_softc(dev); + sc = &crb_sc->base; + handle = acpi_get_handle(dev); + + sc->dev = dev; + + sc->mem_rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + RF_ACTIVE); + if (sc->mem_res == NULL) + return (ENXIO); + + if(!tpmcrb_request_locality(sc, 0)) { + tpmcrb_detach(dev); + return (ENXIO); + } + + /* + * Disable all interrupts for now, since I don't have a device that + * works in CRB mode and supports them. + */ + AND4(sc, TPM_CRB_INT_ENABLE, ~TPM_CRB_INT_ENABLE_BIT); + sc->interrupts = false; + + /* + * Read addresses of Tx/Rx buffers and their sizes. Note that they + * can be implemented by a single buffer. Also for some reason CMD + * addr is stored in two 4 byte neighboring registers, whereas RSP is + * stored in a single 8 byte one. + */ + crb_sc->rsp_off = RD8(sc, TPM_CRB_CTRL_RSP_ADDR); + crb_sc->cmd_off = RD4(sc, TPM_CRB_CTRL_CMD_LADDR); + crb_sc->cmd_off |= ((uint64_t) RD4(sc, TPM_CRB_CTRL_CMD_HADDR) << 32); + crb_sc->cmd_buf_size = RD4(sc, TPM_CRB_CTRL_CMD_SIZE); + crb_sc->rsp_buf_size = RD4(sc, TPM_CRB_CTRL_RSP_SIZE); + + tpmcrb_relinquish_locality(sc); + + /* Emulator returns address in acpi space instead of an offset */ + status = AcpiWalkResources(handle, "_CRS", tpmcrb_fix_buff_offsets, + (void *)crb_sc); + if (ACPI_FAILURE(status)) { + tpmcrb_detach(dev); + return (ENXIO); + } + + if (crb_sc->rsp_off == crb_sc->cmd_off) { + /* + * If Tx/Rx buffers are implemented as one they have to be of + * same size + */ + if (crb_sc->cmd_buf_size != crb_sc->rsp_buf_size) { + device_printf(sc->dev, + "Overlapping Tx/Rx buffers have different sizes\n"); + tpmcrb_detach(dev); + return (ENXIO); + } + } + + sc->transmit = tpmcrb_transmit; + + result = tpm20_init(sc); + if (result != 0) + tpmcrb_detach(dev); + + return (result); +} + +static int +tpmcrb_detach(device_t dev) +{ + struct tpm_sc *sc; + + sc = device_get_softc(dev); + + if (sc->mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + sc->mem_rid, sc->mem_res); + + tpm20_release(sc); + return (0); +} + +static bool +tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val, + int32_t timeout) +{ + + /* Check for condition */ + if ((RD4(sc, off) & mask) == val) + return (true); + + while (timeout > 0) { + if ((RD4(sc, off) & mask) == val) + return (true); + + pause("TPM in polling mode", 1); + timeout -= tick; + } + return (false); +} + +static bool +tpmcrb_request_locality(struct tpm_sc *sc, int locality) +{ + uint32_t mask; + + /* Currently we only support Locality 0 */ + if (locality != 0) + return (false); + + mask = TPM_LOC_STATE_VALID | TPM_LOC_STATE_ASSIGNED; + + OR4(sc, TPM_LOC_CTRL, TPM_LOC_CTRL_REQUEST); + if (!tpm_wait_for_u32(sc, TPM_LOC_STATE, mask, mask, TPM_TIMEOUT_C)) + return (false); + + return (true); +} + +static void +tpmcrb_relinquish_locality(struct tpm_sc *sc) +{ + + OR4(sc, TPM_LOC_CTRL, TPM_LOC_CTRL_RELINQUISH); +} + +static bool +tpmcrb_cancel_cmd(struct tpm_sc *sc) +{ + uint32_t mask = ~0; + + WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CMD); + if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_START, + mask, ~mask, TPM_TIMEOUT_B)) { + device_printf(sc->dev, + "Device failed to cancel command\n"); + return (false); + } + + WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD); + return (true); +} + +int +tpmcrb_transmit(struct tpm_sc *sc, size_t length) +{ + struct tpmcrb_sc *crb_sc; + uint32_t mask, curr_cmd; + int timeout, bytes_available; + + crb_sc = (struct tpmcrb_sc *)sc; + + sx_assert(&sc->dev_lock, SA_XLOCKED); + + if (length > crb_sc->cmd_buf_size) { + device_printf(sc->dev, + "Requested transfer is bigger than buffer size\n"); + return (E2BIG); + } + + if (RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_ERR_BIT) { + device_printf(sc->dev, + "Device has Error bit set\n"); + return (EIO); + } + if (!tpmcrb_request_locality(sc, 0)) { + device_printf(sc->dev, + "Failed to obtain locality\n"); + return (EIO); + } + /* Clear cancellation bit */ + WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD); + + /* Switch device to idle state if necessary */ + if (!(RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) { + OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_IDLE); + + mask = TPM_CRB_CTRL_STS_IDLE_BIT; + if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, + mask, mask, TPM_TIMEOUT_C)) { + device_printf(sc->dev, + "Failed to transition to idle state\n"); + return (EIO); + } + } + /* Switch to ready state */ + OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_READY); + + mask = TPM_CRB_CTRL_REQ_GO_READY; + if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, + mask, !mask, TPM_TIMEOUT_C)) { + device_printf(sc->dev, + "Failed to transition to ready state\n"); + return (EIO); + } + + /* + * Calculate timeout for current command. + * Command code is passed in bytes 6-10. + */ + curr_cmd = be32toh(*(uint32_t *) (&sc->buf[6])); + timeout = tpm20_get_timeout(curr_cmd); + + /* Send command and tell device to process it. */ + bus_write_region_stream_1(sc->mem_res, crb_sc->cmd_off, + sc->buf, length); + bus_barrier(sc->mem_res, crb_sc->cmd_off, + length, BUS_SPACE_BARRIER_WRITE); + + WR4(sc, TPM_CRB_CTRL_START, TPM_CRB_CTRL_START_CMD); + bus_barrier(sc->mem_res, TPM_CRB_CTRL_START, + 4, BUS_SPACE_BARRIER_WRITE); + + mask = ~0; + if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_START, mask, ~mask, timeout)) { + device_printf(sc->dev, + "Timeout while waiting for device to process cmd\n"); + if (!tpmcrb_cancel_cmd(sc)) + return (EIO); + } + + /* Read response header. Length is passed in bytes 2 - 6. */ + bus_read_region_stream_1(sc->mem_res, crb_sc->rsp_off, + sc->buf, TPM_HEADER_SIZE); + bytes_available = be32toh(*(uint32_t *) (&sc->buf[2])); + + if (bytes_available > TPM_BUFSIZE || bytes_available < TPM_HEADER_SIZE) { + device_printf(sc->dev, + "Incorrect response size: %d\n", + bytes_available); + return (EIO); + } + + bus_read_region_stream_1(sc->mem_res, crb_sc->rsp_off + TPM_HEADER_SIZE, + &sc->buf[TPM_HEADER_SIZE], bytes_available - TPM_HEADER_SIZE); + + OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_IDLE); + + tpmcrb_relinquish_locality(sc); + sc->pending_data_length = bytes_available; + + return (0); +} + +/* ACPI Driver */ +static device_method_t tpmcrb_methods[] = { + DEVMETHOD(device_probe, tpmcrb_acpi_probe), + DEVMETHOD(device_attach, tpmcrb_attach), + DEVMETHOD(device_detach, tpmcrb_detach), + DEVMETHOD(device_shutdown, tpm20_shutdown), + DEVMETHOD(device_suspend, tpm20_suspend), + {0, 0} +}; +static driver_t tpmcrb_driver = { + "tpmcrb", tpmcrb_methods, sizeof(struct tpmcrb_sc), +}; + +devclass_t tpmcrb_devclass; +DRIVER_MODULE(tpmcrb, acpi, tpmcrb_driver, tpmcrb_devclass, 0, 0); Added: head/sys/dev/tpm/tpm_tis.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/tpm/tpm_tis.c Fri Dec 14 16:14:36 2018 (r342084) @@ -0,0 +1,510 @@ +/*- + * Copyright (c) 2018 Stormshield. + * Copyright (c) 2018 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "tpm20.h" + +/* + * TIS register space as defined in + * TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22 + */ +#define TPM_ACCESS 0x0 +#define TPM_INT_ENABLE 0x8 +#define TPM_INT_VECTOR 0xc +#define TPM_INT_STS 0x10 +#define TPM_INTF_CAPS 0x14 +#define TPM_STS 0x18 +#define TPM_DATA_FIFO 0x24 +#define TPM_INTF_ID 0x30 +#define TPM_XDATA_FIFO 0x80 +#define TPM_DID_VID 0xF00 +#define TPM_RID 0xF04 + +#define TPM_ACCESS_LOC_REQ BIT(1) +#define TPM_ACCESS_LOC_Seize BIT(3) +#define TPM_ACCESS_LOC_ACTIVE BIT(5) +#define TPM_ACCESS_LOC_RELINQUISH BIT(5) +#define TPM_ACCESS_VALID BIT(7) + +#define TPM_INT_ENABLE_GLOBAL_ENABLE BIT(31) +#define TPM_INT_ENABLE_CMD_RDY BIT(7) +#define TPM_INT_ENABLE_LOC_CHANGE BIT(2) +#define TPM_INT_ENABLE_STS_VALID BIT(1) +#define TPM_INT_ENABLE_DATA_AVAIL BIT(0) + +#define TPM_INT_STS_CMD_RDY BIT(7) +#define TPM_INT_STS_LOC_CHANGE BIT(2) +#define TPM_INT_STS_VALID BIT(1) +#define TPM_INT_STS_DATA_AVAIL BIT(0) + +#define TPM_INTF_CAPS_VERSION 0x70000000 +#define TPM_INTF_CAPS_TPM20 0x30000000 + +#define TPM_STS_VALID BIT(7) +#define TPM_STS_CMD_RDY BIT(6) +#define TPM_STS_CMD_START BIT(5) +#define TPM_STS_DATA_AVAIL BIT(4) +#define TPM_STS_DATA_EXPECTED BIT(3) +#define TPM_STS_BURST_MASK 0xFFFF00 +#define TPM_STS_BURST_OFFSET 0x8 + +static int tpmtis_transmit(struct tpm_sc *sc, size_t length); + +static int tpmtis_acpi_probe(device_t dev); +static int tpmtis_attach(device_t dev); +static int tpmtis_detach(device_t dev); + +static void tpmtis_intr_handler(void *arg); + +static ACPI_STATUS tpmtis_get_SIRQ_channel(ACPI_RESOURCE *res, void *arg); +static bool tpmtis_setup_intr(struct tpm_sc *sc); + +static bool tpmtis_read_bytes(struct tpm_sc *sc, size_t count, uint8_t *buf); +static bool tpmtis_write_bytes(struct tpm_sc *sc, size_t count, uint8_t *buf); +static bool tpmtis_request_locality(struct tpm_sc *sc, int locality); +static void tpmtis_relinquish_locality(struct tpm_sc *sc); +static bool tpmtis_go_ready(struct tpm_sc *sc); + +static bool tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, + uint32_t mask, uint32_t val, int32_t timeout); +static uint16_t tpmtis_wait_for_burst(struct tpm_sc *sc); + +char *tpmtis_ids[] = {"MSFT0101", NULL}; + +static int +tpmtis_acpi_probe(device_t dev) +{ + struct resource *res; + int rid = 0; + uint32_t caps; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Dec 14 17:43:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 127D6133D20E; Fri, 14 Dec 2018 17:43:36 +0000 (UTC) (envelope-from mw@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) server-signature RSA-PSS (4096 bits) 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 AE1F288940; Fri, 14 Dec 2018 17:43:35 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A15DB2BE1; Fri, 14 Dec 2018 17:43:35 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEHhZlF096561; Fri, 14 Dec 2018 17:43:35 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEHhZar096560; Fri, 14 Dec 2018 17:43:35 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201812141743.wBEHhZar096560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Fri, 14 Dec 2018 17:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342085 - head/sys/dev/tpm X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/tpm X-SVN-Commit-Revision: 342085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE1F288940 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 17:43:36 -0000 Author: mw Date: Fri Dec 14 17:43:35 2018 New Revision: 342085 URL: https://svnweb.freebsd.org/changeset/base/342085 Log: Fix TPM driver compilation from r342084 Include recent ACPI_ID_PROBE API change. Modified: head/sys/dev/tpm/tpm_crb.c head/sys/dev/tpm/tpm_tis.c Modified: head/sys/dev/tpm/tpm_crb.c ============================================================================== --- head/sys/dev/tpm/tpm_crb.c Fri Dec 14 16:14:36 2018 (r342084) +++ head/sys/dev/tpm/tpm_crb.c Fri Dec 14 17:43:35 2018 (r342085) @@ -107,7 +107,7 @@ tpmcrb_acpi_probe(device_t dev) int rid = 0; uint32_t caps; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids) == NULL) + if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids, NULL) == NULL) return (ENXIO); /* Check if device is in CRB mode */ Modified: head/sys/dev/tpm/tpm_tis.c ============================================================================== --- head/sys/dev/tpm/tpm_tis.c Fri Dec 14 16:14:36 2018 (r342084) +++ head/sys/dev/tpm/tpm_tis.c Fri Dec 14 17:43:35 2018 (r342085) @@ -104,7 +104,7 @@ tpmtis_acpi_probe(device_t dev) int rid = 0; uint32_t caps; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids) == NULL) + if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids, NULL) == NULL) return (ENXIO); /* Check if device is in TPM 2.0 TIS mode */ From owner-svn-src-all@freebsd.org Fri Dec 14 17:57:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE98B133D90C; Fri, 14 Dec 2018 17:57:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85B248924A; Fri, 14 Dec 2018 17:57:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id F35F210B429; Fri, 14 Dec 2018 12:57:28 -0500 (EST) Subject: Re: svn commit: r342085 - head/sys/dev/tpm To: Marcin Wojtas , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812141743.wBEHhZar096560@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt 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: Date: Fri, 14 Dec 2018 09:57:28 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <201812141743.wBEHhZar096560@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 14 Dec 2018 12:57:29 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-Rspamd-Queue-Id: 85B248924A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 17:57:37 -0000 On 12/14/18 9:43 AM, Marcin Wojtas wrote: > Author: mw > Date: Fri Dec 14 17:43:35 2018 > New Revision: 342085 > URL: https://svnweb.freebsd.org/changeset/base/342085 > > Log: > Fix TPM driver compilation from r342084 > > Include recent ACPI_ID_PROBE API change. > > Modified: > head/sys/dev/tpm/tpm_crb.c > head/sys/dev/tpm/tpm_tis.c > > Modified: head/sys/dev/tpm/tpm_crb.c > ============================================================================== > --- head/sys/dev/tpm/tpm_crb.c Fri Dec 14 16:14:36 2018 (r342084) > +++ head/sys/dev/tpm/tpm_crb.c Fri Dec 14 17:43:35 2018 (r342085) > @@ -107,7 +107,7 @@ tpmcrb_acpi_probe(device_t dev) > int rid = 0; > uint32_t caps; > > - if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids) == NULL) > + if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids, NULL) == NULL) > return (ENXIO); I think it doesn't return a pointer anymore either. I think you want to use its return value as the return value from probe to honor the relative priority of CID vs HID matches, so something like: int error; error = ACPI_ID_PROBE(...); if (error > 0) return (error); ... return (error); Instead of 'return (BUS_GENERIC_PROBE)' or some such. -- John Baldwin                                                                              From owner-svn-src-all@freebsd.org Fri Dec 14 18:16:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 573F1133E391; Fri, 14 Dec 2018 18:16:36 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 ED0FC89F90; Fri, 14 Dec 2018 18:16:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDD85317B; Fri, 14 Dec 2018 18:16:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEIGZNf012605; Fri, 14 Dec 2018 18:16:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEIGZZw012603; Fri, 14 Dec 2018 18:16:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812141816.wBEIGZZw012603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 18:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342086 - head/sys/dev/nfe X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/nfe X-SVN-Commit-Revision: 342086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ED0FC89F90 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.70 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:16:36 -0000 Author: markj Date: Fri Dec 14 18:16:35 2018 New Revision: 342086 URL: https://svnweb.freebsd.org/changeset/base/342086 Log: Add support for the nForce MCP89 adapter. PR: 234015 Submitted by: Andrejs Bogdanovs MFC after: 1 week Modified: head/sys/dev/nfe/if_nfe.c head/sys/dev/nfe/if_nfereg.h Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Fri Dec 14 17:43:35 2018 (r342085) +++ head/sys/dev/nfe/if_nfe.c Fri Dec 14 18:16:35 2018 (r342086) @@ -265,6 +265,8 @@ static struct nfe_type nfe_devs[] = { "NVIDIA nForce MCP79 Networking Adapter"}, {PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP79_LAN4, "NVIDIA nForce MCP79 Networking Adapter"}, + {PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP89_LAN, + "NVIDIA nForce MCP89 Networking Adapter"}, {0, 0, NULL} }; @@ -531,6 +533,7 @@ nfe_attach(device_t dev) case PCI_PRODUCT_NVIDIA_MCP79_LAN2: case PCI_PRODUCT_NVIDIA_MCP79_LAN3: case PCI_PRODUCT_NVIDIA_MCP79_LAN4: + case PCI_PRODUCT_NVIDIA_MCP89_LAN: /* XXX flow control */ sc->nfe_flags |= NFE_JUMBO_SUP | NFE_40BIT_ADDR | NFE_HW_CSUM | NFE_PWR_MGMT | NFE_CORRECT_MACADDR | NFE_MIB_V3; Modified: head/sys/dev/nfe/if_nfereg.h ============================================================================== --- head/sys/dev/nfe/if_nfereg.h Fri Dec 14 17:43:35 2018 (r342085) +++ head/sys/dev/nfe/if_nfereg.h Fri Dec 14 18:16:35 2018 (r342086) @@ -338,6 +338,7 @@ struct nfe_desc64 { #define PCI_PRODUCT_NVIDIA_MCP79_LAN2 0x0ab1 #define PCI_PRODUCT_NVIDIA_MCP79_LAN3 0x0ab2 #define PCI_PRODUCT_NVIDIA_MCP79_LAN4 0x0ab3 +#define PCI_PRODUCT_NVIDIA_MCP89_LAN 0x0d7d #define PCI_PRODUCT_NVIDIA_NFORCE3_LAN2 PCI_PRODUCT_NVIDIA_NFORCE2_400_LAN1 #define PCI_PRODUCT_NVIDIA_NFORCE3_LAN3 PCI_PRODUCT_NVIDIA_NFORCE2_400_LAN2 From owner-svn-src-all@freebsd.org Fri Dec 14 18:25:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84AD1133E9E4; Fri, 14 Dec 2018 18:25:15 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 292FA8A89A; Fri, 14 Dec 2018 18:25:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0A5091B0F3; Fri, 14 Dec 2018 18:25:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r342057 - head/crypto/openssl/crypto/engine To: koobs@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812140106.wBE16Zgr058499@repo.freebsd.org> <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> From: Jung-uk Kim Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <3f9a0289-4539-368f-0ddd-b9ca9be2ac69@FreeBSD.org> Date: Fri, 14 Dec 2018 13:25:06 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XhGWniLjE0DGInk1VEfa2XZqOHrFDd7TG" X-Rspamd-Queue-Id: 292FA8A89A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:25:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XhGWniLjE0DGInk1VEfa2XZqOHrFDd7TG Content-Type: multipart/mixed; boundary="9UFlAsadM5x6cqJVyckHyAvuhzcdr5230"; protected-headers="v1" From: Jung-uk Kim To: koobs@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <3f9a0289-4539-368f-0ddd-b9ca9be2ac69@FreeBSD.org> Subject: Re: svn commit: r342057 - head/crypto/openssl/crypto/engine References: <201812140106.wBE16Zgr058499@repo.freebsd.org> <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> In-Reply-To: <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> --9UFlAsadM5x6cqJVyckHyAvuhzcdr5230 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18. 12. 13., Kubilay Kocak wrote: > On 14/12/2018 12:06 pm, Jung-uk Kim wrote: >> Author: jkim >> Date: Fri Dec 14 01:06:34 2018 >> New Revision: 342057 >> URL: https://svnweb.freebsd.org/changeset/base/342057 >> >> Log: >> =C2=A0=C2=A0 Do not complain when /dev/crypto does not exist. >> =C2=A0=C2=A0 =C2=A0=C2=A0 Now the new devcrypto engine is enabled sinc= e r342009, many >> users started >> =C2=A0=C2=A0 seeing "Could not open /dev/crypto: No such file or direc= tory".=C2=A0 >> Disable >> =C2=A0=C2=A0 the annoying error message as it is not very useful anywa= y. >> =C2=A0=C2=A0 =C2=A0=C2=A0 Note the patch was submitted upstream. >> =C2=A0=C2=A0 =C2=A0=C2=A0 https://github.com/openssl/openssl/pull/7896= >> >> Modified: >> =C2=A0=C2=A0 head/crypto/openssl/crypto/engine/eng_devcrypto.c >> >> Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> >> --- head/crypto/openssl/crypto/engine/eng_devcrypto.c=C2=A0=C2=A0=C2=A0= Fri Dec 14 >> 00:40:38 2018=C2=A0=C2=A0=C2=A0 (r342056) >> +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c=C2=A0=C2=A0=C2=A0= Fri Dec 14 >> 01:06:34 2018=C2=A0=C2=A0=C2=A0 (r342057) >> @@ -24,6 +24,8 @@ >> =C2=A0 =C2=A0 #include "internal/engine.h" >> =C2=A0 +/* #define ENGINE_DEVCRYPTO_DEBUG */ >> + >> =C2=A0 #ifdef CRYPTO_ALGORITHM_MIN >> =C2=A0 # define CHECK_BSD_STYLE_MACROS >> =C2=A0 #endif >> @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ENGINE *e =3D NULL; >> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ((cfd =3D open("/dev/crypto",= O_RDWR, 0)) < 0) { >> +#ifndef ENGINE_DEVCRYPTO_DEBUG >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (errno !=3D ENOENT) >> +#endif >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fprintf(stderr,= "Could not open /dev/crypto: %s\n", >> strerror(errno)); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return; >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >=20 > How trivially could devcrypto_debug=C2=A0 be modified to be a runtime > configuration (say sysctl) setting? This file came from OpenSSL and we will not implement any FreeBSD-specific code like that. Jung-uk Kim --9UFlAsadM5x6cqJVyckHyAvuhzcdr5230-- --XhGWniLjE0DGInk1VEfa2XZqOHrFDd7TG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlwT9YoACgkQfJ+WJvzb 8UY/fAf/dTgaLXh5IFr1c2gsrDikLb141+D76BZRXtOMMJ9JyYc6gLhasQmOD/0H pdIFAIuNRlAAREzp9qT2b9MVglk9huvUNZ8a/vHOpQ2+JQKrnb5pjKJIn0u3ZQze nKQKN0vUKv/r1ZR4iH7I/36WRUDyz2LtfTct96CZU3O99GQZNsutikjqaufPKJ76 lb0P/bZGOgZuNMGuw4g5vThZfKJw7oRb0qKuu0xzEgrGSmk8cC99PMU3tpojw2Je iKQv0zZwD+nYKerPkAum4zl8oUsOZACAQBEKrQSEVuDo00NP7SNOPB9rVK4PbyS6 HVQct6geW/lqJ9o/DU5fUXotHkZQrA== =Ponw -----END PGP SIGNATURE----- --XhGWniLjE0DGInk1VEfa2XZqOHrFDd7TG-- From owner-svn-src-all@freebsd.org Fri Dec 14 18:27:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 988F6133EB95; Fri, 14 Dec 2018 18:27:46 +0000 (UTC) (envelope-from jkim@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) server-signature RSA-PSS (4096 bits) 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 385068AAD5; Fri, 14 Dec 2018 18:27:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 11A681B0F4; Fri, 14 Dec 2018 18:27:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r342057 - head/crypto/openssl/crypto/engine To: Kevin Bowling , koobs@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812140106.wBE16Zgr058499@repo.freebsd.org> <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> From: Jung-uk Kim Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Fri, 14 Dec 2018 13:27:44 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1A1U1JfV4cX6yyHCJfcUXDapDfk0wZpCR" X-Rspamd-Queue-Id: 385068AAD5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:27:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1A1U1JfV4cX6yyHCJfcUXDapDfk0wZpCR Content-Type: multipart/mixed; boundary="ng2XUQsMXIXKkSe6k1YWneraSWUK6f9qD"; protected-headers="v1" From: Jung-uk Kim To: Kevin Bowling , koobs@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r342057 - head/crypto/openssl/crypto/engine References: <201812140106.wBE16Zgr058499@repo.freebsd.org> <216fb35b-28d1-faaa-d115-1f4a601212f0@FreeBSD.org> In-Reply-To: --ng2XUQsMXIXKkSe6k1YWneraSWUK6f9qD Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18. 12. 13., Kevin Bowling wrote: > But why, you can trivially see the open() call with truss or more > advanced tracers if you are debugging this Sure. I just followed OpenSSL coding style. Jung-uk Kim > On Thu, Dec 13, 2018 at 6:39 PM Kubilay Kocak > wrote: >=20 > On 14/12/2018 12:06 pm, Jung-uk Kim wrote: > > Author: jkim > > Date: Fri Dec 14 01:06:34 2018 > > New Revision: 342057 > > URL: https://svnweb.freebsd.org/changeset/base/342057 > > > > Log: > >=C2=A0 =C2=A0 Do not complain when /dev/crypto does not exist. > >=C2=A0 =C2=A0 > >=C2=A0 =C2=A0 Now the new devcrypto engine is enabled since r34200= 9, many > users started > >=C2=A0 =C2=A0 seeing "Could not open /dev/crypto: No such file or > directory".=C2=A0 Disable > >=C2=A0 =C2=A0 the annoying error message as it is not very useful = anyway. > >=C2=A0 =C2=A0 > >=C2=A0 =C2=A0 Note the patch was submitted upstream. > >=C2=A0 =C2=A0 > >=C2=A0 =C2=A0 https://github.com/openssl/openssl/pull/7896 > > > > Modified: > >=C2=A0 =C2=A0 head/crypto/openssl/crypto/engine/eng_devcrypto.c > > > > Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 > 00:40:38 2018=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r342056) > > +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 > 01:06:34 2018=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r342057) > > @@ -24,6 +24,8 @@ > >=C2=A0 =C2=A0 > >=C2=A0 =C2=A0#include "internal/engine.h" > >=C2=A0 =C2=A0 > > +/* #define ENGINE_DEVCRYPTO_DEBUG */ > > + > >=C2=A0 =C2=A0#ifdef CRYPTO_ALGORITHM_MIN > >=C2=A0 =C2=A0# define CHECK_BSD_STYLE_MACROS > >=C2=A0 =C2=A0#endif > > @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() > >=C2=A0 =C2=A0 =C2=A0 =C2=A0ENGINE *e =3D NULL; > >=C2=A0 =C2=A0 > >=C2=A0 =C2=A0 =C2=A0 =C2=A0if ((cfd =3D open("/dev/crypto", O_RDWR= , 0)) < 0) { > > +#ifndef ENGINE_DEVCRYPTO_DEBUG > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (errno !=3D ENOENT) > > +#endif > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "Could no= t open /dev/crypto: %s\n", > strerror(errno)); > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return; > >=C2=A0 =C2=A0 =C2=A0 =C2=A0} >=20 > How trivially could devcrypto_debug=C2=A0 be modified to be a runti= me > configuration (say sysctl) setting? --ng2XUQsMXIXKkSe6k1YWneraSWUK6f9qD-- --1A1U1JfV4cX6yyHCJfcUXDapDfk0wZpCR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlwT9iEACgkQfJ+WJvzb 8UaRCwf/QHaQ/mXYcG/1G9Te4378i4Bw0FX02yXCLyk79oFwr+o/3xsWMZy44Ee+ JLQHc3fd8l+vtGiHEPbjseNESaUTMzxr7AeDHtfg10lvw8JgeERqusrTrjUtz8Ov GryFtSmFcJHcTYIytBfZ/AsAHCVI5tO5f0laaPTZLJaNcKpRLd0N2KqM5aFCdKzG TC9LJwqGPi1CahYQBBLCRtxd9u1ekDnePPanXuDgLI5hqdktMn6oZc1/ZTJMH8Qq lHWo7+vI9RyscBcvIlHMQyWo2uNHSEyj3vQfLMtFTMNdxlJjcvBKul3ETUR5B7bn wIHgW9r43MNUC0ygTpadkY34Tww3Nw== =Ycio -----END PGP SIGNATURE----- --1A1U1JfV4cX6yyHCJfcUXDapDfk0wZpCR-- From owner-svn-src-all@freebsd.org Fri Dec 14 18:37:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7836E133F06F; Fri, 14 Dec 2018 18:37:28 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 1D60C8B122; Fri, 14 Dec 2018 18:37:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A53436CE; Fri, 14 Dec 2018 18:37:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEIbRf2023122; Fri, 14 Dec 2018 18:37:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEIbQh7023117; Fri, 14 Dec 2018 18:37:26 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812141837.wBEIbQh7023117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 14 Dec 2018 18:37:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342087 - in head: sys/arm/allwinner sys/dev/pwm sys/sys usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: sys/arm/allwinner sys/dev/pwm sys/sys usr.sbin/pwm X-SVN-Commit-Revision: 342087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1D60C8B122 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.85)[-0.853,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:37:28 -0000 Author: manu Date: Fri Dec 14 18:37:26 2018 New Revision: 342087 URL: https://svnweb.freebsd.org/changeset/base/342087 Log: pwm: Convert period and duty to unsigned int We don't need a 64 bits value to store nanoseconds Discused with: ian, jhibbits Modified: head/sys/arm/allwinner/aw_pwm.c head/sys/dev/pwm/pwm_if.m head/sys/dev/pwm/pwmbus.c head/sys/dev/pwm/pwmbus_if.m head/sys/sys/pwm.h head/usr.sbin/pwm/pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Dec 14 18:16:35 2018 (r342086) +++ head/sys/arm/allwinner/aw_pwm.c Fri Dec 14 18:37:26 2018 (r342087) @@ -87,8 +87,8 @@ struct aw_pwm_softc { struct resource *res; uint64_t clk_freq; - uint64_t period; - uint64_t duty; + unsigned int period; + unsigned int duty; uint32_t flags; bool enabled; }; @@ -191,7 +191,7 @@ aw_pwm_channel_max(device_t dev, int *nchannel) } static int -aw_pwm_channel_config(device_t dev, int channel, uint64_t period, uint64_t duty) +aw_pwm_channel_config(device_t dev, int channel, unsigned int period, unsigned int duty) { struct aw_pwm_softc *sc; uint64_t period_freq, duty_freq; @@ -254,7 +254,7 @@ aw_pwm_channel_config(device_t dev, int channel, uint6 } static int -aw_pwm_channel_get_config(device_t dev, int channel, uint64_t *period, uint64_t *duty) +aw_pwm_channel_get_config(device_t dev, int channel, unsigned int *period, unsigned int *duty) { struct aw_pwm_softc *sc; Modified: head/sys/dev/pwm/pwm_if.m ============================================================================== --- head/sys/dev/pwm/pwm_if.m Fri Dec 14 18:16:35 2018 (r342086) +++ head/sys/dev/pwm/pwm_if.m Fri Dec 14 18:37:26 2018 (r342087) @@ -46,8 +46,8 @@ METHOD device_t get_bus { METHOD int channel_config { device_t dev; int channel; - uint64_t period; - uint64_t duty; + unsigned int period; + unsigned duty; }; # @@ -57,8 +57,8 @@ METHOD int channel_config { METHOD int channel_get_config { device_t dev; int channel; - uint64_t *period; - uint64_t *duty; + unsigned int *period; + unsigned int *duty; }; # Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Fri Dec 14 18:16:35 2018 (r342086) +++ head/sys/dev/pwm/pwmbus.c Fri Dec 14 18:37:26 2018 (r342087) @@ -138,7 +138,7 @@ pwmbus_detach(device_t dev) } static int -pwmbus_channel_config(device_t bus, int channel, uint64_t period, uint64_t duty) +pwmbus_channel_config(device_t bus, int channel, unsigned int period, unsigned int duty) { struct pwmbus_softc *sc; @@ -151,7 +151,7 @@ pwmbus_channel_config(device_t bus, int channel, uint6 } static int -pwmbus_channel_get_config(device_t bus, int channel, uint64_t *period, uint64_t *duty) +pwmbus_channel_get_config(device_t bus, int channel, unsigned int *period, unsigned int *duty) { struct pwmbus_softc *sc; Modified: head/sys/dev/pwm/pwmbus_if.m ============================================================================== --- head/sys/dev/pwm/pwmbus_if.m Fri Dec 14 18:16:35 2018 (r342086) +++ head/sys/dev/pwm/pwmbus_if.m Fri Dec 14 18:37:26 2018 (r342087) @@ -59,8 +59,8 @@ HEADER { METHOD int channel_config { device_t bus; int channel; - uint64_t period; - uint64_t duty; + unsigned int period; + unsigned int duty; }; # @@ -70,8 +70,8 @@ METHOD int channel_config { METHOD int channel_get_config { device_t bus; int channel; - uint64_t *period; - uint64_t *duty; + unsigned int *period; + unsigned int *duty; }; # Modified: head/sys/sys/pwm.h ============================================================================== --- head/sys/sys/pwm.h Fri Dec 14 18:16:35 2018 (r342086) +++ head/sys/sys/pwm.h Fri Dec 14 18:37:26 2018 (r342087) @@ -35,8 +35,8 @@ struct pwm_state { int channel; - uint64_t period; - uint64_t duty; + unsigned int period; + unsigned int duty; uint32_t flags; bool enable; }; Modified: head/usr.sbin/pwm/pwm.c ============================================================================== --- head/usr.sbin/pwm/pwm.c Fri Dec 14 18:16:35 2018 (r342086) +++ head/usr.sbin/pwm/pwm.c Fri Dec 14 18:37:26 2018 (r342087) @@ -190,9 +190,9 @@ main(int argc, char *argv[]) } break; case PWM_SHOW_CONFIG: - printf("period: %ju\nduty: %ju\nenabled:%d\n", - (uintmax_t) state.period, - (uintmax_t) state.duty, + printf("period: %u\nduty: %u\nenabled:%d\n", + state.period, + state.duty, state.enable); break; case PWM_PERIOD: From owner-svn-src-all@freebsd.org Fri Dec 14 18:38:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8781133F0C9; Fri, 14 Dec 2018 18:38:11 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 3BF6D8B285; Fri, 14 Dec 2018 18:38:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2959536D0; Fri, 14 Dec 2018 18:38:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEIcAIg023244; Fri, 14 Dec 2018 18:38:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEIcAt3023243; Fri, 14 Dec 2018 18:38:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812141838.wBEIcAt3023243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 18:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342089 - stable/12/lib/libcasper/services/cap_syslog X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/lib/libcasper/services/cap_syslog X-SVN-Commit-Revision: 342089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3BF6D8B285 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.73 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.866,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-0.89)[-0.889,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:38:12 -0000 Author: markj Date: Fri Dec 14 18:38:10 2018 New Revision: 342089 URL: https://svnweb.freebsd.org/changeset/base/342089 Log: MFC r341692: Let the cap_syslog capability inherit stdio descriptors. Modified: stable/12/lib/libcasper/services/cap_syslog/cap_syslog.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libcasper/services/cap_syslog/cap_syslog.c ============================================================================== --- stable/12/lib/libcasper/services/cap_syslog/cap_syslog.c Fri Dec 14 18:38:10 2018 (r342088) +++ stable/12/lib/libcasper/services/cap_syslog/cap_syslog.c Fri Dec 14 18:38:10 2018 (r342089) @@ -198,4 +198,4 @@ syslog_command(const char *cmd, const nvlist_t *limits return (0); } -CREATE_SERVICE("system.syslog", NULL, syslog_command, 0); +CREATE_SERVICE("system.syslog", NULL, syslog_command, CASPER_SERVICE_STDIO); From owner-svn-src-all@freebsd.org Fri Dec 14 18:38:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DBD4133F0C5; Fri, 14 Dec 2018 18:38:11 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 1CC3B8B284; Fri, 14 Dec 2018 18:38:11 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E58436CF; Fri, 14 Dec 2018 18:38:11 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEIcAVe023242; Fri, 14 Dec 2018 18:38:10 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEIcAaB023238; Fri, 14 Dec 2018 18:38:10 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812141838.wBEIcAaB023238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 14 Dec 2018 18:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342088 - head/usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.sbin/pwm X-SVN-Commit-Revision: 342088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1CC3B8B284 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:38:11 -0000 Author: manu Date: Fri Dec 14 18:38:10 2018 New Revision: 342088 URL: https://svnweb.freebsd.org/changeset/base/342088 Log: pwm(8): Add percentage value support for duty cycle Modified: head/usr.sbin/pwm/pwm.8 head/usr.sbin/pwm/pwm.c Modified: head/usr.sbin/pwm/pwm.8 ============================================================================== --- head/usr.sbin/pwm/pwm.8 Fri Dec 14 18:37:26 2018 (r342087) +++ head/usr.sbin/pwm/pwm.8 Fri Dec 14 18:38:10 2018 (r342088) @@ -67,7 +67,7 @@ Show the configuration of the pwm channel .It Fl p Ar period Configure the period (in nanoseconds) of the pwm channel .It Fl d Ar duty -Configure the duty (in nanoseconds) of the pwm channel +Configure the duty (in nanoseconds or percentage) of the pwm channel .El .Sh EXAMPLES .Bl -bullet @@ -76,9 +76,13 @@ Show the configuration of the pwm channel: .Pp pwm -f /dev/pwmc0 -C .It -Configure a 50000 ns period and a 25000 duty cycles: +Configure a 50000 ns period and a 25000 duty cycle: .Pp pwm -f /dev/pwmc0 -p 50000 -d 25000 +.It +Configure a 50% duty cycle: +.Pp +pwm -f /dev/pwmc0 -d 50% .El .Sh SEE ALSO .Xr pwm 9 , Modified: head/usr.sbin/pwm/pwm.c ============================================================================== --- head/usr.sbin/pwm/pwm.c Fri Dec 14 18:37:26 2018 (r342087) +++ head/usr.sbin/pwm/pwm.c Fri Dec 14 18:38:10 2018 (r342088) @@ -71,6 +71,7 @@ main(int argc, char *argv[]) int action, ch; cap_rights_t right_ioctl; const unsigned long pwm_ioctls[] = {PWMGETSTATE, PWMSETSTATE, PWMMAXCHANNEL}; + char *percent; action = 0; fd = -1; @@ -104,7 +105,9 @@ main(int argc, char *argv[]) if (action & ~(PWM_PERIOD | PWM_DUTY)) usage(); action = PWM_DUTY; - duty = strtol(optarg, NULL, 10); + duty = strtol(optarg, &percent, 10); + if (*percent != '\0' && *percent != '%') + usage(); break; case 'c': if (channel != -1) @@ -199,8 +202,12 @@ main(int argc, char *argv[]) case PWM_DUTY: if (period != -1) state.period = period; - if (duty != -1) - state.duty = duty; + if (duty != -1) { + if (*percent != '\0') + state.duty = state.period * duty / 100; + else + state.duty = duty; + } if (ioctl(fd, PWMSETSTATE, &state) == -1) { fprintf(stderr, "Cannot configure the pwm controller\n"); From owner-svn-src-all@freebsd.org Fri Dec 14 18:39:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86CBD133F195; Fri, 14 Dec 2018 18:39:07 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 297A48B518; Fri, 14 Dec 2018 18:39:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BBE736D3; Fri, 14 Dec 2018 18:39:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEId6m1023352; Fri, 14 Dec 2018 18:39:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEId6Is023348; Fri, 14 Dec 2018 18:39:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812141839.wBEId6Is023348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 18:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342090 - in stable/12/sys/riscv: include riscv X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys/riscv: include riscv X-SVN-Commit-Revision: 342090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 297A48B518 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.73 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.864,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.89)[-0.888,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:39:07 -0000 Author: markj Date: Fri Dec 14 18:39:06 2018 New Revision: 342090 URL: https://svnweb.freebsd.org/changeset/base/342090 Log: MFC r341693: Rename sptbr to satp per v1.10 of the privileged architecture spec. Modified: stable/12/sys/riscv/include/cpufunc.h stable/12/sys/riscv/riscv/locore.S stable/12/sys/riscv/riscv/pmap.c stable/12/sys/riscv/riscv/swtch.S Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/riscv/include/cpufunc.h ============================================================================== --- stable/12/sys/riscv/include/cpufunc.h Fri Dec 14 18:38:10 2018 (r342089) +++ stable/12/sys/riscv/include/cpufunc.h Fri Dec 14 18:39:06 2018 (r342090) @@ -109,6 +109,13 @@ sfence_vma_page(uintptr_t addr) #define rdinstret() csr_read64(instret) #define rdhpmcounter(n) csr_read64(hpmcounter##n) +static __inline void +load_satp(uint64_t val) +{ + + __asm __volatile("csrw satp, %0" :: "r"(val)); +} + #define cpufunc_nullop() riscv_nullop() void riscv_nullop(void); Modified: stable/12/sys/riscv/riscv/locore.S ============================================================================== --- stable/12/sys/riscv/riscv/locore.S Fri Dec 14 18:38:10 2018 (r342089) +++ stable/12/sys/riscv/riscv/locore.S Fri Dec 14 18:39:06 2018 (r342090) @@ -152,7 +152,7 @@ _start: li t0, SATP_MODE_SV39 or s2, s2, t0 sfence.vma - csrw sptbr, s2 + csrw satp, s2 .align 2 va: @@ -297,7 +297,7 @@ ENTRY(mpentry) li t0, SATP_MODE_SV39 or s2, s2, t0 sfence.vma - csrw sptbr, s2 + csrw satp, s2 .align 2 mpva: Modified: stable/12/sys/riscv/riscv/pmap.c ============================================================================== --- stable/12/sys/riscv/riscv/pmap.c Fri Dec 14 18:38:10 2018 (r342089) +++ stable/12/sys/riscv/riscv/pmap.c Fri Dec 14 18:39:06 2018 (r342090) @@ -3277,7 +3277,7 @@ pmap_activate(struct thread *td) reg = SATP_MODE_SV39; reg |= (td->td_pcb->pcb_l1addr >> PAGE_SHIFT); - __asm __volatile("csrw sptbr, %0" :: "r"(reg)); + load_satp(reg); pmap_invalidate_all(pmap); critical_exit(); Modified: stable/12/sys/riscv/riscv/swtch.S ============================================================================== --- stable/12/sys/riscv/riscv/swtch.S Fri Dec 14 18:38:10 2018 (r342089) +++ stable/12/sys/riscv/riscv/swtch.S Fri Dec 14 18:39:06 2018 (r342090) @@ -223,7 +223,7 @@ ENTRY(cpu_throw) srli t0, t0, PAGE_SHIFT li t1, SATP_MODE_SV39 or t0, t0, t1 - csrw sptbr, t0 + csrw satp, t0 /* TODO: Invalidate the TLB */ @@ -341,7 +341,7 @@ ENTRY(cpu_switch) srli t0, t0, PAGE_SHIFT li t1, SATP_MODE_SV39 or t0, t0, t1 - csrw sptbr, t0 + csrw satp, t0 /* TODO: Invalidate the TLB */ From owner-svn-src-all@freebsd.org Fri Dec 14 18:39:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5FFD133F1CD; Fri, 14 Dec 2018 18:39:20 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 8CBAA8B608; Fri, 14 Dec 2018 18:39:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FC4F36D4; Fri, 14 Dec 2018 18:39:17 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEIdHfT023406; Fri, 14 Dec 2018 18:39:17 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEIdHwS023405; Fri, 14 Dec 2018 18:39:17 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201812141839.wBEIdHwS023405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 14 Dec 2018 18:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342091 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 342091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8CBAA8B608 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.855,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:39:21 -0000 Author: manu Date: Fri Dec 14 18:39:17 2018 New Revision: 342091 URL: https://svnweb.freebsd.org/changeset/base/342091 Log: allwinner: aw_pwm: Read value at attach The booloaded might have configured the pwm controller so read the values. Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Fri Dec 14 18:39:06 2018 (r342090) +++ head/sys/arm/allwinner/aw_pwm.c Fri Dec 14 18:39:17 2018 (r342091) @@ -136,7 +136,8 @@ static int aw_pwm_attach(device_t dev) { struct aw_pwm_softc *sc; - /* uint32_t reg; */ + uint64_t clk_freq; + uint32_t reg; int error; sc = device_get_softc(dev); @@ -160,6 +161,26 @@ aw_pwm_attach(device_t dev) if ((sc->busdev = pwmbus_attach_bus(dev)) == NULL) device_printf(dev, "Cannot attach pwm bus\n"); + /* Read the configuration left by U-Boot */ + reg = AW_PWM_READ(sc, AW_PWM_CTRL); + if (reg & (AW_PWM_CTRL_GATE | AW_PWM_CTRL_EN)) + sc->enabled = true; + + reg = AW_PWM_READ(sc, AW_PWM_CTRL); + reg &= AW_PWM_CTRL_PRESCALE_MASK; + if (reg > nitems(aw_pwm_clk_prescaler)) { + device_printf(dev, "Bad prescaler %x, cannot guess current settings\n", reg); + goto out; + } + clk_freq = sc->clk_freq / aw_pwm_clk_prescaler[reg]; + + reg = AW_PWM_READ(sc, AW_PWM_PERIOD); + sc->period = NS_PER_SEC / + (clk_freq / ((reg >> AW_PWM_PERIOD_TOTAL_SHIFT) & AW_PWM_PERIOD_TOTAL_MASK)); + sc->duty = NS_PER_SEC / + (clk_freq / ((reg >> AW_PWM_PERIOD_ACTIVE_SHIFT) & AW_PWM_PERIOD_ACTIVE_MASK)); + +out: return (0); fail: From owner-svn-src-all@freebsd.org Fri Dec 14 18:40:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA62D133F257; Fri, 14 Dec 2018 18:40:09 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 6DF028B753; Fri, 14 Dec 2018 18:40:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6134336D8; Fri, 14 Dec 2018 18:40:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEIe97Q023524; Fri, 14 Dec 2018 18:40:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEIe94p023523; Fri, 14 Dec 2018 18:40:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812141840.wBEIe94p023523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 18:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342092 - stable/12/sys/riscv/include X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/riscv/include X-SVN-Commit-Revision: 342092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6DF028B753 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.73 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.86)[-0.864,0]; NEURAL_HAM_LONG(-0.89)[-0.888,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:40:10 -0000 Author: markj Date: Fri Dec 14 18:40:08 2018 New Revision: 342092 URL: https://svnweb.freebsd.org/changeset/base/342092 Log: MFC r341694: Update the description of the address space layout on RISC-V. Modified: stable/12/sys/riscv/include/vmparam.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/riscv/include/vmparam.h ============================================================================== --- stable/12/sys/riscv/include/vmparam.h Fri Dec 14 18:39:17 2018 (r342091) +++ stable/12/sys/riscv/include/vmparam.h Fri Dec 14 18:40:08 2018 (r342092) @@ -115,23 +115,24 @@ /** * Address space layout. * - * RISC-V implements up to a 48 bit virtual address space. The address space is - * split into 2 regions at each end of the 64 bit address space, with an - * out of range "hole" in the middle. + * RISC-V implements multiple paging modes with different virtual address space + * sizes: SV32, SV39 and SV48. SV39 permits a virtual address space size of + * 512GB and uses a three-level page table. Since this is large enough for most + * purposes, we currently use SV39 for both userland and the kernel, avoiding + * the extra translation step required by SV48. * - * We limit the size of the two spaces to 39 bits each. + * The address space is split into two regions at each end of the 64-bit address + * space: * - * Upper region: 0xffffffffffffffff - * 0xffffff8000000000 + * 0x0000000000000000 - 0x0000003fffffffff 256GB user map + * 0x0000004000000000 - 0xffffffbfffffffff unmappable + * 0xffffffc000000000 - 0xffffffc7ffffffff 32GB kernel map + * 0xffffffc800000000 - 0xffffffcfffffffff 32GB unused + * 0xffffffd000000000 - 0xffffffefffffffff 128GB direct map + * 0xfffffff000000000 - 0xffffffffffffffff 64GB unused * - * Hole: 0xffffff7fffffffff - * 0x0000008000000000 + * The kernel is loaded at the beginning of the kernel map. * - * Lower region: 0x0000007fffffffff - * 0x0000000000000000 - * - * We use the upper region for the kernel, and the lower region for userland. - * * We define some interesting address constants: * * VM_MIN_ADDRESS and VM_MAX_ADDRESS define the start and end of the entire @@ -146,11 +147,9 @@ #define VM_MIN_ADDRESS (0x0000000000000000UL) #define VM_MAX_ADDRESS (0xffffffffffffffffUL) -/* 32 GiB of kernel addresses */ #define VM_MIN_KERNEL_ADDRESS (0xffffffc000000000UL) #define VM_MAX_KERNEL_ADDRESS (0xffffffc800000000UL) -/* 128 GiB maximum for the direct map region */ #define DMAP_MIN_ADDRESS (0xffffffd000000000UL) #define DMAP_MAX_ADDRESS (0xfffffff000000000UL) From owner-svn-src-all@freebsd.org Fri Dec 14 18:50:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2705D133F787; Fri, 14 Dec 2018 18:50:33 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 BD8FF8BE5D; Fri, 14 Dec 2018 18:50:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF28B38A1; Fri, 14 Dec 2018 18:50:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEIoWte029121; Fri, 14 Dec 2018 18:50:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEIoWN9029120; Fri, 14 Dec 2018 18:50:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812141850.wBEIoWN9029120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 18:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342093 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 342093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD8FF8BE5D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.71 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.85)[-0.853,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 18:50:33 -0000 Author: markj Date: Fri Dec 14 18:50:32 2018 New Revision: 342093 URL: https://svnweb.freebsd.org/changeset/base/342093 Log: Clean up the riscv pmap_bootstrap() implementation. - Build up phys_avail[] in a single loop, excluding memory used by the loaded kernel. - Fix an array indexing bug in the aforementioned phys_avail[] initialization.[1] - Remove some unneeded code copied from the arm64 implementation. PR: 231515 [1] Reviewed by: jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18464 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Fri Dec 14 18:40:08 2018 (r342092) +++ head/sys/riscv/riscv/pmap.c Fri Dec 14 18:50:32 2018 (r342093) @@ -211,7 +211,7 @@ __FBSDID("$FreeBSD$"); /* The list of all the user pmaps */ LIST_HEAD(pmaplist, pmap); -static struct pmaplist allpmaps; +static struct pmaplist allpmaps = LIST_HEAD_INITIALIZER(); struct pmap kernel_pmap_store; @@ -508,17 +508,12 @@ pmap_bootstrap_l3(vm_offset_t l1pt, vm_offset_t va, vm void pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) { - u_int l1_slot, l2_slot, avail_slot, map_slot, used_map_slot; - uint64_t kern_delta; - pt_entry_t *l2; - vm_offset_t va, freemempos; + u_int l1_slot, l2_slot, avail_slot, map_slot; + vm_offset_t freemempos; vm_offset_t dpcpu, msgbufpv; - vm_paddr_t pa, min_pa, max_pa; + vm_paddr_t end, max_pa, min_pa, pa, start; int i; - kern_delta = KERNBASE - kernstart; - physmem = 0; - printf("pmap_bootstrap %lx %lx %lx\n", l1pt, kernstart, kernlen); printf("%lx\n", l1pt); printf("%lx\n", (KERNBASE >> L1_SHIFT) & Ln_ADDR_MASK); @@ -527,21 +522,16 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, kernel_pmap_store.pm_l1 = (pd_entry_t *)l1pt; PMAP_LOCK_INIT(kernel_pmap); - /* - * Initialize the global pv list lock. - */ rw_init(&pvh_global_lock, "pmap pv global"); - LIST_INIT(&allpmaps); + /* Assume the address we were loaded to is a valid physical address. */ + min_pa = max_pa = kernstart; - /* Assume the address we were loaded to is a valid physical address */ - min_pa = max_pa = KERNBASE - kern_delta; - /* * Find the minimum physical address. physmap is sorted, * but may contain empty ranges. */ - for (i = 0; i < (physmap_idx * 2); i += 2) { + for (i = 0; i < physmap_idx * 2; i += 2) { if (physmap[i] == physmap[i + 1]) continue; if (physmap[i] <= min_pa) @@ -556,67 +546,18 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, /* Create a direct map region early so we can use it for pa -> va */ pmap_bootstrap_dmap(l1pt, min_pa, max_pa); - va = KERNBASE; - pa = KERNBASE - kern_delta; - /* - * Start to initialize phys_avail by copying from physmap - * up to the physical address KERNBASE points at. - */ - map_slot = avail_slot = 0; - for (; map_slot < (physmap_idx * 2); map_slot += 2) { - if (physmap[map_slot] == physmap[map_slot + 1]) - continue; - - if (physmap[map_slot] <= pa && - physmap[map_slot + 1] > pa) - break; - - phys_avail[avail_slot] = physmap[map_slot]; - phys_avail[avail_slot + 1] = physmap[map_slot + 1]; - physmem += (phys_avail[avail_slot + 1] - - phys_avail[avail_slot]) >> PAGE_SHIFT; - avail_slot += 2; - } - - /* Add the memory before the kernel */ - if (physmap[avail_slot] < pa) { - phys_avail[avail_slot] = physmap[map_slot]; - phys_avail[avail_slot + 1] = pa; - physmem += (phys_avail[avail_slot + 1] - - phys_avail[avail_slot]) >> PAGE_SHIFT; - avail_slot += 2; - } - used_map_slot = map_slot; - - /* * Read the page table to find out what is already mapped. * This assumes we have mapped a block of memory from KERNBASE * using a single L1 entry. */ - l2 = pmap_early_page_idx(l1pt, KERNBASE, &l1_slot, &l2_slot); + (void)pmap_early_page_idx(l1pt, KERNBASE, &l1_slot, &l2_slot); /* Sanity check the index, KERNBASE should be the first VA */ KASSERT(l2_slot == 0, ("The L2 index is non-zero")); - /* Find how many pages we have mapped */ - for (; l2_slot < Ln_ENTRIES; l2_slot++) { - if ((l2[l2_slot] & PTE_V) == 0) - break; + freemempos = roundup2(KERNBASE + kernlen, PAGE_SIZE); - /* Check locore used L2 superpages */ - KASSERT((l2[l2_slot] & PTE_RX) != 0, - ("Invalid bootstrap L2 table")); - - va += L2_SIZE; - pa += L2_SIZE; - } - - va = roundup2(va, L2_SIZE); - - freemempos = KERNBASE + kernlen; - freemempos = roundup2(freemempos, PAGE_SIZE); - /* Create the l3 tables for the early devmap */ freemempos = pmap_bootstrap_l3(l1pt, VM_MAX_KERNEL_ADDRESS - L2_SIZE, freemempos); @@ -642,31 +583,32 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, pa = pmap_early_vtophys(l1pt, freemempos); - /* Finish initialising physmap */ - map_slot = used_map_slot; - for (; avail_slot < (PHYS_AVAIL_SIZE - 2) && - map_slot < (physmap_idx * 2); map_slot += 2) { - if (physmap[map_slot] == physmap[map_slot + 1]) { - continue; - } + /* Initialize phys_avail. */ + for (avail_slot = map_slot = physmem = 0; map_slot < physmap_idx * 2; + map_slot += 2) { + start = physmap[map_slot]; + end = physmap[map_slot + 1]; - /* Have we used the current range? */ - if (physmap[map_slot + 1] <= pa) { + if (start == end) continue; - } + if (start >= kernstart && end <= pa) + continue; - /* Do we need to split the entry? */ - if (physmap[map_slot] < pa) { + if (start < kernstart && end > kernstart) + end = kernstart; + else if (start < pa && end > pa) + start = pa; + phys_avail[avail_slot] = start; + phys_avail[avail_slot + 1] = end; + physmem += (end - start) >> PAGE_SHIFT; + avail_slot += 2; + + if (end != physmap[map_slot + 1] && end > pa) { phys_avail[avail_slot] = pa; phys_avail[avail_slot + 1] = physmap[map_slot + 1]; - } else { - phys_avail[avail_slot] = physmap[map_slot]; - phys_avail[avail_slot + 1] = physmap[map_slot + 1]; + physmem += (physmap[map_slot + 1] - pa) >> PAGE_SHIFT; + avail_slot += 2; } - physmem += (phys_avail[avail_slot + 1] - - phys_avail[avail_slot]) >> PAGE_SHIFT; - - avail_slot += 2; } phys_avail[avail_slot] = 0; phys_avail[avail_slot + 1] = 0; From owner-svn-src-all@freebsd.org Fri Dec 14 19:14:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A93130A0E5; Fri, 14 Dec 2018 19:14:52 +0000 (UTC) (envelope-from imp@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) server-signature RSA-PSS (4096 bits) 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 D36458D017; Fri, 14 Dec 2018 19:14:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C51543E90; Fri, 14 Dec 2018 19:14:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEJEpnj044241; Fri, 14 Dec 2018 19:14:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEJEp3W044240; Fri, 14 Dec 2018 19:14:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812141914.wBEJEp3W044240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 14 Dec 2018 19:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342094 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 342094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D36458D017 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 19:14:52 -0000 Author: imp Date: Fri Dec 14 19:14:51 2018 New Revision: 342094 URL: https://svnweb.freebsd.org/changeset/base/342094 Log: atomic_fcmpset* return int, not the type of *. fcmpset returns true/false as a int, so make the return types and variables match the int to be consistent with other arch. Reviewed by: cognet@ Differential Revision: https://reviews.freebsd.org/D18557 Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Fri Dec 14 18:50:32 2018 (r342093) +++ head/sys/mips/include/atomic.h Fri Dec 14 19:14:51 2018 (r342094) @@ -392,10 +392,10 @@ atomic_cmpset_rel_32(__volatile uint32_t *p, uint32_t return (atomic_cmpset_32(p, cmpval, newval)); } -static __inline uint32_t +static __inline int atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) { - uint32_t ret; + int ret; __asm __volatile ( "1:\n\t" @@ -415,7 +415,7 @@ atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cm return ret; } -static __inline uint32_t +static __inline int atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) { int retval; @@ -425,7 +425,7 @@ atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t return (retval); } -static __inline uint32_t +static __inline int atomic_fcmpset_rel_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) { mips_sync(); @@ -502,10 +502,10 @@ atomic_cmpset_rel_64(__volatile uint64_t *p, uint64_t return (atomic_cmpset_64(p, cmpval, newval)); } -static __inline uint32_t +static __inline int atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) { - uint32_t ret; + int ret; __asm __volatile ( "1:\n\t" @@ -526,7 +526,7 @@ atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cm return ret; } -static __inline uint64_t +static __inline int atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) { int retval; @@ -536,7 +536,7 @@ atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t return (retval); } -static __inline uint64_t +static __inline int atomic_fcmpset_rel_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) { mips_sync(); From owner-svn-src-all@freebsd.org Fri Dec 14 19:48:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A617F130B50A; Fri, 14 Dec 2018 19:48:43 +0000 (UTC) (envelope-from imp@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) server-signature RSA-PSS (4096 bits) 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 358168E408; Fri, 14 Dec 2018 19:48:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 238DE441F; Fri, 14 Dec 2018 19:48:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEJmgr9060301; Fri, 14 Dec 2018 19:48:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEJmg4K060300; Fri, 14 Dec 2018 19:48:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812141948.wBEJmg4K060300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 14 Dec 2018 19:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342095 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 342095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 358168E408 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 19:48:44 -0000 Author: imp Date: Fri Dec 14 19:48:42 2018 New Revision: 342095 URL: https://svnweb.freebsd.org/changeset/base/342095 Log: atomic_cmpset return value is also an int. Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Fri Dec 14 19:14:51 2018 (r342094) +++ head/sys/mips/include/atomic.h Fri Dec 14 19:48:42 2018 (r342095) @@ -348,10 +348,10 @@ ATOMIC_STORE_LOAD(64) * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint32_t +static __inline int atomic_cmpset_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { - uint32_t ret; + int ret; __asm __volatile ( "1:\tll %0, %4\n\t" /* load old value */ @@ -375,7 +375,7 @@ atomic_cmpset_32(__volatile uint32_t *p, uint32_t cmpv * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint32_t +static __inline int atomic_cmpset_acq_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { int retval; @@ -385,7 +385,7 @@ atomic_cmpset_acq_32(__volatile uint32_t *p, uint32_t return (retval); } -static __inline uint32_t +static __inline int atomic_cmpset_rel_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { mips_sync(); @@ -457,10 +457,10 @@ atomic_fetchadd_32(__volatile uint32_t *p, uint32_t v) * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint64_t +static __inline int atomic_cmpset_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) { - uint64_t ret; + int ret; __asm __volatile ( "1:\n\t" @@ -485,7 +485,7 @@ atomic_cmpset_64(__volatile uint64_t *p, uint64_t cmpv * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint64_t +static __inline int atomic_cmpset_acq_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) { int retval; @@ -495,7 +495,7 @@ atomic_cmpset_acq_64(__volatile uint64_t *p, uint64_t return (retval); } -static __inline uint64_t +static __inline int atomic_cmpset_rel_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) { mips_sync(); From owner-svn-src-all@freebsd.org Fri Dec 14 20:57:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1EA31316572; Fri, 14 Dec 2018 20:57:58 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 57F236AD0B; Fri, 14 Dec 2018 20:57:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B7C4511E; Fri, 14 Dec 2018 20:57:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEKvwCm097864; Fri, 14 Dec 2018 20:57:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEKvwEQ097863; Fri, 14 Dec 2018 20:57:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812142057.wBEKvwEQ097863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 20:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342096 - head/sys/riscv/conf X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/conf X-SVN-Commit-Revision: 342096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 57F236AD0B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 20:57:58 -0000 Author: markj Date: Fri Dec 14 20:57:57 2018 New Revision: 342096 URL: https://svnweb.freebsd.org/changeset/base/342096 Log: Enable witness(4) in the RISC-V GENERIC config. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18559 Modified: head/sys/riscv/conf/GENERIC Modified: head/sys/riscv/conf/GENERIC ============================================================================== --- head/sys/riscv/conf/GENERIC Fri Dec 14 19:48:42 2018 (r342095) +++ head/sys/riscv/conf/GENERIC Fri Dec 14 20:57:57 2018 (r342096) @@ -120,7 +120,7 @@ options DDB # Support DDB. options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -# options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS # Enable checks to detect deadlocks and cycles # options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # options EARLY_PRINTF From owner-svn-src-all@freebsd.org Fri Dec 14 21:00:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5C4013166B3; Fri, 14 Dec 2018 21:00:41 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 8AEE16AF12; Fri, 14 Dec 2018 21:00:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C6AA5158; Fri, 14 Dec 2018 21:00:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEL0fTg098828; Fri, 14 Dec 2018 21:00:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEL0fRU098826; Fri, 14 Dec 2018 21:00:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812142100.wBEL0fRU098826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 21:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342097 - head/sys/riscv/conf X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/conf X-SVN-Commit-Revision: 342097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8AEE16AF12 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 21:00:42 -0000 Author: markj Date: Fri Dec 14 21:00:41 2018 New Revision: 342097 URL: https://svnweb.freebsd.org/changeset/base/342097 Log: Add a QEMU config for RISC-V. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18560 Added: head/sys/riscv/conf/QEMU (contents, props changed) Added: head/sys/riscv/conf/QEMU ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/riscv/conf/QEMU Fri Dec 14 21:00:41 2018 (r342097) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +#NO_UNIVERSE + +include "GENERIC" + +ident QEMU + +options ROOTDEVNAME=\"ufs:/dev/vtbd0\" From owner-svn-src-all@freebsd.org Fri Dec 14 21:03:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73AE81316930; Fri, 14 Dec 2018 21:03:02 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 1A8836B36A; Fri, 14 Dec 2018 21:03:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE74752F0; Fri, 14 Dec 2018 21:03:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEL31px003083; Fri, 14 Dec 2018 21:03:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEL31f3003082; Fri, 14 Dec 2018 21:03:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812142103.wBEL31f3003082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 21:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342098 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 342098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A8836B36A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 21:03:02 -0000 Author: markj Date: Fri Dec 14 21:03:01 2018 New Revision: 342098 URL: https://svnweb.freebsd.org/changeset/base/342098 Log: Assume that pmap_l1() will return a PTE. pmaps on RISC-V always have an L1 page table page, so we don't need to check for this when performing lookups. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18563 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Fri Dec 14 21:00:41 2018 (r342097) +++ head/sys/riscv/riscv/pmap.c Fri Dec 14 21:03:01 2018 (r342098) @@ -316,8 +316,6 @@ pmap_l2(pmap_t pmap, vm_offset_t va) pd_entry_t *l1; l1 = pmap_l1(pmap, va); - if (l1 == NULL) - return (NULL); if ((pmap_load(l1) & PTE_V) == 0) return (NULL); if ((pmap_load(l1) & PTE_RX) != 0) From owner-svn-src-all@freebsd.org Fri Dec 14 21:04:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6239213169DF; Fri, 14 Dec 2018 21:04:31 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 015246B4F9; Fri, 14 Dec 2018 21:04:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBBCC52F4; Fri, 14 Dec 2018 21:04:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEL4Udu003183; Fri, 14 Dec 2018 21:04:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEL4UJI003182; Fri, 14 Dec 2018 21:04:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812142104.wBEL4UJI003182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 21:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342099 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 342099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 015246B4F9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 21:04:31 -0000 Author: markj Date: Fri Dec 14 21:04:30 2018 New Revision: 342099 URL: https://svnweb.freebsd.org/changeset/base/342099 Log: Avoid needless TLB invalidations in pmap_remove_pages(). pmap_remove_pages() is called during process termination, when it is guaranteed that no other CPU may access the mappings being torn down. In particular, it unnecessary to invalidate each mapping individually since we do a pmap_invalidate_all() at the end of the function. Also don't call pmap_invalidate_all() while holding a PV list lock, the global pvh lock is sufficient. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18562 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Fri Dec 14 21:03:01 2018 (r342098) +++ head/sys/riscv/riscv/pmap.c Fri Dec 14 21:04:30 2018 (r342099) @@ -2721,9 +2721,10 @@ pmap_remove_pages(pmap_t pmap) l3 = pmap_l2_to_l3(l2, pv->pv_va); tl3 = pmap_load(l3); -/* - * We cannot remove wired pages from a process' mapping at this time - */ + /* + * We cannot remove wired pages from a + * process' mapping at this time. + */ if (tl3 & PTE_SW_WIRED) { allfree = 0; continue; @@ -2742,7 +2743,6 @@ pmap_remove_pages(pmap_t pmap) (uintmax_t)tl3)); pmap_load_clear(l3); - pmap_invalidate_page(pmap, pv->pv_va); /* * Update the vm_page_t clean/reference bits. @@ -2771,9 +2771,9 @@ pmap_remove_pages(pmap_t pmap) free_pv_chunk(pc); } } - pmap_invalidate_all(pmap); if (lock != NULL) rw_wunlock(lock); + pmap_invalidate_all(pmap); rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); vm_page_free_pages_toq(&free, false); From owner-svn-src-all@freebsd.org Fri Dec 14 21:07:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9064A1316B69; Fri, 14 Dec 2018 21:07:13 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 350F16B6E0; Fri, 14 Dec 2018 21:07:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04BC95306; Fri, 14 Dec 2018 21:07:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEL7CsY003347; Fri, 14 Dec 2018 21:07:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEL7CxP003346; Fri, 14 Dec 2018 21:07:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812142107.wBEL7CxP003346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 14 Dec 2018 21:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342100 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 342100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 350F16B6E0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_LONG(-0.88)[-0.881,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 21:07:13 -0000 Author: markj Date: Fri Dec 14 21:07:12 2018 New Revision: 342100 URL: https://svnweb.freebsd.org/changeset/base/342100 Log: Add some more checking to the RISC-V page fault handler. - Panic immediately if witness says we're holding non-sleepable locks. This helps ensure that we don't recurse on the pmap lock in pmap_fault_fixup(). - Panic if the kernel faults on a user address without setting an onfault handler. - Panic if the fault occurred in a critical section or interrupt handler, like we do on other platforms. - Fix some style issues in trap_pfault(). Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18561 Modified: head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Fri Dec 14 21:04:30 2018 (r342099) +++ head/sys/riscv/riscv/trap.c Fri Dec 14 21:07:12 2018 (r342100) @@ -167,7 +167,7 @@ svc_handler(struct trapframe *frame) } static void -data_abort(struct trapframe *frame, int lower) +data_abort(struct trapframe *frame, int usermode) { struct vm_map *map; uint64_t sbadaddr; @@ -176,9 +176,7 @@ data_abort(struct trapframe *frame, int lower) vm_prot_t ftype; vm_offset_t va; struct proc *p; - int ucode; - int error; - int sig; + int error, sig, ucode; #ifdef KDB if (kdb_active) { @@ -188,19 +186,23 @@ data_abort(struct trapframe *frame, int lower) #endif td = curthread; + p = td->td_proc; pcb = td->td_pcb; sbadaddr = frame->tf_sbadaddr; - p = td->td_proc; + if (td->td_critnest != 0 || td->td_intr_nesting_level != 0 || + WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL, + "Kernel page fault") != 0) + goto fatal; - if (lower) + if (usermode) map = &td->td_proc->p_vmspace->vm_map; + else if (sbadaddr >= VM_MAX_USER_ADDRESS) + map = kernel_map; else { - /* The top bit tells us which range to use */ - if ((sbadaddr >> 63) == 1) - map = kernel_map; - else - map = &td->td_proc->p_vmspace->vm_map; + if (pcb->pcb_onfault == 0) + goto fatal; + map = &td->td_proc->p_vmspace->vm_map; } va = trunc_page(sbadaddr); @@ -241,7 +243,7 @@ data_abort(struct trapframe *frame, int lower) } if (error != KERN_SUCCESS) { - if (lower) { + if (usermode) { sig = SIGSEGV; if (error == KERN_PROTECTION_FAILURE) ucode = SEGV_ACCERR; @@ -249,21 +251,23 @@ data_abort(struct trapframe *frame, int lower) ucode = SEGV_MAPERR; call_trapsignal(td, sig, ucode, (void *)sbadaddr); } else { - if (td->td_intr_nesting_level == 0 && - pcb->pcb_onfault != 0) { + if (pcb->pcb_onfault != 0) { frame->tf_a[0] = error; frame->tf_sepc = pcb->pcb_onfault; return; } - dump_regs(frame); - panic("vm_fault failed: %lx, va 0x%016lx", - frame->tf_sepc, sbadaddr); + goto fatal; } } done: - if (lower) + if (usermode) userret(td, frame); + return; + +fatal: + dump_regs(frame); + panic("Fatal page fault at %#lx: %#016lx", frame->tf_sepc, sbadaddr); } void From owner-svn-src-all@freebsd.org Fri Dec 14 21:16:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 213081318062; Fri, 14 Dec 2018 21:16:05 +0000 (UTC) (envelope-from arichardson@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) server-signature RSA-PSS (4096 bits) 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 BBD506BCEC; Fri, 14 Dec 2018 21:16:04 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A860554B6; Fri, 14 Dec 2018 21:16:04 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBELG4Ow008770; Fri, 14 Dec 2018 21:16:04 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBELG4Tn008769; Fri, 14 Dec 2018 21:16:04 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201812142116.wBELG4Tn008769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Fri, 14 Dec 2018 21:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342101 - head/lib/libnv X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libnv X-SVN-Commit-Revision: 342101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BBD506BCEC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 21:16:05 -0000 Author: arichardson Date: Fri Dec 14 21:16:04 2018 New Revision: 342101 URL: https://svnweb.freebsd.org/changeset/base/342101 Log: Allow bootstrapping libnv on macOS and Linux MacOS/Linux do not define struct cmsgcred but we need to bootstrap libnv when building on non-FreeBSD systems. Since they are not used during bootstrap we can just omit these two functions there. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D18472 Modified: head/lib/libnv/msgio.c Modified: head/lib/libnv/msgio.c ============================================================================== --- head/lib/libnv/msgio.c Fri Dec 14 21:07:12 2018 (r342100) +++ head/lib/libnv/msgio.c Fri Dec 14 21:16:04 2018 (r342101) @@ -157,6 +157,14 @@ msg_send(int sock, const struct msghdr *msg) return (0); } +/* + * MacOS/Linux do not define struct cmsgcred but we need to bootstrap libnv + * when building on non-FreeBSD systems. Since they are not used during + * bootstrap we can just omit these two functions there. + */ +#ifndef __FreeBSD__ +#warning "cred_send() not supported on non-FreeBSD systems" +#else int cred_send(int sock) { @@ -232,6 +240,7 @@ cred_recv(int sock, struct cmsgcred *cred) return (0); } +#endif static int fd_package_send(int sock, const int *fds, size_t nfds) From owner-svn-src-all@freebsd.org Fri Dec 14 21:17:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD4C71318135; Fri, 14 Dec 2018 21:17:43 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 5BB2C6BE89; Fri, 14 Dec 2018 21:17:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4866B54C4; Fri, 14 Dec 2018 21:17:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBELHhZM008883; Fri, 14 Dec 2018 21:17:43 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBELHgDA008881; Fri, 14 Dec 2018 21:17:42 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201812142117.wBELHgDA008881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 14 Dec 2018 21:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342102 - head/sys/dev/iicbus/twsi X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/iicbus/twsi X-SVN-Commit-Revision: 342102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5BB2C6BE89 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 21:17:43 -0000 Author: gonzo Date: Fri Dec 14 21:17:42 2018 New Revision: 342102 URL: https://svnweb.freebsd.org/changeset/base/342102 Log: [twsi] Make extres/clk part conditional based on the EXT_RESOURCES option value This should fix kernel build for ARMADA38X and possibly some other ARM configs Approved by: manu Modified: head/sys/dev/iicbus/twsi/mv_twsi.c head/sys/dev/iicbus/twsi/twsi.h Modified: head/sys/dev/iicbus/twsi/mv_twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/mv_twsi.c Fri Dec 14 21:16:04 2018 (r342101) +++ head/sys/dev/iicbus/twsi/mv_twsi.c Fri Dec 14 21:17:42 2018 (r342102) @@ -61,7 +61,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef EXT_RESOURCES #include +#endif #include #include Modified: head/sys/dev/iicbus/twsi/twsi.h ============================================================================== --- head/sys/dev/iicbus/twsi/twsi.h Fri Dec 14 21:16:04 2018 (r342101) +++ head/sys/dev/iicbus/twsi/twsi.h Fri Dec 14 21:17:42 2018 (r342102) @@ -34,7 +34,9 @@ #ifndef _TWSI_H_ #define _TWSI_H_ +#ifdef EXT_RESOURCES #include +#endif struct twsi_baud_rate { uint32_t raw; @@ -48,8 +50,10 @@ struct twsi_softc { struct resource *res[1]; /* SYS_RES_MEMORY */ struct mtx mutex; device_t iicbus; +#ifdef EXT_RESOURCES clk_t clk_core; clk_t clk_reg; +#endif bus_size_t reg_data; bus_size_t reg_slave_addr; From owner-svn-src-all@freebsd.org Fri Dec 14 21:30:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 455D5131885E; Fri, 14 Dec 2018 21:30:35 +0000 (UTC) (envelope-from imp@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) server-signature RSA-PSS (4096 bits) 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 DB82D6C706; Fri, 14 Dec 2018 21:30:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCB3C56A3; Fri, 14 Dec 2018 21:30:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBELUYFT014263; Fri, 14 Dec 2018 21:30:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBELUYlu014262; Fri, 14 Dec 2018 21:30:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812142130.wBELUYlu014262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 14 Dec 2018 21:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342103 - stable/11/etc X-SVN-Group: stable-11 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/11/etc X-SVN-Commit-Revision: 342103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DB82D6C706 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-0.89)[-0.889,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 21:30:35 -0000 Author: imp Date: Fri Dec 14 21:30:34 2018 New Revision: 342103 URL: https://svnweb.freebsd.org/changeset/base/342103 Log: MFC: r334909 | imp Set the $PATH in /etc/crontab like it is set by the cron(8) daemon, for consistency. Submitted by: Ben RUBSON Pull Request: https://github.com/freebsd/freebsd/pull/155 Modified: stable/11/etc/crontab Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/crontab ============================================================================== --- stable/11/etc/crontab Fri Dec 14 21:17:42 2018 (r342102) +++ stable/11/etc/crontab Fri Dec 14 21:30:34 2018 (r342103) @@ -3,7 +3,7 @@ # $FreeBSD$ # SHELL=/bin/sh -PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin # #minute hour mday month wday who command # From owner-svn-src-all@freebsd.org Fri Dec 14 22:16:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4471913223E1; Fri, 14 Dec 2018 22:16:43 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AFEA6DEAD; Fri, 14 Dec 2018 22:16:42 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-lf1-x142.google.com with SMTP id n18so5384980lfh.6; Fri, 14 Dec 2018 14:16:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=nWtdqrUune7X1Dwaw9oDY3eFvYCc+b0+VQigrMVun/E=; b=u9/+AXkTztW8eBxPtZsFq9pJUgs23ybXOp0ICnk5rhnnEnjcqTAVf2Q6ziLa+0NQhz 5dNuLDy0zL42PSt4YWBQcejSte3uhTK0XuXtUexbjs1Yzr8XHX+ZF4VB5ME8HTigxLPq fcQJC4dripadlk//WovgcXCQ+p0UrcJ8jDgfq8q/iQBBLpETNz3VmQmkFOzMg6qrofCl Bx9hJoSAwseahWNg2S5uojbpl1nh0eXi8vGkoWAsW+ell9Lb+Igsg4XtrjNsATxKq1Qo xAR+JDtK1Bm6B1hEpAccBJKCqLZ4g/JZUv7QrGQDSZKbv/k6jn8uhPcWRMg733fzl0cV Y/NA== 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:reply-to :from:date:message-id:subject:to:cc; bh=nWtdqrUune7X1Dwaw9oDY3eFvYCc+b0+VQigrMVun/E=; b=hQ7Pf2TOy2GBdE7EW942WxOqAk5FWnuO4ZEuvd1X6f2HCHol8Jo8SJYLM6PCK2wfC4 1RGlQVLt4rcMI00mcnoxoe+Q17+OhA8NsXL4y5U1wfhkxcdlNyP+/xAp4NOSEBgNMM3W +ub1EcbF5lEWYz1jRsoypEaqYdUiG+bQeYqWWU84FdGBb/o81bICmDyFHG0HQxJ+TWz8 Imq+RLHvieT5tnXmQk6AFy4z5QvK/mZUFTF+0wazg1xhwm4tjD+QdHKP15Ncek61/ep8 F6AoUq13COSSLzD7JgJgzul5/m/t8MGAZkel36u08BFiyR5bXHiT8JprTii8zAHCg+xR 3M0A== X-Gm-Message-State: AA+aEWZKEvvjp3DbIdhP4UKxpyF6TPjcPzM3CkBJaY7FgGrDQEsCzdPl vQtrpVVWndRaTnZXI9h1KwM+uJLKib7WHhKiFVFzFQ== X-Google-Smtp-Source: AFSGD/UW3zlgjPxcV5eFmMfvjE7i47/a1scghjXdPBT0tsVr2lgZE35+6H3kM/Yv2Y1lpxfs3YAX44MsMUqf4HMWDSk= X-Received: by 2002:a19:1d0d:: with SMTP id d13mr2680249lfd.74.1544825800766; Fri, 14 Dec 2018 14:16:40 -0800 (PST) MIME-Version: 1.0 References: <201812141449.wBEEn5eQ001337@repo.freebsd.org> In-Reply-To: <201812141449.wBEEn5eQ001337@repo.freebsd.org> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Sat, 15 Dec 2018 06:16:28 +0800 Message-ID: Subject: Re: svn commit: r342083 - stable/12/usr.sbin/bhyve To: Alexander Motin Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org X-Rspamd-Queue-Id: 8AFEA6DEAD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.996,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.988,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 22:16:43 -0000 Your mfc was quite fast less than 1 week, usually we take a bit more of time before we do the mfc! On Fri, Dec 14, 2018, 10:49 PM Alexander Motin Author: mav > Date: Fri Dec 14 14:49:04 2018 > New Revision: 342083 > URL: https://svnweb.freebsd.org/changeset/base/342083 > > Log: > MFC r341829: Allow CTL device specification in bhyve virtio-scsi. > > There was a large refactoring done in CTL to allow multiple ioctl > frontend > ports (and respective devices) to be created, particularly for bhyve. > Unfortunately, respective part of bhyve functionality got lost somehow > from > the original virtio-scsi commit. This change allows wanted device path > to > be specified in either of two ways: > -s 6,virtio-scsi,/dev/cam/ctl1.1 > -s 6,virtio-scsi,dev=/dev/cam/ctl2.3 > If neither is specified, the default /dev/cam/ctl device is used. > > While there, remove per-queue CTL device opening, which makes no sense at > this point. > > Modified: > stable/12/usr.sbin/bhyve/bhyve.8 > stable/12/usr.sbin/bhyve/pci_virtio_scsi.c > Directory Properties: > stable/12/ (props changed) > > Modified: stable/12/usr.sbin/bhyve/bhyve.8 > > ============================================================================== > --- stable/12/usr.sbin/bhyve/bhyve.8 Fri Dec 14 14:46:35 2018 > (r342082) > +++ stable/12/usr.sbin/bhyve/bhyve.8 Fri Dec 14 14:49:04 2018 > (r342083) > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 24, 2018 > +.Dd December 11, 2018 > .Dt BHYVE 8 > .Os > .Sh NAME > @@ -298,7 +298,16 @@ if not explicitly specified. > .Pp > SCSI devices: > .Bl -tag -width 10n > -.It Pa /dev/cam/ Ns Oo , Ns Ar port and initiator_id Oc > +.It Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ns Oo , Ns Ar > scsi-device-options Oc > +.El > +.Pp > +The > +.Ar scsi-device-options > +are: > +.Bl -tag -width 10n > +.It Li iid= Ns Ar IID > +Initiator ID to use when sending requests to specified CTL port. > +The default value is 0. > .El > .Pp > TTY devices: > > Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c > > ============================================================================== > --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:46:35 2018 > (r342082) > +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 14 14:49:04 2018 > (r342083) > @@ -105,7 +105,6 @@ struct pci_vtscsi_config { > struct pci_vtscsi_queue { > struct pci_vtscsi_softc * vsq_sc; > struct vqueue_info * vsq_vq; > - int vsq_ctl_fd; > pthread_mutex_t vsq_mtx; > pthread_mutex_t vsq_qmtx; > pthread_cond_t vsq_cv; > @@ -529,7 +528,7 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, > sbuf_delete(sb); > } > > - err = ioctl(q->vsq_ctl_fd, CTL_IO, io); > + err = ioctl(sc->vss_ctl_fd, CTL_IO, io); > if (err != 0) { > WPRINTF(("CTL_IO: err=%d (%s)\n", errno, strerror(errno))); > cmd_wr->response = VIRTIO_SCSI_S_FAILURE; > @@ -639,14 +638,8 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, > int i; > > queue->vsq_sc = sc; > - queue->vsq_ctl_fd = open("/dev/cam/ctl", O_RDWR); > queue->vsq_vq = &sc->vss_vq[num + 2]; > > - if (queue->vsq_ctl_fd < 0) { > - WPRINTF(("cannot open /dev/cam/ctl: %s\n", > strerror(errno))); > - return (-1); > - } > - > pthread_mutex_init(&queue->vsq_mtx, NULL); > pthread_mutex_init(&queue->vsq_qmtx, NULL); > pthread_cond_init(&queue->vsq_cv, NULL); > @@ -672,24 +665,34 @@ static int > pci_vtscsi_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) > { > struct pci_vtscsi_softc *sc; > - char *optname = NULL; > - char *opt; > - int i; > + char *opt, *optname; > + const char *devname; > + int i, optidx = 0; > > sc = calloc(1, sizeof(struct pci_vtscsi_softc)); > - sc->vss_ctl_fd = open("/dev/cam/ctl", O_RDWR); > + devname = "/dev/cam/ctl"; > + while ((opt = strsep(&opts, ",")) != NULL) { > + optname = strsep(&opt, "="); > + if (opt == NULL && optidx == 0) { > + if (optname[0] != 0) > + devname = optname; > + } else if (strcmp(optname, "dev") == 0 && opt != NULL) { > + devname = opt; > + } else if (strcmp(optname, "iid") == 0 && opt != NULL) { > + sc->vss_iid = strtoul(opt, NULL, 10); > + } else { > + fprintf(stderr, "Invalid option %s\n", optname); > + free(sc); > + return (1); > + } > + optidx++; > + } > > + sc->vss_ctl_fd = open(devname, O_RDWR); > if (sc->vss_ctl_fd < 0) { > - WPRINTF(("cannot open /dev/cam/ctl: %s\n", > strerror(errno))); > + WPRINTF(("cannot open %s: %s\n", devname, > strerror(errno))); > + free(sc); > return (1); > - } > - > - while ((opt = strsep(&opts, ",")) != NULL) { > - if ((optname = strsep(&opt, "=")) != NULL) { > - if (strcmp(optname, "iid") == 0) { > - sc->vss_iid = strtoul(opt, NULL, 10); > - } > - } > } > > vi_softc_linkup(&sc->vss_vs, &vtscsi_vi_consts, sc, pi, > sc->vss_vq); > > From owner-svn-src-all@freebsd.org Fri Dec 14 22:22:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 013B213226A1; Fri, 14 Dec 2018 22:22:45 +0000 (UTC) (envelope-from mw@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) server-signature RSA-PSS (4096 bits) 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 938BF6E33B; Fri, 14 Dec 2018 22:22:44 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8380560C0; Fri, 14 Dec 2018 22:22:44 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEMMir1044901; Fri, 14 Dec 2018 22:22:44 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEMMiFa044900; Fri, 14 Dec 2018 22:22:44 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201812142222.wBEMMiFa044900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Fri, 14 Dec 2018 22:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342104 - head/sys/dev/tpm X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/tpm X-SVN-Commit-Revision: 342104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 938BF6E33B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 22:22:45 -0000 Author: mw Date: Fri Dec 14 22:22:43 2018 New Revision: 342104 URL: https://svnweb.freebsd.org/changeset/base/342104 Log: Fix error check for ACPI_ID_PROBE in the TPM2.0 driver Updated API does not return pointer, so adjust the TPM2.0 driver accordingly. Reported by: jhb Obtained from: Semihalf Sponsored by: Stormshield Modified: head/sys/dev/tpm/tpm_crb.c head/sys/dev/tpm/tpm_tis.c Modified: head/sys/dev/tpm/tpm_crb.c ============================================================================== --- head/sys/dev/tpm/tpm_crb.c Fri Dec 14 21:30:34 2018 (r342103) +++ head/sys/dev/tpm/tpm_crb.c Fri Dec 14 22:22:43 2018 (r342104) @@ -104,11 +104,12 @@ static int tpmcrb_acpi_probe(device_t dev) { struct resource *res; - int rid = 0; + int err, rid = 0; uint32_t caps; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids, NULL) == NULL) - return (ENXIO); + err = ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids, NULL); + if (err > 0) + return (err); /* Check if device is in CRB mode */ res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); Modified: head/sys/dev/tpm/tpm_tis.c ============================================================================== --- head/sys/dev/tpm/tpm_tis.c Fri Dec 14 21:30:34 2018 (r342103) +++ head/sys/dev/tpm/tpm_tis.c Fri Dec 14 22:22:43 2018 (r342104) @@ -101,11 +101,12 @@ static int tpmtis_acpi_probe(device_t dev) { struct resource *res; - int rid = 0; + int err, rid = 0; uint32_t caps; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids, NULL) == NULL) - return (ENXIO); + err = ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids, NULL); + if (err > 0) + return (err); /* Check if device is in TPM 2.0 TIS mode */ res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); From owner-svn-src-all@freebsd.org Fri Dec 14 22:23:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66749132270F for ; Fri, 14 Dec 2018 22:23:48 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-it1-x132.google.com (mail-it1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7DF46E4AE for ; Fri, 14 Dec 2018 22:23:47 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-it1-x132.google.com with SMTP id p197so11866500itp.0 for ; Fri, 14 Dec 2018 14:23:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=t8MRFKpim491jiw3+sC1ceE9qZes8VXy0uemyz77Jdg=; b=cyNE6Kj5vEBGmSM6g2jJYxGg3rf1iWxfJ3m6qmOmV4Q759BxaZcLqmEEHU2aDuJLAq /phWi6q5+4QpDvpFwDfdPQmc0+apyzqWoRaDjJggg/tnaeOr2m5bPE+QNXEB9dnNL3s2 t541XzktPqri+iDMcR5wC50Jhp6kLu9Sq5NLgR3ztvUWf8ILLq6YUxGIhLyEqKldv9l/ EhF7mlJW8x3nCRIzcqgVgEvaC/BWi5dVp+4wzLPZ9KD98JKzdrX/Zbntob7fiWhPVFg6 Jw3XpgwpaGG3ARnxw3FLpfAAUwDGyutNNt/eGjjEZeA2vEiNZJ3pFicEOqJA6RvMWpXD HD8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=t8MRFKpim491jiw3+sC1ceE9qZes8VXy0uemyz77Jdg=; b=qkd8oZQ+MrHWOKOGxEEn9dTC2l4KboYEWdQqqAoHTaMObl5MH5tSr+/h7kbm0iHLtm D17B4B4rkkGx2I2bRLiwrGBtsPgRKWkbpgJWJlXT8eluJfKMd74O448dz0o6GJCHJnus NAc6PwTEe6qUObHoXT5G7VWtBHSeRNx43gC+yLWynYHPv5e1EBQlImgrUC9qeX7h1/wo 9VxouRcjiSGJEMexXTnGlOz6Zqh1cW0lOLxSGGcE+b9uobdEApcl8HZxlG47QL98j9mS h20G738TPwnvBFmsnKU6WJ8YE0MFYNMvcEI2wYUKE1RanFL1Hc/TwEUnlqaGKoy/yBfM ZN9Q== X-Gm-Message-State: AA+aEWZedUrSx3Ff+rIO2UdnMPsTehinXXJiuazo7vReT4FHlfe7XzkI lqPunrashcnFY6fgj2Xbb9dVgmHOw2CZblaCAg9Y2w== X-Google-Smtp-Source: AFSGD/UR+30MvpEHxqG6RFQAzUwLQFhO9eRTKH/Lqsub34p6SSDR0Ub8Zn5CX/LdnU4X+n2FtBAEjvjKORjpvZdmvy0= X-Received: by 2002:a02:5ec9:: with SMTP id h192mr4383800jab.112.1544826227237; Fri, 14 Dec 2018 14:23:47 -0800 (PST) MIME-Version: 1.0 References: <201812141743.wBEHhZar096560@repo.freebsd.org> In-Reply-To: From: Marcin Wojtas Date: Fri, 14 Dec 2018 23:23:35 +0100 Message-ID: Subject: Re: svn commit: r342085 - head/sys/dev/tpm To: jhb@freebsd.org Cc: Marcin Wojtas , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: E7DF46E4AE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-0.996,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 22:23:48 -0000 Hi John, pt., 14 gru 2018 o 18:57 John Baldwin napisa=C5=82(a): > > On 12/14/18 9:43 AM, Marcin Wojtas wrote: > > Author: mw > > Date: Fri Dec 14 17:43:35 2018 > > New Revision: 342085 > > URL: https://svnweb.freebsd.org/changeset/base/342085 > > > > Log: > > Fix TPM driver compilation from r342084 > > > > Include recent ACPI_ID_PROBE API change. > > > > Modified: > > head/sys/dev/tpm/tpm_crb.c > > head/sys/dev/tpm/tpm_tis.c > > > > Modified: head/sys/dev/tpm/tpm_crb.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/dev/tpm/tpm_crb.c Fri Dec 14 16:14:36 2018 (= r342084) > > +++ head/sys/dev/tpm/tpm_crb.c Fri Dec 14 17:43:35 2018 (= r342085) > > @@ -107,7 +107,7 @@ tpmcrb_acpi_probe(device_t dev) > > int rid =3D 0; > > uint32_t caps; > > > > - if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids) =3D=3D= NULL) > > + if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpmcrb_ids, NULL) = =3D=3D NULL) > > return (ENXIO); > > I think it doesn't return a pointer anymore either. I think you want to = use > its return value as the return value from probe to honor the relative pri= ority > of CID vs HID matches, so something like: > > int error; > > error =3D ACPI_ID_PROBE(...); > if (error > 0) > return (error); > > ... > > return (error); > > Instead of 'return (BUS_GENERIC_PROBE)' or some such. > Thank you for pointing this, I addressed your remark in r342104. Best regards, Marcin From owner-svn-src-all@freebsd.org Fri Dec 14 22:45:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 189E21322E3E; Fri, 14 Dec 2018 22:45:17 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91B706EF04; Fri, 14 Dec 2018 22:45:16 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yb1-xb31.google.com with SMTP id d2so2905858ybs.11; Fri, 14 Dec 2018 14:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=00HfDL3Y4sZ6CSuIjMBGKt5vWHOE/kKHgPSDIu+Cpmo=; b=rD6Znen2GyqWJ7Ec2l88TfZhMB4FtpvCruaZ9RfCZ75rrjkdOJa2tfrq3ZD/b29v8M UPTzGz6Zv2YYVqWn1HI2tOKcSWOZrZtw86FKo2HZteVwtBbom1Yl+RnsxHNxUjlt5XWY n5lp8Yjd1JgCXW9R/tVszkWIBpKslt6Wn+1+FZklIzXmGeVSgo1TY5lJahLMUfWVPzCr iFq721+ldzACNlyxoDjYWGAr10H/tKQXZ5l67GpiMoLQsg+Y29Yv1nkZZdkeOLwtMIAj ZrnjjMUyxzdHvAQoHShqYVDkWNQY4GuJEft1MiKyrGZfaSN4Ie/ib3Y0AyLxSJnqE1m8 Y7Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=00HfDL3Y4sZ6CSuIjMBGKt5vWHOE/kKHgPSDIu+Cpmo=; b=A0wD79Wxb4d/ZYTSIPlwv+viVpvJ7AYmv4f4J8z+U1xXwsWYhrAtv5MCqwG5rgMPXy CxbYc1zgj35nNK//bT+bglvcMv4DiE7/8+y7DSKADAh/tL4Fx4OZmCXg994W8Huu3WMH X+fnpgzIsxciUoxrIcw97YxMMusOlExuSVHRlY9KsI38r8XabxR/hSK4SPgSOPINttAE vno3UrvlIiQ4yPiPUw7/g/ODK34LvZkfu16Fh6NF+mudTJgmP9gVznpq43LhKKFakTRP 6PUPbfukKYKK2iK/j19jUuVd+I/pTKCuoPFntnbfoKL9ecRtUUcjklAz8csNQBb9x3RO ZJxw== X-Gm-Message-State: AA+aEWYAca4PjANHtrysQiWZJ/LRcCeFiU289yq0WnIU6EhKqdILh+BN 7LeUku7DMdeO1UTGiuSF4LiNz0dJ X-Google-Smtp-Source: AFSGD/V4ph7OMPcH7P3T1WB0stEX9Cw/9dc7WT1wYnz5k2pfm/gJrWz3BPhUcKMYx5Wc4ltuyqvnVg== X-Received: by 2002:a5b:845:: with SMTP id v5mr5020993ybq.96.1544827515562; Fri, 14 Dec 2018 14:45:15 -0800 (PST) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id b129sm1883921ywc.106.2018.12.14.14.45.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 14:45:14 -0800 (PST) Sender: Alexander Motin Subject: Re: svn commit: r342083 - stable/12/usr.sbin/bhyve To: araujo@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org References: <201812141449.wBEEn5eQ001337@repo.freebsd.org> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <34b5b58b-3abc-9142-2dc8-2a9780a51304@FreeBSD.org> Date: Fri, 14 Dec 2018 17:45:14 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91B706EF04 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 22:45:17 -0000 Generally you are right. But I considered previous state of this code in stable/12 as worse then what can happen from this change. And I'll be around to help if anything is found. On 14.12.2018 17:16, Marcelo Araujo wrote: > Your mfc was quite fast less than 1 week, usually we take a bit more of > time before we do the mfc!  > > On Fri, Dec 14, 2018, 10:49 PM Alexander Motin wrote: > > Author: mav > Date: Fri Dec 14 14:49:04 2018 > New Revision: 342083 > URL: https://svnweb.freebsd.org/changeset/base/342083 > > Log: >   MFC r341829: Allow CTL device specification in bhyve virtio-scsi. > >   There was a large refactoring done in CTL to allow multiple ioctl > frontend >   ports (and respective devices) to be created, particularly for bhyve. >   Unfortunately, respective part of bhyve functionality got lost > somehow from >   the original virtio-scsi commit.  This change allows wanted device > path to >   be specified in either of two ways: >    -s 6,virtio-scsi,/dev/cam/ctl1.1 >    -s 6,virtio-scsi,dev=/dev/cam/ctl2.3 >   If neither is specified, the default /dev/cam/ctl device is used. > >   While there, remove per-queue CTL device opening, which makes no > sense at >   this point. > > Modified: >   stable/12/usr.sbin/bhyve/bhyve.8 >   stable/12/usr.sbin/bhyve/pci_virtio_scsi.c > Directory Properties: >   stable/12/   (props changed) > > Modified: stable/12/usr.sbin/bhyve/bhyve.8 > ============================================================================== > --- stable/12/usr.sbin/bhyve/bhyve.8    Fri Dec 14 14:46:35 2018    >     (r342082) > +++ stable/12/usr.sbin/bhyve/bhyve.8    Fri Dec 14 14:49:04 2018    >     (r342083) > @@ -24,7 +24,7 @@ >  .\" >  .\" $FreeBSD$ >  .\" > -.Dd October 24, 2018 > +.Dd December 11, 2018 >  .Dt BHYVE 8 >  .Os >  .Sh NAME > @@ -298,7 +298,16 @@ if not explicitly specified. >  .Pp >  SCSI devices: >  .Bl -tag -width 10n > -.It Pa /dev/cam/ Ns Oo , Ns Ar port and initiator_id Oc > +.It Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ns Oo , Ns Ar > scsi-device-options Oc > +.El > +.Pp > +The > +.Ar scsi-device-options > +are: > +.Bl -tag -width 10n > +.It Li iid= Ns Ar IID > +Initiator ID to use when sending requests to specified CTL port. > +The default value is 0. >  .El >  .Pp >  TTY devices: > > Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c > ============================================================================== > --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c  Fri Dec 14 14:46:35 > 2018        (r342082) > +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c  Fri Dec 14 14:49:04 > 2018        (r342083) > @@ -105,7 +105,6 @@ struct pci_vtscsi_config { >  struct pci_vtscsi_queue { >         struct pci_vtscsi_softc *         vsq_sc; >         struct vqueue_info *              vsq_vq; > -       int                               vsq_ctl_fd; >         pthread_mutex_t                   vsq_mtx; >         pthread_mutex_t                   vsq_qmtx; >         pthread_cond_t                    vsq_cv; > @@ -529,7 +528,7 @@ pci_vtscsi_request_handle(struct > pci_vtscsi_queue *q, >                 sbuf_delete(sb); >         } > > -       err = ioctl(q->vsq_ctl_fd, CTL_IO, io); > +       err = ioctl(sc->vss_ctl_fd, CTL_IO, io); >         if (err != 0) { >                 WPRINTF(("CTL_IO: err=%d (%s)\n", errno, > strerror(errno))); >                 cmd_wr->response = VIRTIO_SCSI_S_FAILURE; > @@ -639,14 +638,8 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, >         int i; > >         queue->vsq_sc = sc; > -       queue->vsq_ctl_fd = open("/dev/cam/ctl", O_RDWR); >         queue->vsq_vq = &sc->vss_vq[num + 2]; > > -       if (queue->vsq_ctl_fd < 0) { > -               WPRINTF(("cannot open /dev/cam/ctl: %s\n", > strerror(errno))); > -               return (-1); > -       } > - >         pthread_mutex_init(&queue->vsq_mtx, NULL); >         pthread_mutex_init(&queue->vsq_qmtx, NULL); >         pthread_cond_init(&queue->vsq_cv, NULL); > @@ -672,24 +665,34 @@ static int >  pci_vtscsi_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) >  { >         struct pci_vtscsi_softc *sc; > -       char *optname = NULL; > -       char *opt; > -       int i; > +       char *opt, *optname; > +       const char *devname; > +       int i, optidx = 0; > >         sc = calloc(1, sizeof(struct pci_vtscsi_softc)); > -       sc->vss_ctl_fd = open("/dev/cam/ctl", O_RDWR); > +       devname = "/dev/cam/ctl"; > +       while ((opt = strsep(&opts, ",")) != NULL) { > +               optname = strsep(&opt, "="); > +               if (opt == NULL && optidx == 0) { > +                       if (optname[0] != 0) > +                               devname = optname; > +               } else if (strcmp(optname, "dev") == 0 && opt != NULL) { > +                       devname = opt; > +               } else if (strcmp(optname, "iid") == 0 && opt != NULL) { > +                       sc->vss_iid = strtoul(opt, NULL, 10); > +               } else { > +                       fprintf(stderr, "Invalid option %s\n", optname); > +                       free(sc); > +                       return (1); > +               } > +               optidx++; > +       } > > +       sc->vss_ctl_fd = open(devname, O_RDWR); >         if (sc->vss_ctl_fd < 0) { > -               WPRINTF(("cannot open /dev/cam/ctl: %s\n", > strerror(errno))); > +               WPRINTF(("cannot open %s: %s\n", devname, > strerror(errno))); > +               free(sc); >                 return (1); > -       } > - > -       while ((opt = strsep(&opts, ",")) != NULL) { > -               if ((optname = strsep(&opt, "=")) != NULL) { > -                       if (strcmp(optname, "iid") == 0) { > -                               sc->vss_iid = strtoul(opt, NULL, 10); > -                       } > -               } >         } > >         vi_softc_linkup(&sc->vss_vs, &vtscsi_vi_consts, sc, pi, > sc->vss_vq); > -- Alexander Motin From owner-svn-src-all@freebsd.org Fri Dec 14 23:53:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B5D1324DD7; Fri, 14 Dec 2018 23:53:29 +0000 (UTC) (envelope-from arichardson@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) server-signature RSA-PSS (4096 bits) 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 290F1713BC; Fri, 14 Dec 2018 23:53:29 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19CA6700F; Fri, 14 Dec 2018 23:53:29 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBENrShw091968; Fri, 14 Dec 2018 23:53:28 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBENrSTr091966; Fri, 14 Dec 2018 23:53:28 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201812142353.wBENrSTr091966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Fri, 14 Dec 2018 23:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342105 - head/sys/tools/fdt X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/sys/tools/fdt X-SVN-Commit-Revision: 342105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 290F1713BC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 23:53:29 -0000 Author: arichardson Date: Fri Dec 14 23:53:28 2018 New Revision: 342105 URL: https://svnweb.freebsd.org/changeset/base/342105 Log: make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH This fixes building in CheriBSD with a strict tmp path since we don't bootstrap a cpp but pass the full path to clang-cpp instead. While touching this file also fix all shellcheck warnings in make_dtb.sh. Reviewed By: manu Differential Revision: https://reviews.freebsd.org/D18376 Modified: head/sys/tools/fdt/make_dtb.sh head/sys/tools/fdt/make_dtbo.sh Modified: head/sys/tools/fdt/make_dtb.sh ============================================================================== --- head/sys/tools/fdt/make_dtb.sh Fri Dec 14 22:22:43 2018 (r342104) +++ head/sys/tools/fdt/make_dtb.sh Fri Dec 14 23:53:28 2018 (r342105) @@ -16,12 +16,13 @@ if [ -z "${MACHINE}" ]; then MACHINE=$(uname -m) fi -: ${DTC:=dtc} -: ${ECHO:=echo} +: "${DTC:=dtc}" +: "${ECHO:=echo}" +: "${CPP:=cpp}" for d in ${dts}; do - dtb=${dtb_path}/`basename $d .dts`.dtb + dtb="${dtb_path}/$(basename "$d" .dts).dtb" ${ECHO} "converting $d -> $dtb" - cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -I $S/gnu/dts/ -include $d /dev/null | - ${DTC} -@ -O dtb -o $dtb -b 0 -p 1024 -i $S/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} -i $S/gnu/dts/ + ${CPP} -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -I "$S/gnu/dts/" -include "$d" /dev/null | + ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" -i "$S/gnu/dts/" done Modified: head/sys/tools/fdt/make_dtbo.sh ============================================================================== --- head/sys/tools/fdt/make_dtbo.sh Fri Dec 14 22:22:43 2018 (r342104) +++ head/sys/tools/fdt/make_dtbo.sh Fri Dec 14 23:53:28 2018 (r342105) @@ -16,12 +16,13 @@ if [ -z "${MACHINE}" ]; then MACHINE=$(uname -m) fi -: ${DTC:=dtc} -: ${ECHO:=echo} +: "${DTC:=dtc}" +: "${ECHO:=echo}" +: "${CPP:=cpp}" for d in ${dtso}; do - dtb=${dtbo_path}/`basename $d .dtso`.dtbo + dtb="${dtbo_path}/$(basename "$d" .dtso).dtbo" ${ECHO} "converting $d -> $dtb" - cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null | - ${DTC} -@ -O dtb -o $dtb -i $S/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} + ${CPP} -P -x assembler-with-cpp -I "$S/gnu/dts/include" -I "$S/dts/${MACHINE}" -I "$S/gnu/dts/${MACHINE}" -include "$d" /dev/null | + ${DTC} -@ -O dtb -o "$dtb" -i "$S/dts/${MACHINE}" -i "$S/gnu/dts/${MACHINE}" done From owner-svn-src-all@freebsd.org Sat Dec 15 02:35:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11E85132CDB2; Sat, 15 Dec 2018 02:35:49 +0000 (UTC) (envelope-from gonzo@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) server-signature RSA-PSS (4096 bits) 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 A840677D21; Sat, 15 Dec 2018 02:35:48 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 946A78EA0; Sat, 15 Dec 2018 02:35:48 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF2ZmIh075315; Sat, 15 Dec 2018 02:35:48 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF2ZmcO075314; Sat, 15 Dec 2018 02:35:48 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201812150235.wBF2ZmcO075314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 15 Dec 2018 02:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342106 - head/sys/arm/mv X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm/mv X-SVN-Commit-Revision: 342106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A840677D21 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 02:35:49 -0000 Author: gonzo Date: Sat Dec 15 02:35:48 2018 New Revision: 342106 URL: https://svnweb.freebsd.org/changeset/base/342106 Log: [mv_pci] Do not attempt to attach disabled PCI ports Fail probe for PCI port if the respective FDT node is not enabled Differential Revision: https://reviews.freebsd.org/D18385 Modified: head/sys/arm/mv/mv_pci.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Fri Dec 14 23:53:28 2018 (r342105) +++ head/sys/arm/mv/mv_pci.c Sat Dec 15 02:35:48 2018 (r342106) @@ -429,6 +429,9 @@ mv_pcib_probe(device_t self) OF_parent(node), "marvell,armada-370-pcie"))) return (ENXIO); + if (!ofw_bus_status_okay(self)) + return (ENXIO); + device_set_desc(self, "Marvell Integrated PCI/PCI-E Controller"); return (BUS_PROBE_DEFAULT); } From owner-svn-src-all@freebsd.org Sat Dec 15 06:34:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A49D1337959; Sat, 15 Dec 2018 06:34:14 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 1C01E8819B; Sat, 15 Dec 2018 06:34:14 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BC40B9A2; Sat, 15 Dec 2018 06:34:14 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF6YD18001656; Sat, 15 Dec 2018 06:34:13 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF6YDdr001655; Sat, 15 Dec 2018 06:34:13 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812150634.wBF6YDdr001655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 15 Dec 2018 06:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342111 - stable/11/libexec/rtld-elf/aarch64 X-SVN-Group: stable-11 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/11/libexec/rtld-elf/aarch64 X-SVN-Commit-Revision: 342111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1C01E8819B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_SHORT(-0.92)[-0.920,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.89)[-0.889,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 06:34:14 -0000 Author: mmel Date: Sat Dec 15 06:34:13 2018 New Revision: 342111 URL: https://svnweb.freebsd.org/changeset/base/342111 Log: MFC r341738: Implement R_AARCH64_TLS_DTPMOD64 and A_AARCH64_TLS_DTPREL64 relocations. Although these are slightly obsolete in favor of R_AARCH64_TLSDESC, gcc -mtls-dialect=trad still use them. Modified: stable/11/libexec/rtld-elf/aarch64/reloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- stable/11/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 06:22:48 2018 (r342110) +++ stable/11/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 06:34:13 2018 (r342111) @@ -217,6 +217,8 @@ reloc_plt(Obj_Entry *obj) case R_AARCH64_TLSDESC: reloc_tlsdesc(obj, rela, where); break; + case R_AARCH64_NONE: + break; default: _rtld_error("Unknown relocation type %u in PLT", (unsigned int)ELF_R_TYPE(rela->r_info)); @@ -342,6 +344,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int switch (ELF_R_TYPE(rela->r_info)) { case R_AARCH64_ABS64: case R_AARCH64_GLOB_DAT: + case R_AARCH64_TLS_TPREL64: + case R_AARCH64_TLS_DTPREL64: + case R_AARCH64_TLS_DTPMOD64: def = find_symdef(symnum, obj, &defobj, flags, cache, lockstate); if (def == NULL) @@ -392,8 +397,23 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int *where = def->st_value + rela->r_addend + defobj->tlsoffset; break; + + /* + * !!! BEWARE !!! + * ARM ELF ABI defines TLS_DTPMOD64 as 1029, and TLS_DTPREL64 + * as 1028. But actual bfd linker and the glibc RTLD linker + * treats TLS_DTPMOD64 as 1028 and TLS_DTPREL64 1029. + */ + case R_AARCH64_TLS_DTPREL64: /* efectively is TLS_DTPMOD64 */ + *where += (Elf_Addr)defobj->tlsindex; + break; + case R_AARCH64_TLS_DTPMOD64: /* efectively is TLS_DTPREL64 */ + *where += (Elf_Addr)(def->st_value + rela->r_addend); + break; case R_AARCH64_RELATIVE: *where = (Elf_Addr)(obj->relocbase + rela->r_addend); + break; + case R_AARCH64_NONE: break; default: rtld_printf("%s: Unhandled relocation %lu\n", From owner-svn-src-all@freebsd.org Sat Dec 15 02:49:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D26F1330402; Sat, 15 Dec 2018 02:49:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8625C8027B; Sat, 15 Dec 2018 02:49:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wBF2n8Bh051253 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 15 Dec 2018 04:49:11 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wBF2n8Bh051253 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wBF2n8Pn051252; Sat, 15 Dec 2018 04:49:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 15 Dec 2018 04:49:08 +0200 From: Konstantin Belousov To: Marcin Wojtas Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342084 - in head/sys: conf dev/tpm Message-ID: <20181215024908.GV60291@kib.kiev.ua> References: <201812141614.wBEGEaFO048433@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201812141614.wBEGEaFO048433@repo.freebsd.org> User-Agent: Mutt/1.11.1 (2018-12-01) 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 02:49:18 -0000 On Fri, Dec 14, 2018 at 04:14:36PM +0000, Marcin Wojtas wrote: > Author: mw > Date: Fri Dec 14 16:14:36 2018 > New Revision: 342084 > URL: https://svnweb.freebsd.org/changeset/base/342084 > > Log: > Introduce driver for TPM 2.0 in CRB and FIFO (TIS) modes > > It was written basing on: > TCG PC Client Platform TPM Profile (PTP) Specification Version 22, Revision 1.03. > It only supports Locality 0. Interrupts are only supported in FIFO mode. > > The driver in FIFO mode was tested on x86 with Infineon SLB9665 discrete TPM chip. > Driver in both modes was also tested on qemu with swtpm running on host. > > Submitted by: Kornel Duleba > Obtained from: Semihalf > Sponsored by: Stormshield > Differential Revision: https://reviews.freebsd.org/D18048 > > Added: > head/sys/dev/tpm/tpm20.c (contents, props changed) > head/sys/dev/tpm/tpm20.h (contents, props changed) > head/sys/dev/tpm/tpm_crb.c (contents, props changed) > head/sys/dev/tpm/tpm_tis.c (contents, props changed) > Modified: > head/sys/conf/files.amd64 Don't you need to update sys/modules/tpm/Makefile ? From owner-svn-src-all@freebsd.org Sat Dec 15 06:22:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA810133747D; Sat, 15 Dec 2018 06:22:48 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 8F36D87C1D; Sat, 15 Dec 2018 06:22:48 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BD5FB7E4; Sat, 15 Dec 2018 06:22:48 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF6Mm9w096427; Sat, 15 Dec 2018 06:22:48 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF6Mm5u096426; Sat, 15 Dec 2018 06:22:48 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812150622.wBF6Mm5u096426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 15 Dec 2018 06:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342110 - stable/12/libexec/rtld-elf/aarch64 X-SVN-Group: stable-12 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/12/libexec/rtld-elf/aarch64 X-SVN-Commit-Revision: 342110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F36D87C1D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_SHORT(-0.92)[-0.920,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.89)[-0.889,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 06:22:49 -0000 Author: mmel Date: Sat Dec 15 06:22:48 2018 New Revision: 342110 URL: https://svnweb.freebsd.org/changeset/base/342110 Log: MFC r341738: Implement R_AARCH64_TLS_DTPMOD64 and A_AARCH64_TLS_DTPREL64 relocations. Although these are slightly obsolete in favor of R_AARCH64_TLSDESC, gcc -mtls-dialect=trad still use them. Modified: stable/12/libexec/rtld-elf/aarch64/reloc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- stable/12/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 05:47:22 2018 (r342109) +++ stable/12/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 06:22:48 2018 (r342110) @@ -220,6 +220,8 @@ reloc_plt(Obj_Entry *obj) case R_AARCH64_IRELATIVE: obj->irelative = true; break; + case R_AARCH64_NONE: + break; default: _rtld_error("Unknown relocation type %u in PLT", (unsigned int)ELF_R_TYPE(rela->r_info)); @@ -386,6 +388,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int case R_AARCH64_ABS64: case R_AARCH64_GLOB_DAT: case R_AARCH64_TLS_TPREL64: + case R_AARCH64_TLS_DTPREL64: + case R_AARCH64_TLS_DTPMOD64: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, flags, cache, lockstate); if (def == NULL) @@ -472,8 +476,23 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int *where = def->st_value + rela->r_addend + defobj->tlsoffset; break; + + /* + * !!! BEWARE !!! + * ARM ELF ABI defines TLS_DTPMOD64 as 1029, and TLS_DTPREL64 + * as 1028. But actual bfd linker and the glibc RTLD linker + * treats TLS_DTPMOD64 as 1028 and TLS_DTPREL64 1029. + */ + case R_AARCH64_TLS_DTPREL64: /* efectively is TLS_DTPMOD64 */ + *where += (Elf_Addr)defobj->tlsindex; + break; + case R_AARCH64_TLS_DTPMOD64: /* efectively is TLS_DTPREL64 */ + *where += (Elf_Addr)(def->st_value + rela->r_addend); + break; case R_AARCH64_RELATIVE: *where = (Elf_Addr)(obj->relocbase + rela->r_addend); + break; + case R_AARCH64_NONE: break; default: rtld_printf("%s: Unhandled relocation %lu\n", From owner-svn-src-all@freebsd.org Sat Dec 15 04:53:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28E7513347F7; Sat, 15 Dec 2018 04:53:03 +0000 (UTC) (envelope-from jhibbits@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) server-signature RSA-PSS (4096 bits) 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 C2BE584D06; Sat, 15 Dec 2018 04:53:02 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6011A88D; Sat, 15 Dec 2018 04:53:02 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF4r2XI049362; Sat, 15 Dec 2018 04:53:02 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF4r21L049361; Sat, 15 Dec 2018 04:53:02 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201812150453.wBF4r21L049361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 15 Dec 2018 04:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342107 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 342107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C2BE584D06 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.81 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.93)[-0.934,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 04:53:03 -0000 Author: jhibbits Date: Sat Dec 15 04:53:02 2018 New Revision: 342107 URL: https://svnweb.freebsd.org/changeset/base/342107 Log: powerpcspe: Don't require FPU_EMU for powerpcspe IEEE emulation Build only the necessary fpu_emu files for supporting the SPE IEEE-754 emulation exception handler. MFC after: 1 week Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sat Dec 15 02:35:48 2018 (r342106) +++ head/sys/conf/files.powerpc Sat Dec 15 04:53:02 2018 (r342107) @@ -126,15 +126,15 @@ powerpc/cpufreq/mpc85xx_jog.c optional cpufreq mpc85xx powerpc/cpufreq/pcr.c optional cpufreq aim powerpc/cpufreq/pmcr.c optional cpufreq aim powerpc64 powerpc/cpufreq/pmufreq.c optional cpufreq aim pmu -powerpc/fpu/fpu_add.c optional fpu_emu -powerpc/fpu/fpu_compare.c optional fpu_emu -powerpc/fpu/fpu_div.c optional fpu_emu +powerpc/fpu/fpu_add.c optional fpu_emu | powerpcspe +powerpc/fpu/fpu_compare.c optional fpu_emu | powerpcspe +powerpc/fpu/fpu_div.c optional fpu_emu | powerpcspe powerpc/fpu/fpu_emu.c optional fpu_emu -powerpc/fpu/fpu_explode.c optional fpu_emu -powerpc/fpu/fpu_implode.c optional fpu_emu -powerpc/fpu/fpu_mul.c optional fpu_emu +powerpc/fpu/fpu_explode.c optional fpu_emu | powerpcspe +powerpc/fpu/fpu_implode.c optional fpu_emu | powerpcspe +powerpc/fpu/fpu_mul.c optional fpu_emu | powerpcspe powerpc/fpu/fpu_sqrt.c optional fpu_emu -powerpc/fpu/fpu_subr.c optional fpu_emu +powerpc/fpu/fpu_subr.c optional fpu_emu | powerpcspe powerpc/mambo/mambocall.S optional mambo powerpc/mambo/mambo.c optional mambo powerpc/mambo/mambo_console.c optional mambo From owner-svn-src-all@freebsd.org Sat Dec 15 05:47:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40912133657B; Sat, 15 Dec 2018 05:47:23 +0000 (UTC) (envelope-from cem@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) server-signature RSA-PSS (4096 bits) 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 D7C6A86AE1; Sat, 15 Dec 2018 05:47:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C55B5B109; Sat, 15 Dec 2018 05:47:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF5lMl2076109; Sat, 15 Dec 2018 05:47:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF5lM7J076107; Sat, 15 Dec 2018 05:47:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201812150547.wBF5lM7J076107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 15 Dec 2018 05:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342109 - head/sys/contrib/zstd/lib/compress X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/contrib/zstd/lib/compress X-SVN-Commit-Revision: 342109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D7C6A86AE1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.81 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 05:47:23 -0000 Author: cem Date: Sat Dec 15 05:47:22 2018 New Revision: 342109 URL: https://svnweb.freebsd.org/changeset/base/342109 Log: Revert accidentally included changes in r342108 If you're curious, please follow along in https://reviews.freebsd.org/D18537 . Sorry for the noise. Modified: head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h head/sys/contrib/zstd/lib/compress/zstd_opt.c Modified: head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h ============================================================================== --- head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h Sat Dec 15 05:46:04 2018 (r342108) +++ head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h Sat Dec 15 05:47:22 2018 (r342109) @@ -691,7 +691,6 @@ MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* windo /* debug functions */ -#if 0 MEM_STATIC double ZSTD_fWeight(U32 rawStat) { U32 const fp_accuracy = 8; @@ -715,7 +714,6 @@ MEM_STATIC void ZSTD_debugTable(const U32* table, U32 u, table[u], ZSTD_fWeight(sum) - ZSTD_fWeight(table[u]) ); } } -#endif #if defined (__cplusplus) } Modified: head/sys/contrib/zstd/lib/compress/zstd_opt.c ============================================================================== --- head/sys/contrib/zstd/lib/compress/zstd_opt.c Sat Dec 15 05:46:04 2018 (r342108) +++ head/sys/contrib/zstd/lib/compress/zstd_opt.c Sat Dec 15 05:47:22 2018 (r342109) @@ -53,12 +53,10 @@ MEM_STATIC U32 ZSTD_fracWeight(U32 rawStat) } /* debugging function, @return price in bytes */ -#if 0 MEM_STATIC double ZSTD_fCost(U32 price) { return (double)price / (BITCOST_MULTIPLIER*8); } -#endif static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) { @@ -854,10 +852,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, for ( ; pos <= end ; pos++ ) { U32 const matchPrice = ZSTD_getMatchPrice(offset, pos, optStatePtr, optLevel); U32 const sequencePrice = literalsPrice + matchPrice; -#if 0 DEBUGLOG(7, "rPos:%u => set initial price : %.2f", pos, ZSTD_fCost(sequencePrice)); -#endif opt[pos].mlen = pos; opt[pos].off = offset; opt[pos].litlen = litlen; @@ -883,22 +879,18 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, - ZSTD_litLengthPrice(litlen-1, optStatePtr, optLevel); assert(price < 1000000000); /* overflow check */ if (price <= opt[cur].price) { -#if 0 DEBUGLOG(7, "cPos:%zi==rPos:%u : better price (%.2f<=%.2f) using literal (ll==%u) (hist:%u,%u,%u)", inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]); -#endif opt[cur].mlen = 0; opt[cur].off = 0; opt[cur].litlen = litlen; opt[cur].price = price; memcpy(opt[cur].rep, opt[cur-1].rep, sizeof(opt[cur].rep)); } else { -#if 0 DEBUGLOG(7, "cPos:%zi==rPos:%u : literal would cost more (%.2f>%.2f) (hist:%u,%u,%u)", inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), opt[cur].rep[0], opt[cur].rep[1], opt[cur].rep[2]); -#endif } } @@ -955,10 +947,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, int const price = basePrice + ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); if ((pos > last_pos) || (price < opt[pos].price)) { -#if 0 DEBUGLOG(7, "rPos:%u (ml=%2u) => new better price (%.2f<%.2f)", pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); -#endif while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } /* fill empty positions */ opt[pos].mlen = mlen; opt[pos].off = offset; @@ -967,10 +957,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, ZSTD_STATIC_ASSERT(sizeof(opt[pos].rep) == sizeof(repHistory)); memcpy(opt[pos].rep, &repHistory, sizeof(repHistory)); } else { -#if 0 DEBUGLOG(7, "rPos:%u (ml=%2u) => new price is worse (%.2f>=%.2f)", pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); -#endif if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ } } } } From owner-svn-src-all@freebsd.org Sat Dec 15 05:46:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57497133654A; Sat, 15 Dec 2018 05:46:06 +0000 (UTC) (envelope-from cem@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) server-signature RSA-PSS (4096 bits) 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 E9468869F2; Sat, 15 Dec 2018 05:46:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5FA5B107; Sat, 15 Dec 2018 05:46:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF5k5jA076009; Sat, 15 Dec 2018 05:46:05 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF5k4Gk076004; Sat, 15 Dec 2018 05:46:04 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201812150546.wBF5k4Gk076004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 15 Dec 2018 05:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342108 - in head: share/man/man9 sys/contrib/zstd/lib/compress sys/dev/efidev sys/dev/ipmi sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: share/man/man9 sys/contrib/zstd/lib/compress sys/dev/efidev sys/dev/ipmi sys/sys X-SVN-Commit-Revision: 342108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E9468869F2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.81 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.878,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 05:46:06 -0000 Author: cem Date: Sat Dec 15 05:46:04 2018 New Revision: 342108 URL: https://svnweb.freebsd.org/changeset/base/342108 Log: efirt: When present, attempt to use EFI runtime services to shutdown PR: maybe related to 233998 (inconclusive at this time) Submitted by: byuu (previous version) Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D18506 Modified: head/share/man/man9/efirt.9 head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h head/sys/contrib/zstd/lib/compress/zstd_opt.c head/sys/dev/efidev/efirt.c head/sys/dev/ipmi/ipmi.c head/sys/sys/efi.h Modified: head/share/man/man9/efirt.9 ============================================================================== --- head/share/man/man9/efirt.9 Sat Dec 15 04:53:02 2018 (r342107) +++ head/share/man/man9/efirt.9 Sat Dec 15 05:46:04 2018 (r342108) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2018 +.Dd December 11, 2018 .Dt EFIRT 9 .Os .Sh NAME @@ -54,7 +54,7 @@ .Ft int .Fn efi_get_time_capabilities "struct efi_tmcap *tmcap" .Ft int -.Fn efi_reset_system "void" +.Fn efi_reset_system "enum efi_reset type" .Ft int .Fn efi_set_time "struct efi_tm *tm" .Ft int @@ -123,7 +123,20 @@ if the time could not be retrieved due to a hardware e .Pp The .Fn efi_reset_system -function requests a warm reset and reboot of the system. +function requests a reset of the system. +The +.Fa type +argument may be one of the +.Vt enum efi_reset +values: +.Bl -tag -width ".Dv EFI_RESET_SHUTDOWN" +.It Dv EFI_RESET_COLD +Perform a cold reset of the system, and reboot. +.It Dv EFI_RESET_WARM +Perform a warm reset of the system, and reboot. +.It Dv EFI_RESET_SHUTDOWN +Power off the system. +.El .Pp The .Fn efi_set_time @@ -239,7 +252,7 @@ The variable could not be saved due to a hardware erro .It Dv EROFS The variable in question is read-only or may not be deleted. .It Dv EDOOFUS -The varialbe could not be set due to an authentication failure. +The variable could not be set due to an authentication failure. .It Dv ENOENT The variable trying to be updated or deleted was not found. .El Modified: head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h ============================================================================== --- head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h Sat Dec 15 04:53:02 2018 (r342107) +++ head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h Sat Dec 15 05:46:04 2018 (r342108) @@ -691,6 +691,7 @@ MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* windo /* debug functions */ +#if 0 MEM_STATIC double ZSTD_fWeight(U32 rawStat) { U32 const fp_accuracy = 8; @@ -714,6 +715,7 @@ MEM_STATIC void ZSTD_debugTable(const U32* table, U32 u, table[u], ZSTD_fWeight(sum) - ZSTD_fWeight(table[u]) ); } } +#endif #if defined (__cplusplus) } Modified: head/sys/contrib/zstd/lib/compress/zstd_opt.c ============================================================================== --- head/sys/contrib/zstd/lib/compress/zstd_opt.c Sat Dec 15 04:53:02 2018 (r342107) +++ head/sys/contrib/zstd/lib/compress/zstd_opt.c Sat Dec 15 05:46:04 2018 (r342108) @@ -53,10 +53,12 @@ MEM_STATIC U32 ZSTD_fracWeight(U32 rawStat) } /* debugging function, @return price in bytes */ +#if 0 MEM_STATIC double ZSTD_fCost(U32 price) { return (double)price / (BITCOST_MULTIPLIER*8); } +#endif static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) { @@ -852,8 +854,10 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, for ( ; pos <= end ; pos++ ) { U32 const matchPrice = ZSTD_getMatchPrice(offset, pos, optStatePtr, optLevel); U32 const sequencePrice = literalsPrice + matchPrice; +#if 0 DEBUGLOG(7, "rPos:%u => set initial price : %.2f", pos, ZSTD_fCost(sequencePrice)); +#endif opt[pos].mlen = pos; opt[pos].off = offset; opt[pos].litlen = litlen; @@ -879,18 +883,22 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, - ZSTD_litLengthPrice(litlen-1, optStatePtr, optLevel); assert(price < 1000000000); /* overflow check */ if (price <= opt[cur].price) { +#if 0 DEBUGLOG(7, "cPos:%zi==rPos:%u : better price (%.2f<=%.2f) using literal (ll==%u) (hist:%u,%u,%u)", inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]); +#endif opt[cur].mlen = 0; opt[cur].off = 0; opt[cur].litlen = litlen; opt[cur].price = price; memcpy(opt[cur].rep, opt[cur-1].rep, sizeof(opt[cur].rep)); } else { +#if 0 DEBUGLOG(7, "cPos:%zi==rPos:%u : literal would cost more (%.2f>%.2f) (hist:%u,%u,%u)", inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), opt[cur].rep[0], opt[cur].rep[1], opt[cur].rep[2]); +#endif } } @@ -947,8 +955,10 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, int const price = basePrice + ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); if ((pos > last_pos) || (price < opt[pos].price)) { +#if 0 DEBUGLOG(7, "rPos:%u (ml=%2u) => new better price (%.2f<%.2f)", pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); +#endif while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } /* fill empty positions */ opt[pos].mlen = mlen; opt[pos].off = offset; @@ -957,8 +967,10 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, ZSTD_STATIC_ASSERT(sizeof(opt[pos].rep) == sizeof(repHistory)); memcpy(opt[pos].rep, &repHistory, sizeof(repHistory)); } else { +#if 0 DEBUGLOG(7, "rPos:%u (ml=%2u) => new price is worse (%.2f>=%.2f)", pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); +#endif if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ } } } } Modified: head/sys/dev/efidev/efirt.c ============================================================================== --- head/sys/dev/efidev/efirt.c Sat Dec 15 04:53:02 2018 (r342107) +++ head/sys/dev/efidev/efirt.c Sat Dec 15 05:46:04 2018 (r342108) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -41,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -57,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include static struct efi_systbl *efi_systbl; +static eventhandler_tag efi_shutdown_tag; /* * The following pointers point to tables in the EFI runtime service data pages. * Care should be taken to make sure that we've properly entered the EFI runtime @@ -106,6 +109,10 @@ efi_status_to_errno(efi_status status) } static struct mtx efi_lock; +static SYSCTL_NODE(_hw, OID_AUTO, efi, CTLFLAG_RWTUN, NULL, "EFI"); +static bool efi_poweroff = true; +SYSCTL_BOOL(_hw_efi, OID_AUTO, poweroff, CTLFLAG_RWTUN, &efi_poweroff, 0, + "If true, use EFI runtime services to power off in preference to ACPI"); static bool efi_is_in_map(struct efi_md *map, int ndesc, int descsz, vm_offset_t addr) @@ -126,6 +133,19 @@ efi_is_in_map(struct efi_md *map, int ndesc, int descs return (false); } +static void +efi_shutdown_final(void *dummy __unused, int howto) +{ + + /* + * On some systems, ACPI S5 is missing or does not function properly. + * When present, shutdown via EFI Runtime Services instead, unless + * disabled. + */ + if ((howto & RB_POWEROFF) != 0 && efi_poweroff) + (void)efi_reset_system(EFI_RESET_SHUTDOWN); +} + static int efi_init(void) { @@ -214,6 +234,12 @@ efi_init(void) } #endif + /* + * We use SHUTDOWN_PRI_LAST - 1 to trigger after IPMI, but before ACPI. + */ + efi_shutdown_tag = EVENTHANDLER_REGISTER(shutdown_final, + efi_shutdown_final, NULL, SHUTDOWN_PRI_LAST - 1); + return (0); } @@ -224,6 +250,8 @@ efi_uninit(void) /* Most likely disabled by tunable */ if (efi_runtime == NULL) return; + if (efi_shutdown_tag != NULL) + EVENTHANDLER_DEREGISTER(shutdown_final, efi_shutdown_tag); efi_destroy_1t1_map(); efi_systbl = NULL; @@ -411,16 +439,24 @@ efi_get_time_capabilities(struct efi_tmcap *tmcap) } int -efi_reset_system(void) +efi_reset_system(enum efi_reset type) { struct efirt_callinfo ec; + switch (type) { + case EFI_RESET_COLD: + case EFI_RESET_WARM: + case EFI_RESET_SHUTDOWN: + break; + default: + return (EINVAL); + } if (efi_runtime == NULL) return (ENXIO); bzero(&ec, sizeof(ec)); ec.ec_name = "rt_reset"; ec.ec_argcnt = 4; - ec.ec_arg1 = (uintptr_t)EFI_RESET_WARM; + ec.ec_arg1 = (uintptr_t)type; ec.ec_arg2 = (uintptr_t)0; ec.ec_arg3 = (uintptr_t)0; ec.ec_arg4 = (uintptr_t)NULL; Modified: head/sys/dev/ipmi/ipmi.c ============================================================================== --- head/sys/dev/ipmi/ipmi.c Sat Dec 15 04:53:02 2018 (r342107) +++ head/sys/dev/ipmi/ipmi.c Sat Dec 15 05:46:04 2018 (r342108) @@ -938,14 +938,14 @@ ipmi_startup(void *arg) } else if (!on) (void)ipmi_set_watchdog(sc, 0); /* - * Power cycle the system off using IPMI. We use last - 1 since we don't + * Power cycle the system off using IPMI. We use last - 2 since we don't * handle all the other kinds of reboots. We'll let others handle them. * We only try to do this if the BMC supports the Chassis device. */ if (sc->ipmi_dev_support & IPMI_ADS_CHASSIS) { device_printf(dev, "Establishing power cycle handler\n"); sc->ipmi_power_cycle_tag = EVENTHANDLER_REGISTER(shutdown_final, - ipmi_power_cycle, sc, SHUTDOWN_PRI_LAST - 1); + ipmi_power_cycle, sc, SHUTDOWN_PRI_LAST - 2); } } Modified: head/sys/sys/efi.h ============================================================================== --- head/sys/sys/efi.h Sat Dec 15 04:53:02 2018 (r342107) +++ head/sys/sys/efi.h Sat Dec 15 05:46:04 2018 (r342108) @@ -42,8 +42,9 @@ {0xeb9d2d32,0x2d88,0x11d3,0x9a,0x16,{0x00,0x90,0x27,0x3f,0xc1,0x4d}} enum efi_reset { - EFI_RESET_COLD, - EFI_RESET_WARM + EFI_RESET_COLD = 0, + EFI_RESET_WARM = 1, + EFI_RESET_SHUTDOWN = 2, }; typedef uint16_t efi_char; @@ -184,7 +185,7 @@ int efi_rt_ok(void); int efi_get_table(struct uuid *uuid, void **ptr); int efi_get_time(struct efi_tm *tm); int efi_get_time_capabilities(struct efi_tmcap *tmcap); -int efi_reset_system(void); +int efi_reset_system(enum efi_reset type); int efi_set_time(struct efi_tm *tm); int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, size_t *datasize, void *data); From owner-svn-src-all@freebsd.org Sat Dec 15 09:26:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56E93133E22F; Sat, 15 Dec 2018 09:26:28 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "goliath.siemens.de", Issuer "Siemens Issuing CA Internet Server 2017" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E72C98E695; Sat, 15 Dec 2018 09:26:26 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id wBF99QKY000737 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 15 Dec 2018 10:09:27 +0100 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id wBF99Qke027696; Sat, 15 Dec 2018 10:09:26 +0100 Received: (from user@localhost) by curry.mchp.siemens.de (8.15.2/8.15.2) id wBF99QJg071688; Date: Sat, 15 Dec 2018 10:09:26 +0100 From: Andre Albsmeier To: Eugene Grosbein Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r341794 - stable/11/etc/periodic/weekly Message-ID: <20181215090926.GA33682@bali> References: <201812101424.wBAEOgbC053582@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201812101424.wBAEOgbC053582@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Rspamd-Queue-Id: E72C98E695 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of Andre.Albsmeier@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=Andre.Albsmeier@siemens.com X-Spamd-Result: default: False [-1.29 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.90)[-0.895,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+exists:192.35.17.28.spf.siemens.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[siemens.com]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.91)[-0.914,0]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_SHORT(0.84)[0.836,0]; MX_GOOD(-0.01)[meleagros.siemens.com,hylas.siemens.com,paxos.siemens.com,gordi.siemens.com,zetes.siemens.com,hephaistos.siemens.com,balduin.siemens.com]; IP_SCORE(-0.00)[country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15465, ipnet:192.35.16.0/22, country:DE]; RCVD_IN_DNSWL_HI(-0.50)[28.17.35.192.list.dnswl.org : 127.0.13.3] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 09:26:28 -0000 On Mon, 10-Dec-2018 at 14:24:42 +0000, Eugene Grosbein wrote: > Author: eugen > Date: Mon Dec 10 14:24:41 2018 > New Revision: 341794 > URL: https://svnweb.freebsd.org/changeset/base/341794 > > Log: > MFC r340322-r340324,r340327: periodic/etc/weekly/340.noid > > Prevent periodic/etc/weekly/340.noid from descending into root directories > of jails. Jails have their own user/group databases and this script > can produce multiple false warnings, not to mention significant extra > load in case of large jailed subtrees. Leave this check for jailed > invocations of the same script. This gave me: Check for files with an unknown user or group: .: cannot open /usr/share/bsdconfig/common.subr: No such file or directory on systems where bsdconfig is not installed. -Andre > > Modified: > stable/11/etc/periodic/weekly/340.noid > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/etc/periodic/weekly/340.noid > ============================================================================== > --- stable/11/etc/periodic/weekly/340.noid Mon Dec 10 14:19:57 2018 (r341793) > +++ stable/11/etc/periodic/weekly/340.noid Mon Dec 10 14:24:41 2018 (r341794) > @@ -16,8 +16,26 @@ case "$weekly_noid_enable" in > echo "" > echo "Check for files with an unknown user or group:" > > + # Host should not test jailed subtrees as jails have their own > + # databases of users and groups. Leave them for jailed invocations > + # of this script. > + > + exclude='' > + if [ $(sysctl -n security.jail.jailed) = 0 ]; then > + sep=: > + OIFS="$IFS" > + IFS="$sep" > + for param in $(jail -f "`sysrc -n jail_conf`" -e "$sep" 2>/dev/null) > + do > + case "$param" in > + path=*) exclude="$exclude -path ${param#path=} -prune -or" > + esac > + done > + IFS="$OIFS" > + fi > + > rc=$(find -H ${weekly_noid_dirs:-/} \ > - \( ! -fstype local -prune -or -name \* \) -and \ > + \( $exclude ! -fstype local -prune -or -name \* \) -and \ > \( -nogroup -o -nouser \) -print | sed 's/^/ /' | > tee /dev/stderr | wc -l) > [ $rc -gt 1 ] && rc=1 > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to "svn-src-stable-11-unsubscribe@freebsd.org" -- "FreeBSD has always been the operating system that GNU/Linux-based operating systems should have been." - Frank Pohlmann, IBM From owner-svn-src-all@freebsd.org Sat Dec 15 10:38:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D10911340E68; Sat, 15 Dec 2018 10:38:10 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 7B0C86A37E; Sat, 15 Dec 2018 10:38:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BE86E4A4; Sat, 15 Dec 2018 10:38:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFAcAnR027434; Sat, 15 Dec 2018 10:38:10 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFAc8gk027422; Sat, 15 Dec 2018 10:38:08 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812151038.wBFAc8gk027422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 15 Dec 2018 10:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342113 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 X-SVN-Commit-Revision: 342113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7B0C86A37E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.82 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.878,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 10:38:11 -0000 Author: mmel Date: Sat Dec 15 10:38:07 2018 New Revision: 342113 URL: https://svnweb.freebsd.org/changeset/base/342113 Log: Improve R_AARCH64_TLSDESC relocation. The original code did not support dynamically loaded libraries and used suboptimal access to TLS variables. New implementation removes lazy resolving of TLS relocation - due to flaw in TLSDESC design is impossible to switch resolver function at runtime without expensive locking. Due to this, 3 specialized resolvers are implemented: - load time resolver for TLS relocation from libraries loaded with main executable (thus with known TLS offset). - resolver for undefined thread weak symbols. - slower lazy resolver for dynamically loaded libraries with fast path for already resolved symbols. PR: 228892, 232149, 233204, 232311 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18417 Modified: head/libexec/rtld-elf/aarch64/reloc.c head/libexec/rtld-elf/aarch64/rtld_start.S head/libexec/rtld-elf/amd64/reloc.c head/libexec/rtld-elf/arm/reloc.c head/libexec/rtld-elf/i386/reloc.c head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/powerpc/reloc.c head/libexec/rtld-elf/powerpc64/reloc.c head/libexec/rtld-elf/riscv/reloc.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/sparc64/reloc.c Modified: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- head/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -49,7 +49,8 @@ __FBSDID("$FreeBSD$"); * This is not the correct prototype, but we only need it for * a function pointer to a simple asm function. */ -void *_rtld_tlsdesc(void *); +void *_rtld_tlsdesc_static(void *); +void *_rtld_tlsdesc_undef(void *); void *_rtld_tlsdesc_dynamic(void *); void _exit(int); @@ -122,78 +123,58 @@ do_copy_relocations(Obj_Entry *dstobj) } struct tls_data { - int64_t index; - Obj_Entry *obj; - const Elf_Rela *rela; + Elf_Addr dtv_gen; + int tls_index; + Elf_Addr tls_offs; }; -int64_t rtld_tlsdesc_handle(struct tls_data *tlsdesc, int flags); - -static struct tls_data * -reloc_tlsdesc_alloc(Obj_Entry *obj, const Elf_Rela *rela) +static Elf_Addr +reloc_tlsdesc_alloc(int tlsindex, Elf_Addr tlsoffs) { struct tls_data *tlsdesc; tlsdesc = xmalloc(sizeof(struct tls_data)); - tlsdesc->index = -1; - tlsdesc->obj = obj; - tlsdesc->rela = rela; + tlsdesc->dtv_gen = tls_dtv_generation; + tlsdesc->tls_index = tlsindex; + tlsdesc->tls_offs = tlsoffs; - return (tlsdesc); + return ((Elf_Addr)tlsdesc); } -/* - * Look up the symbol to find its tls index - */ -static int64_t -rtld_tlsdesc_handle_locked(struct tls_data *tlsdesc, int flags, - RtldLockState *lockstate) +static void +reloc_tlsdesc(const Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *where, + int flags, RtldLockState *lockstate) { - const Elf_Rela *rela; const Elf_Sym *def; const Obj_Entry *defobj; - Obj_Entry *obj; + Elf_Addr offs; - rela = tlsdesc->rela; - obj = tlsdesc->obj; - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, flags, NULL, - lockstate); - if (def == NULL) - rtld_die(); + offs = 0; + if (ELF_R_SYM(rela->r_info) != 0) { + def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, flags, + NULL, lockstate); + if (def == NULL) + rtld_die(); + offs = def->st_value; + obj = defobj; + if (def->st_shndx == SHN_UNDEF) { + /* Weak undefined thread variable */ + where[0] = (Elf_Addr)_rtld_tlsdesc_undef; + where[1] = rela->r_addend; + return; + } + } + offs += rela->r_addend; - tlsdesc->index = defobj->tlsoffset + def->st_value + rela->r_addend; - - return (tlsdesc->index); -} - -int64_t -rtld_tlsdesc_handle(struct tls_data *tlsdesc, int flags) -{ - RtldLockState lockstate; - - /* We have already found the index, return it */ - if (tlsdesc->index >= 0) - return (tlsdesc->index); - - wlock_acquire(rtld_bind_lock, &lockstate); - /* tlsdesc->index may have been set by another thread */ - if (tlsdesc->index == -1) - rtld_tlsdesc_handle_locked(tlsdesc, flags, &lockstate); - lock_release(rtld_bind_lock, &lockstate); - - return (tlsdesc->index); -} - -static void -reloc_tlsdesc(Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *where) -{ - if (ELF_R_SYM(rela->r_info) == 0) { - where[0] = (Elf_Addr)_rtld_tlsdesc; - where[1] = obj->tlsoffset + rela->r_addend; + if (obj->tlsoffset != 0) { + /* Variable is in initialy allocated TLS segment */ + where[0] = (Elf_Addr)_rtld_tlsdesc_static; + where[1] = obj->tlsoffset + offs; } else { + /* TLS offest is unknown at load time, use dynamic resolving */ where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic; - where[1] = (Elf_Addr)reloc_tlsdesc_alloc(obj, rela); + where[1] = reloc_tlsdesc_alloc(obj->tlsindex, offs); } } @@ -201,7 +182,7 @@ reloc_tlsdesc(Obj_Entry *obj, const Elf_Rela *rela, El * Process the PLT relocations. */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; @@ -218,7 +199,8 @@ reloc_plt(Obj_Entry *obj) *where += (Elf_Addr)obj->relocbase; break; case R_AARCH64_TLSDESC: - reloc_tlsdesc(obj, rela, where); + reloc_tlsdesc(obj, rela, where, SYMLOOK_IN_PLT | flags, + lockstate); break; case R_AARCH64_IRELATIVE: obj->irelative = true; @@ -458,7 +440,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int } break; case R_AARCH64_TLSDESC: - reloc_tlsdesc(obj, rela, where); + reloc_tlsdesc(obj, rela, where, flags, lockstate); break; case R_AARCH64_TLS_TPREL64: /* @@ -478,9 +460,25 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int return (-1); } } - - *where = def->st_value + rela->r_addend + - defobj->tlsoffset; + /* Test weak undefined thread variable */ + if (def->st_shndx != SHN_UNDEF) { + *where = def->st_value + rela->r_addend + + defobj->tlsoffset; + } else { + /* + * XXX We should relocate undefined thread + * weak variable address to NULL, but how? + * Can we return error in this situation? + */ + rtld_printf("%s: Unable to relocate undefined " + "weak TLS variable\n", obj->path); +#if 0 + return (-1); +#else + *where = def->st_value + rela->r_addend + + defobj->tlsoffset; +#endif + } break; /* Modified: head/libexec/rtld-elf/aarch64/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/aarch64/rtld_start.S Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/aarch64/rtld_start.S Sat Dec 15 10:38:07 2018 (r342113) @@ -118,55 +118,145 @@ ENTRY(_rtld_bind_start) END(_rtld_bind_start) /* - * uint64_t _rtld_tlsdesc(struct tlsdesc *); + * struct rel_tlsdesc { + * uint64_t resolver_fnc; + * uint64_t resolver_arg; * - * struct tlsdesc { - * uint64_t ptr; - * uint64_t data; - * }; * - * Returns the data. + * uint64_t _rtld_tlsdesc_static(struct rel_tlsdesc *); + * + * Resolver function for TLS symbols resolved at load time */ -ENTRY(_rtld_tlsdesc) +ENTRY(_rtld_tlsdesc_static) + .cfi_startproc ldr x0, [x0, #8] ret -END(_rtld_tlsdesc) + .cfi_endproc +END(_rtld_tlsdesc_static) /* - * uint64_t _rtld_tlsdesc_dynamic(struct tlsdesc *); + * uint64_t _rtld_tlsdesc_undef(void); * - * TODO: We could lookup the saved index here to skip saving the entire stack. + * Resolver function for weak and undefined TLS symbols */ +ENTRY(_rtld_tlsdesc_undef) + .cfi_startproc + str x1, [sp, #-16]! + .cfi_adjust_cfa_offset 16 + + mrs x1, tpidr_el0 + ldr x0, [x0, #8] + sub x0, x0, x1 + + ldr x1, [sp], #16 + .cfi_adjust_cfa_offset -16 + .cfi_endproc + ret +END(_rtld_tlsdesc_undef) + +/* + * uint64_t _rtld_tlsdesc_dynamic(struct rel_tlsdesc *); + * + * Resolver function for TLS symbols from dlopen() + */ ENTRY(_rtld_tlsdesc_dynamic) - /* Store any registers we may use in rtld_tlsdesc_handle */ - stp x29, x30, [sp, #-(10 * 16)]! + .cfi_startproc + + /* Save registers used in fast path */ + stp x1, x2, [sp, #(-2 * 16)]! + stp x3, x4, [sp, #(1 * 16)] + .cfi_adjust_cfa_offset 2 * 16 + .cfi_rel_offset x1, 0 + .cfi_rel_offset x2, 8 + .cfi_rel_offset x3, 16 + .cfi_rel_offset x4, 24 + + /* Test fastpath - inlined version of tls_get_addr_common(). */ + ldr x1, [x0, #8] /* tlsdesc ptr */ + mrs x4, tpidr_el0 + ldr x0, [x4] /* DTV pointer */ + ldr x2, [x0] /* dtv[0] (generation count) */ + ldr x3, [x1] /* tlsdec->dtv_gen */ + cmp x2, x3 + b.ne 1f /* dtv[0] != tlsdec->dtv_gen */ + + ldr w2, [x1, #8] /* tlsdec->tls_index */ + add w2, w2, #1 + ldr x3, [x0, w2, sxtw #3] /* dtv[tlsdesc->tls_index + 1] */ + cbz x3, 1f + + /* Return (dtv[tlsdesc->tls_index + 1] + tlsdesc->tls_offs - tp) */ + ldr x2, [x1, #16] /* tlsdec->tls_offs */ + add x2, x2, x3 + sub x0, x2, x4 + /* Restore registers and return */ + ldp x3, x4, [sp, #(1 * 16)] + ldp x1, x2, [sp], #(2 * 16) + .cfi_adjust_cfa_offset -2 * 16 + ret + + /* + * Slow path + * return( + * tls_get_addr_common(tp, tlsdesc->tls_index, tlsdesc->tls_offs)); + * + */ +1: + /* Save all interger registers */ + stp x29, x30, [sp, #-(8 * 16)]! + .cfi_adjust_cfa_offset 8 * 16 + .cfi_rel_offset x29, 0 + .cfi_rel_offset x30, 8 + mov x29, sp - stp x1, x2, [sp, #(1 * 16)] - stp x3, x4, [sp, #(2 * 16)] - stp x5, x6, [sp, #(3 * 16)] - stp x7, x8, [sp, #(4 * 16)] - stp x9, x10, [sp, #(5 * 16)] - stp x11, x12, [sp, #(6 * 16)] - stp x13, x14, [sp, #(7 * 16)] - stp x15, x16, [sp, #(8 * 16)] - stp x17, x18, [sp, #(9 * 16)] + stp x5, x6, [sp, #(1 * 16)] + stp x7, x8, [sp, #(2 * 16)] + stp x9, x10, [sp, #(3 * 16)] + stp x11, x12, [sp, #(4 * 16)] + stp x13, x14, [sp, #(5 * 16)] + stp x15, x16, [sp, #(6 * 16)] + stp x17, x18, [sp, #(7 * 16)] + .cfi_rel_offset x5, 16 + .cfi_rel_offset x6, 24 + .cfi_rel_offset x7, 32 + .cfi_rel_offset x8, 40 + .cfi_rel_offset x9, 48 + .cfi_rel_offset x10, 56 + .cfi_rel_offset x11, 64 + .cfi_rel_offset x12, 72 + .cfi_rel_offset x13, 80 + .cfi_rel_offset x14, 88 + .cfi_rel_offset x15, 96 + .cfi_rel_offset x16, 104 + .cfi_rel_offset x17, 112 + .cfi_rel_offset x18, 120 /* Find the tls offset */ - ldr x0, [x0, #8] - mov x1, #1 - bl rtld_tlsdesc_handle + mov x0, x4 /* tp */ + mov x3, x1 /* tlsdesc ptr */ + ldr w1, [x3, #8] /* tlsdec->tls_index */ + ldr x2, [x3, #16] /* tlsdec->tls_offs */ + bl tls_get_addr_common + mrs x1, tpidr_el0 + sub x0, x0, x1 - /* Restore the registers */ - ldp x17, x18, [sp, #(9 * 16)] - ldp x15, x16, [sp, #(8 * 16)] - ldp x13, x14, [sp, #(7 * 16)] - ldp x11, x12, [sp, #(6 * 16)] - ldp x9, x10, [sp, #(5 * 16)] - ldp x7, x8, [sp, #(4 * 16)] - ldp x5, x6, [sp, #(3 * 16)] - ldp x3, x4, [sp, #(2 * 16)] - ldp x1, x2, [sp, #(1 * 16)] - ldp x29, x30, [sp], #(10 * 16) + /* Restore slow patch registers */ + ldp x17, x18, [sp, #(7 * 16)] + ldp x15, x16, [sp, #(6 * 16)] + ldp x13, x14, [sp, #(5 * 16)] + ldp x11, x12, [sp, #(4 * 16)] + ldp x9, x10, [sp, #(3 * 16)] + ldp x7, x8, [sp, #(2 * 16)] + ldp x5, x6, [sp, #(1 * 16)] + ldp x29, x30, [sp], #(8 * 16) + .cfi_adjust_cfa_offset -8 * 16 + .cfi_restore x29 + .cfi_restore x30 + /* Restore fast path registers and return */ + ldp x3, x4, [sp, #16] + ldp x1, x2, [sp], #(2 * 16) + .cfi_adjust_cfa_offset -2 * 16 + .cfi_endproc ret END(_rtld_tlsdesc_dynamic) Modified: head/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- head/libexec/rtld-elf/amd64/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/amd64/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -323,7 +323,7 @@ done: /* Process the PLT relocations. */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) { const Elf_Rela *relalim; const Elf_Rela *rela; Modified: head/libexec/rtld-elf/arm/reloc.c ============================================================================== --- head/libexec/rtld-elf/arm/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/arm/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -389,7 +389,7 @@ done: * * Process the PLT relocations. * */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) { const Elf_Rel *rellim; const Elf_Rel *rel; Modified: head/libexec/rtld-elf/i386/reloc.c ============================================================================== --- head/libexec/rtld-elf/i386/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/i386/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -274,7 +274,7 @@ done: /* Process the PLT relocations. */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) { const Elf_Rel *rellim; const Elf_Rel *rel; Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/mips/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -652,7 +652,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int * Process the PLT relocations. */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) { const Elf_Rel *rellim; const Elf_Rel *rel; Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/powerpc/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -402,7 +402,7 @@ reloc_plt_object(Obj_Entry *obj, const Elf_Rela *rela) * Process the PLT relocations. */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) { const Elf_Rela *relalim; const Elf_Rela *rela; Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/powerpc64/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -376,7 +376,7 @@ reloc_plt_object(Obj_Entry *obj, const Elf_Rela *rela) * Process the PLT relocations. */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) { const Elf_Rela *relalim; const Elf_Rela *rela; Modified: head/libexec/rtld-elf/riscv/reloc.c ============================================================================== --- head/libexec/rtld-elf/riscv/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/riscv/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -145,7 +145,7 @@ do_copy_relocations(Obj_Entry *dstobj) * Process the PLT relocations. */ int -reloc_plt(Obj_Entry *obj) +reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) { const Elf_Rela *relalim; const Elf_Rela *rela; Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/rtld.c Sat Dec 15 10:38:07 2018 (r342113) @@ -2890,7 +2890,7 @@ relocate_object(Obj_Entry *obj, bool bind_now, Obj_Ent init_pltgot(obj); /* Process the PLT relocations. */ - if (reloc_plt(obj) == -1) + if (reloc_plt(obj, flags, lockstate) == -1) return (-1); /* Relocate the jump slots if we are doing immediate binding. */ if ((obj->bind_now || bind_now) && reloc_jmpslots(obj, flags, Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/rtld.h Sat Dec 15 10:38:07 2018 (r342113) @@ -400,7 +400,7 @@ int convert_prot(int elfflags); int do_copy_relocations(Obj_Entry *); int reloc_non_plt(Obj_Entry *, Obj_Entry *, int flags, struct Struct_RtldLockState *); -int reloc_plt(Obj_Entry *); +int reloc_plt(Obj_Entry *, int flags, struct Struct_RtldLockState *); int reloc_jmpslots(Obj_Entry *, int flags, struct Struct_RtldLockState *); int reloc_iresolve(Obj_Entry *, struct Struct_RtldLockState *); int reloc_gnu_ifunc(Obj_Entry *, int flags, struct Struct_RtldLockState *); Modified: head/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/sparc64/reloc.c Sat Dec 15 09:12:19 2018 (r342112) +++ head/libexec/rtld-elf/sparc64/reloc.c Sat Dec 15 10:38:07 2018 (r342113) @@ -487,7 +487,8 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rela *re } int -reloc_plt(Obj_Entry *obj __unused) +reloc_plt(Obj_Entry *obj __unused, int flags __unused, + RtldLockState *lockstate __unused) { #if 0 const Obj_Entry *defobj; From owner-svn-src-all@freebsd.org Sat Dec 15 10:56:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3615D134183E; Sat, 15 Dec 2018 10:56:02 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DD0C6ADC6; Sat, 15 Dec 2018 10:56:01 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id wBFAtq3I089192 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 15 Dec 2018 11:55:53 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: Andre.Albsmeier@siemens.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id wBFAtp7G074948 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 15 Dec 2018 17:55:52 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r341794 - stable/11/etc/periodic/weekly To: Andre Albsmeier References: <201812101424.wBAEOgbC053582@repo.freebsd.org> <20181215090926.GA33682@bali> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org From: Eugene Grosbein Message-ID: Date: Sat, 15 Dec 2018 17:55:44 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20181215090926.GA33682@bali> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 9DD0C6ADC6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.937,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 10:56:02 -0000 15.12.2018 16:09, Andre Albsmeier wrote: > On Mon, 10-Dec-2018 at 14:24:42 +0000, Eugene Grosbein wrote: >> Author: eugen >> Date: Mon Dec 10 14:24:41 2018 >> New Revision: 341794 >> URL: https://svnweb.freebsd.org/changeset/base/341794 >> >> Log: >> MFC r340322-r340324,r340327: periodic/etc/weekly/340.noid >> >> Prevent periodic/etc/weekly/340.noid from descending into root directories >> of jails. Jails have their own user/group databases and this script >> can produce multiple false warnings, not to mention significant extra >> load in case of large jailed subtrees. Leave this check for jailed >> invocations of the same script. > > This gave me: > > Check for files with an unknown user or group: > .: cannot open /usr/share/bsdconfig/common.subr: No such file or directory > > on systems where bsdconfig is not installed. This periodic script does not try to access /usr/share/bsdconfig/common.subr I think error message comes from another periodic script. Can you please run it with "sh -x /etc/periodic/weekly/340.noid" to make sure? From owner-svn-src-all@freebsd.org Sat Dec 15 09:12:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15019133D6C8; Sat, 15 Dec 2018 09:12:20 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) 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 ACE1D8DC47; Sat, 15 Dec 2018 09:12:19 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F3E0D657; Sat, 15 Dec 2018 09:12:19 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBF9CJmo084124; Sat, 15 Dec 2018 09:12:19 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBF9CJnZ084123; Sat, 15 Dec 2018 09:12:19 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201812150912.wBF9CJnZ084123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 15 Dec 2018 09:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342112 - stable/11/libexec/rtld-elf/aarch64 X-SVN-Group: stable-11 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: stable/11/libexec/rtld-elf/aarch64 X-SVN-Commit-Revision: 342112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ACE1D8DC47 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.82 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.89)[-0.889,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 09:12:20 -0000 Author: mmel Date: Sat Dec 15 09:12:19 2018 New Revision: 342112 URL: https://svnweb.freebsd.org/changeset/base/342112 Log: Fix mismerge caused by r342111. This is a direct commit to stable/11. Modified: stable/11/libexec/rtld-elf/aarch64/reloc.c Modified: stable/11/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- stable/11/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 06:34:13 2018 (r342111) +++ stable/11/libexec/rtld-elf/aarch64/reloc.c Sat Dec 15 09:12:19 2018 (r342112) @@ -344,9 +344,6 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int switch (ELF_R_TYPE(rela->r_info)) { case R_AARCH64_ABS64: case R_AARCH64_GLOB_DAT: - case R_AARCH64_TLS_TPREL64: - case R_AARCH64_TLS_DTPREL64: - case R_AARCH64_TLS_DTPMOD64: def = find_symdef(symnum, obj, &defobj, flags, cache, lockstate); if (def == NULL) @@ -405,9 +402,19 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int * treats TLS_DTPMOD64 as 1028 and TLS_DTPREL64 1029. */ case R_AARCH64_TLS_DTPREL64: /* efectively is TLS_DTPMOD64 */ + def = find_symdef(symnum, obj, &defobj, flags, cache, + lockstate); + if (def == NULL) + return (-1); + *where += (Elf_Addr)defobj->tlsindex; break; case R_AARCH64_TLS_DTPMOD64: /* efectively is TLS_DTPREL64 */ + def = find_symdef(symnum, obj, &defobj, flags, cache, + lockstate); + if (def == NULL) + return (-1); + *where += (Elf_Addr)(def->st_value + rela->r_addend); break; case R_AARCH64_RELATIVE: From owner-svn-src-all@freebsd.org Sat Dec 15 11:32:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89AD41342F95; Sat, 15 Dec 2018 11:32:12 +0000 (UTC) (envelope-from trasz@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) server-signature RSA-PSS (4096 bits) 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 2AF056C19F; Sat, 15 Dec 2018 11:32:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BBA7EF3F; Sat, 15 Dec 2018 11:32:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFBWBIa058002; Sat, 15 Dec 2018 11:32:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFBWBeU058001; Sat, 15 Dec 2018 11:32:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201812151132.wBFBWBeU058001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 15 Dec 2018 11:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342114 - head/sys/rpc/rpcsec_gss X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/rpc/rpcsec_gss X-SVN-Commit-Revision: 342114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2AF056C19F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.82 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 11:32:12 -0000 Author: trasz Date: Sat Dec 15 11:32:11 2018 New Revision: 342114 URL: https://svnweb.freebsd.org/changeset/base/342114 Log: Add kern.rpc.gss.client_max, to make it possible to bump it easily. This can drastically lower the load on gssd(8) on large NFS servers. Submitted by: Per Andersson Reviewed by: rmacklem@ MFC after: 2 weeks Sponsored by: Chalmers University of Technology Differential Revision: https://reviews.freebsd.org/D18393 Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Sat Dec 15 10:38:07 2018 (r342113) +++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Sat Dec 15 11:32:11 2018 (r342114) @@ -171,9 +171,22 @@ struct svc_rpc_gss_cookedcred { #define CLIENT_HASH_SIZE 256 #define CLIENT_MAX 128 +u_int svc_rpc_gss_client_max = CLIENT_MAX; + +SYSCTL_NODE(_kern, OID_AUTO, rpc, CTLFLAG_RW, 0, "RPC"); +SYSCTL_NODE(_kern_rpc, OID_AUTO, gss, CTLFLAG_RW, 0, "GSS"); + +SYSCTL_UINT(_kern_rpc_gss, OID_AUTO, client_max, CTLFLAG_RW, + &svc_rpc_gss_client_max, 0, + "Max number of rpc-gss clients"); + +static u_int svc_rpc_gss_client_count; +SYSCTL_UINT(_kern_rpc_gss, OID_AUTO, client_count, CTLFLAG_RD, + &svc_rpc_gss_client_count, 0, + "Number of rpc-gss clients"); + struct svc_rpc_gss_client_list svc_rpc_gss_client_hash[CLIENT_HASH_SIZE]; struct svc_rpc_gss_client_list svc_rpc_gss_clients; -static size_t svc_rpc_gss_client_count; static uint32_t svc_rpc_gss_next_clientid = 1; static void @@ -669,7 +682,7 @@ svc_rpc_gss_timeout_clients(void) */ sx_xlock(&svc_rpc_gss_lock); client = TAILQ_LAST(&svc_rpc_gss_clients, svc_rpc_gss_client_list); - while (svc_rpc_gss_client_count > CLIENT_MAX && client != NULL) { + while (svc_rpc_gss_client_count > svc_rpc_gss_client_max && client != NULL) { svc_rpc_gss_forget_client_locked(client); sx_xunlock(&svc_rpc_gss_lock); svc_rpc_gss_release_client(client); From owner-svn-src-all@freebsd.org Sat Dec 15 11:36:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECE971343352; Sat, 15 Dec 2018 11:36:20 +0000 (UTC) (envelope-from trasz@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) server-signature RSA-PSS (4096 bits) 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 89C346C6CC; Sat, 15 Dec 2018 11:36:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B5CDEF62; Sat, 15 Dec 2018 11:36:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFBaKO6058237; Sat, 15 Dec 2018 11:36:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFBaKV3058236; Sat, 15 Dec 2018 11:36:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201812151136.wBFBaKV3058236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 15 Dec 2018 11:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342115 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 342115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 89C346C6CC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 11:36:21 -0000 Author: trasz Date: Sat Dec 15 11:36:20 2018 New Revision: 342115 URL: https://svnweb.freebsd.org/changeset/base/342115 Log: Make fsck(8) use pread(2). This cuts the number of syscalls by half. Reviewed by: kib, mckusick MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17586 Modified: head/sbin/fsck_ffs/fsutil.c Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Sat Dec 15 11:32:11 2018 (r342114) +++ head/sbin/fsck_ffs/fsutil.c Sat Dec 15 11:36:20 2018 (r342115) @@ -576,9 +576,7 @@ blread(int fd, char *buf, ufs2_daddr_t blk, long size) slowio_start(); totalreads++; diskreads++; - if (lseek(fd, offset, 0) < 0) - rwerror("SEEK BLK", blk); - else if (read(fd, buf, (int)size) == size) { + if (pread(fd, buf, (int)size, offset) == size) { if (bkgrdflag) slowio_end(); return (0); @@ -595,14 +593,11 @@ blread(int fd, char *buf, ufs2_daddr_t blk, long size) } else rwerror("READ BLK", blk); - if (lseek(fd, offset, 0) < 0) - rwerror("SEEK BLK", blk); errs = 0; memset(buf, 0, (size_t)size); printf("THE FOLLOWING DISK SECTORS COULD NOT BE READ:"); for (cp = buf, i = 0; i < size; i += secsize, cp += secsize) { - if (read(fd, cp, (int)secsize) != secsize) { - (void)lseek(fd, offset + i + secsize, 0); + if (pread(fd, cp, (int)secsize, offset + i) != secsize) { if (secsize != dev_bsize && dev_bsize != 1) printf(" %jd (%jd),", (intmax_t)(blk * dev_bsize + i) / secsize, @@ -629,22 +624,16 @@ blwrite(int fd, char *buf, ufs2_daddr_t blk, ssize_t s return; offset = blk; offset *= dev_bsize; - if (lseek(fd, offset, 0) < 0) - rwerror("SEEK BLK", blk); - else if (write(fd, buf, size) == size) { + if (pwrite(fd, buf, size, offset) == size) { fsmodified = 1; return; } resolved = 0; rwerror("WRITE BLK", blk); - if (lseek(fd, offset, 0) < 0) - rwerror("SEEK BLK", blk); printf("THE FOLLOWING SECTORS COULD NOT BE WRITTEN:"); for (cp = buf, i = 0; i < size; i += dev_bsize, cp += dev_bsize) - if (write(fd, cp, dev_bsize) != dev_bsize) { - (void)lseek(fd, offset + i + dev_bsize, 0); + if (pwrite(fd, cp, dev_bsize, offset + i) != dev_bsize) printf(" %jd,", (intmax_t)blk + i / dev_bsize); - } printf("\n"); return; } From owner-svn-src-all@freebsd.org Sat Dec 15 13:52:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B99341315A3E; Sat, 15 Dec 2018 13:52:37 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 414B471212; Sat, 15 Dec 2018 13:52:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C921187FF; Sat, 15 Dec 2018 13:52:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFDqWcR031311; Sat, 15 Dec 2018 13:52:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFDqW4W031310; Sat, 15 Dec 2018 13:52:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151352.wBFDqW4W031310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 13:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342122 - vendor/lldb/lldb-release_701-r349250 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_701-r349250 X-SVN-Commit-Revision: 342122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 414B471212 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-0.88)[-0.884,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 13:52:37 -0000 Author: dim Date: Sat Dec 15 13:52:32 2018 New Revision: 342122 URL: https://svnweb.freebsd.org/changeset/base/342122 Log: Tag lldb 7.0.1 release r349250. Added: vendor/lldb/lldb-release_701-r349250/ - copied from r342121, vendor/lldb/dist-release_70/ From owner-svn-src-all@freebsd.org Sat Dec 15 13:52:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 215D213159F8; Sat, 15 Dec 2018 13:52:20 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 36B647107A; Sat, 15 Dec 2018 13:52:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A21D5187E1; Sat, 15 Dec 2018 13:52:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFDqCUQ031072; Sat, 15 Dec 2018 13:52:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFDqC5Z031071; Sat, 15 Dec 2018 13:52:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151352.wBFDqC5Z031071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 13:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342117 - vendor/clang/dist-release_70/lib/Basic X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/dist-release_70/lib/Basic X-SVN-Commit-Revision: 342117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36B647107A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 13:52:20 -0000 Author: dim Date: Sat Dec 15 13:52:12 2018 New Revision: 342117 URL: https://svnweb.freebsd.org/changeset/base/342117 Log: Vendor import of clang 7.0.1 release r349250: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_701/final@349250 Modified: vendor/clang/dist-release_70/lib/Basic/Version.cpp Modified: vendor/clang/dist-release_70/lib/Basic/Version.cpp ============================================================================== --- vendor/clang/dist-release_70/lib/Basic/Version.cpp Sat Dec 15 13:52:04 2018 (r342116) +++ vendor/clang/dist-release_70/lib/Basic/Version.cpp Sat Dec 15 13:52:12 2018 (r342117) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_70/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_701/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); From owner-svn-src-all@freebsd.org Sat Dec 15 13:52:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 168261315A24; Sat, 15 Dec 2018 13:52:26 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 32A1A7110B; Sat, 15 Dec 2018 13:52:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90041187F4; Sat, 15 Dec 2018 13:52:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFDqOR8031216; Sat, 15 Dec 2018 13:52:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFDqOIr031215; Sat, 15 Dec 2018 13:52:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151352.wBFDqOIr031215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 13:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342120 - vendor/libc++/libc++-release_701-r349250 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_701-r349250 X-SVN-Commit-Revision: 342120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 32A1A7110B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-0.88)[-0.884,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 13:52:26 -0000 Author: dim Date: Sat Dec 15 13:52:24 2018 New Revision: 342120 URL: https://svnweb.freebsd.org/changeset/base/342120 Log: Tag libc++ 7.0.1 release r349250. Added: vendor/libc++/libc++-release_701-r349250/ - copied from r342119, vendor/libc++/dist-release_70/ From owner-svn-src-all@freebsd.org Sat Dec 15 13:52:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7850B1315A05; Sat, 15 Dec 2018 13:52:20 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 CAEB97109D; Sat, 15 Dec 2018 13:52:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9823D187ED; Sat, 15 Dec 2018 13:52:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFDqJdo031167; Sat, 15 Dec 2018 13:52:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFDqJNP031166; Sat, 15 Dec 2018 13:52:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151352.wBFDqJNP031166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 13:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342119 - vendor/compiler-rt/compiler-rt-release_701-r349250 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_701-r349250 X-SVN-Commit-Revision: 342119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CAEB97109D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-0.88)[-0.884,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 13:52:20 -0000 Author: dim Date: Sat Dec 15 13:52:19 2018 New Revision: 342119 URL: https://svnweb.freebsd.org/changeset/base/342119 Log: Tag compiler-rt 7.0.1 release r349250. Added: vendor/compiler-rt/compiler-rt-release_701-r349250/ - copied from r342118, vendor/compiler-rt/dist-release_70/ From owner-svn-src-all@freebsd.org Sat Dec 15 13:52:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1163E13159E8; Sat, 15 Dec 2018 13:52:05 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 ABD1C70F87; Sat, 15 Dec 2018 13:52:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82F19187D2; Sat, 15 Dec 2018 13:52:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFDq4je030692; Sat, 15 Dec 2018 13:52:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFDq4tn030673; Sat, 15 Dec 2018 13:52:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151352.wBFDq4tn030673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 13:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342116 - vendor/llvm/llvm-release_701-r349250 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_701-r349250 X-SVN-Commit-Revision: 342116 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ABD1C70F87 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-0.88)[-0.884,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 13:52:05 -0000 Author: dim Date: Sat Dec 15 13:52:04 2018 New Revision: 342116 URL: https://svnweb.freebsd.org/changeset/base/342116 Log: Tag llvm 7.0.1 release r349250. Added: vendor/llvm/llvm-release_701-r349250/ - copied from r342115, vendor/llvm/dist-release_70/ From owner-svn-src-all@freebsd.org Sat Dec 15 13:52:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4376513159F9; Sat, 15 Dec 2018 13:52:20 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 3E6407108F; Sat, 15 Dec 2018 13:52:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 863C0187E5; Sat, 15 Dec 2018 13:52:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFDqFID031118; Sat, 15 Dec 2018 13:52:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFDqFVc031117; Sat, 15 Dec 2018 13:52:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151352.wBFDqFVc031117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 13:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342118 - vendor/clang/clang-release_701-r349250 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_701-r349250 X-SVN-Commit-Revision: 342118 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E6407108F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-0.88)[-0.884,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 13:52:20 -0000 Author: dim Date: Sat Dec 15 13:52:15 2018 New Revision: 342118 URL: https://svnweb.freebsd.org/changeset/base/342118 Log: Tag clang 7.0.1 release r349250. Added: vendor/clang/clang-release_701-r349250/ - copied from r342117, vendor/clang/dist-release_70/ From owner-svn-src-all@freebsd.org Sat Dec 15 13:52:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E071315A39; Sat, 15 Dec 2018 13:52:31 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 7AE6E71195; Sat, 15 Dec 2018 13:52:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00D0D187FA; Sat, 15 Dec 2018 13:52:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFDqR6D031262; Sat, 15 Dec 2018 13:52:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFDqRM9031261; Sat, 15 Dec 2018 13:52:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151352.wBFDqRM9031261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 13:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r342121 - vendor/lld/lld-release_701-r349250 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_701-r349250 X-SVN-Commit-Revision: 342121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7AE6E71195 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-0.88)[-0.884,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 13:52:32 -0000 Author: dim Date: Sat Dec 15 13:52:27 2018 New Revision: 342121 URL: https://svnweb.freebsd.org/changeset/base/342121 Log: Tag lld 7.0.1 release r349250. Added: vendor/lld/lld-release_701-r349250/ - copied from r342120, vendor/lld/dist-release_70/ From owner-svn-src-all@freebsd.org Sat Dec 15 14:08:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B6641316371; Sat, 15 Dec 2018 14:08:43 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) 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 F199171EA0; Sat, 15 Dec 2018 14:08:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1A6A189AF; Sat, 15 Dec 2018 14:08:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFE8gk4036809; Sat, 15 Dec 2018 14:08:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFE8fHO036805; Sat, 15 Dec 2018 14:08:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812151408.wBFE8fHO036805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Dec 2018 14:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342123 - in head: contrib/llvm/tools/clang/lib/Basic lib/clang/include/clang/Basic lib/clang/include/lld/Common lib/clang/include/llvm/Support X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/tools/clang/lib/Basic lib/clang/include/clang/Basic lib/clang/include/lld/Common lib/clang/include/llvm/Support X-SVN-Commit-Revision: 342123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F199171EA0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; NEURAL_HAM_LONG(-0.88)[-0.881,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 14:08:43 -0000 Author: dim Date: Sat Dec 15 14:08:41 2018 New Revision: 342123 URL: https://svnweb.freebsd.org/changeset/base/342123 Log: Update clang, llvm, lld, lldb, compiler-rt and libc++ version number to 7.0.1 release r349250. There were no functional changes since the 7.0.1 rc3 import. PR: 230240, 230355 Relnotes: yes MFC after: 2 months X-MFC-With: r341825 Modified: head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/tools/clang/lib/Basic/Version.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sat Dec 15 13:52:32 2018 (r342122) +++ head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sat Dec 15 14:08:41 2018 (r342123) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_70/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_701/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Sat Dec 15 13:52:32 2018 (r342122) +++ head/lib/clang/include/clang/Basic/Version.inc Sat Dec 15 14:08:41 2018 (r342123) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "348686" +#define SVN_REVISION "349250" Modified: head/lib/clang/include/lld/Common/Version.inc ============================================================================== --- head/lib/clang/include/lld/Common/Version.inc Sat Dec 15 13:52:32 2018 (r342122) +++ head/lib/clang/include/lld/Common/Version.inc Sat Dec 15 14:08:41 2018 (r342123) @@ -7,4 +7,4 @@ #define LLD_REPOSITORY_STRING "FreeBSD" // - -#define LLD_REVISION_STRING "348686-1300001" +#define LLD_REVISION_STRING "349250-1300001" Modified: head/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- head/lib/clang/include/llvm/Support/VCSRevision.h Sat Dec 15 13:52:32 2018 (r342122) +++ head/lib/clang/include/llvm/Support/VCSRevision.h Sat Dec 15 14:08:41 2018 (r342123) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "svn-r348686" +#define LLVM_REVISION "svn-r349250" From owner-svn-src-all@freebsd.org Sat Dec 15 14:58:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D653C1321FF2; Sat, 15 Dec 2018 14:58:46 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) 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 79AB573BAF; Sat, 15 Dec 2018 14:58:46 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6650B19221; Sat, 15 Dec 2018 14:58:46 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFEwk9U063952; Sat, 15 Dec 2018 14:58:46 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFEwkbG063950; Sat, 15 Dec 2018 14:58:46 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201812151458.wBFEwkbG063950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 15 Dec 2018 14:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342124 - in head/sys/dev: rtwn/usb usb X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev: rtwn/usb usb X-SVN-Commit-Revision: 342124 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 79AB573BAF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 14:58:47 -0000 Author: avos Date: Sat Dec 15 14:58:45 2018 New Revision: 342124 URL: https://svnweb.freebsd.org/changeset/base/342124 Log: Add new USB id in rtwn_usb(4) (RTL8812AU) PR: 234029 Submitted by: MFC after: 4 days Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sat Dec 15 14:08:41 2018 (r342123) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sat Dec 15 14:58:45 2018 (r342124) @@ -140,6 +140,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8812AU_DEV(SITECOMEU, WLA7100), RTWN_RTL8812AU_DEV(TPLINK, T4U), RTWN_RTL8812AU_DEV(TPLINK, T4UV2), + RTWN_RTL8812AU_DEV(TPLINK, T4UHV1), RTWN_RTL8812AU_DEV(TPLINK, T4UHV2), RTWN_RTL8812AU_DEV(TRENDNET, TEW805UB), RTWN_RTL8812AU_DEV(ZYXEL, NWD6605), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Dec 15 14:08:41 2018 (r342123) +++ head/sys/dev/usb/usbdevs Sat Dec 15 14:58:45 2018 (r342124) @@ -4614,6 +4614,7 @@ product TPLINK WN822NV4 0x0108 TL-WN822N v4 product TPLINK WN823NV2 0x0109 TL-WN823N v2 product TPLINK WN722N 0x010c TL-WN722N product TPLINK T4UV2 0x010d Archer T4U ver 2 +product TPLINK T4UHV1 0x0103 Archer T4UH ver 1 product TPLINK T4UHV2 0x010e Archer T4UH ver 2 product TPLINK RTL8153 0x0601 RTL8153 USB 10/100/1000 LAN From owner-svn-src-all@freebsd.org Sat Dec 15 15:06:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 543CC1322621; Sat, 15 Dec 2018 15:06:25 +0000 (UTC) (envelope-from brooks@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) server-signature RSA-PSS (4096 bits) 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 D8DE274859; Sat, 15 Dec 2018 15:06:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4D2A193CE; Sat, 15 Dec 2018 15:06:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFF6OeT069244; Sat, 15 Dec 2018 15:06:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFF6NNb069236; Sat, 15 Dec 2018 15:06:23 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201812151506.wBFF6NNb069236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sat, 15 Dec 2018 15:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342125 - in head/sys/netinet: . cc X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys/netinet: . cc X-SVN-Commit-Revision: 342125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8DE274859 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_LONG(-0.88)[-0.878,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 15:06:25 -0000 Author: brooks Date: Sat Dec 15 15:06:22 2018 New Revision: 342125 URL: https://svnweb.freebsd.org/changeset/base/342125 Log: Fix bugs in plugable CC algorithm and siftr sysctls. Use the sysctl_handle_int() handler to write out the old value and read the new value into a temporary variable. Use the temporary variable for any checks of values rather than using the CAST_PTR_INT() macro on req->newptr. The prior usage read directly from userspace memory if the sysctl() was called correctly. This is unsafe and doesn't work at all on some architectures (at least i386.) In some cases, the code could also be tricked into reading from kernel memory and leaking limited information about the contents or crashing the system. This was true for CDG, newreno, and siftr on all platforms and true for i386 in all cases. The impact of this bug is largest in VIMAGE jails which have been configured to allow writing to these sysctls. Per discussion with the security officer, we will not be issuing an advisory for this issue as root access and a non-default config are required to be impacted. Reviewed by: markj, bz Discussed with: gordon (security officer) MFC after: 3 days Security: kernel information leak, local DoS (both require root) Differential Revision: https://reviews.freebsd.org/D18443 Modified: head/sys/netinet/cc/cc_cdg.c head/sys/netinet/cc/cc_chd.c head/sys/netinet/cc/cc_dctcp.c head/sys/netinet/cc/cc_hd.c head/sys/netinet/cc/cc_newreno.c head/sys/netinet/cc/cc_vegas.c head/sys/netinet/siftr.c Modified: head/sys/netinet/cc/cc_cdg.c ============================================================================== --- head/sys/netinet/cc/cc_cdg.c Sat Dec 15 14:58:45 2018 (r342124) +++ head/sys/netinet/cc/cc_cdg.c Sat Dec 15 15:06:22 2018 (r342125) @@ -80,8 +80,6 @@ __FBSDID("$FreeBSD$"); #define CDG_VERSION "0.1" -#define CAST_PTR_INT(X) (*((int*)(X))) - /* Private delay-gradient induced congestion control signal. */ #define CC_CDG_DELAY 0x01000000 @@ -358,22 +356,37 @@ cdg_cb_destroy(struct cc_var *ccv) static int cdg_beta_handler(SYSCTL_HANDLER_ARGS) { + int error; + uint32_t new; - if (req->newptr != NULL && - (CAST_PTR_INT(req->newptr) == 0 || CAST_PTR_INT(req->newptr) > 100)) - return (EINVAL); + new = *(uint32_t *)arg1; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (new == 0 || new > 100) + error = EINVAL; + else + *(uint32_t *)arg1 = new; + } - return (sysctl_handle_int(oidp, arg1, arg2, req)); + return (error); } static int cdg_exp_backoff_scale_handler(SYSCTL_HANDLER_ARGS) { + int error; + uint32_t new; - if (req->newptr != NULL && CAST_PTR_INT(req->newptr) < 1) - return (EINVAL); + new = *(uint32_t *)arg1; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (new < 1) + error = EINVAL; + else + *(uint32_t *)arg1 = new; + } - return (sysctl_handle_int(oidp, arg1, arg2, req)); + return (error); } static inline uint32_t Modified: head/sys/netinet/cc/cc_chd.c ============================================================================== --- head/sys/netinet/cc/cc_chd.c Sat Dec 15 14:58:45 2018 (r342124) +++ head/sys/netinet/cc/cc_chd.c Sat Dec 15 15:06:22 2018 (r342125) @@ -78,8 +78,6 @@ __FBSDID("$FreeBSD$"); #include -#define CAST_PTR_INT(X) (*((int*)(X))) - /* * Private signal type for rate based congestion signal. * See for appropriate bit-range to use for private signals. @@ -421,7 +419,7 @@ chd_loss_fair_handler(SYSCTL_HANDLER_ARGS) new = V_chd_loss_fair; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) > 1) + if (new > 1) error = EINVAL; else V_chd_loss_fair = new; @@ -439,8 +437,7 @@ chd_pmax_handler(SYSCTL_HANDLER_ARGS) new = V_chd_pmax; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) == 0 || - CAST_PTR_INT(req->newptr) > 100) + if (new == 0 || new > 100) error = EINVAL; else V_chd_pmax = new; @@ -458,7 +455,7 @@ chd_qthresh_handler(SYSCTL_HANDLER_ARGS) new = V_chd_qthresh; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) <= V_chd_qmin) + if (new <= V_chd_qmin) error = EINVAL; else V_chd_qthresh = new; Modified: head/sys/netinet/cc/cc_dctcp.c ============================================================================== --- head/sys/netinet/cc/cc_dctcp.c Sat Dec 15 14:58:45 2018 (r342124) +++ head/sys/netinet/cc/cc_dctcp.c Sat Dec 15 15:06:22 2018 (r342125) @@ -56,8 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define CAST_PTR_INT(X) (*((int*)(X))) - #define MAX_ALPHA_VALUE 1024 VNET_DEFINE_STATIC(uint32_t, dctcp_alpha) = 0; #define V_dctcp_alpha VNET(dctcp_alpha) @@ -400,7 +398,7 @@ dctcp_alpha_handler(SYSCTL_HANDLER_ARGS) new = V_dctcp_alpha; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) > 1) + if (new > 1) error = EINVAL; else { if (new > MAX_ALPHA_VALUE) @@ -422,7 +420,7 @@ dctcp_shift_g_handler(SYSCTL_HANDLER_ARGS) new = V_dctcp_shift_g; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) > 1) + if (new > 1) error = EINVAL; else V_dctcp_shift_g = new; @@ -440,7 +438,7 @@ dctcp_slowstart_handler(SYSCTL_HANDLER_ARGS) new = V_dctcp_slowstart; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) > 1) + if (new > 1) error = EINVAL; else V_dctcp_slowstart = new; Modified: head/sys/netinet/cc/cc_hd.c ============================================================================== --- head/sys/netinet/cc/cc_hd.c Sat Dec 15 14:58:45 2018 (r342124) +++ head/sys/netinet/cc/cc_hd.c Sat Dec 15 15:06:22 2018 (r342125) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include -#define CAST_PTR_INT(X) (*((int*)(X))) - /* Largest possible number returned by random(). */ #define RANDOM_MAX INT_MAX @@ -188,8 +186,7 @@ hd_pmax_handler(SYSCTL_HANDLER_ARGS) new = V_hd_pmax; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) == 0 || - CAST_PTR_INT(req->newptr) > 100) + if (new == 0 || new > 100) error = EINVAL; else V_hd_pmax = new; @@ -207,7 +204,7 @@ hd_qmin_handler(SYSCTL_HANDLER_ARGS) new = V_hd_qmin; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) > V_hd_qthresh) + if (new > V_hd_qthresh) error = EINVAL; else V_hd_qmin = new; @@ -225,8 +222,7 @@ hd_qthresh_handler(SYSCTL_HANDLER_ARGS) new = V_hd_qthresh; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) < 1 || - CAST_PTR_INT(req->newptr) < V_hd_qmin) + if (new == 0 || new < V_hd_qmin) error = EINVAL; else V_hd_qthresh = new; Modified: head/sys/netinet/cc/cc_newreno.c ============================================================================== --- head/sys/netinet/cc/cc_newreno.c Sat Dec 15 14:58:45 2018 (r342124) +++ head/sys/netinet/cc/cc_newreno.c Sat Dec 15 15:06:22 2018 (r342125) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_NEWRENO, "newreno data", "newreno beta values"); -#define CAST_PTR_INT(X) (*((int*)(X))) - static void newreno_cb_destroy(struct cc_var *ccv); static void newreno_ack_received(struct cc_var *ccv, uint16_t type); static void newreno_after_idle(struct cc_var *ccv); @@ -364,15 +362,21 @@ newreno_ctl_output(struct cc_var *ccv, struct sockopt static int newreno_beta_handler(SYSCTL_HANDLER_ARGS) { + int error; + uint32_t new; - if (req->newptr != NULL ) { + new = *(uint32_t *)arg1; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL ) { if (arg1 == &VNET_NAME(newreno_beta_ecn) && !V_cc_do_abe) - return (EACCES); - if (CAST_PTR_INT(req->newptr) <= 0 || CAST_PTR_INT(req->newptr) > 100) - return (EINVAL); + error = EACCES; + else if (new == 0 || new > 100) + error = EINVAL; + else + *(uint32_t *)arg1 = new; } - return (sysctl_handle_int(oidp, arg1, arg2, req)); + return (error); } SYSCTL_DECL(_net_inet_tcp_cc_newreno); Modified: head/sys/netinet/cc/cc_vegas.c ============================================================================== --- head/sys/netinet/cc/cc_vegas.c Sat Dec 15 14:58:45 2018 (r342124) +++ head/sys/netinet/cc/cc_vegas.c Sat Dec 15 15:06:22 2018 (r342125) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include -#define CAST_PTR_INT(X) (*((int*)(X))) - /* * Private signal type for rate based congestion signal. * See for appropriate bit-range to use for private signals. @@ -260,8 +258,7 @@ vegas_alpha_handler(SYSCTL_HANDLER_ARGS) new = V_vegas_alpha; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) < 1 || - CAST_PTR_INT(req->newptr) > V_vegas_beta) + if (new == 0 || new > V_vegas_beta) error = EINVAL; else V_vegas_alpha = new; @@ -279,8 +276,7 @@ vegas_beta_handler(SYSCTL_HANDLER_ARGS) new = V_vegas_beta; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr != NULL) { - if (CAST_PTR_INT(req->newptr) < 1 || - CAST_PTR_INT(req->newptr) < V_vegas_alpha) + if (new == 0 || new < V_vegas_alpha) error = EINVAL; else V_vegas_beta = new; Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sat Dec 15 14:58:45 2018 (r342124) +++ head/sys/netinet/siftr.c Sat Dec 15 15:06:22 2018 (r342125) @@ -152,8 +152,6 @@ __FBSDID("$FreeBSD$"); #endif /* useful macros */ -#define CAST_PTR_INT(X) (*((int*)(X))) - #define UPPER_SHORT(X) (((X) & 0xFFFF0000) >> 16) #define LOWER_SHORT(X) ((X) & 0x0000FFFF) @@ -1442,22 +1440,22 @@ siftr_manage_ops(uint8_t action) static int siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS) { - if (req->newptr == NULL) - goto skip; + int error; + uint32_t new; - /* If the value passed in isn't 0 or 1, return an error. */ - if (CAST_PTR_INT(req->newptr) != 0 && CAST_PTR_INT(req->newptr) != 1) - return (1); - - /* If we are changing state (0 to 1 or 1 to 0). */ - if (CAST_PTR_INT(req->newptr) != siftr_enabled ) - if (siftr_manage_ops(CAST_PTR_INT(req->newptr))) { - siftr_manage_ops(SIFTR_DISABLE); - return (1); + new = siftr_enabled; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error != 0 && req->newptr != NULL) { + if (new > 1) + return (EINVAL); + else if (new != siftr_enabled) { + error = siftr_manage_ops(new); + if (error != 0) + siftr_manage_ops(SIFTR_DISABLE); } + } -skip: - return (sysctl_handle_int(oidp, arg1, arg2, req)); + return (error); } From owner-svn-src-all@freebsd.org Sat Dec 15 16:53:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CDA91325D5B; Sat, 15 Dec 2018 16:53:17 +0000 (UTC) (envelope-from se@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) server-signature RSA-PSS (4096 bits) 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 01A0677D89; Sat, 15 Dec 2018 16:53:17 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCE841A691; Sat, 15 Dec 2018 16:53:16 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFGrG0D028450; Sat, 15 Dec 2018 16:53:16 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFGrGcR028447; Sat, 15 Dec 2018 16:53:16 GMT (envelope-from se@FreeBSD.org) Message-Id: <201812151653.wBFGrGcR028447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 15 Dec 2018 16:53:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342126 - in head: share/man/man5 tools/build/mk tools/build/options usr.sbin usr.sbin/ctm X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: share/man/man5 tools/build/mk tools/build/options usr.sbin usr.sbin/ctm X-SVN-Commit-Revision: 342126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01A0677D89 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 16:53:17 -0000 Author: se Date: Sat Dec 15 16:53:15 2018 New Revision: 342126 URL: https://svnweb.freebsd.org/changeset/base/342126 Log: Remove CTM from 13-CURRENT after the release of FreeBSD-12.0. The removal (and creation of a port) has been pre-announced in UPDATING 1 month ago. Packages are available for all supported FreeBSD vesions. I did not think that another entry in UPDATING is required to note the actual removal. No MFC is planned - CTM shall be kept in base for all releases up to 12.x. Reviewed by: rgrimes Approved by: imp, bcr (manpages) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D17935 Deleted: head/tools/build/options/WITHOUT_CTM head/usr.sbin/ctm/ Modified: head/share/man/man5/src.conf.5 head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Dec 15 15:06:22 2018 (r342125) +++ head/share/man/man5/src.conf.5 Sat Dec 15 16:53:15 2018 (r342126) @@ -479,10 +479,6 @@ is set explicitly) Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. -.It Va WITHOUT_CTM -Set to not build -.Xr ctm 1 -and related utilities. .It Va WITHOUT_CUSE Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXGBETOOL Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 15:06:22 2018 (r342125) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 16:53:15 2018 (r342126) @@ -1551,18 +1551,6 @@ OLD_FILES+=usr/bin/cpp OLD_FILES+=usr/share/man/man1/cpp.1.gz .endif -.if ${MK_CTM} == no -OLD_FILES+=usr/sbin/ctm -OLD_FILES+=usr/sbin/ctm_dequeue -OLD_FILES+=usr/sbin/ctm_rmail -OLD_FILES+=usr/sbin/ctm_smail -OLD_FILES+=usr/share/man/man1/ctm.1.gz -OLD_FILES+=usr/share/man/man1/ctm_dequeue.1.gz -OLD_FILES+=usr/share/man/man1/ctm_rmail.1.gz -OLD_FILES+=usr/share/man/man1/ctm_smail.1.gz -OLD_FILES+=usr/share/man/man5/ctm.5.gz -.endif - .if ${MK_CUSE} == no OLD_FILES+=usr/include/fs/cuse/cuse_defs.h OLD_FILES+=usr/include/fs/cuse/cuse_ioctl.h Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sat Dec 15 15:06:22 2018 (r342125) +++ head/usr.sbin/Makefile Sat Dec 15 16:53:15 2018 (r342126) @@ -123,7 +123,6 @@ SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd -SUBDIR.${MK_CTM}+= ctm SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_EFI}+= efivar efidp efibootmgr From owner-svn-src-all@freebsd.org Sat Dec 15 16:58:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD3AB1325E7A for ; Sat, 15 Dec 2018 16:58:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CF2980021 for ; Sat, 15 Dec 2018 16:58:36 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1544893107; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=lRQsFsNTCqx7zYPHrQS9KTR/zMgb6B/RXii9J/ddxtJ/bKW5Dor1A0jNplphRyg3ja6eJRKW18ajZ urgAGjWxFenvNqvF7ixQaHoInHC6rZL0cczAAuklRJjg9W2DAH5YoeC19ms496M//xlbjLbqVOBFma HQmdubfaqJQWjI7X6Fhsc+olVC8mgsRBcfvq6vB8zsx8ZWs2RIXybYgj+pMacDrVxPLxC7vqEOiVBR EBWW0VwaQNPNjYJY5nICr355dyUApAjzB880y7plK+k2Qug32iE+gBawIVmeLk4Kt8XWpJG/wDdf0Y TIUrHgAx9YT9g3DQ/3mjQ36vcrOaggw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=JRNAgPYa1jyxeU3BTKBoxj0bNn5b19XtUvRZ1MMTExY=; b=Vid1YeyystpPfTDIVkLDHOBVGuW2O8k9xu+pt/O5xjseOzWkYab22u/8SWl05D+YxfrhYzav+w80o b/F1P1tc1MpV48fXuTQRQpPDozSlKHnI81870ifC9bBF2aWE2tGtl5hiWArtTYgu9KUyEFXKf1GzLr tElJN+aquoT9OcBKa//Pn3Nvp28/T4EIg6ejBlLOvT/+K1pJn0Ph8UQNGrLGD63RkVOjY5NSmVqUSs GgJXkp8q3fpihq7awRK9owedj7423Qen0mR33agI6w+lzvjvBVqzbPBSFk/d/wm8Qh+/aokpegefZG kp8mSn6M8Vz7Z/Ugl9N1/0nWHqugvdw== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=JRNAgPYa1jyxeU3BTKBoxj0bNn5b19XtUvRZ1MMTExY=; b=lgQcbIcebrgx42bfO+GBHDgrLjbv04Id+uO/k2aRoUuaevOCyRkThep07ntOh99bY/yL9E10Ag46u fO+ukoEkHt4HLUJ2uTX8ulOF3CTdEuXzQOEJDB0/8e8VNPbqhf/vRgK1ERUUFQrjULuTbwzVTsQN+L yvWOsBaOEtpf747TYSigZPAEdI+PwDocELnIBd3/d5MdWtGNNUI/w9GvXiF7zYSiVeGrHyI+eKsOEe 1DrLbaZA9uNkp9rp0Q9NlqRBtOVI0h4OcN8vakv4qzJ2r+WpF06jdrVU2rbdrZ0V55WnI/w6RSTSJL xfo4kC/V/QD9oZlQpl1+eCRhg9P5CMQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: a1940152-008a-11e9-8a28-a1efd8da9a94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id a1940152-008a-11e9-8a28-a1efd8da9a94; Sat, 15 Dec 2018 16:58:24 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id wBFGwM47087200; Sat, 15 Dec 2018 09:58:22 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1544893102.76088.70.camel@freebsd.org> Subject: Re: svn commit: r341794 - stable/11/etc/periodic/weekly From: Ian Lepore To: Eugene Grosbein , Andre Albsmeier Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Sat, 15 Dec 2018 09:58:22 -0700 In-Reply-To: References: <201812101424.wBAEOgbC053582@repo.freebsd.org> <20181215090926.GA33682@bali> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1CF2980021 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 16:58:36 -0000 On Sat, 2018-12-15 at 17:55 +0700, Eugene Grosbein wrote: > 15.12.2018 16:09, Andre Albsmeier wrote: > > > > > On Mon, 10-Dec-2018 at 14:24:42 +0000, Eugene Grosbein wrote: > > > > > > Author: eugen > > > Date: Mon Dec 10 14:24:41 2018 > > > New Revision: 341794 > > > URL: https://svnweb.freebsd.org/changeset/base/341794 > > > > > > Log: > > >   MFC r340322-r340324,r340327: periodic/etc/weekly/340.noid > > >    > > >   Prevent periodic/etc/weekly/340.noid from descending into root > > > directories > > >   of jails. Jails have their own user/group databases and this > > > script > > >   can produce multiple false warnings, not to mention significant > > > extra > > >   load in case of large jailed subtrees. Leave this check for > > > jailed > > >   invocations of the same script. > > This gave me: > > > > Check for files with an unknown user or group: > > .: cannot open /usr/share/bsdconfig/common.subr: No such file or > > directory > > > > on systems where bsdconfig is not installed. > This periodic script does not try to access > /usr/share/bsdconfig/common.subr > I think error message comes from another periodic script. > Can you please run it with "sh -x /etc/periodic/weekly/340.noid" to > make sure? > > It uses sysrc, which sources in /usr/share/bsdconfig/common.subr; this is the first reference to sysrc in any periodic script, so it does establish a new dependency, requiring sysrc to be installed on any system that runs periodic scripts. A safer way to extract the root path of all running jails might be something like:   if which -s jls; then       allpaths="$(jls -d path)"       for onepath in ${allpaths}; do            # do whatever with ${onepath} here       done   fi -- Ian From owner-svn-src-all@freebsd.org Sat Dec 15 17:01:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A64F1325FCB; Sat, 15 Dec 2018 17:01:18 +0000 (UTC) (envelope-from hiren@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) server-signature RSA-PSS (4096 bits) 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 A45C48034A; Sat, 15 Dec 2018 17:01:17 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95BED1A6EF; Sat, 15 Dec 2018 17:01:17 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFH1Hrf032000; Sat, 15 Dec 2018 17:01:17 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFH1HeT031998; Sat, 15 Dec 2018 17:01:17 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201812151701.wBFH1HeT031998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Sat, 15 Dec 2018 17:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342127 - head/sys/netinet/cc X-SVN-Group: head X-SVN-Commit-Author: hiren X-SVN-Commit-Paths: head/sys/netinet/cc X-SVN-Commit-Revision: 342127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A45C48034A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 17:01:18 -0000 Author: hiren Date: Sat Dec 15 17:01:16 2018 New Revision: 342127 URL: https://svnweb.freebsd.org/changeset/base/342127 Log: Revert r331567 CC Cubic: fix underflow for cubic_cwnd() This change is causing TCP connections using cubic to hang. Need to dig more to find exact cause and fix it. Reported by: tj at mrsk dot me, Matt Garber (via twitter) Discussed with: sbruno (previously), allanjude, cperciva MFC after: 3 days Modified: head/sys/netinet/cc/cc.h head/sys/netinet/cc/cc_cubic.c head/sys/netinet/cc/cc_cubic.h Modified: head/sys/netinet/cc/cc.h ============================================================================== --- head/sys/netinet/cc/cc.h Sat Dec 15 16:53:15 2018 (r342126) +++ head/sys/netinet/cc/cc.h Sat Dec 15 17:01:16 2018 (r342127) @@ -102,8 +102,6 @@ struct cc_var { #define CCF_ACKNOW 0x0008 /* Will this ack be sent now? */ #define CCF_IPHDR_CE 0x0010 /* Does this packet set CE bit? */ #define CCF_TCPHDR_CWR 0x0020 /* Does this packet set CWR bit? */ -#define CCF_MAX_CWND 0x0040 /* Have we reached maximum cwnd? */ -#define CCF_CHG_MAX_CWND 0x0080 /* Cubic max_cwnd changed, for K */ /* ACK types passed to the ack_received() hook. */ #define CC_ACK 0x0001 /* Regular in sequence ACK. */ Modified: head/sys/netinet/cc/cc_cubic.c ============================================================================== --- head/sys/netinet/cc/cc_cubic.c Sat Dec 15 16:53:15 2018 (r342126) +++ head/sys/netinet/cc/cc_cubic.c Sat Dec 15 17:01:16 2018 (r342127) @@ -88,8 +88,6 @@ struct cubic { unsigned long max_cwnd; /* cwnd at the previous congestion event. */ unsigned long prev_max_cwnd; - /* Cached value for t_maxseg when K was computed */ - uint32_t k_maxseg; /* Number of congestion events. */ uint32_t num_cong_events; /* Minimum observed rtt in ticks. */ @@ -126,9 +124,6 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) cubic_data = ccv->cc_data; cubic_record_rtt(ccv); - if (ccv->flags & CCF_MAX_CWND) - return; - /* * Regular ACK and we're not in cong/fast recovery and we're cwnd * limited and we're either not doing ABC or are slow starting or are @@ -156,12 +151,6 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) cubic_data->mean_rtt_ticks, cubic_data->max_cwnd, CCV(ccv, t_maxseg)); - if (ccv->flags & CCF_CHG_MAX_CWND || cubic_data->k_maxseg != CCV(ccv, t_maxseg)) { - cubic_data->K = cubic_k(cubic_data->max_cwnd / CCV(ccv, t_maxseg)); - cubic_data->k_maxseg = CCV(ccv, t_maxseg); - ccv->flags &= ~(CCF_MAX_CWND|CCF_CHG_MAX_CWND); - } - w_cubic_next = cubic_cwnd(ticks_since_cong + cubic_data->mean_rtt_ticks, cubic_data->max_cwnd, CCV(ccv, t_maxseg), cubic_data->K); @@ -173,18 +162,13 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) * TCP-friendly region, follow tf * cwnd growth. */ - CCV(ccv, snd_cwnd) = ulmin(w_tf, TCP_MAXWIN << CCV(ccv, snd_scale)); + CCV(ccv, snd_cwnd) = w_tf; else if (CCV(ccv, snd_cwnd) < w_cubic_next) { /* * Concave or convex region, follow CUBIC * cwnd growth. */ - if (w_cubic_next >= TCP_MAXWIN << CCV(ccv, snd_scale)) { - w_cubic_next = TCP_MAXWIN << CCV(ccv, snd_scale); - ccv->flags |= CCF_MAX_CWND; - } - w_cubic_next = ulmin(w_cubic_next, TCP_MAXWIN << CCV(ccv, snd_scale)); if (V_tcp_do_rfc3465) CCV(ccv, snd_cwnd) = w_cubic_next; else @@ -202,10 +186,8 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) * max_cwnd. */ if (cubic_data->num_cong_events == 0 && - cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) { + cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) cubic_data->max_cwnd = CCV(ccv, snd_cwnd); - ccv->flags |= CCF_CHG_MAX_CWND; - } } } } @@ -254,7 +236,6 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) cubic_data->num_cong_events++; cubic_data->prev_max_cwnd = cubic_data->max_cwnd; cubic_data->max_cwnd = CCV(ccv, snd_cwnd); - ccv->flags |= CCF_CHG_MAX_CWND; } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -267,8 +248,6 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) cubic_data->prev_max_cwnd = cubic_data->max_cwnd; cubic_data->max_cwnd = CCV(ccv, snd_cwnd); cubic_data->t_last_cong = ticks; - ccv->flags |= CCF_CHG_MAX_CWND; - ccv->flags &= ~CCF_MAX_CWND; CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } @@ -285,7 +264,6 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) if (CCV(ccv, t_rxtshift) >= 2) { cubic_data->num_cong_events++; cubic_data->t_last_cong = ticks; - ccv->flags &= ~CCF_MAX_CWND; } break; } @@ -304,7 +282,6 @@ cubic_conn_init(struct cc_var *ccv) * get used. */ cubic_data->max_cwnd = CCV(ccv, snd_cwnd); - ccv->flags |= CCF_CHG_MAX_CWND; } static int @@ -329,11 +306,9 @@ cubic_post_recovery(struct cc_var *ccv) pipe = 0; /* Fast convergence heuristic. */ - if (cubic_data->max_cwnd < cubic_data->prev_max_cwnd) { + if (cubic_data->max_cwnd < cubic_data->prev_max_cwnd) cubic_data->max_cwnd = (cubic_data->max_cwnd * CUBIC_FC_FACTOR) >> CUBIC_SHIFT; - ccv->flags |= CCF_CHG_MAX_CWND; - } if (IN_FASTRECOVERY(CCV(ccv, t_flags))) { /* @@ -356,7 +331,6 @@ cubic_post_recovery(struct cc_var *ccv) cubic_data->max_cwnd) >> CUBIC_SHIFT)); } cubic_data->t_last_cong = ticks; - ccv->flags &= ~CCF_MAX_CWND; /* Calculate the average RTT between congestion epochs. */ if (cubic_data->epoch_ack_count > 0 && @@ -367,6 +341,7 @@ cubic_post_recovery(struct cc_var *ccv) cubic_data->epoch_ack_count = 0; cubic_data->sum_rtt_ticks = 0; + cubic_data->K = cubic_k(cubic_data->max_cwnd / CCV(ccv, t_maxseg)); } /* Modified: head/sys/netinet/cc/cc_cubic.h ============================================================================== --- head/sys/netinet/cc/cc_cubic.h Sat Dec 15 16:53:15 2018 (r342126) +++ head/sys/netinet/cc/cc_cubic.h Sat Dec 15 17:01:16 2018 (r342127) @@ -41,8 +41,6 @@ #ifndef _NETINET_CC_CUBIC_H_ #define _NETINET_CC_CUBIC_H_ -#include - /* Number of bits of precision for fixed point math calcs. */ #define CUBIC_SHIFT 8 @@ -163,6 +161,8 @@ cubic_k(unsigned long wmax_pkts) /* * Compute the new cwnd value using an implementation of eqn 1 from the I-D. * Thanks to Kip Macy for help debugging this function. + * + * XXXLAS: Characterise bounds for overflow. */ static __inline unsigned long cubic_cwnd(int ticks_since_cong, unsigned long wmax, uint32_t smss, int64_t K) @@ -174,15 +174,6 @@ cubic_cwnd(int ticks_since_cong, unsigned long wmax, u /* t - K, with CUBIC_SHIFT worth of precision. */ cwnd = ((int64_t)(ticks_since_cong << CUBIC_SHIFT) - (K * hz)) / hz; - /* moved this calculation up because it cannot overflow or underflow */ - cwnd *= CUBIC_C_FACTOR * smss; - - if (cwnd > 2097151) /* 2^21 cubed is long max */ - return INT_MAX; - - if (cwnd < -2097152) /* -2^21 cubed is long min */ - return smss; - /* (t - K)^3, with CUBIC_SHIFT^3 worth of precision. */ cwnd *= (cwnd * cwnd); @@ -191,17 +182,8 @@ cubic_cwnd(int ticks_since_cong, unsigned long wmax, u * The down shift by CUBIC_SHIFT_4 is because cwnd has 4 lots of * CUBIC_SHIFT included in the value. 3 from the cubing of cwnd above, * and an extra from multiplying through by CUBIC_C_FACTOR. - * - * The original formula was this: - * cwnd = ((cwnd * CUBIC_C_FACTOR * smss) >> CUBIC_SHIFT_4) + wmax; - * - * CUBIC_C_FACTOR and smss factors were moved up to an earlier - * calculation to simplify overflow and underflow detection. */ - cwnd = (cwnd >> CUBIC_SHIFT_4) + wmax; - - if (cwnd < 0) - return 1; + cwnd = ((cwnd * CUBIC_C_FACTOR * smss) >> CUBIC_SHIFT_4) + wmax; return ((unsigned long)cwnd); } From owner-svn-src-all@freebsd.org Sat Dec 15 17:09:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BE7013264A1; Sat, 15 Dec 2018 17:09:58 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 642A6806E0; Sat, 15 Dec 2018 17:09:56 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id wBFGg21P078693 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 15 Dec 2018 17:42:03 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id wBFGg2WG078692; Sat, 15 Dec 2018 17:42:02 +0100 (CET) (envelope-from marius) Date: Sat, 15 Dec 2018 17:42:02 +0100 From: Marius Strobl To: Dima Panov Cc: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: Re: svn commit: r341266 - in releng/12.0: . sys/modules/iavf Message-ID: <20181215164202.GF93591@alchemy.franken.de> References: <201811292159.wATLx9Bb099604@repo.freebsd.org> <31493546-f2a6-8ad4-5c6e-5e8d835debeb@FreeBSD.org> <20181206172506.GU93591@alchemy.franken.de> <20181206173003.GE29692@FreeBSD.org> <20181206190802.GV93591@alchemy.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (alchemy.franken.de [0.0.0.0]); Sat, 15 Dec 2018 17:42:03 +0100 (CET) X-Rspamd-Queue-Id: 642A6806E0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.15 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.58)[ip: (-9.15), ipnet: 194.94.0.0/15(-3.67), asn: 680(-0.08), country: DE(-0.01)]; MX_GOOD(-0.01)[alchemy.franken.de,hub-r.franken.de,rachael.franken.de]; NEURAL_HAM_SHORT(-0.76)[-0.765,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[marius@freebsd.org,marius@alchemy.franken.de]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:194.94.0.0/15, country:DE]; FROM_NEQ_ENVFROM(0.00)[marius@freebsd.org,marius@alchemy.franken.de] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 17:09:58 -0000 On Fri, Dec 07, 2018 at 01:29:57PM +1000, Dima Panov wrote: > Hello! > > Marius Strobl wrote on 07/12/2018 05:08: > > On Thu, Dec 06, 2018 at 05:30:03PM +0000, Glen Barber wrote: > >> On Thu, Dec 06, 2018 at 06:25:06PM +0100, Marius Strobl wrote: > >>> On Thu, Dec 06, 2018 at 03:58:44PM +1000, Dima Panov wrote: > >>>> Hello! > >>>> > >>>> Marius Strobl wrote on 30/11/2018 07:59: > >>>>> Author: marius > >>>>> Date: Thu Nov 29 21:59:09 2018 > >>>>> New Revision: 341266 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/341266 > >>>>> > >>>>> Log: > >>>>> MFC: r341016, MF12: r341261 > >>>>> > >>>>> - Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in r339338. > >>>>> - Likewise, add ixlv.4.gz to OLD_FILES, > >>>>> - and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the transition. > >>>>> > >>>> [cut] > >>>>> > >>>>> Modified: releng/12.0/sys/modules/iavf/Makefile > >>>>> ============================================================================== > >>>>> --- releng/12.0/sys/modules/iavf/Makefile Thu Nov 29 21:20:53 2018 (r341265) > >>>>> +++ releng/12.0/sys/modules/iavf/Makefile Thu Nov 29 21:59:09 2018 (r341266) > >>>>> @@ -15,4 +15,6 @@ SRCS += i40e_common.c i40e_nvm.c i40e_adminq.c > >>>>> # Enable asserts and other debugging facilities > >>>>> # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS > >>>>> > >>>>> +LINKS= ${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko > >>>>> + > >>>>> .include > >>>> > >>>> > >>>> And this broke poudriere jail upgrade due to missed kernel modules for > >>>> build purpose > >>>> > >>>> # poudriere jail -u -j fbsd12-test -t 12.0-RC3 > >>>> [skip] > >>>> /usr/src/usr.sbin/newsyslog/newsyslog.c > >>>> To install the downloaded upgrades, run "/usr/sbin/freebsd-update.fixed > >>>> install". > >>>> Installing updates...ln: ///boot/kernel/if_iavf.ko: No such file or > >>>> directory > >>>> chflags: ///boot/kernel/if_ixlv.ko: No such file or directory > >>>> [00:20:27] Error: Fail to upgrade system > >>>> # > >>> > >>> Hrm, apparently this doesn't trip up with a native, i. e. non-poudriere, > >>> environment and I'd assume that the linking of if_igb.ko to if_em.ko that > >>> sys/modules/em/Makefile does ever since r324500 isn't causing problems > >>> with poudriere either. What are poudriere and the "fixed" version of > >>> freebsd-update(8) doing differently than native counterparts and what do > >>> you mean by "missed kernel modules for build purpose"? > >>> > >> > >> FWIW, I did not see this in all of my freebsd-update(8) tests. > > > > So could it be that a subset of the mirrors carries a corrupt index > > of 12.0-RC3? Otherwise I don't see how only some freebsd-update(8) > > runs to 12.0-RC3 fail or how the problem should be specific to > > if_ixlv.ko so far. > > > > > No, mirrors are fine. Bug is repeatable on 4 different machines with > poudrire during jails -RC2 => -RC3 binary upgrade. > On a host installation upgrade is always fine ? /bot/kernel/* is always > present on live systems. > > Upgrade error caused by absent kernel and modules in poudriere jail > installations. The error appears to occur in install_from_index(). Looking at how that function is called, the only explanation I have still is that the index is wrong. That might very well be the index generated by freebsd-update(8) rather than the one obtained from a server, but how freebsd-update(8) gets to the index it eventually feeds to that function including how filtering the index based on components works (or rather how that shouldn't work for links) is beyond me. In any case, I still don't see how this problem should be specific to the if_ixlv.ko link. What happens if you upgrade a 11.2 poudriere jail to 12.0-RC2, does that succeed or trip over if_igb.ko instead? Marius From owner-svn-src-all@freebsd.org Sat Dec 15 17:17:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05C601326AEF; Sat, 15 Dec 2018 17:17:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 34D6780CBF; Sat, 15 Dec 2018 17:17:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 534713CFA91; Sun, 16 Dec 2018 04:17:11 +1100 (AEDT) Date: Sun, 16 Dec 2018 04:17:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Edward Tomasz Napierala cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r342115 - head/sbin/fsck_ffs In-Reply-To: <201812151136.wBFBaKV3058236@repo.freebsd.org> Message-ID: <20181216033655.G5660@besplex.bde.org> References: <201812151136.wBFBaKV3058236@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=DZtnkrlW c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=iBufN-CbBZ9qPfiJausA:9 a=04TOIXbChQNhCiql:21 a=-gMqSNPqehXkdgwA:21 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 34D6780CBF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 17:17:22 -0000 On Sat, 15 Dec 2018, Edward Tomasz Napierala wrote: > Log: > Make fsck(8) use pread(2). This cuts the number of syscalls by half. > > Reviewed by: kib, mckusick This cuts the error handling for reads by a bit more than half. This also makes fsck use pwrite(). Cutting the error handling is almost a feature for writes. > Modified: head/sbin/fsck_ffs/fsutil.c > ============================================================================== > --- head/sbin/fsck_ffs/fsutil.c Sat Dec 15 11:32:11 2018 (r342114) > +++ head/sbin/fsck_ffs/fsutil.c Sat Dec 15 11:36:20 2018 (r342115) > @@ -576,9 +576,7 @@ blread(int fd, char *buf, ufs2_daddr_t blk, long size) > slowio_start(); > totalreads++; > diskreads++; > - if (lseek(fd, offset, 0) < 0) > - rwerror("SEEK BLK", blk); > - else if (read(fd, buf, (int)size) == size) { > + if (pread(fd, buf, (int)size, offset) == size) { > if (bkgrdflag) > slowio_end(); > return (0); Just after here, the comment before the error handling says that the error handling is simpler here because it is just for true read/write errors. > @@ -595,14 +593,11 @@ blread(int fd, char *buf, ufs2_daddr_t blk, long size) > } else > rwerror("READ BLK", blk); > > - if (lseek(fd, offset, 0) < 0) > - rwerror("SEEK BLK", blk); This used to exit in many cases. The seek error is unrecoverable. (Usually the previous lseek() fails before this is reached.) > errs = 0; > memset(buf, 0, (size_t)size); > printf("THE FOLLOWING DISK SECTORS COULD NOT BE READ:"); > for (cp = buf, i = 0; i < size; i += secsize, cp += secsize) { > - if (read(fd, cp, (int)secsize) != secsize) { > - (void)lseek(fd, offset + i + secsize, 0); This used to handle lseek() errors sloppily. > + if (pread(fd, cp, (int)secsize, offset + i) != secsize) { > if (secsize != dev_bsize && dev_bsize != 1) > printf(" %jd (%jd),", > (intmax_t)(blk * dev_bsize + i) / secsize, This handles pread() sloppily. It checks for errors, but proceeds to spew errors for the whole block, just like the sloppy lseek() error handling except now that was protected by 2 instances of non-sloppy lseek() error handling for the start of the block. > @@ -629,22 +624,16 @@ blwrite(int fd, char *buf, ufs2_daddr_t blk, ssize_t s > return; > offset = blk; > offset *= dev_bsize; > - if (lseek(fd, offset, 0) < 0) > - rwerror("SEEK BLK", blk); > - else if (write(fd, buf, size) == size) { > + if (pwrite(fd, buf, size, offset) == size) { > fsmodified = 1; > return; > } > resolved = 0; > rwerror("WRITE BLK", blk); > - if (lseek(fd, offset, 0) < 0) > - rwerror("SEEK BLK", blk); > printf("THE FOLLOWING SECTORS COULD NOT BE WRITTEN:"); > for (cp = buf, i = 0; i < size; i += dev_bsize, cp += dev_bsize) > - if (write(fd, cp, dev_bsize) != dev_bsize) { > - (void)lseek(fd, offset + i + dev_bsize, 0); > + if (pwrite(fd, cp, dev_bsize, offset + i) != dev_bsize) > printf(" %jd,", (intmax_t)blk + i / dev_bsize); > - } > printf("\n"); > return; > } Not so similarly. Everything is the same except now it is a feature to not bail out on the first sign of a problem. Only the error spew is bad here. Of course, lseek errors "can't happen". It is interesting that writes for the error case are done with size dev_bsize, while reads for the error case are done with size secsize. This is very confusing. Both sizes are initially initialized to DEV_BSIZE, which cannot work on disks with large sectors, then bootstrapped confusingly differently by probing for metadata. There is also real_dev_bsize, which suj.c sets to secsize. The printf()s for both claim to access SECTORs. Writes for to attempt to recover from errors by retrying (only once here) should use the smallest size that the hardware supports. This is the sector size unless sectors are virtual. Hopefully dev_bsize == secsize for all writes, since it is too dangerous to write before you know the sector size. Bruce From owner-svn-src-all@freebsd.org Sat Dec 15 17:32:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 034EC132772B; Sat, 15 Dec 2018 17:32:49 +0000 (UTC) (envelope-from mckusick@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) server-signature RSA-PSS (4096 bits) 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 9606B818B7; Sat, 15 Dec 2018 17:32:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 851111AD94; Sat, 15 Dec 2018 17:32:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFHWmNI049766; Sat, 15 Dec 2018 17:32:48 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFHWmi8049765; Sat, 15 Dec 2018 17:32:48 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201812151732.wBFHWmi8049765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 15 Dec 2018 17:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342128 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 342128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9606B818B7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.86 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 17:32:49 -0000 Author: mckusick Date: Sat Dec 15 17:32:47 2018 New Revision: 342128 URL: https://svnweb.freebsd.org/changeset/base/342128 Log: Fsck would find, report, and offer to fix inode check-hash failures. If requested to fix the inode check-hash it would confirm having done it, but then fail to make the fix. The same code is used in fsdb which, unlike fsck, would actually fix the inode check-hash. The discrepancy occurred because fsck has two ways to fetch inodes. The inode by number function ginode() and the streaming inode function getnextinode() used during pass1. Fsdb uses the ginode() function which correctly does the fix, while fsck first encounters the bad inode check-hash in pass1 where it is using the getnextinode() function that failed to make the correction. This patch corrects the getnextinode() function so that fsck now correctly fixes inodes with incorrect inode check-hashs. Reported by: Gary Jennejohn Sponsored by: Netflix Modified: head/sbin/fsck_ffs/inode.c Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Sat Dec 15 17:01:16 2018 (r342127) +++ head/sbin/fsck_ffs/inode.c Sat Dec 15 17:32:47 2018 (r342128) @@ -309,6 +309,8 @@ ginode(ino_t inumber) if (preen || reply("FIX") != 0) { if (preen) printf(" (FIXED)\n"); + ffs_update_dinode_ckhash(&sblock, + (struct ufs2_dinode *)dp); inodirty(dp); } } From owner-svn-src-all@freebsd.org Sat Dec 15 17:58:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDCE61328586; Sat, 15 Dec 2018 17:58:42 +0000 (UTC) (envelope-from mckusick@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) server-signature RSA-PSS (4096 bits) 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 7FF77827DA; Sat, 15 Dec 2018 17:58:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7006C1B125; Sat, 15 Dec 2018 17:58:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFHwgtW060625; Sat, 15 Dec 2018 17:58:42 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFHwgEB060624; Sat, 15 Dec 2018 17:58:42 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201812151758.wBFHwgEB060624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 15 Dec 2018 17:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342129 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 342129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7FF77827DA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 17:58:43 -0000 Author: mckusick Date: Sat Dec 15 17:58:42 2018 New Revision: 342129 URL: https://svnweb.freebsd.org/changeset/base/342129 Log: Must set ip->i_effnlink = ip->i_nlink to avoid a soft updates "panic: softdep_update_inodeblock: bad link count" when releasing a partially initialized vnode after an inode check-hash failure. Reported by: Gary Jennejohn Reported by: Peter Holm (pho) Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_subr.c Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 17:32:47 2018 (r342128) +++ head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 17:58:42 2018 (r342129) @@ -127,6 +127,7 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc *((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); ip->i_mode = dip1->di_mode; ip->i_nlink = dip1->di_nlink; + ip->i_effnlink = dip1->di_nlink; ip->i_size = dip1->di_size; ip->i_flags = dip1->di_flags; ip->i_gen = dip1->di_gen; @@ -138,6 +139,7 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc *dip2 = *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); ip->i_mode = dip2->di_mode; ip->i_nlink = dip2->di_nlink; + ip->i_effnlink = dip2->di_nlink; ip->i_size = dip2->di_size; ip->i_flags = dip2->di_flags; ip->i_gen = dip2->di_gen; From owner-svn-src-all@freebsd.org Sat Dec 15 18:05:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 451061328A6B; Sat, 15 Dec 2018 18:05:06 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 DF35982D23; Sat, 15 Dec 2018 18:05:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C90D71B2F4; Sat, 15 Dec 2018 18:05:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFI55FE065699; Sat, 15 Dec 2018 18:05:05 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFI55xO065698; Sat, 15 Dec 2018 18:05:05 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812151805.wBFI55xO065698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Sat, 15 Dec 2018 18:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342130 - stable/12/sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/netmap X-SVN-Commit-Revision: 342130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF35982D23 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_SHORT(-0.92)[-0.917,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.89)[-0.889,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 18:05:06 -0000 Author: vmaffione Date: Sat Dec 15 18:05:05 2018 New Revision: 342130 URL: https://svnweb.freebsd.org/changeset/base/342130 Log: MFC r341992 netmap: fix warning in netmap_kloop.c Reported by: markj Modified: stable/12/sys/dev/netmap/netmap_kloop.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_kloop.c Sat Dec 15 17:58:42 2018 (r342129) +++ stable/12/sys/dev/netmap/netmap_kloop.c Sat Dec 15 18:05:05 2018 (r342130) @@ -111,6 +111,7 @@ csb_ktoa_kick_enable(struct nm_csb_ktoa __user *csb_kt CSB_WRITE(csb_ktoa, kern_need_kick, val); } +#ifdef SYNC_KLOOP_POLL /* Are application interrupt enabled or disabled? */ static inline uint32_t csb_atok_intr_enabled(struct nm_csb_atok __user *csb_atok) @@ -121,6 +122,7 @@ csb_atok_intr_enabled(struct nm_csb_atok __user *csb_a return v; } +#endif /* SYNC_KLOOP_POLL */ static inline void sync_kloop_kring_dump(const char *title, const struct netmap_kring *kring) From owner-svn-src-all@freebsd.org Sat Dec 15 18:08:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BB6E1328BED; Sat, 15 Dec 2018 18:08:00 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 DF4F182EF5; Sat, 15 Dec 2018 18:07:59 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEC451B306; Sat, 15 Dec 2018 18:07:59 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFI7xMf065880; Sat, 15 Dec 2018 18:07:59 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFI7x1G065879; Sat, 15 Dec 2018 18:07:59 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812151807.wBFI7x1G065879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Sat, 15 Dec 2018 18:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342131 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 342131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF4F182EF5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-0.89)[-0.889,0]; NEURAL_HAM_SHORT(-0.92)[-0.917,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 18:08:00 -0000 Author: vmaffione Date: Sat Dec 15 18:07:59 2018 New Revision: 342131 URL: https://svnweb.freebsd.org/changeset/base/342131 Log: MFC r341992 netmap: fix warning in netmap_kloop.c Reported by: markj Modified: stable/11/sys/dev/netmap/netmap_kloop.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_kloop.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_kloop.c Sat Dec 15 18:05:05 2018 (r342130) +++ stable/11/sys/dev/netmap/netmap_kloop.c Sat Dec 15 18:07:59 2018 (r342131) @@ -111,6 +111,7 @@ csb_ktoa_kick_enable(struct nm_csb_ktoa __user *csb_kt CSB_WRITE(csb_ktoa, kern_need_kick, val); } +#ifdef SYNC_KLOOP_POLL /* Are application interrupt enabled or disabled? */ static inline uint32_t csb_atok_intr_enabled(struct nm_csb_atok __user *csb_atok) @@ -121,6 +122,7 @@ csb_atok_intr_enabled(struct nm_csb_atok __user *csb_a return v; } +#endif /* SYNC_KLOOP_POLL */ static inline void sync_kloop_kring_dump(const char *title, const struct netmap_kring *kring) From owner-svn-src-all@freebsd.org Sat Dec 15 18:11:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 415ED1328E81; Sat, 15 Dec 2018 18:11:42 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) 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 D8CBF8320E; Sat, 15 Dec 2018 18:11:41 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA74E1B357; Sat, 15 Dec 2018 18:11:41 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFIBfp3067671; Sat, 15 Dec 2018 18:11:41 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFIBfps067670; Sat, 15 Dec 2018 18:11:41 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201812151811.wBFIBfps067670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Sat, 15 Dec 2018 18:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342132 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 342132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8CBF8320E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.79 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_SHORT(-0.92)[-0.919,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.89)[-0.888,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 18:11:42 -0000 Author: vmaffione Date: Sat Dec 15 18:11:41 2018 New Revision: 342132 URL: https://svnweb.freebsd.org/changeset/base/342132 Log: MFC r341993 netmap: add man page for ptnet Add a man page for ptnet(4), describing the guest driver for netmap passthrough. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D18518 Added: stable/12/share/man/man4/ptnet.4 - copied unchanged from r341993, head/share/man/man4/ptnet.4 Modified: Directory Properties: stable/12/ (props changed) Copied: stable/12/share/man/man4/ptnet.4 (from r341993, head/share/man/man4/ptnet.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/man/man4/ptnet.4 Sat Dec 15 18:11:41 2018 (r342132, copy of r341993, head/share/man/man4/ptnet.4) @@ -0,0 +1,140 @@ +.\" Copyright (c) 2018 Vincenzo Maffione +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" 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$ +.\" +.Dd December 11, 2018 +.Dt PTNET 4 +.Os +.Sh NAME +.Nm ptnet +.Nd Ethernet driver for passed-through netmap ports +.Sh SYNOPSIS +This network driver is included in +.Xr netmap 4 , +and it can be compiled into the kernel by adding the following +line in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device netmap" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides direct access to host netmap ports, +from within a Virtual Machine (VM). +Applications running inside +the VM can access the TX/RX rings and buffers of a netmap port +that the hypervisor has passed-through to the VM. +Hypervisor support for +.Nm +is currently available for QEMU/KVM. +Any +.Xr netmap 4 +port can be passed-through, including physical NICs, +.Xr vale 4 +ports, netmap pipes, etc. +.Pp +The main use-case for netmap passthrough is Network Function +Virtualization (NFV), where middlebox applications running within +VMs may want to process very high packet rates (e.g., 1-10 millions +packets per second or more). +Note, however, that those applications +must use the device in netmap mode in order to achieve such rates. +In addition to the general advantages of netmap, the improved +performance of +.Nm +when compared to hypervisor device emulation or paravirtualization (e.g., +.Xr vtnet 4 , +.Xr vmx 4 ) +comes from the hypervisor being completely bypassed in the data-path. +For example, when using +.Xr vtnet 4 +the VM has to convert each +.Xr mbuf 9 +to a VirtIO-specific packet representation +and publish that to a VirtIO queue; on the hypervisor side, the +packet is extracted from the VirtIO queue and converted to a +hypervisor-specific packet representation. +The overhead of format conversions (and packet copies, in same cases) is not +incured by +.Nm +in netmap mode, because mbufs are not used at all, and the packet format +is the one defined by netmap (e.g., +.Ar struct netmap_slot ) +along the whole data-path. +No format conversions or copies happen. +.Pp +It is also possible to use a +.Nm +device like a regular network interface, which interacts with the +.Fx +network stack (i.e., not in netmap mode). +However, in that case it is necessary to pay the cost of data copies +between mbufs and netmap buffers, which generally results in lower +TCP/UDP performance than +.Xr vtnet 4 +or other paravirtualized network devices. +If the passed-through netmap port supports the VirtIO network header, +.Nm +is able to use it, and support TCP/UDP checksum offload (for both transmit +and receive), TCP segmentation offload (TSO) and TCP large receive offload +(LRO). +Currently, +.Xr vale 4 +ports support the header. +Note that the VirtIO network header is generally not used in NFV +use-cases, because middleboxes are not endpoints of TCP/UDP connections. +.Sh TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va dev.netmap.ptnet_vnet_hdr +This tunable enables (1) or disables (0) the VirtIO network header. +If enabled, +.Nm +uses the same header used by +.Xr vtnet 4 +to exchange offload metadata with the hypervisor. +If disabled, no header is prepended to transmitted and received +packets. +The metadata is necessary to support TCP/UDP checksum offloads, +TSO, and LRO. +The default value is 1. +.El +.Sh SEE ALSO +.Xr netintro 4 , +.Xr netmap 4 , +.Xr vale 4 , +.Xr virtio 4 , +.Xr vmx 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +driver was written by +.An Vincenzo Maffione Aq Mt vmaffione@FreeBSD.org . +It first appeared in +.Fx 12.0 . From owner-svn-src-all@freebsd.org Sat Dec 15 18:35:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC3001329F52; Sat, 15 Dec 2018 18:35:47 +0000 (UTC) (envelope-from mckusick@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) server-signature RSA-PSS (4096 bits) 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 8C7888418F; Sat, 15 Dec 2018 18:35:47 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 787F51B82E; Sat, 15 Dec 2018 18:35:47 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFIZlLh081292; Sat, 15 Dec 2018 18:35:47 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFIZlDU081291; Sat, 15 Dec 2018 18:35:47 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201812151835.wBFIZlDU081291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 15 Dec 2018 18:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342133 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 342133 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8C7888418F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 18:35:48 -0000 Author: mckusick Date: Sat Dec 15 18:35:46 2018 New Revision: 342133 URL: https://svnweb.freebsd.org/changeset/base/342133 Log: Reorder ffs_verify_dinode_ckhash() so that it checks the inode check-hash before copying in the inode so that the mode and link-count are not set if the check-hash fails. This change ensures that the vnode will be properly unwound and recycled rather than being held in the cache. Initialize the file mode is zero so that if the loading of the inode fails (for example because of a check-hash failure), the vnode will be properly unwound and recycled. Reported by: Gary Jennejohn (gj) Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_subr.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 18:11:41 2018 (r342132) +++ head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 18:35:46 2018 (r342133) @@ -135,8 +135,14 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc ip->i_gid = dip1->di_gid; return (0); } + dip2 = ((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); + if ((error = ffs_verify_dinode_ckhash(fs, dip2)) != 0) { + printf("%s: inode %jd: check-hash failed\n", fs->fs_fsmnt, + (intmax_t)ino); + return (error); + } + *ip->i_din2 = *dip2; dip2 = ip->i_din2; - *dip2 = *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); ip->i_mode = dip2->di_mode; ip->i_nlink = dip2->di_nlink; ip->i_effnlink = dip2->di_nlink; @@ -145,9 +151,7 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc ip->i_gen = dip2->di_gen; ip->i_uid = dip2->di_uid; ip->i_gid = dip2->di_gid; - if ((error = ffs_verify_dinode_ckhash(fs, dip2)) != 0) - printf("Inode %jd: check-hash failed\n", (intmax_t)ino); - return (error); + return (0); } #endif /* _KERNEL */ Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat Dec 15 18:11:41 2018 (r342132) +++ head/sys/ufs/ffs/ffs_vfsops.c Sat Dec 15 18:35:46 2018 (r342133) @@ -1692,6 +1692,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags) ip->i_ea_refs = 0; ip->i_nextclustercg = -1; ip->i_flag = fs->fs_magic == FS_UFS1_MAGIC ? 0 : IN_UFS2; + ip->i_mode = 0; /* ensure error cases below throw away vnode */ #ifdef QUOTA { int i; From owner-svn-src-all@freebsd.org Sat Dec 15 18:49:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9685F132A7AE; Sat, 15 Dec 2018 18:49:31 +0000 (UTC) (envelope-from mckusick@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) server-signature RSA-PSS (4096 bits) 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 3BF4C84B36; Sat, 15 Dec 2018 18:49:31 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CAF31BA07; Sat, 15 Dec 2018 18:49:31 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFInVhw086770; Sat, 15 Dec 2018 18:49:31 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFInVl0086769; Sat, 15 Dec 2018 18:49:31 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201812151849.wBFInVl0086769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 15 Dec 2018 18:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342134 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 342134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3BF4C84B36 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 18:49:31 -0000 Author: mckusick Date: Sat Dec 15 18:49:30 2018 New Revision: 342134 URL: https://svnweb.freebsd.org/changeset/base/342134 Log: Ensure that the inode check-hash is not left zeroed out in the case where the check-hash fails. Prior to the fix in -r342133 the inode with the zeroed out check-hash was written back to disk causing further confusion. Reported by: Gary Jennejohn (gj) Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_subr.c Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 18:35:46 2018 (r342133) +++ head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 18:49:30 2018 (r342134) @@ -161,7 +161,7 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc int ffs_verify_dinode_ckhash(struct fs *fs, struct ufs2_dinode *dip) { - uint32_t save_ckhash; + uint32_t ckhash, save_ckhash; /* * Return success if unallocated or we are not doing inode check-hash. @@ -174,10 +174,11 @@ ffs_verify_dinode_ckhash(struct fs *fs, struct ufs2_di */ save_ckhash = dip->di_ckhash; dip->di_ckhash = 0; - if (save_ckhash != calculate_crc32c(~0L, (void *)dip, sizeof(*dip))) - return (EINVAL); + ckhash = calculate_crc32c(~0L, (void *)dip, sizeof(*dip)); dip->di_ckhash = save_ckhash; - return (0); + if (save_ckhash == ckhash) + return (0); + return (EINVAL); } /* From owner-svn-src-all@freebsd.org Sat Dec 15 19:04:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D98C132AE07; Sat, 15 Dec 2018 19:04:51 +0000 (UTC) (envelope-from mckusick@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) server-signature RSA-PSS (4096 bits) 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 D1B2685333; Sat, 15 Dec 2018 19:04:50 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B88BD1BD5E; Sat, 15 Dec 2018 19:04:50 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFJ4oCI097067; Sat, 15 Dec 2018 19:04:50 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFJ4oNT097066; Sat, 15 Dec 2018 19:04:50 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201812151904.wBFJ4oNT097066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 15 Dec 2018 19:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342135 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 342135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D1B2685333 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 19:04:51 -0000 Author: mckusick Date: Sat Dec 15 19:04:50 2018 New Revision: 342135 URL: https://svnweb.freebsd.org/changeset/base/342135 Log: Under UFS/FFS the VFS_ROOT() function will return an error if the inode check-hash fails. Panic'ing is not an appropriate response. So, check for an error return from VFS_ROOT() and when an error is reported, unwind and return the error. Reported by: Gary Jennejohn (gj) Sponsored by: Netflix Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sat Dec 15 18:49:30 2018 (r342134) +++ head/sys/kern/vfs_mount.c Sat Dec 15 19:04:50 2018 (r342135) @@ -841,7 +841,7 @@ vfs_domount_first( struct vattr va; struct mount *mp; struct vnode *newdp; - int error; + int error, error1; ASSERT_VOP_ELOCKED(vp, __func__); KASSERT((fsflags & MNT_UPDATE) == 0, ("MNT_UPDATE shouldn't be here")); @@ -893,8 +893,14 @@ vfs_domount_first( * XXX The final recipients of VFS_MOUNT just overwrite the ndp they * get. No freeing of cn_pnbuf. */ - error = VFS_MOUNT(mp); - if (error != 0) { + error1 = 0; + if ((error = VFS_MOUNT(mp)) != 0 || + (error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) { + if (error1 != 0) { + error = error1; + if ((error1 = VFS_UNMOUNT(mp, 0)) != 0) + printf("VFS_UNMOUNT returned %d\n", error1); + } vfs_unbusy(mp); mp->mnt_vnodecovered = NULL; vfs_mount_destroy(mp); @@ -904,6 +910,7 @@ vfs_domount_first( vrele(vp); return (error); } + VOP_UNLOCK(newdp, 0); if (mp->mnt_opt != NULL) vfs_freeopts(mp->mnt_opt); @@ -935,8 +942,7 @@ vfs_domount_first( TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list); mtx_unlock(&mountlist_mtx); vfs_event_signal(NULL, VQ_MOUNT, 0); - if (VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) - panic("mount: lost mount"); + vn_lock(newdp, LK_EXCLUSIVE | LK_RETRY); VOP_UNLOCK(vp, 0); EVENTHANDLER_DIRECT_INVOKE(vfs_mounted, mp, newdp, td); VOP_UNLOCK(newdp, 0); From owner-svn-src-all@freebsd.org Sat Dec 15 19:18:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C75C132B285; Sat, 15 Dec 2018 19:18:59 +0000 (UTC) (envelope-from mckusick@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) server-signature RSA-PSS (4096 bits) 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 E6F458593A; Sat, 15 Dec 2018 19:18:58 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1A6D1BF06; Sat, 15 Dec 2018 19:18:58 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFJIwCV002482; Sat, 15 Dec 2018 19:18:58 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFJIwKH002481; Sat, 15 Dec 2018 19:18:58 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201812151918.wBFJIwKH002481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 15 Dec 2018 19:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342136 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 342136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E6F458593A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.80 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 19:18:59 -0000 Author: mckusick Date: Sat Dec 15 19:18:58 2018 New Revision: 342136 URL: https://svnweb.freebsd.org/changeset/base/342136 Log: Clarify panic in set_rootvnode(). Check for panic in vfs_mountroot_shuffle(). Sponsored by: Netflix Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sat Dec 15 19:04:50 2018 (r342135) +++ head/sys/kern/vfs_mountroot.c Sat Dec 15 19:18:58 2018 (r342136) @@ -211,7 +211,7 @@ set_rootvnode(void) struct proc *p; if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode)) - panic("Cannot find root vnode"); + panic("set_rootvnode: Cannot find root vnode"); VOP_UNLOCK(rootvnode, 0); @@ -309,7 +309,8 @@ vfs_mountroot_shuffle(struct thread *td, struct mount if (mporoot != mpdevfs) cache_purgevfs(mpdevfs, true); - VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot); + if (VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot)) + panic("vfs_mountroot_shuffle: Cannot find root vnode"); VI_LOCK(vporoot); vporoot->v_iflag &= ~VI_MOUNT; From owner-svn-src-all@freebsd.org Sat Dec 15 19:56:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5663132C008; Sat, 15 Dec 2018 19:56:51 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 8927A86AE5; Sat, 15 Dec 2018 19:56:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78D5D1C5DC; Sat, 15 Dec 2018 19:56:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFJupg5023235; Sat, 15 Dec 2018 19:56:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFJupsA023234; Sat, 15 Dec 2018 19:56:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812151956.wBFJupsA023234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 15 Dec 2018 19:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342137 - stable/12/sys/dev/bwn X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/bwn X-SVN-Commit-Revision: 342137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8927A86AE5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-0.89)[-0.888,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 19:56:52 -0000 Author: markj Date: Sat Dec 15 19:56:51 2018 New Revision: 342137 URL: https://svnweb.freebsd.org/changeset/base/342137 Log: MFC r341990: Fix a possible mbuf double free in bwn_dma_tx_start(). admbug: 820 Modified: stable/12/sys/dev/bwn/if_bwn.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/12/sys/dev/bwn/if_bwn.c Sat Dec 15 19:18:58 2018 (r342136) +++ stable/12/sys/dev/bwn/if_bwn.c Sat Dec 15 19:56:51 2018 (r342137) @@ -209,7 +209,7 @@ static void bwn_pio_rx_write_2(struct bwn_pio_rxqueue static void bwn_pio_rx_write_4(struct bwn_pio_rxqueue *, uint16_t, uint32_t); static int bwn_pio_tx_start(struct bwn_mac *, struct ieee80211_node *, - struct mbuf *); + struct mbuf **); static struct bwn_pio_txqueue *bwn_pio_select(struct bwn_mac *, uint8_t); static uint32_t bwn_pio_write_multi_4(struct bwn_mac *, struct bwn_pio_txqueue *, uint32_t, const void *, int); @@ -273,7 +273,7 @@ static void bwn_ratectl_tx_complete(const struct ieee8 static void bwn_dma_handle_txeof(struct bwn_mac *, const struct bwn_txstatus *); static int bwn_dma_tx_start(struct bwn_mac *, struct ieee80211_node *, - struct mbuf *); + struct mbuf **); static int bwn_dma_getslot(struct bwn_dma_ring *); static struct bwn_dma_ring *bwn_dma_select(struct bwn_mac *, uint8_t); @@ -1068,7 +1068,7 @@ bwn_tx_start(struct bwn_softc *sc, struct ieee80211_no } error = (mac->mac_flags & BWN_MAC_FLAG_DMA) ? - bwn_dma_tx_start(mac, ni, m) : bwn_pio_tx_start(mac, ni, m); + bwn_dma_tx_start(mac, ni, &m) : bwn_pio_tx_start(mac, ni, &m); if (error) { m_freem(m); return (error); @@ -1077,13 +1077,14 @@ bwn_tx_start(struct bwn_softc *sc, struct ieee80211_no } static int -bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) +bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, + struct mbuf **mp) { struct bwn_pio_txpkt *tp; - struct bwn_pio_txqueue *tq = bwn_pio_select(mac, M_WME_GETAC(m)); + struct bwn_pio_txqueue *tq; struct bwn_softc *sc = mac->mac_sc; struct bwn_txhdr txhdr; - struct mbuf *m_new; + struct mbuf *m, *m_new; uint32_t ctl32; int error; uint16_t ctl16; @@ -1092,6 +1093,8 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211 /* XXX TODO send packets after DTIM */ + m = *mp; + tq = bwn_pio_select(mac, M_WME_GETAC(m)); KASSERT(!TAILQ_EMPTY(&tq->tq_pktlist), ("%s: fail", __func__)); tp = TAILQ_FIRST(&tq->tq_pktlist); tp->tp_ni = ni; @@ -1111,13 +1114,14 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211 /* * XXX please removes m_defrag(9) */ - m_new = m_defrag(m, M_NOWAIT); + m_new = m_defrag(*mp, M_NOWAIT); if (m_new == NULL) { device_printf(sc->sc_dev, "%s: can't defrag TX buffer\n", __func__); return (ENOBUFS); } + *mp = m_new; if (m_new->m_next != NULL) device_printf(sc->sc_dev, "TODO: fragmented packets for PIO\n"); @@ -1168,15 +1172,17 @@ bwn_pio_select(struct bwn_mac *mac, uint8_t prio) } static int -bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) +bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, + struct mbuf **mp) { #define BWN_GET_TXHDRCACHE(slot) \ &(txhdr_cache[(slot / BWN_TX_SLOTS_PER_FRAME) * BWN_HDRSIZE(mac)]) struct bwn_dma *dma = &mac->mac_method.dma; - struct bwn_dma_ring *dr = bwn_dma_select(mac, M_WME_GETAC(m)); + struct bwn_dma_ring *dr = bwn_dma_select(mac, M_WME_GETAC(*mp)); struct bwn_dmadesc_generic *desc; struct bwn_dmadesc_meta *mt; struct bwn_softc *sc = mac->mac_sc; + struct mbuf *m; uint8_t *txhdr_cache = (uint8_t *)dr->dr_txhdr_cache; int error, slot, backup[2] = { dr->dr_curslot, dr->dr_usedslot }; @@ -1185,6 +1191,7 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211 /* XXX send after DTIM */ + m = *mp; slot = bwn_dma_getslot(dr); dr->getdesc(dr, slot, &desc, &mt); KASSERT(mt->mt_txtype == BWN_DMADESC_METATYPE_HEADER, @@ -1233,9 +1240,8 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211 __func__); error = ENOBUFS; goto fail; - } else { - m = m_new; } + *mp = m = m_new; mt->mt_m = m; error = bus_dmamap_load_mbuf(dma->txbuf_dtag, mt->mt_dmap, From owner-svn-src-all@freebsd.org Sat Dec 15 20:07:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DA13132C5C3; Sat, 15 Dec 2018 20:07:33 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) 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 C340F870F0; Sat, 15 Dec 2018 20:07:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89DC61C7A7; Sat, 15 Dec 2018 20:07:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFK7WKj028562; Sat, 15 Dec 2018 20:07:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFK7Wgk028561; Sat, 15 Dec 2018 20:07:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201812152007.wBFK7Wgk028561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 15 Dec 2018 20:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342138 - stable/11/sys/dev/bwn X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/dev/bwn X-SVN-Commit-Revision: 342138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C340F870F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-0.89)[-0.888,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 20:07:33 -0000 Author: markj Date: Sat Dec 15 20:07:32 2018 New Revision: 342138 URL: https://svnweb.freebsd.org/changeset/base/342138 Log: MFC r341990: Fix a possible mbuf double free in bwn_dma_tx_start(). Modified: stable/11/sys/dev/bwn/if_bwn.c Modified: stable/11/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/11/sys/dev/bwn/if_bwn.c Sat Dec 15 19:56:51 2018 (r342137) +++ stable/11/sys/dev/bwn/if_bwn.c Sat Dec 15 20:07:32 2018 (r342138) @@ -196,7 +196,7 @@ static void bwn_pio_rx_write_2(struct bwn_pio_rxqueue static void bwn_pio_rx_write_4(struct bwn_pio_rxqueue *, uint16_t, uint32_t); static int bwn_pio_tx_start(struct bwn_mac *, struct ieee80211_node *, - struct mbuf *); + struct mbuf **); static struct bwn_pio_txqueue *bwn_pio_select(struct bwn_mac *, uint8_t); static uint32_t bwn_pio_write_multi_4(struct bwn_mac *, struct bwn_pio_txqueue *, uint32_t, const void *, int); @@ -261,7 +261,7 @@ static uint8_t bwn_dma_check_redzone(struct bwn_dma_ri static void bwn_dma_handle_txeof(struct bwn_mac *, const struct bwn_txstatus *); static int bwn_dma_tx_start(struct bwn_mac *, struct ieee80211_node *, - struct mbuf *); + struct mbuf **); static int bwn_dma_getslot(struct bwn_dma_ring *); static struct bwn_dma_ring *bwn_dma_select(struct bwn_mac *, uint8_t); @@ -937,7 +937,7 @@ bwn_tx_start(struct bwn_softc *sc, struct ieee80211_no } error = (mac->mac_flags & BWN_MAC_FLAG_DMA) ? - bwn_dma_tx_start(mac, ni, m) : bwn_pio_tx_start(mac, ni, m); + bwn_dma_tx_start(mac, ni, &m) : bwn_pio_tx_start(mac, ni, &m); if (error) { m_freem(m); return (error); @@ -946,13 +946,14 @@ bwn_tx_start(struct bwn_softc *sc, struct ieee80211_no } static int -bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) +bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, + struct mbuf **mp) { struct bwn_pio_txpkt *tp; - struct bwn_pio_txqueue *tq = bwn_pio_select(mac, M_WME_GETAC(m)); + struct bwn_pio_txqueue *tq; struct bwn_softc *sc = mac->mac_sc; struct bwn_txhdr txhdr; - struct mbuf *m_new; + struct mbuf *m, *m_new; uint32_t ctl32; int error; uint16_t ctl16; @@ -961,6 +962,8 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211 /* XXX TODO send packets after DTIM */ + m = *mp; + tq = bwn_pio_select(mac, M_WME_GETAC(m)); KASSERT(!TAILQ_EMPTY(&tq->tq_pktlist), ("%s: fail", __func__)); tp = TAILQ_FIRST(&tq->tq_pktlist); tp->tp_ni = ni; @@ -980,13 +983,14 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211 /* * XXX please removes m_defrag(9) */ - m_new = m_defrag(m, M_NOWAIT); + m_new = m_defrag(*mp, M_NOWAIT); if (m_new == NULL) { device_printf(sc->sc_dev, "%s: can't defrag TX buffer\n", __func__); return (ENOBUFS); } + *mp = m_new; if (m_new->m_next != NULL) device_printf(sc->sc_dev, "TODO: fragmented packets for PIO\n"); @@ -1037,15 +1041,17 @@ bwn_pio_select(struct bwn_mac *mac, uint8_t prio) } static int -bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) +bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, + struct mbuf **mp) { #define BWN_GET_TXHDRCACHE(slot) \ &(txhdr_cache[(slot / BWN_TX_SLOTS_PER_FRAME) * BWN_HDRSIZE(mac)]) struct bwn_dma *dma = &mac->mac_method.dma; - struct bwn_dma_ring *dr = bwn_dma_select(mac, M_WME_GETAC(m)); + struct bwn_dma_ring *dr = bwn_dma_select(mac, M_WME_GETAC(*mp)); struct bwn_dmadesc_generic *desc; struct bwn_dmadesc_meta *mt; struct bwn_softc *sc = mac->mac_sc; + struct mbuf *m; uint8_t *txhdr_cache = (uint8_t *)dr->dr_txhdr_cache; int error, slot, backup[2] = { dr->dr_curslot, dr->dr_usedslot }; @@ -1054,6 +1060,7 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211 /* XXX send after DTIM */ + m = *mp; slot = bwn_dma_getslot(dr); dr->getdesc(dr, slot, &desc, &mt); KASSERT(mt->mt_txtype == BWN_DMADESC_METATYPE_HEADER, @@ -1102,9 +1109,8 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211 __func__); error = ENOBUFS; goto fail; - } else { - m = m_new; } + *mp = m = m_new; mt->mt_m = m; error = bus_dmamap_load_mbuf(dma->txbuf_dtag, mt->mt_dmap, From owner-svn-src-all@freebsd.org Sat Dec 15 21:34:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7FC8133056C; Sat, 15 Dec 2018 21:34:42 +0000 (UTC) (envelope-from gnn@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) server-signature RSA-PSS (4096 bits) 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 8CD6A89878; Sat, 15 Dec 2018 21:34:42 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A77C1D75A; Sat, 15 Dec 2018 21:34:42 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFLYg0J075516; Sat, 15 Dec 2018 21:34:42 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFLYehs075507; Sat, 15 Dec 2018 21:34:40 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201812152134.wBFLYehs075507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Sat, 15 Dec 2018 21:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342139 - in head: . bin/date libexec/rc/rc.d share/man/man5 tools/build/mk tools/build/options usr.sbin usr.sbin/timed X-SVN-Group: head X-SVN-Commit-Author: gnn X-SVN-Commit-Paths: in head: . bin/date libexec/rc/rc.d share/man/man5 tools/build/mk tools/build/options usr.sbin usr.sbin/timed X-SVN-Commit-Revision: 342139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8CD6A89878 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_LONG(-0.88)[-0.881,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 21:34:43 -0000 Author: gnn Date: Sat Dec 15 21:34:40 2018 New Revision: 342139 URL: https://svnweb.freebsd.org/changeset/base/342139 Log: Remove, the now very outdated, timed. Submitted by: Kyle Spiers ksspiers at gmail Reviewed by: bcr,brooks,bz,sbruno Relnotes: yes Differential Revision: https://reviews.freebsd.org/D18505 Deleted: head/bin/date/extern.h head/bin/date/netdate.c head/libexec/rc/rc.d/timed head/tools/build/options/WITHOUT_TIMED head/usr.sbin/timed/ Modified: head/ObsoleteFiles.inc head/UPDATING head/bin/date/Makefile head/bin/date/Makefile.depend head/bin/date/date.c head/libexec/rc/rc.d/Makefile head/share/man/man5/src.conf.5 head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Dec 15 20:07:32 2018 (r342138) +++ head/ObsoleteFiles.inc Sat Dec 15 21:34:40 2018 (r342139) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20181214: Remove timed files +OLD_FILES+=etc/rc.d/timed +OLD_FILES+=usr/sbin/timed +OLD_FILES+=usr/sbin/timedc +OLD_FILES+=usr/share/man/man8/timed.8.gz +OLD_FILES+=usr/share/man/man8/timedc.8.gz # 20181211: new clang import which bumps version from 6.0.1 to 7.0.1. OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/asan_interface.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Dec 15 20:07:32 2018 (r342138) +++ head/UPDATING Sat Dec 15 21:34:40 2018 (r342139) @@ -37,6 +37,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. +20181211: + Remove the timed and netdate programs from the base tree. Setting + the time with these deamons has been obsolete for over a decade. + 20181126: On amd64, arm64 and armv7 (architectures that install LLVM's ld.lld linker as /usr/bin/ld) GNU ld is no longer installed as ld.bfd, as Modified: head/bin/date/Makefile ============================================================================== --- head/bin/date/Makefile Sat Dec 15 20:07:32 2018 (r342138) +++ head/bin/date/Makefile Sat Dec 15 21:34:40 2018 (r342139) @@ -5,7 +5,7 @@ PACKAGE=runtime PROG= date -SRCS= date.c netdate.c vary.c +SRCS= date.c vary.c HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Modified: head/bin/date/Makefile.depend ============================================================================== --- head/bin/date/Makefile.depend Sat Dec 15 20:07:32 2018 (r342138) +++ head/bin/date/Makefile.depend Sat Dec 15 21:34:40 2018 (r342139) @@ -4,7 +4,6 @@ DIRDEPS = \ gnu/lib/csu \ include \ - include/protocols \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ Modified: head/bin/date/date.c ============================================================================== --- head/bin/date/date.c Sat Dec 15 20:07:32 2018 (r342138) +++ head/bin/date/date.c Sat Dec 15 21:34:40 2018 (r342139) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "extern.h" #include "vary.h" #ifndef TM_YEAR_BASE @@ -67,7 +66,6 @@ __FBSDID("$FreeBSD$"); #endif static time_t tval; -int retval; static void badformat(void); static void iso8601_usage(const char *); @@ -248,7 +246,7 @@ printdate(const char *buf) (void)printf("%s\n", buf); if (fflush(stdout)) err(1, "stdout"); - exit(retval); + exit(EXIT_SUCCESS); } static void @@ -370,7 +368,7 @@ setthetime(const char *fmt, const char *p, int jflag, if (!jflag) { /* set the time */ - if (nflag || netsettime(tval)) { + if (nflag) { utx.ut_type = OLD_TIME; memset(utx.ut_id, 0, sizeof(utx.ut_id)); (void)gettimeofday(&utx.ut_tv, NULL); Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Sat Dec 15 20:07:32 2018 (r342138) +++ head/libexec/rc/rc.d/Makefile Sat Dec 15 21:34:40 2018 (r342139) @@ -291,10 +291,6 @@ SMRCD= sendmail SMRCDPACKAGE= sendmail .endif -.if ${MK_TIMED} != "no" -CONFS+= timed -.endif - .if ${MK_UNBOUND} != "no" CONFGROUPS+= UNBOUND UNBOUND+= local_unbound Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Dec 15 20:07:32 2018 (r342138) +++ head/share/man/man5/src.conf.5 Sat Dec 15 21:34:40 2018 (r342139) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd November 26, 2018 +.Dd December 15, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -239,6 +239,17 @@ Disable the BSD licensed .Pa crtbegin.o and .Pa crtend.o . +.Pp +This is a default setting on +powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +.It Va WITH_BSD_CRTBEGIN +Enable the BSD licensed +.Pa crtbegin.o +and +.Pa crtend.o . +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and riscv/riscv64. .It Va WITH_BSD_GREP Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP @@ -1780,9 +1791,6 @@ Set to not build or install .Xr tftp 1 and .Xr tftpd 8 . -.It Va WITHOUT_TIMED -Set to not build or install -.Xr timed 8 . .It Va WITHOUT_TOOLCHAIN Set to not install header or programs used for program development, Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 20:07:32 2018 (r342138) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 21:34:40 2018 (r342139) @@ -8513,14 +8513,6 @@ OLD_FILES+=usr/share/man/man1/tftp.1.gz OLD_FILES+=usr/share/man/man8/tftpd.8.gz .endif -.if ${MK_TIMED} == no -OLD_FILES+=usr/sbin/timed -OLD_FILES+=usr/sbin/timedc -OLD_FILES+=usr/share/man/man8/timed.8.gz -OLD_FILES+=usr/share/man/man8/timedc.8.gz -.endif - -.if ${MK_TOOLCHAIN} == no OLD_FILES+=usr/bin/addr2line OLD_FILES+=usr/bin/as OLD_FILES+=usr/bin/byacc Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sat Dec 15 20:07:32 2018 (r342138) +++ head/usr.sbin/Makefile Sat Dec 15 21:34:40 2018 (r342139) @@ -201,7 +201,6 @@ SUBDIR.${MK_SENDMAIL}+= praliases SUBDIR.${MK_SENDMAIL}+= sendmail SUBDIR.${MK_TCP_WRAPPERS}+= tcpdchk SUBDIR.${MK_TCP_WRAPPERS}+= tcpdmatch -SUBDIR.${MK_TIMED}+= timed SUBDIR.${MK_TOOLCHAIN}+= config SUBDIR.${MK_TOOLCHAIN}+= crunch SUBDIR.${MK_UNBOUND}+= unbound From owner-svn-src-all@freebsd.org Sat Dec 15 21:48:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AD2F13309FF; Sat, 15 Dec 2018 21:48:15 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E14089ED6; Sat, 15 Dec 2018 21:48:14 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from [IPv6:2003:cd:6f2a:b300:7de7:88b7:9a8f:1607] (p200300CD6F2AB3007DE788B79A8F1607.dip0.t-ipconnect.de [IPv6:2003:cd:6f2a:b300:7de7:88b7:9a8f:1607]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 87CAB72106C11; Sat, 15 Dec 2018 22:48:03 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: svn commit: r342139 - in head: . bin/date libexec/rc/rc.d share/man/man5 tools/build/mk tools/build/options usr.sbin usr.sbin/timed From: Michael Tuexen In-Reply-To: <201812152134.wBFLYehs075507@repo.freebsd.org> Date: Sat, 15 Dec 2018 22:48:02 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201812152134.wBFLYehs075507@repo.freebsd.org> To: "George V. Neville-Neil" X-Mailer: Apple Mail (2.3445.102.3) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 21:48:15 -0000 > On 15. Dec 2018, at 22:34, George V. Neville-Neil = wrote: >=20 > Author: gnn > Date: Sat Dec 15 21:34:40 2018 > New Revision: 342139 > URL: https://svnweb.freebsd.org/changeset/base/342139 >=20 > Log: > Remove, the now very outdated, timed. >=20 > Submitted by: Kyle Spiers ksspiers at gmail > Reviewed by: bcr,brooks,bz,sbruno > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D18505 >=20 > Deleted: > head/bin/date/extern.h > head/bin/date/netdate.c > head/libexec/rc/rc.d/timed > head/tools/build/options/WITHOUT_TIMED > head/usr.sbin/timed/ > Modified: > head/ObsoleteFiles.inc > head/UPDATING > head/bin/date/Makefile > head/bin/date/Makefile.depend > head/bin/date/date.c > head/libexec/rc/rc.d/Makefile > head/share/man/man5/src.conf.5 > head/tools/build/mk/OptionalObsoleteFiles.inc > head/usr.sbin/Makefile >=20 > Modified: head/ObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/ObsoleteFiles.inc Sat Dec 15 20:07:32 2018 = (r342138) > +++ head/ObsoleteFiles.inc Sat Dec 15 21:34:40 2018 = (r342139) > @@ -38,6 +38,12 @@ > # xargs -n1 | sort | uniq -d; > # done >=20 > +# 20181214: Remove timed files > +OLD_FILES+=3Detc/rc.d/timed > +OLD_FILES+=3Dusr/sbin/timed > +OLD_FILES+=3Dusr/sbin/timedc > +OLD_FILES+=3Dusr/share/man/man8/timed.8.gz > +OLD_FILES+=3Dusr/share/man/man8/timedc.8.gz > # 20181211: new clang import which bumps version from 6.0.1 to 7.0.1. > OLD_FILES+=3Dusr/lib/clang/6.0.1/include/sanitizer/allocator_interface.h= > OLD_FILES+=3Dusr/lib/clang/6.0.1/include/sanitizer/asan_interface.h >=20 > Modified: head/UPDATING > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/UPDATING Sat Dec 15 20:07:32 2018 (r342138) > +++ head/UPDATING Sat Dec 15 21:34:40 2018 (r342139) > @@ -37,6 +37,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: > prerequisites and upgrading, if you are not already using clang = 3.5.0 > or higher. >=20 > +20181211: > + Remove the timed and netdate programs from the base tree. = Setting > + the time with these deamons has been obsolete for over a decade. > + > 20181126: > On amd64, arm64 and armv7 (architectures that install LLVM's = ld.lld > linker as /usr/bin/ld) GNU ld is no longer installed as ld.bfd, = as >=20 > Modified: head/bin/date/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/bin/date/Makefile Sat Dec 15 20:07:32 2018 = (r342138) > +++ head/bin/date/Makefile Sat Dec 15 21:34:40 2018 = (r342139) > @@ -5,7 +5,7 @@ >=20 > PACKAGE=3Druntime > PROG=3D date > -SRCS=3D date.c netdate.c vary.c > +SRCS=3D date.c vary.c >=20 > HAS_TESTS=3D > SUBDIR.${MK_TESTS}+=3D tests >=20 > Modified: head/bin/date/Makefile.depend > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/bin/date/Makefile.depend Sat Dec 15 20:07:32 2018 = (r342138) > +++ head/bin/date/Makefile.depend Sat Dec 15 21:34:40 2018 = (r342139) > @@ -4,7 +4,6 @@ > DIRDEPS =3D \ > gnu/lib/csu \ > include \ > - include/protocols \ > include/xlocale \ > lib/${CSU_DIR} \ > lib/libc \ >=20 > Modified: head/bin/date/date.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/bin/date/date.c Sat Dec 15 20:07:32 2018 = (r342138) > +++ head/bin/date/date.c Sat Dec 15 21:34:40 2018 = (r342139) > @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); > #include > #include >=20 > -#include "extern.h" > #include "vary.h" >=20 > #ifndef TM_YEAR_BASE > @@ -67,7 +66,6 @@ __FBSDID("$FreeBSD$"); > #endif >=20 > static time_t tval; > -int retval; >=20 > static void badformat(void); > static void iso8601_usage(const char *); > @@ -248,7 +246,7 @@ printdate(const char *buf) > (void)printf("%s\n", buf); > if (fflush(stdout)) > err(1, "stdout"); > - exit(retval); > + exit(EXIT_SUCCESS); > } >=20 > static void > @@ -370,7 +368,7 @@ setthetime(const char *fmt, const char *p, int = jflag,=20 >=20 > if (!jflag) { > /* set the time */ > - if (nflag || netsettime(tval)) { > + if (nflag) { > utx.ut_type =3D OLD_TIME; > memset(utx.ut_id, 0, sizeof(utx.ut_id)); > (void)gettimeofday(&utx.ut_tv, NULL); >=20 > Modified: head/libexec/rc/rc.d/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/libexec/rc/rc.d/Makefile Sat Dec 15 20:07:32 2018 = (r342138) > +++ head/libexec/rc/rc.d/Makefile Sat Dec 15 21:34:40 2018 = (r342139) > @@ -291,10 +291,6 @@ SMRCD=3D sendmail > SMRCDPACKAGE=3D sendmail > .endif >=20 > -.if ${MK_TIMED} !=3D "no" > -CONFS+=3D timed > -.endif > - > .if ${MK_UNBOUND} !=3D "no" > CONFGROUPS+=3D UNBOUND > UNBOUND+=3D local_unbound >=20 > Modified: head/share/man/man5/src.conf.5 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man5/src.conf.5 Sat Dec 15 20:07:32 2018 = (r342138) > +++ head/share/man/man5/src.conf.5 Sat Dec 15 21:34:40 2018 = (r342139) > @@ -1,6 +1,6 @@ > .\" DO NOT EDIT-- this file is @generated by = tools/build/options/makeman. > .\" $FreeBSD$ > -.Dd November 26, 2018 > +.Dd December 15, 2018 > .Dt SRC.CONF 5 > .Os > .Sh NAME > @@ -239,6 +239,17 @@ Disable the BSD licensed > .Pa crtbegin.o > and > .Pa crtend.o . > +.Pp > +This is a default setting on > +powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and = sparc64/sparc64. > +.It Va WITH_BSD_CRTBEGIN > +Enable the BSD licensed > +.Pa crtbegin.o > +and > +.Pa crtend.o . > +.Pp > +This is a default setting on > +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, = mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, = mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and = riscv/riscv64. > .It Va WITH_BSD_GREP > Install BSD-licensed grep as '[ef]grep' instead of GNU grep. > .It Va WITHOUT_BSNMP > @@ -1780,9 +1791,6 @@ Set to not build or install > .Xr tftp 1 > and > .Xr tftpd 8 . > -.It Va WITHOUT_TIMED > -Set to not build or install > -.Xr timed 8 . > .It Va WITHOUT_TOOLCHAIN > Set to not install header or > programs used for program development, >=20 > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 = 20:07:32 2018 (r342138) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 = 21:34:40 2018 (r342139) > @@ -8513,14 +8513,6 @@ OLD_FILES+=3Dusr/share/man/man1/tftp.1.gz > OLD_FILES+=3Dusr/share/man/man8/tftpd.8.gz > .endif >=20 > -.if ${MK_TIMED} =3D=3D no > -OLD_FILES+=3Dusr/sbin/timed > -OLD_FILES+=3Dusr/sbin/timedc > -OLD_FILES+=3Dusr/share/man/man8/timed.8.gz > -OLD_FILES+=3Dusr/share/man/man8/timedc.8.gz > -.endif > - > -.if ${MK_TOOLCHAIN} =3D=3D no I think the above line should not be removed... Best regards Michael > OLD_FILES+=3Dusr/bin/addr2line > OLD_FILES+=3Dusr/bin/as > OLD_FILES+=3Dusr/bin/byacc >=20 > Modified: head/usr.sbin/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.sbin/Makefile Sat Dec 15 20:07:32 2018 = (r342138) > +++ head/usr.sbin/Makefile Sat Dec 15 21:34:40 2018 = (r342139) > @@ -201,7 +201,6 @@ SUBDIR.${MK_SENDMAIL}+=3D praliases > SUBDIR.${MK_SENDMAIL}+=3D sendmail > SUBDIR.${MK_TCP_WRAPPERS}+=3D tcpdchk > SUBDIR.${MK_TCP_WRAPPERS}+=3D tcpdmatch > -SUBDIR.${MK_TIMED}+=3D timed > SUBDIR.${MK_TOOLCHAIN}+=3D config > SUBDIR.${MK_TOOLCHAIN}+=3D crunch > SUBDIR.${MK_UNBOUND}+=3D unbound >=20 From owner-svn-src-all@freebsd.org Sat Dec 15 22:02:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDC5A1331273; Sat, 15 Dec 2018 22:02:03 +0000 (UTC) (envelope-from cy@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) server-signature RSA-PSS (4096 bits) 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 744808A562; Sat, 15 Dec 2018 22:02:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C0A31DB3A; Sat, 15 Dec 2018 22:02:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFM23B0089707; Sat, 15 Dec 2018 22:02:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFM23K0089706; Sat, 15 Dec 2018 22:02:03 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201812152202.wBFM23K0089706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 15 Dec 2018 22:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342140 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 342140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 744808A562 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 22:02:04 -0000 Author: cy Date: Sat Dec 15 22:02:02 2018 New Revision: 342140 URL: https://svnweb.freebsd.org/changeset/base/342140 Log: Repair build post-r342139 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 21:34:40 2018 (r342139) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 22:02:02 2018 (r342140) @@ -8513,6 +8513,7 @@ OLD_FILES+=usr/share/man/man1/tftp.1.gz OLD_FILES+=usr/share/man/man8/tftpd.8.gz .endif +.if ${MK_TOOLCHAIN} == no OLD_FILES+=usr/bin/addr2line OLD_FILES+=usr/bin/as OLD_FILES+=usr/bin/byacc From owner-svn-src-all@freebsd.org Sat Dec 15 23:14:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B68B133244E; Sat, 15 Dec 2018 23:14:14 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7DE08BF79; Sat, 15 Dec 2018 23:14:13 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wBFMuKnP089077; Sat, 15 Dec 2018 14:56:20 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wBFMuICq089076; Sat, 15 Dec 2018 14:56:18 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201812152256.wBFMuICq089076@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r342139 - in head: . bin/date libexec/rc/rc.d share/man/man5 tools/build/mk tools/build/options usr.sbin usr.sbin/timed In-Reply-To: <201812152134.wBFLYehs075507@repo.freebsd.org> To: "George V. Neville-Neil" Date: Sat, 15 Dec 2018 14:56:18 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: D7DE08BF79 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.995,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 23:14:14 -0000 > Author: gnn > Date: Sat Dec 15 21:34:40 2018 > New Revision: 342139 > URL: https://svnweb.freebsd.org/changeset/base/342139 > > Log: > Remove, the now very outdated, timed. > > Submitted by: Kyle Spiers ksspiers at gmail > Reviewed by: bcr,brooks,bz,sbruno > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D18505 This should of first been marked with a deprecation notice, which was merged to stable/12, then removed from here. > Deleted: > head/bin/date/extern.h > head/bin/date/netdate.c > head/libexec/rc/rc.d/timed > head/tools/build/options/WITHOUT_TIMED > head/usr.sbin/timed/ > Modified: > head/ObsoleteFiles.inc > head/UPDATING > head/bin/date/Makefile > head/bin/date/Makefile.depend > head/bin/date/date.c > head/libexec/rc/rc.d/Makefile > head/share/man/man5/src.conf.5 > head/tools/build/mk/OptionalObsoleteFiles.inc > head/usr.sbin/Makefile > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sat Dec 15 20:07:32 2018 (r342138) > +++ head/ObsoleteFiles.inc Sat Dec 15 21:34:40 2018 (r342139) > @@ -38,6 +38,12 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20181214: Remove timed files > +OLD_FILES+=etc/rc.d/timed > +OLD_FILES+=usr/sbin/timed > +OLD_FILES+=usr/sbin/timedc > +OLD_FILES+=usr/share/man/man8/timed.8.gz > +OLD_FILES+=usr/share/man/man8/timedc.8.gz > # 20181211: new clang import which bumps version from 6.0.1 to 7.0.1. > OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/allocator_interface.h > OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/asan_interface.h > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Sat Dec 15 20:07:32 2018 (r342138) > +++ head/UPDATING Sat Dec 15 21:34:40 2018 (r342139) > @@ -37,6 +37,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: > prerequisites and upgrading, if you are not already using clang 3.5.0 > or higher. > > +20181211: > + Remove the timed and netdate programs from the base tree. Setting > + the time with these deamons has been obsolete for over a decade. > + > 20181126: > On amd64, arm64 and armv7 (architectures that install LLVM's ld.lld > linker as /usr/bin/ld) GNU ld is no longer installed as ld.bfd, as > > Modified: head/bin/date/Makefile > ============================================================================== > --- head/bin/date/Makefile Sat Dec 15 20:07:32 2018 (r342138) > +++ head/bin/date/Makefile Sat Dec 15 21:34:40 2018 (r342139) > @@ -5,7 +5,7 @@ > > PACKAGE=runtime > PROG= date > -SRCS= date.c netdate.c vary.c > +SRCS= date.c vary.c > > HAS_TESTS= > SUBDIR.${MK_TESTS}+= tests > > Modified: head/bin/date/Makefile.depend > ============================================================================== > --- head/bin/date/Makefile.depend Sat Dec 15 20:07:32 2018 (r342138) > +++ head/bin/date/Makefile.depend Sat Dec 15 21:34:40 2018 (r342139) > @@ -4,7 +4,6 @@ > DIRDEPS = \ > gnu/lib/csu \ > include \ > - include/protocols \ > include/xlocale \ > lib/${CSU_DIR} \ > lib/libc \ > > Modified: head/bin/date/date.c > ============================================================================== > --- head/bin/date/date.c Sat Dec 15 20:07:32 2018 (r342138) > +++ head/bin/date/date.c Sat Dec 15 21:34:40 2018 (r342139) > @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#include "extern.h" > #include "vary.h" > > #ifndef TM_YEAR_BASE > @@ -67,7 +66,6 @@ __FBSDID("$FreeBSD$"); > #endif > > static time_t tval; > -int retval; > > static void badformat(void); > static void iso8601_usage(const char *); > @@ -248,7 +246,7 @@ printdate(const char *buf) > (void)printf("%s\n", buf); > if (fflush(stdout)) > err(1, "stdout"); > - exit(retval); > + exit(EXIT_SUCCESS); > } > > static void > @@ -370,7 +368,7 @@ setthetime(const char *fmt, const char *p, int jflag, > > if (!jflag) { > /* set the time */ > - if (nflag || netsettime(tval)) { > + if (nflag) { > utx.ut_type = OLD_TIME; > memset(utx.ut_id, 0, sizeof(utx.ut_id)); > (void)gettimeofday(&utx.ut_tv, NULL); > > Modified: head/libexec/rc/rc.d/Makefile > ============================================================================== > --- head/libexec/rc/rc.d/Makefile Sat Dec 15 20:07:32 2018 (r342138) > +++ head/libexec/rc/rc.d/Makefile Sat Dec 15 21:34:40 2018 (r342139) > @@ -291,10 +291,6 @@ SMRCD= sendmail > SMRCDPACKAGE= sendmail > .endif > > -.if ${MK_TIMED} != "no" > -CONFS+= timed > -.endif > - > .if ${MK_UNBOUND} != "no" > CONFGROUPS+= UNBOUND > UNBOUND+= local_unbound > > Modified: head/share/man/man5/src.conf.5 > ============================================================================== > --- head/share/man/man5/src.conf.5 Sat Dec 15 20:07:32 2018 (r342138) > +++ head/share/man/man5/src.conf.5 Sat Dec 15 21:34:40 2018 (r342139) > @@ -1,6 +1,6 @@ > .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. > .\" $FreeBSD$ > -.Dd November 26, 2018 > +.Dd December 15, 2018 > .Dt SRC.CONF 5 > .Os > .Sh NAME > @@ -239,6 +239,17 @@ Disable the BSD licensed > .Pa crtbegin.o > and > .Pa crtend.o . > +.Pp > +This is a default setting on > +powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. > +.It Va WITH_BSD_CRTBEGIN > +Enable the BSD licensed > +.Pa crtbegin.o > +and > +.Pa crtend.o . > +.Pp > +This is a default setting on > +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and riscv/riscv64. > .It Va WITH_BSD_GREP > Install BSD-licensed grep as '[ef]grep' instead of GNU grep. > .It Va WITHOUT_BSNMP > @@ -1780,9 +1791,6 @@ Set to not build or install > .Xr tftp 1 > and > .Xr tftpd 8 . > -.It Va WITHOUT_TIMED > -Set to not build or install > -.Xr timed 8 . > .It Va WITHOUT_TOOLCHAIN > Set to not install header or > programs used for program development, > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > ============================================================================== > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 20:07:32 2018 (r342138) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Dec 15 21:34:40 2018 (r342139) > @@ -8513,14 +8513,6 @@ OLD_FILES+=usr/share/man/man1/tftp.1.gz > OLD_FILES+=usr/share/man/man8/tftpd.8.gz > .endif > > -.if ${MK_TIMED} == no > -OLD_FILES+=usr/sbin/timed > -OLD_FILES+=usr/sbin/timedc > -OLD_FILES+=usr/share/man/man8/timed.8.gz > -OLD_FILES+=usr/share/man/man8/timedc.8.gz > -.endif > - > -.if ${MK_TOOLCHAIN} == no > OLD_FILES+=usr/bin/addr2line > OLD_FILES+=usr/bin/as > OLD_FILES+=usr/bin/byacc > > Modified: head/usr.sbin/Makefile > ============================================================================== > --- head/usr.sbin/Makefile Sat Dec 15 20:07:32 2018 (r342138) > +++ head/usr.sbin/Makefile Sat Dec 15 21:34:40 2018 (r342139) > @@ -201,7 +201,6 @@ SUBDIR.${MK_SENDMAIL}+= praliases > SUBDIR.${MK_SENDMAIL}+= sendmail > SUBDIR.${MK_TCP_WRAPPERS}+= tcpdchk > SUBDIR.${MK_TCP_WRAPPERS}+= tcpdmatch > -SUBDIR.${MK_TIMED}+= timed > SUBDIR.${MK_TOOLCHAIN}+= config > SUBDIR.${MK_TOOLCHAIN}+= crunch > SUBDIR.${MK_UNBOUND}+= unbound > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat Dec 15 23:20:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A49F133255C; Sat, 15 Dec 2018 23:20:09 +0000 (UTC) (envelope-from eugen@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) server-signature RSA-PSS (4096 bits) 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 A02598C11A; Sat, 15 Dec 2018 23:20:08 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CF1E1E808; Sat, 15 Dec 2018 23:20:08 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBFNK8FA027782; Sat, 15 Dec 2018 23:20:08 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBFNK80c027781; Sat, 15 Dec 2018 23:20:08 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201812152320.wBFNK80c027781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sat, 15 Dec 2018 23:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342141 - head/usr.sbin/periodic/etc/weekly X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.sbin/periodic/etc/weekly X-SVN-Commit-Revision: 342141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A02598C11A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.83 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 23:20:09 -0000 Author: eugen Date: Sat Dec 15 23:20:08 2018 New Revision: 342141 URL: https://svnweb.freebsd.org/changeset/base/342141 Log: periodic/weekly/340.noid: do not use sysrc(8) that depends on bsdinstall(8) and may be non-functional for system built WITHOUT_BSDINSTALL. (*) Also, add a check for jails sharing whole tree with host (path=/) and do not skip it. Reported by: Andre.Albsmeier@siemens.com (*) MFC after: 1 week Modified: head/usr.sbin/periodic/etc/weekly/340.noid Modified: head/usr.sbin/periodic/etc/weekly/340.noid ============================================================================== --- head/usr.sbin/periodic/etc/weekly/340.noid Sat Dec 15 22:02:02 2018 (r342140) +++ head/usr.sbin/periodic/etc/weekly/340.noid Sat Dec 15 23:20:08 2018 (r342141) @@ -22,13 +22,24 @@ case "$weekly_noid_enable" in exclude='' if [ $(sysctl -n security.jail.jailed) = 0 ]; then + # For jail_conf + . /etc/rc.subr + load_rc_config jail + sep=: OIFS="$IFS" IFS="$sep" - for param in $(jail -f "`sysrc -n jail_conf`" -e "$sep" 2>/dev/null) + for param in $(jail -f "$jail_conf" -e "$sep" 2>/dev/null) do case "$param" in - path=*) exclude="$exclude -path ${param#path=} -prune -or" + path=*) + _p=${param#path=} + if [ -z "$_p" -o "$_p" = / ]; then + continue + fi + + exclude="$exclude -path $_p -prune -or" + ;; esac done IFS="$OIFS" From owner-svn-src-all@freebsd.org Sat Dec 15 23:28:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BB5013327AD; Sat, 15 Dec 2018 23:28:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 879BA8C521; Sat, 15 Dec 2018 23:28:51 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id wBFNSicp094673 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 16 Dec 2018 00:28:44 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: gnn@FreeBSD.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id wBFNShbH082154 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 16 Dec 2018 06:28:43 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r342139 - in head: . bin/date libexec/rc/rc.d share/man/man5 tools/build/mk tools/build/options usr.sbin usr.sbin/timed To: "George V. Neville-Neil" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812152134.wBFLYehs075507@repo.freebsd.org> From: Eugene Grosbein Message-ID: <7a528b98-f554-4d34-a5cb-aa5496a89f3e@grosbein.net> Date: Sun, 16 Dec 2018 06:28:39 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201812152134.wBFLYehs075507@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 879BA8C521 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 23:28:52 -0000 16.12.2018 4:34, George V. Neville-Neil wrote: > Author: gnn > Date: Sat Dec 15 21:34:40 2018 > New Revision: 342139 > URL: https://svnweb.freebsd.org/changeset/base/342139 > > Log: > Remove, the now very outdated, timed. > +20181211: > + Remove the timed and netdate programs from the base tree. Setting > + the time with these deamons has been obsolete for over a decade. > + Is there any replacement software arounnd for timed protocol? I still run some telco hardware that uses my FreeBSD/timed as time source because it cannot use any other protocol, not NTP nor SNTP. From owner-svn-src-all@freebsd.org Sat Dec 15 23:47:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EBBD1332BF1; Sat, 15 Dec 2018 23:47:18 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 147048CBF7; Sat, 15 Dec 2018 23:47:17 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id wBFNl99A094806 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 16 Dec 2018 00:47:10 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: ian@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id wBFNl8PS082441 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 16 Dec 2018 06:47:09 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r341794 - stable/11/etc/periodic/weekly To: Ian Lepore , Andre Albsmeier References: <201812101424.wBAEOgbC053582@repo.freebsd.org> <20181215090926.GA33682@bali> <1544893102.76088.70.camel@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org From: Eugene Grosbein Message-ID: <3a15a5aa-913a-88eb-a072-86526ef4899e@freebsd.org> Date: Sun, 16 Dec 2018 06:47:04 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1544893102.76088.70.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 147048CBF7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2018 23:47:18 -0000 15.12.2018 23:58, Ian Lepore wrote: > It uses sysrc, which sources in /usr/share/bsdconfig/common.subr; this > is the first reference to sysrc in any periodic script, so it does > establish a new dependency, requiring sysrc to be installed on any > system that runs periodic scripts. Thanks, I've re-implemented this without sysrc. > A safer way to extract the root path of all running jails might be > something like: > > if which -s jls; then > allpaths="$(jls -d path)" > for onepath in ${allpaths}; do > # do whatever with ${onepath} here > done > fi This needs to check for all configured full-blown jails including maybe not running at the moment. sysrc is handy but is not really necessary. Andre, this should fix it for your case, please test: fetch -o /tmp/noid.diff 'https://svnweb.freebsd.org/base/head/usr.sbin/periodic/etc/weekly/340.noid?view=patch&r1=342141&r2=342140&pathrev=342141' cd /etc/periodic/weekly && patch -p5 < /tmp/noid.diff Then re-run /etc/periodic/weekly/340.noid Do not forget to remove 340.noid.orig if fixed script succeeds or rename it back to 340.noit if not.