From owner-svn-src-head@freebsd.org Sun Jul 15 00:23:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9089B1044857; Sun, 15 Jul 2018 00:23:12 +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.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 321FC8F274; Sun, 15 Jul 2018 00:23:12 +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 0D76B263E2; Sun, 15 Jul 2018 00:23:12 +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 w6F0NCnJ065428; Sun, 15 Jul 2018 00:23:12 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6F0NBx1065422; Sun, 15 Jul 2018 00:23:11 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807150023.w6F0NBx1065422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 15 Jul 2018 00:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src X-SVN-Commit-Revision: 336299 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 00:23:12 -0000 Author: mmacy Date: Sun Jul 15 00:23:10 2018 New Revision: 336299 URL: https://svnweb.freebsd.org/changeset/base/336299 Log: msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd This corresponds to the latest status (hasn't changed in 9+ years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, cpowl (the complex power functions for float complex, double complex, and long double complex) which are required for C99 compliance and were missing from FreeBSD. Also required for some numerical codes using complex numbered Hamiltonians. Thanks to jhb for tracking down the issue with making weak_reference compile on powerpc. When asked to review, bde said "I don't like it" - but provided no actionable feedback or superior implementations. Discussed with: jhb Submitted by: jmd Differential Revision: https://reviews.freebsd.org/D15919 Added: head/lib/msun/ld128/e_powl.c (contents, props changed) head/lib/msun/ld80/e_powl.c (contents, props changed) head/lib/msun/man/cpow.3 (contents, props changed) head/lib/msun/src/polevll.c (contents, props changed) head/lib/msun/src/s_cpow.c (contents, props changed) head/lib/msun/src/s_cpowf.c (contents, props changed) head/lib/msun/src/s_cpowl.c (contents, props changed) Modified: head/include/complex.h head/lib/msun/Makefile head/lib/msun/Symbol.map head/lib/msun/man/complex.3 head/lib/msun/src/e_pow.c head/lib/msun/src/imprecise.c head/lib/msun/src/math_private.h Modified: head/include/complex.h ============================================================================== --- head/include/complex.h Sat Jul 14 23:53:51 2018 (r336298) +++ head/include/complex.h Sun Jul 15 00:23:10 2018 (r336299) @@ -109,6 +109,10 @@ double complex conj(double complex) __pure2; float complex conjf(float complex) __pure2; long double complex conjl(long double complex) __pure2; +float complex cpowf(float complex, float complex); +double complex cpow(double complex, double complex); +long double complex + cpowl(long double complex, long double complex); float complex cprojf(float complex) __pure2; double complex cproj(double complex) __pure2; long double complex Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Sat Jul 14 23:53:51 2018 (r336298) +++ head/lib/msun/Makefile Sun Jul 15 00:23:10 2018 (r336299) @@ -56,6 +56,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ imprecise.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ + polevll.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c s_clog.c s_clogf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ @@ -98,7 +99,7 @@ COMMON_SRCS+= s_copysignl.c s_fabsl.c s_llrintl.c s_lr COMMON_SRCS+= catrigl.c \ e_acoshl.c e_acosl.c e_asinl.c e_atan2l.c e_atanhl.c \ e_coshl.c e_fmodl.c e_hypotl.c \ - e_lgammal.c e_lgammal_r.c \ + e_lgammal.c e_lgammal_r.c e_powl.c \ e_remainderl.c e_sinhl.c e_sqrtl.c \ invtrig.c k_cosl.c k_sinl.c k_tanl.c \ s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c \ @@ -115,6 +116,7 @@ COMMON_SRCS+= catrig.c catrigf.c \ s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \ s_cimag.c s_cimagf.c s_cimagl.c \ s_conj.c s_conjf.c s_conjl.c \ + s_cpow.c s_cpowf.c s_cpowl.c \ s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c \ s_csinh.c s_csinhf.c s_ctanh.c s_ctanhf.c @@ -134,7 +136,7 @@ INCS+= fenv.h math.h MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \ ceil.3 cacos.3 ccos.3 ccosh.3 cexp.3 \ - cimag.3 clog.3 copysign.3 cos.3 cosh.3 csqrt.3 erf.3 \ + cimag.3 clog.3 copysign.3 cos.3 cosh.3 cpow.3 csqrt.3 erf.3 \ exp.3 fabs.3 fdim.3 \ feclearexcept.3 feenableexcept.3 fegetenv.3 \ fegetround.3 fenv.3 floor.3 \ @@ -172,6 +174,7 @@ MLINKS+=clog.3 clogf.3 clog.3 clogl.3 MLINKS+=copysign.3 copysignf.3 copysign.3 copysignl.3 MLINKS+=cos.3 cosf.3 cos.3 cosl.3 MLINKS+=cosh.3 coshf.3 cosh.3 coshl.3 +MLINKS+=cpow.3 cpowf.3 cpow.3 cpowl.3 MLINKS+=csqrt.3 csqrtf.3 csqrt.3 csqrtl.3 MLINKS+=erf.3 erfc.3 erf.3 erff.3 erf.3 erfcf.3 erf.3 erfl.3 erf.3 erfcl.3 MLINKS+=exp.3 expm1.3 exp.3 expm1f.3 exp.3 expm1l.3 exp.3 pow.3 exp.3 powf.3 \ Modified: head/lib/msun/Symbol.map ============================================================================== --- head/lib/msun/Symbol.map Sat Jul 14 23:53:51 2018 (r336298) +++ head/lib/msun/Symbol.map Sun Jul 15 00:23:10 2018 (r336299) @@ -274,10 +274,10 @@ FBSD_1.3 { log1pl; log2l; logl; + powl; sinhl; tanhl; /* Implemented as weak aliases for imprecise versions */ - powl; tgammal; }; @@ -297,6 +297,9 @@ FBSD_1.5 { clog; clogf; clogl; + cpow; + cpowf; + cpowl; sincos; sincosf; sincosl; Added: head/lib/msun/ld128/e_powl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/ld128/e_powl.c Sun Jul 15 00:23:10 2018 (r336299) @@ -0,0 +1,443 @@ +/*- + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * Copyright (c) 2008 Stephen L. Moshier + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* powl(x,y) return x**y + * + * n + * Method: Let x = 2 * (1+f) + * 1. Compute and return log2(x) in two pieces: + * log2(x) = w1 + w2, + * where w1 has 113-53 = 60 bit trailing zeros. + * 2. Perform y*log2(x) = n+y' by simulating muti-precision + * arithmetic, where |y'|<=0.5. + * 3. Return x**y = 2**n*exp(y'*log2) + * + * Special cases: + * 1. (anything) ** 0 is 1 + * 2. (anything) ** 1 is itself + * 3. (anything) ** NAN is NAN + * 4. NAN ** (anything except 0) is NAN + * 5. +-(|x| > 1) ** +INF is +INF + * 6. +-(|x| > 1) ** -INF is +0 + * 7. +-(|x| < 1) ** +INF is +0 + * 8. +-(|x| < 1) ** -INF is +INF + * 9. +-1 ** +-INF is NAN + * 10. +0 ** (+anything except 0, NAN) is +0 + * 11. -0 ** (+anything except 0, NAN, odd integer) is +0 + * 12. +0 ** (-anything except 0, NAN) is +INF + * 13. -0 ** (-anything except 0, NAN, odd integer) is +INF + * 14. -0 ** (odd integer) = -( +0 ** (odd integer) ) + * 15. +INF ** (+anything except 0,NAN) is +INF + * 16. +INF ** (-anything except 0,NAN) is +0 + * 17. -INF ** (anything) = -0 ** (-anything) + * 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer) + * 19. (-anything except 0 and inf) ** (non-integer) is NAN + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "math_private.h" + +static const long double bp[] = { + 1.0L, + 1.5L, +}; + +/* log_2(1.5) */ +static const long double dp_h[] = { + 0.0, + 5.8496250072115607565592654282227158546448E-1L +}; + +/* Low part of log_2(1.5) */ +static const long double dp_l[] = { + 0.0, + 1.0579781240112554492329533686862998106046E-16L +}; + +static const long double zero = 0.0L, + one = 1.0L, + two = 2.0L, + two113 = 1.0384593717069655257060992658440192E34L, + huge = 1.0e3000L, + tiny = 1.0e-3000L; + +/* 3/2 log x = 3 z + z^3 + z^3 (z^2 R(z^2)) + z = (x-1)/(x+1) + 1 <= x <= 1.25 + Peak relative error 2.3e-37 */ +static const long double LN[] = +{ + -3.0779177200290054398792536829702930623200E1L, + 6.5135778082209159921251824580292116201640E1L, + -4.6312921812152436921591152809994014413540E1L, + 1.2510208195629420304615674658258363295208E1L, + -9.9266909031921425609179910128531667336670E-1L +}; +static const long double LD[] = +{ + -5.129862866715009066465422805058933131960E1L, + 1.452015077564081884387441590064272782044E2L, + -1.524043275549860505277434040464085593165E2L, + 7.236063513651544224319663428634139768808E1L, + -1.494198912340228235853027849917095580053E1L + /* 1.0E0 */ +}; + +/* exp(x) = 1 + x - x / (1 - 2 / (x - x^2 R(x^2))) + 0 <= x <= 0.5 + Peak relative error 5.7e-38 */ +static const long double PN[] = +{ + 5.081801691915377692446852383385968225675E8L, + 9.360895299872484512023336636427675327355E6L, + 4.213701282274196030811629773097579432957E4L, + 5.201006511142748908655720086041570288182E1L, + 9.088368420359444263703202925095675982530E-3L, +}; +static const long double PD[] = +{ + 3.049081015149226615468111430031590411682E9L, + 1.069833887183886839966085436512368982758E8L, + 8.259257717868875207333991924545445705394E5L, + 1.872583833284143212651746812884298360922E3L, + /* 1.0E0 */ +}; + +static const long double + /* ln 2 */ + lg2 = 6.9314718055994530941723212145817656807550E-1L, + lg2_h = 6.9314718055994528622676398299518041312695E-1L, + lg2_l = 2.3190468138462996154948554638754786504121E-17L, + ovt = 8.0085662595372944372e-0017L, + /* 2/(3*log(2)) */ + cp = 9.6179669392597560490661645400126142495110E-1L, + cp_h = 9.6179669392597555432899980587535537779331E-1L, + cp_l = 5.0577616648125906047157785230014751039424E-17L; + +long double +powl(long double x, long double y) +{ + long double z, ax, z_h, z_l, p_h, p_l; + long double yy1, t1, t2, r, s, t, u, v, w; + long double s2, s_h, s_l, t_h, t_l; + int32_t i, j, k, yisint, n; + u_int32_t ix, iy; + int32_t hx, hy; + ieee_quad_shape_type o, p, q; + + p.value = x; + hx = p.parts32.mswhi; + ix = hx & 0x7fffffff; + + q.value = y; + hy = q.parts32.mswhi; + iy = hy & 0x7fffffff; + + + /* y==zero: x**0 = 1 */ + if ((iy | q.parts32.mswlo | q.parts32.lswhi | q.parts32.lswlo) == 0) + return one; + + /* 1.0**y = 1; -1.0**+-Inf = 1 */ + if (x == one) + return one; + if (x == -1.0L && iy == 0x7fff0000 + && (q.parts32.mswlo | q.parts32.lswhi | q.parts32.lswlo) == 0) + return one; + + /* +-NaN return x+y */ + if ((ix > 0x7fff0000) + || ((ix == 0x7fff0000) + && ((p.parts32.mswlo | p.parts32.lswhi | p.parts32.lswlo) != 0)) + || (iy > 0x7fff0000) + || ((iy == 0x7fff0000) + && ((q.parts32.mswlo | q.parts32.lswhi | q.parts32.lswlo) != 0))) + return x + y; + + /* determine if y is an odd int when x < 0 + * yisint = 0 ... y is not an integer + * yisint = 1 ... y is an odd int + * yisint = 2 ... y is an even int + */ + yisint = 0; + if (hx < 0) + { + if (iy >= 0x40700000) /* 2^113 */ + yisint = 2; /* even integer y */ + else if (iy >= 0x3fff0000) /* 1.0 */ + { + if (floorl (y) == y) + { + z = 0.5 * y; + if (floorl (z) == z) + yisint = 2; + else + yisint = 1; + } + } + } + + /* special value of y */ + if ((q.parts32.mswlo | q.parts32.lswhi | q.parts32.lswlo) == 0) + { + if (iy == 0x7fff0000) /* y is +-inf */ + { + if (((ix - 0x3fff0000) | p.parts32.mswlo | p.parts32.lswhi | + p.parts32.lswlo) == 0) + return y - y; /* +-1**inf is NaN */ + else if (ix >= 0x3fff0000) /* (|x|>1)**+-inf = inf,0 */ + return (hy >= 0) ? y : zero; + else /* (|x|<1)**-,+inf = inf,0 */ + return (hy < 0) ? -y : zero; + } + if (iy == 0x3fff0000) + { /* y is +-1 */ + if (hy < 0) + return one / x; + else + return x; + } + if (hy == 0x40000000) + return x * x; /* y is 2 */ + if (hy == 0x3ffe0000) + { /* y is 0.5 */ + if (hx >= 0) /* x >= +0 */ + return sqrtl (x); + } + } + + ax = fabsl (x); + /* special value of x */ + if ((p.parts32.mswlo | p.parts32.lswhi | p.parts32.lswlo) == 0) + { + if (ix == 0x7fff0000 || ix == 0 || ix == 0x3fff0000) + { + z = ax; /*x is +-0,+-inf,+-1 */ + if (hy < 0) + z = one / z; /* z = (1/|x|) */ + if (hx < 0) + { + if (((ix - 0x3fff0000) | yisint) == 0) + { + z = (z - z) / (z - z); /* (-1)**non-int is NaN */ + } + else if (yisint == 1) + z = -z; /* (x<0)**odd = -(|x|**odd) */ + } + return z; + } + } + + /* (x<0)**(non-int) is NaN */ + if (((((u_int32_t) hx >> 31) - 1) | yisint) == 0) + return (x - x) / (x - x); + + /* |y| is huge. + 2^-16495 = 1/2 of smallest representable value. + If (1 - 1/131072)^y underflows, y > 1.4986e9 */ + if (iy > 0x401d654b) + { + /* if (1 - 2^-113)^y underflows, y > 1.1873e38 */ + if (iy > 0x407d654b) + { + if (ix <= 0x3ffeffff) + return (hy < 0) ? huge * huge : tiny * tiny; + if (ix >= 0x3fff0000) + return (hy > 0) ? huge * huge : tiny * tiny; + } + /* over/underflow if x is not close to one */ + if (ix < 0x3ffeffff) + return (hy < 0) ? huge * huge : tiny * tiny; + if (ix > 0x3fff0000) + return (hy > 0) ? huge * huge : tiny * tiny; + } + + n = 0; + /* take care subnormal number */ + if (ix < 0x00010000) + { + ax *= two113; + n -= 113; + o.value = ax; + ix = o.parts32.mswhi; + } + n += ((ix) >> 16) - 0x3fff; + j = ix & 0x0000ffff; + /* determine interval */ + ix = j | 0x3fff0000; /* normalize ix */ + if (j <= 0x3988) + k = 0; /* |x|> 31) - 1) | (yisint - 1)) == 0) + s = -one; /* (-ve)**(odd int) */ + + /* split up y into yy1+y2 and compute (yy1+y2)*(t1+t2) */ + yy1 = y; + o.value = yy1; + o.parts32.lswlo = 0; + o.parts32.lswhi &= 0xf8000000; + yy1 = o.value; + p_l = (y - yy1) * t1 + y * t2; + p_h = yy1 * t1; + z = p_l + p_h; + o.value = z; + j = o.parts32.mswhi; + if (j >= 0x400d0000) /* z >= 16384 */ + { + /* if z > 16384 */ + if (((j - 0x400d0000) | o.parts32.mswlo | o.parts32.lswhi | + o.parts32.lswlo) != 0) + return s * huge * huge; /* overflow */ + else + { + if (p_l + ovt > z - p_h) + return s * huge * huge; /* overflow */ + } + } + else if ((j & 0x7fffffff) >= 0x400d01b9) /* z <= -16495 */ + { + /* z < -16495 */ + if (((j - 0xc00d01bc) | o.parts32.mswlo | o.parts32.lswhi | + o.parts32.lswlo) + != 0) + return s * tiny * tiny; /* underflow */ + else + { + if (p_l <= z - p_h) + return s * tiny * tiny; /* underflow */ + } + } + /* compute 2**(p_h+p_l) */ + i = j & 0x7fffffff; + k = (i >> 16) - 0x3fff; + n = 0; + if (i > 0x3ffe0000) + { /* if |z| > 0.5, set n = [z+0.5] */ + n = floorl (z + 0.5L); + t = n; + p_h -= t; + } + t = p_l + p_h; + o.value = t; + o.parts32.lswlo = 0; + o.parts32.lswhi &= 0xf8000000; + t = o.value; + u = t * lg2_h; + v = (p_l - (t - p_h)) * lg2 + t * lg2_l; + z = u + v; + w = v - (z - u); + /* exp(z) */ + t = z * z; + u = PN[0] + t * (PN[1] + t * (PN[2] + t * (PN[3] + t * PN[4]))); + v = PD[0] + t * (PD[1] + t * (PD[2] + t * (PD[3] + t))); + t1 = z - t * u / v; + r = (z * t1) / (t1 - two) - (w + z * w); + z = one - (r - z); + o.value = z; + j = o.parts32.mswhi; + j += (n << 16); + if ((j >> 16) <= 0) + z = scalbnl (z, n); /* subnormal output */ + else + { + o.parts32.mswhi = j; + z = o.value; + } + return s * z; +} Added: head/lib/msun/ld80/e_powl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/ld80/e_powl.c Sun Jul 15 00:23:10 2018 (r336299) @@ -0,0 +1,616 @@ +/*- + * Copyright (c) 2008 Stephen L. Moshier + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* powl.c + * + * Power function, long double precision + * + * + * + * SYNOPSIS: + * + * long double x, y, z, powl(); + * + * z = powl( x, y ); + * + * + * + * DESCRIPTION: + * + * Computes x raised to the yth power. Analytically, + * + * x**y = exp( y log(x) ). + * + * Following Cody and Waite, this program uses a lookup table + * of 2**-i/32 and pseudo extended precision arithmetic to + * obtain several extra bits of accuracy in both the logarithm + * and the exponential. + * + * + * + * ACCURACY: + * + * The relative error of pow(x,y) can be estimated + * by y dl ln(2), where dl is the absolute error of + * the internally computed base 2 logarithm. At the ends + * of the approximation interval the logarithm equal 1/32 + * and its relative error is about 1 lsb = 1.1e-19. Hence + * the predicted relative error in the result is 2.3e-21 y . + * + * Relative error: + * arithmetic domain # trials peak rms + * + * IEEE +-1000 40000 2.8e-18 3.7e-19 + * .001 < x < 1000, with log(x) uniformly distributed. + * -1000 < y < 1000, y uniformly distributed. + * + * IEEE 0,8700 60000 6.5e-18 1.0e-18 + * 0.99 < x < 1.01, 0 < y < 8700, uniformly distributed. + * + * + * ERROR MESSAGES: + * + * message condition value returned + * pow overflow x**y > MAXNUM INFINITY + * pow underflow x**y < 1/MAXNUM 0.0 + * pow domain x<0 and y noninteger 0.0 + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "math_private.h" + +/* Table size */ +#define NXT 32 +/* log2(Table size) */ +#define LNXT 5 + +/* log(1+x) = x - .5x^2 + x^3 * P(z)/Q(z) + * on the domain 2^(-1/32) - 1 <= x <= 2^(1/32) - 1 + */ +static long double P[] = { + 8.3319510773868690346226E-4L, + 4.9000050881978028599627E-1L, + 1.7500123722550302671919E0L, + 1.4000100839971580279335E0L, +}; +static long double Q[] = { +/* 1.0000000000000000000000E0L,*/ + 5.2500282295834889175431E0L, + 8.4000598057587009834666E0L, + 4.2000302519914740834728E0L, +}; +/* A[i] = 2^(-i/32), rounded to IEEE long double precision. + * If i is even, A[i] + B[i/2] gives additional accuracy. + */ +static long double A[33] = { + 1.0000000000000000000000E0L, + 9.7857206208770013448287E-1L, + 9.5760328069857364691013E-1L, + 9.3708381705514995065011E-1L, + 9.1700404320467123175367E-1L, + 8.9735453750155359320742E-1L, + 8.7812608018664974155474E-1L, + 8.5930964906123895780165E-1L, + 8.4089641525371454301892E-1L, + 8.2287773907698242225554E-1L, + 8.0524516597462715409607E-1L, + 7.8799042255394324325455E-1L, + 7.7110541270397041179298E-1L, + 7.5458221379671136985669E-1L, + 7.3841307296974965571198E-1L, + 7.2259040348852331001267E-1L, + 7.0710678118654752438189E-1L, + 6.9195494098191597746178E-1L, + 6.7712777346844636413344E-1L, + 6.6261832157987064729696E-1L, + 6.4841977732550483296079E-1L, + 6.3452547859586661129850E-1L, + 6.2092890603674202431705E-1L, + 6.0762367999023443907803E-1L, + 5.9460355750136053334378E-1L, + 5.8186242938878875689693E-1L, + 5.6939431737834582684856E-1L, + 5.5719337129794626814472E-1L, + 5.4525386633262882960438E-1L, + 5.3357020033841180906486E-1L, + 5.2213689121370692017331E-1L, + 5.1094857432705833910408E-1L, + 5.0000000000000000000000E-1L, +}; +static long double B[17] = { + 0.0000000000000000000000E0L, + 2.6176170809902549338711E-20L, +-1.0126791927256478897086E-20L, + 1.3438228172316276937655E-21L, + 1.2207982955417546912101E-20L, +-6.3084814358060867200133E-21L, + 1.3164426894366316434230E-20L, +-1.8527916071632873716786E-20L, + 1.8950325588932570796551E-20L, + 1.5564775779538780478155E-20L, + 6.0859793637556860974380E-21L, +-2.0208749253662532228949E-20L, + 1.4966292219224761844552E-20L, + 3.3540909728056476875639E-21L, +-8.6987564101742849540743E-22L, +-1.2327176863327626135542E-20L, + 0.0000000000000000000000E0L, +}; + +/* 2^x = 1 + x P(x), + * on the interval -1/32 <= x <= 0 + */ +static long double R[] = { + 1.5089970579127659901157E-5L, + 1.5402715328927013076125E-4L, + 1.3333556028915671091390E-3L, + 9.6181291046036762031786E-3L, + 5.5504108664798463044015E-2L, + 2.4022650695910062854352E-1L, + 6.9314718055994530931447E-1L, +}; + +#define douba(k) A[k] +#define doubb(k) B[k] +#define MEXP (NXT*16384.0L) +/* The following if denormal numbers are supported, else -MEXP: */ +#define MNEXP (-NXT*(16384.0L+64.0L)) +/* log2(e) - 1 */ +#define LOG2EA 0.44269504088896340735992L + +#define F W +#define Fa Wa +#define Fb Wb +#define G W +#define Ga Wa +#define Gb u +#define H W +#define Ha Wb +#define Hb Wb + +static const long double MAXLOGL = 1.1356523406294143949492E4L; +static const long double MINLOGL = -1.13994985314888605586758E4L; +static const long double LOGE2L = 6.9314718055994530941723E-1L; +static volatile long double z; +static long double w, W, Wa, Wb, ya, yb, u; +static const long double huge = 0x1p10000L; +#if 0 /* XXX Prevent gcc from erroneously constant folding this. */ +static const long double twom10000 = 0x1p-10000L; +#else +static volatile long double twom10000 = 0x1p-10000L; +#endif + +static long double reducl( long double ); +static long double powil ( long double, int ); + +long double +powl(long double x, long double y) +{ +/* double F, Fa, Fb, G, Ga, Gb, H, Ha, Hb */ +int i, nflg, iyflg, yoddint; +long e; + +if( y == 0.0L ) + return( 1.0L ); + +if( x == 1.0L ) + return( 1.0L ); + +if( isnan(x) ) + return( x ); +if( isnan(y) ) + return( y ); + +if( y == 1.0L ) + return( x ); + +if( !isfinite(y) && x == -1.0L ) + return( 1.0L ); + +if( y >= LDBL_MAX ) + { + if( x > 1.0L ) + return( INFINITY ); + if( x > 0.0L && x < 1.0L ) + return( 0.0L ); + if( x < -1.0L ) + return( INFINITY ); + if( x > -1.0L && x < 0.0L ) + return( 0.0L ); + } +if( y <= -LDBL_MAX ) + { + if( x > 1.0L ) + return( 0.0L ); + if( x > 0.0L && x < 1.0L ) + return( INFINITY ); + if( x < -1.0L ) + return( 0.0L ); + if( x > -1.0L && x < 0.0L ) + return( INFINITY ); + } +if( x >= LDBL_MAX ) + { + if( y > 0.0L ) + return( INFINITY ); + return( 0.0L ); + } + +w = floorl(y); +/* Set iyflg to 1 if y is an integer. */ +iyflg = 0; +if( w == y ) + iyflg = 1; + +/* Test for odd integer y. */ +yoddint = 0; +if( iyflg ) + { + ya = fabsl(y); + ya = floorl(0.5L * ya); + yb = 0.5L * fabsl(w); + if( ya != yb ) + yoddint = 1; + } + +if( x <= -LDBL_MAX ) + { + if( y > 0.0L ) + { + if( yoddint ) + return( -INFINITY ); + return( INFINITY ); + } + if( y < 0.0L ) + { + if( yoddint ) + return( -0.0L ); + return( 0.0 ); + } + } + + +nflg = 0; /* flag = 1 if x<0 raised to integer power */ +if( x <= 0.0L ) + { + if( x == 0.0L ) + { + if( y < 0.0 ) + { + if( signbit(x) && yoddint ) + return( -INFINITY ); + return( INFINITY ); + } + if( y > 0.0 ) + { + if( signbit(x) && yoddint ) + return( -0.0L ); + return( 0.0 ); + } + if( y == 0.0L ) + return( 1.0L ); /* 0**0 */ + else + return( 0.0L ); /* 0**y */ + } + else + { + if( iyflg == 0 ) + return (x - x) / (x - x); /* (x<0)**(non-int) is NaN */ + nflg = 1; + } + } + +/* Integer power of an integer. */ + +if( iyflg ) + { + i = w; + w = floorl(x); + if( (w == x) && (fabsl(y) < 32768.0) ) + { + w = powil( x, (int) y ); + return( w ); + } + } + + +if( nflg ) + x = fabsl(x); + +/* separate significand from exponent */ +x = frexpl( x, &i ); +e = i; + +/* find significand in antilog table A[] */ +i = 1; +if( x <= douba(17) ) + i = 17; +if( x <= douba(i+8) ) + i += 8; +if( x <= douba(i+4) ) + i += 4; +if( x <= douba(i+2) ) + i += 2; +if( x >= douba(1) ) + i = -1; +i += 1; + + +/* Find (x - A[i])/A[i] + * in order to compute log(x/A[i]): + * + * log(x) = log( a x/a ) = log(a) + log(x/a) + * + * log(x/a) = log(1+v), v = x/a - 1 = (x-a)/a + */ +x -= douba(i); +x -= doubb(i/2); +x /= douba(i); + + +/* rational approximation for log(1+v): + * + * log(1+v) = v - v**2/2 + v**3 P(v) / Q(v) + */ +z = x*x; +w = x * ( z * __polevll( x, P, 3 ) / __p1evll( x, Q, 3 ) ); +w = w - ldexpl( z, -1 ); /* w - 0.5 * z */ + +/* Convert to base 2 logarithm: + * multiply by log2(e) = 1 + LOG2EA + */ +z = LOG2EA * w; +z += w; +z += LOG2EA * x; +z += x; + +/* Compute exponent term of the base 2 logarithm. */ +w = -i; +w = ldexpl( w, -LNXT ); /* divide by NXT */ +w += e; +/* Now base 2 log of x is w + z. */ + +/* Multiply base 2 log by y, in extended precision. */ + +/* separate y into large part ya + * and small part yb less than 1/NXT + */ +ya = reducl(y); +yb = y - ya; + +/* (w+z)(ya+yb) + * = w*ya + w*yb + z*y + */ +F = z * y + w * yb; +Fa = reducl(F); +Fb = F - Fa; + +G = Fa + w * ya; +Ga = reducl(G); +Gb = G - Ga; + +H = Fb + Gb; +Ha = reducl(H); +w = ldexpl( Ga+Ha, LNXT ); + +/* Test the power of 2 for overflow */ +if( w > MEXP ) + return (huge * huge); /* overflow */ + +if( w < MNEXP ) + return (twom10000 * twom10000); /* underflow */ + +e = w; +Hb = H - Ha; + +if( Hb > 0.0L ) + { + e += 1; + Hb -= (1.0L/NXT); /*0.0625L;*/ + } + +/* Now the product y * log2(x) = Hb + e/NXT. + * + * Compute base 2 exponential of Hb, + * where -0.0625 <= Hb <= 0. + */ +z = Hb * __polevll( Hb, R, 6 ); /* z = 2**Hb - 1 */ + +/* Express e/NXT as an integer plus a negative number of (1/NXT)ths. + * Find lookup table entry for the fractional power of 2. + */ +if( e < 0 ) + i = 0; +else + i = 1; +i = e/NXT + i; +e = NXT*i - e; +w = douba( e ); +z = w * z; /* 2**-e * ( 1 + (2**Hb-1) ) */ +z = z + w; +z = ldexpl( z, i ); /* multiply by integer power of 2 */ + +if( nflg ) + { +/* For negative x, + * find out if the integer exponent + * is odd or even. + */ + w = ldexpl( y, -1 ); + w = floorl(w); + w = ldexpl( w, 1 ); + if( w != y ) + z = -z; /* odd exponent */ + } + +return( z ); +} + + +/* Find a multiple of 1/NXT that is within 1/NXT of x. */ +static long double *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Jul 15 00:31:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E50BD1044C01; Sun, 15 Jul 2018 00:31:17 +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.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 8FB728F521; Sun, 15 Jul 2018 00:31:17 +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 70F7126436; Sun, 15 Jul 2018 00:31:17 +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 w6F0VHsV068018; Sun, 15 Jul 2018 00:31:17 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6F0VHUT068017; Sun, 15 Jul 2018 00:31:17 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807150031.w6F0VHUT068017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 15 Jul 2018 00:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336300 - head/sys/tests/epoch X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/tests/epoch X-SVN-Commit-Revision: 336300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 00:31:18 -0000 Author: mmacy Date: Sun Jul 15 00:31:17 2018 New Revision: 336300 URL: https://svnweb.freebsd.org/changeset/base/336300 Log: epoch_test: fix compile - update to new interface Reported by: manu Modified: head/sys/tests/epoch/epoch_test.c Modified: head/sys/tests/epoch/epoch_test.c ============================================================================== --- head/sys/tests/epoch/epoch_test.c Sun Jul 15 00:23:10 2018 (r336299) +++ head/sys/tests/epoch/epoch_test.c Sun Jul 15 00:31:17 2018 (r336300) @@ -67,6 +67,7 @@ epoch_testcase1(struct epoch_test_instance *eti) { int i, startticks; struct mtx *mtxp; + struct epoch_tracker et; startticks = ticks; i = 0; @@ -76,11 +77,11 @@ epoch_testcase1(struct epoch_test_instance *eti) mtxp = &mutexB; while (i < iterations) { - epoch_enter_preempt(test_epoch); + epoch_enter_preempt(test_epoch, &et); mtx_lock(mtxp); i++; mtx_unlock(mtxp); - epoch_exit_preempt(test_epoch); + epoch_exit_preempt(test_epoch, &et); epoch_wait_preempt(test_epoch); } printf("test1: thread: %d took %d ticks to complete %d iterations\n", @@ -92,18 +93,19 @@ epoch_testcase2(struct epoch_test_instance *eti) { int i, startticks; struct mtx *mtxp; + struct epoch_tracker et; startticks = ticks; i = 0; mtxp = &mutexA; while (i < iterations) { - epoch_enter_preempt(test_epoch); + epoch_enter_preempt(test_epoch, &et); mtx_lock(mtxp); DELAY(1); i++; mtx_unlock(mtxp); - epoch_exit_preempt(test_epoch); + epoch_exit_preempt(test_epoch, &et); epoch_wait_preempt(test_epoch); } printf("test2: thread: %d took %d ticks to complete %d iterations\n", From owner-svn-src-head@freebsd.org Sun Jul 15 00:47:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C648E10454A5; Sun, 15 Jul 2018 00:47:07 +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.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 7B91C8FC35; Sun, 15 Jul 2018 00:47:07 +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 3E8AE2670C; Sun, 15 Jul 2018 00:47:07 +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 w6F0l6K8075706; Sun, 15 Jul 2018 00:47:06 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6F0l68J075705; Sun, 15 Jul 2018 00:47:06 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807150047.w6F0l68J075705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 15 Jul 2018 00:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336301 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 336301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 00:47:08 -0000 Author: mmacy Date: Sun Jul 15 00:47:06 2018 New Revision: 336301 URL: https://svnweb.freebsd.org/changeset/base/336301 Log: acquire inp lock around ip6_pcbopt to fix IPV6_TCLASS panic Simple fix to address panics relating to setting IPV6_TCLASS with setsockopt(). The premise of this change is that it is ok to call malloc with M_NOWAIT while holding a lock on the in6p. If it later turns out that it is not ok, then major surgery will be required, as ip6_setpktopt() will have to be fixed (as it also calls malloc with M_NOWAIT) which pulls in the ip6_pcbopts(), ip6_setpktopts(), ip6_setpktopt() call chain. Submitted by: Jason Eggnet Reviewed by: rrs, transport, sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16201 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Sun Jul 15 00:31:17 2018 (r336300) +++ head/sys/netinet6/ip6_output.c Sun Jul 15 00:47:06 2018 (r336301) @@ -1636,11 +1636,17 @@ do { \ error = EINVAL; break; } + INP_WLOCK(in6p); + if (in6p->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(in6p); + return (ECONNRESET); + } optp = &in6p->in6p_outputopts; error = ip6_pcbopt(IPV6_HOPLIMIT, (u_char *)&optval, sizeof(optval), optp, (td != NULL) ? td->td_ucred : NULL, uproto); + INP_WUNLOCK(in6p); break; } @@ -1750,11 +1756,17 @@ do { \ break; { struct ip6_pktopts **optp; + INP_WLOCK(in6p); + if (in6p->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(in6p); + return (ECONNRESET); + } optp = &in6p->in6p_outputopts; error = ip6_pcbopt(optname, (u_char *)&optval, sizeof(optval), optp, (td != NULL) ? td->td_ucred : NULL, uproto); + INP_WUNLOCK(in6p); break; } @@ -1836,10 +1848,16 @@ do { \ break; optlen = sopt->sopt_valsize; optbuf = optbuf_storage; + INP_WLOCK(in6p); + if (in6p->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(in6p); + return (ECONNRESET); + } optp = &in6p->in6p_outputopts; error = ip6_pcbopt(optname, optbuf, optlen, optp, (td != NULL) ? td->td_ucred : NULL, uproto); + INP_WUNLOCK(in6p); break; } #undef OPTSET @@ -2286,7 +2304,9 @@ ip6_pcbopt(int optname, u_char *buf, int len, struct i if (*pktopt == NULL) { *pktopt = malloc(sizeof(struct ip6_pktopts), M_IP6OPT, - M_WAITOK); + M_NOWAIT); + if (*pktopt == NULL) + return (ENOBUFS); ip6_initpktopts(*pktopt); } opt = *pktopt; From owner-svn-src-head@freebsd.org Sun Jul 15 05:29:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2194B102A88E; Sun, 15 Jul 2018 05:29:41 +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 BDAD17922B; Sun, 15 Jul 2018 05:29:40 +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 930B71713; Sun, 15 Jul 2018 05:29:40 +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 w6F5Ted8019342; Sun, 15 Jul 2018 05:29:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6F5Te51019341; Sun, 15 Jul 2018 05:29:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807150529.w6F5Te51019341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 15 Jul 2018 05:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336302 - head/usr.sbin/kldxref X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/kldxref X-SVN-Commit-Revision: 336302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 05:29:41 -0000 Author: imp Date: Sun Jul 15 05:29:39 2018 New Revision: 336302 URL: https://svnweb.freebsd.org/changeset/base/336302 Log: Use EF_SEG_READ_STRING instead of EF_SEG_READ when reading strings. Normally, we can get away with just reading the 1k buffer for the string, since the placement of the data is generally no where near the end of the file. However, it's possible that the string is within the last 1k of the file, in which case the read will fail, and we'll not produce the proper records needed for devmatch to work. By reading using EF_SEG_READ_STRING, we automatically work around these problems while still retaining safety. This fix a problem with devmatch where we wouldn't load certain modules (like ums). This didn't always happen (my tree didn't exhibit it, while nathan's did because his optimization options were more agressive). Reported by: nathanw@ Modified: head/usr.sbin/kldxref/kldxref.c Modified: head/usr.sbin/kldxref/kldxref.c ============================================================================== --- head/usr.sbin/kldxref/kldxref.c Sun Jul 15 00:47:06 2018 (r336301) +++ head/usr.sbin/kldxref/kldxref.c Sun Jul 15 05:29:39 2018 (r336302) @@ -420,7 +420,7 @@ parse_entry(struct mod_metadata *md, const char *cval, break; case MDT_PNP_INFO: check(EF_SEG_READ_REL(ef, data, sizeof(pnp), &pnp)); - check(EF_SEG_READ(ef, (Elf_Off)pnp.descr, sizeof(descr), descr)); + check(EF_SEG_READ_STRING(ef, (Elf_Off)pnp.descr, sizeof(descr), descr)); descr[sizeof(descr) - 1] = '\0'; if (dflag) { printf(" pnp info for bus %s format %s %d entries of %d bytes\n", @@ -510,7 +510,7 @@ parse_entry(struct mod_metadata *md, const char *cval, ptr = *(char **)(walker + elt->pe_offset); buffer[0] = '\0'; if (ptr != NULL) { - EF_SEG_READ(ef, (Elf_Off)ptr, + EF_SEG_READ_STRING(ef, (Elf_Off)ptr, sizeof(buffer), buffer); buffer[sizeof(buffer) - 1] = '\0'; } From owner-svn-src-head@freebsd.org Sun Jul 15 09:14:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35089103335C; Sun, 15 Jul 2018 09:14:31 +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 DBB75805A8; Sun, 15 Jul 2018 09:14:30 +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 BD62440A5; Sun, 15 Jul 2018 09:14:30 +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 w6F9EU68037531; Sun, 15 Jul 2018 09:14:30 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6F9EU0i037530; Sun, 15 Jul 2018 09:14:30 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201807150914.w6F9EU0i037530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 15 Jul 2018 09:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336303 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 336303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 09:14:31 -0000 Author: jilles Date: Sun Jul 15 09:14:30 2018 New Revision: 336303 URL: https://svnweb.freebsd.org/changeset/base/336303 Log: sh: Don't use padvance() for MAIL/MAILPATH Using padvance() requires undoing its append of '/' and prevents adjusting its '%' logic to allow most directories with '%' in PATH. No functional change is intended. Modified: head/bin/sh/mail.c Modified: head/bin/sh/mail.c ============================================================================== --- head/bin/sh/mail.c Sun Jul 15 05:29:39 2018 (r336302) +++ head/bin/sh/mail.c Sun Jul 15 09:14:30 2018 (r336303) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); */ #include "shell.h" -#include "exec.h" /* defines padvance() */ #include "mail.h" #include "var.h" #include "output.h" @@ -72,9 +71,9 @@ void chkmail(int silent) { int i; - const char *mpath; + char *mpath; char *p; - char *q; + char *msg; struct stackmark smark; struct stat statb; @@ -83,22 +82,25 @@ chkmail(int silent) if (nmboxes == 0) return; setstackmark(&smark); - mpath = mpathset()? mpathval() : mailval(); + mpath = stsavestr(mpathset()? mpathval() : mailval()); for (i = 0 ; i < nmboxes ; i++) { - p = padvance(&mpath, ""); - if (p == NULL) - break; + p = mpath; if (*p == '\0') - continue; - for (q = p ; *q ; q++); - if (q[-1] != '/') - abort(); - q[-1] = '\0'; /* delete trailing '/' */ + break; + mpath = strchrnul(mpath, ':'); + if (*mpath != '\0') { + *mpath++ = '\0'; + if (p == mpath - 1) + continue; + } + msg = strchr(p, '%'); + if (msg != NULL) + *msg++ = '\0'; #ifdef notdef /* this is what the System V shell claims to do (it lies) */ if (stat(p, &statb) < 0) statb.st_mtime = 0; if (statb.st_mtime > mailtime[i] && ! silent) { - out2str(pathopt? pathopt : "you have mail"); + out2str(msg? msg : "you have mail"); out2c('\n'); } mailtime[i] = statb.st_mtime; @@ -106,7 +108,7 @@ chkmail(int silent) if (stat(p, &statb) < 0) statb.st_size = 0; if (statb.st_size > mailtime[i] && ! silent) { - out2str(pathopt? pathopt : "you have mail"); + out2str(msg? msg : "you have mail"); out2c('\n'); } mailtime[i] = statb.st_size; From owner-svn-src-head@freebsd.org Sun Jul 15 14:12:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BBA510408EF; Sun, 15 Jul 2018 14:12:49 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F12268999F; Sun, 15 Jul 2018 14:12:48 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x232.google.com with SMTP id e13-v6so35335317iof.6; Sun, 15 Jul 2018 07:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tC/rJhpg/HBpO/EZwBKuNlPX3jqqD5/RqqUNShS15pA=; b=CJ8ufKyxvyObfUKfyYMcgrIId1WzInznqZBHrNxEty+zyHpLFmi1WlWzzaYDeWgdXx 2pXKlUG2Jp0gH/pe/uRvQSagnP23QZolBj6DZERkt+i0dnxSKb+wMFowc8Ay94huye/h N71h0iIn0BtBDmSufssAbkneiJeAeVhgRKZxG52b0jjLkhqb4/JBh1uju5V3yjE9Xog2 f7LgpWBVduhLkCW4ACb9N1Jh/yYk++VS3omQADaoRH3AF9wJogneQipzqvnHBNRgwJu4 b9PBNCrQcTnTJ4BHQXxEjN9Ux+bieEIRjy44/ZTxODV5AYjnUR/ZaUTXVgF0XM+bOvYP zBTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=tC/rJhpg/HBpO/EZwBKuNlPX3jqqD5/RqqUNShS15pA=; b=U/FQ4yU2zhBdHpL8Q2l3d7TBSDrzKq/J9pz5do0ZRUFYiULDviMbHKfoLxk5HrDTJR qh4iDNAX4p6m09VsDTJs6BJOosFsIEZ3ouu59wxSNGJ4I99mUg1LWEex2fC3mMkQ7QH1 Qf3aNqsOQjfISuNw/uolwCvTxod7eLXQmpgQEUBGZYoEATYUApIHr5gzv92E08DSEaPE pDkx70sJKKfl00DDB82R9ivVjDqQ1RpYKsrVahiVSFBOMpvPYwC9jRpY2uOXf0eRhaoE 8NQ120DdUyrPfk/zComipjiArW/VA4omkrWkR3l9ddSDJ63BDRNMObHjcVHKMJEWay5q /teA== X-Gm-Message-State: AOUpUlELS1eB5qM9rYcaKlxEoFzCa+M85gE0vZwBvooG/ek+gruGjrjS AOWKRCBW6x9vL+cxom/rIjDd9DbnMm8iuX8/XYQHbgrg X-Google-Smtp-Source: AAOMgpcFmlap2YtOhSZ/L/x3w9zrjnQAt8XAB7pYSzxEhiDJJrVjvoNIjqaWx9a2xo7FgdZBcsXICrKoRBqTNV1HrJo= X-Received: by 2002:a6b:3e46:: with SMTP id l67-v6mr35854659ioa.294.1531663967923; Sun, 15 Jul 2018 07:12:47 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:290d:0:0:0:0:0 with HTTP; Sun, 15 Jul 2018 07:12:27 -0700 (PDT) In-Reply-To: <201807150529.w6F5Te51019341@repo.freebsd.org> References: <201807150529.w6F5Te51019341@repo.freebsd.org> From: Ed Maste Date: Sun, 15 Jul 2018 10:12:27 -0400 X-Google-Sender-Auth: CR8XN5dXh9Afob2y8sRoJZpQ1Lw Message-ID: Subject: Re: svn commit: r336302 - head/usr.sbin/kldxref To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 14:12:49 -0000 On 15 July 2018 at 01:29, Warner Losh wrote: > Author: imp > Date: Sun Jul 15 05:29:39 2018 > New Revision: 336302 > URL: https://svnweb.freebsd.org/changeset/base/336302 > > Log: > Use EF_SEG_READ_STRING instead of EF_SEG_READ when reading strings. For reference this is the same sort of problem that r328094 fixed - beyond optimization settings it's also dependent on the linker's section placement algorithm and the earlier issue appeared with the switch to lld. From owner-svn-src-head@freebsd.org Sun Jul 15 17:10:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C02E310472CE; Sun, 15 Jul 2018 17:10:13 +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.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 6D8368F0D7; Sun, 15 Jul 2018 17:10:13 +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 4AA9010C62; Sun, 15 Jul 2018 17:10:13 +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 w6FHADkU079192; Sun, 15 Jul 2018 17:10:13 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FHADmu079191; Sun, 15 Jul 2018 17:10:13 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201807151710.w6FHADmu079191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 15 Jul 2018 17:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336306 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 336306 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 17:10:14 -0000 Author: oshogbo Date: Sun Jul 15 17:10:12 2018 New Revision: 336306 URL: https://svnweb.freebsd.org/changeset/base/336306 Log: Extend amount of possible coredumps from 10 to 100000 when using index format. The amount of digits in the name of corefile is assigned dynamically. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D16118 Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Jul 15 15:28:23 2018 (r336305) +++ head/sys/kern/kern_sig.c Sun Jul 15 17:10:12 2018 (r336306) @@ -3214,11 +3214,7 @@ childproc_exited(struct proc *p) sigparent(p, reason, status); } -/* - * We only have 1 character for the core count in the format - * string, so the range will be 0-9 - */ -#define MAX_NUM_CORE_FILES 10 +#define MAX_NUM_CORE_FILES 100000 #ifndef NUM_CORE_FILES #define NUM_CORE_FILES 5 #endif @@ -3311,18 +3307,19 @@ vnode_close_locked(struct thread *td, struct vnode *vp /* * If the core format has a %I in it, then we need to check * for existing corefiles before defining a name. - * To do this we iterate over 0..num_cores to find a + * To do this we iterate over 0..ncores to find a * non-existing core file name to use. If all core files are * already used we choose the oldest one. */ static int corefile_open_last(struct thread *td, char *name, int indexpos, - struct vnode **vpp) + int indexlen, int ncores, struct vnode **vpp) { struct vnode *oldvp, *nextvp, *vp; struct vattr vattr; struct nameidata nd; int error, i, flags, oflags, cmode; + char ch; struct timespec lasttime; nextvp = oldvp = NULL; @@ -3330,10 +3327,14 @@ corefile_open_last(struct thread *td, char *name, int oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE | (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); - for (i = 0; i < num_cores; i++) { + for (i = 0; i < ncores; i++) { flags = O_CREAT | FWRITE | O_NOFOLLOW; - name[indexpos] = '0' + i; + ch = name[indexpos + indexlen]; + (void)snprintf(name + indexpos, indexlen + 1, "%.*u", indexlen, + i); + name[indexpos + indexlen] = ch; + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL); @@ -3402,12 +3403,14 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, struct nameidata nd; const char *format; char *hostname, *name; - int cmode, error, flags, i, indexpos, oflags; + int cmode, error, flags, i, indexpos, indexlen, oflags, ncores; hostname = NULL; format = corefilename; name = malloc(MAXPATHLEN, M_TEMP, M_WAITOK | M_ZERO); + indexlen = 0; indexpos = -1; + ncores = num_cores; (void)sbuf_new(&sb, name, MAXPATHLEN, SBUF_FIXEDLEN); sx_slock(&corefilename_lock); for (i = 0; format[i] != '\0'; i++) { @@ -3428,8 +3431,14 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, sbuf_printf(&sb, "%s", hostname); break; case 'I': /* autoincrementing index */ - sbuf_printf(&sb, "0"); - indexpos = sbuf_len(&sb) - 1; + if (indexpos != -1) { + sbuf_printf(&sb, "%%I"); + break; + } + + indexpos = sbuf_len(&sb); + sbuf_printf(&sb, "%u", ncores - 1); + indexlen = sbuf_len(&sb) - indexpos; break; case 'N': /* process name */ sbuf_printf(&sb, "%s", comm); @@ -3469,7 +3478,8 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, sbuf_delete(&sb); if (indexpos != -1) { - error = corefile_open_last(td, name, indexpos, vpp); + error = corefile_open_last(td, name, indexpos, indexlen, ncores, + vpp); if (error != 0) { log(LOG_ERR, "pid %d (%s), uid (%u): Path `%s' failed " From owner-svn-src-head@freebsd.org Sun Jul 15 17:21:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85D0C10479BC; Sun, 15 Jul 2018 17:21:20 +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.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 372D18F86E; Sun, 15 Jul 2018 17:21:20 +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 1804210E34; Sun, 15 Jul 2018 17:21:20 +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 w6FHLJx4086043; Sun, 15 Jul 2018 17:21:19 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FHLJQs086041; Sun, 15 Jul 2018 17:21:19 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201807151721.w6FHLJQs086041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 15 Jul 2018 17:21:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336307 - in head/usr.sbin: fstyp uefisign X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head/usr.sbin: fstyp uefisign X-SVN-Commit-Revision: 336307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 17:21:20 -0000 Author: oshogbo Date: Sun Jul 15 17:21:19 2018 New Revision: 336307 URL: https://svnweb.freebsd.org/changeset/base/336307 Log: Use capsicum helpers in fstype and ctld. Reviewed by: trasz Modified: head/usr.sbin/fstyp/fstyp.c head/usr.sbin/uefisign/child.c Modified: head/usr.sbin/fstyp/fstyp.c ============================================================================== --- head/usr.sbin/fstyp/fstyp.c Sun Jul 15 17:10:12 2018 (r336306) +++ head/usr.sbin/fstyp/fstyp.c Sun Jul 15 17:21:19 2018 (r336307) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -191,8 +192,7 @@ main(int argc, char **argv) if (fp == NULL) err(1, "%s", path); - error = cap_enter(); - if (error != 0 && errno != ENOSYS) + if (caph_enter() < 0) err(1, "cap_enter"); if (ignore_type == false) Modified: head/usr.sbin/uefisign/child.c ============================================================================== --- head/usr.sbin/uefisign/child.c Sun Jul 15 17:10:12 2018 (r336306) +++ head/usr.sbin/uefisign/child.c Sun Jul 15 17:21:19 2018 (r336307) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -228,7 +229,6 @@ int child(const char *inpath, const char *outpath, int pipefd, bool Vflag, bool vflag) { - int error; FILE *outfp = NULL, *infp = NULL; struct executable *x; @@ -236,8 +236,7 @@ child(const char *inpath, const char *outpath, int pip if (outpath != NULL) outfp = checked_fopen(outpath, "w"); - error = cap_enter(); - if (error != 0 && errno != ENOSYS) + if (caph_enter() < 0) err(1, "cap_enter"); x = calloc(1, sizeof(*x)); From owner-svn-src-head@freebsd.org Sun Jul 15 17:31:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8F6110480DC; Sun, 15 Jul 2018 17:31:51 +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.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 6A54E9001B; Sun, 15 Jul 2018 17:31:51 +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 4B5351111E; Sun, 15 Jul 2018 17:31:51 +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 w6FHVpPY093576; Sun, 15 Jul 2018 17:31:51 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FHVpwY093575; Sun, 15 Jul 2018 17:31:51 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201807151731.w6FHVpwY093575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 15 Jul 2018 17:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336308 - head/lib/libcapsicum X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcapsicum X-SVN-Commit-Revision: 336308 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 17:31:51 -0000 Author: oshogbo Date: Sun Jul 15 17:31:50 2018 New Revision: 336308 URL: https://svnweb.freebsd.org/changeset/base/336308 Log: Fix declaration. Modified: head/lib/libcapsicum/capsicum_helpers.3 Modified: head/lib/libcapsicum/capsicum_helpers.3 ============================================================================== --- head/lib/libcapsicum/capsicum_helpers.3 Sun Jul 15 17:21:19 2018 (r336307) +++ head/lib/libcapsicum/capsicum_helpers.3 Sun Jul 15 17:31:50 2018 (r336308) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2018 +.Dd July 15, 2018 .Dt CAPSICUM_HELPERS 3 .Os .Sh NAME @@ -45,7 +45,7 @@ .Ft int .Fn caph_enter_casper "void" .Ft int -.Fn caph_limit_stream "int fd, int flags" +.Fn caph_limit_stream "int fd" "int flags" .Ft int .Fn caph_limit_stdin "void" .Ft int From owner-svn-src-head@freebsd.org Sun Jul 15 18:02:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C18181048FF5; Sun, 15 Jul 2018 18:02:51 +0000 (UTC) (envelope-from marius@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 70EFA90F1D; Sun, 15 Jul 2018 18:02:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51E0211609; Sun, 15 Jul 2018 18:02:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FI2pXY009649; Sun, 15 Jul 2018 18:02:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FI2oUt009647; Sun, 15 Jul 2018 18:02:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807151802.w6FI2oUt009647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 15 Jul 2018 18:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336309 - head/sys/dev/ixl X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/ixl X-SVN-Commit-Revision: 336309 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 18:02:51 -0000 Author: marius Date: Sun Jul 15 18:02:50 2018 New Revision: 336309 URL: https://svnweb.freebsd.org/changeset/base/336309 Log: As suggested by a comment in ixl_initialize_vsi(), use if_getcapenable(9) instead of directly interrogating ifp->if_capenable. Reviewed by: erj (ixl_initialize_vsi()) Differential Revision: https://reviews.freebsd.org/D15720 (part of) Modified: head/sys/dev/ixl/ixl_pf_main.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- head/sys/dev/ixl/ixl_pf_main.c Sun Jul 15 17:31:50 2018 (r336308) +++ head/sys/dev/ixl/ixl_pf_main.c Sun Jul 15 18:02:50 2018 (r336309) @@ -1219,8 +1219,7 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) /* Set VLAN receive stripping mode */ ctxt.info.valid_sections |= I40E_AQ_VSI_PROP_VLAN_VALID; ctxt.info.port_vlan_flags = I40E_AQ_VSI_PVLAN_MODE_ALL; - // TODO: Call function to get this cap bit, instead - if (vsi->ifp->if_capenable & IFCAP_VLAN_HWTAGGING) + if (if_getcapenable(vsi->ifp) & IFCAP_VLAN_HWTAGGING) ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_STR_BOTH; else ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_NOTHING; Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Sun Jul 15 17:31:50 2018 (r336308) +++ head/sys/dev/ixl/ixl_txrx.c Sun Jul 15 18:02:50 2018 (r336309) @@ -687,7 +687,7 @@ ixl_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) rxr->packets++; rxr->rx_packets++; - if ((vsi->ifp->if_capenable & IFCAP_RXCSUM) != 0) + if ((if_getcapenable(vsi->ifp) & IFCAP_RXCSUM) != 0) ixl_rx_checksum(ri, status, error, ptype); ri->iri_flowid = le32toh(cur->wb.qword0.hi_dword.rss); ri->iri_rsstype = ixl_ptype_to_hash(ptype); From owner-svn-src-head@freebsd.org Sun Jul 15 18:03:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF7A91049072; Sun, 15 Jul 2018 18:03:20 +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.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 91EBB91046; Sun, 15 Jul 2018 18:03:20 +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 738A71160A; Sun, 15 Jul 2018 18:03:20 +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 w6FI3KbN009722; Sun, 15 Jul 2018 18:03:20 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FI3KSc009720; Sun, 15 Jul 2018 18:03:20 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201807151803.w6FI3KSc009720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 15 Jul 2018 18:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336310 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 336310 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 18:03:21 -0000 Author: oshogbo Date: Sun Jul 15 18:03:19 2018 New Revision: 336310 URL: https://svnweb.freebsd.org/changeset/base/336310 Log: Let geli deal with lost devices without crashing. PR: 162036 Submitted by: Fabian Keil Obtained from: ElectroBSD Discussed with: pjd@ Modified: head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli_privacy.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Sun Jul 15 18:02:50 2018 (r336309) +++ head/sys/geom/eli/g_eli.c Sun Jul 15 18:03:19 2018 (r336310) @@ -254,7 +254,8 @@ g_eli_read_done(struct bio *bp) pbp->bio_driver2 = NULL; } g_io_deliver(pbp, pbp->bio_error); - atomic_subtract_int(&sc->sc_inflight, 1); + if (sc != NULL) + atomic_subtract_int(&sc->sc_inflight, 1); return; } mtx_lock(&sc->sc_queue_mtx); @@ -299,7 +300,8 @@ g_eli_write_done(struct bio *bp) */ sc = pbp->bio_to->geom->softc; g_io_deliver(pbp, pbp->bio_error); - atomic_subtract_int(&sc->sc_inflight, 1); + if (sc != NULL) + atomic_subtract_int(&sc->sc_inflight, 1); } /* Modified: head/sys/geom/eli/g_eli_privacy.c ============================================================================== --- head/sys/geom/eli/g_eli_privacy.c Sun Jul 15 18:02:50 2018 (r336309) +++ head/sys/geom/eli/g_eli_privacy.c Sun Jul 15 18:03:19 2018 (r336310) @@ -89,7 +89,8 @@ g_eli_crypto_read_done(struct cryptop *crp) bp->bio_error = crp->crp_etype; } sc = bp->bio_to->geom->softc; - g_eli_key_drop(sc, crp->crp_desc->crd_key); + if (sc != NULL) + g_eli_key_drop(sc, crp->crp_desc->crd_key); /* * Do we have all sectors already? */ @@ -106,7 +107,8 @@ g_eli_crypto_read_done(struct cryptop *crp) * Read is finished, send it up. */ g_io_deliver(bp, bp->bio_error); - atomic_subtract_int(&sc->sc_inflight, 1); + if (sc != NULL) + atomic_subtract_int(&sc->sc_inflight, 1); return (0); } From owner-svn-src-head@freebsd.org Sun Jul 15 18:03:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC5F0104913C; Sun, 15 Jul 2018 18:03:57 +0000 (UTC) (envelope-from marius@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 71CBE91192; Sun, 15 Jul 2018 18:03:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54BB31160C; Sun, 15 Jul 2018 18:03:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FI3vTR009800; Sun, 15 Jul 2018 18:03:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FI3vJu009799; Sun, 15 Jul 2018 18:03:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807151803.w6FI3vJu009799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 15 Jul 2018 18:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336311 - head/sys/dev/ixgbe X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/ixgbe X-SVN-Commit-Revision: 336311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 18:03:57 -0000 Author: marius Date: Sun Jul 15 18:03:56 2018 New Revision: 336311 URL: https://svnweb.freebsd.org/changeset/base/336311 Log: Remove code to disable IFCAP_VLAN_HWFILTER by default for ixgbe(4) as VLAN events are passed through by lagg(4) ever since r203548. Deactivation of this capability by default due to lagg(4) was already not done for ixgbev(4) and has been - although inadvertently - broken when em(4)/igb(4)/lem(4) and ixl(4) were converted to iflib(9) in r311849 and r335338 respectively. Reviewed by: erj Differential Revision: https://reviews.freebsd.org/D15720 (part of) Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Sun Jul 15 18:03:19 2018 (r336310) +++ head/sys/dev/ixgbe/if_ix.c Sun Jul 15 18:03:56 2018 (r336311) @@ -1180,15 +1180,6 @@ ixgbe_setup_interface(if_ctx_t ctx) adapter->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - /* - * Don't turn this on by default, if vlans are - * created on another pseudo device (eg. lagg) - * then vlan events are not passed thru, breaking - * operation, but with HW FILTER off it works. If - * using vlans directly on the ixgbe driver you can - * enable this and get full hardware tag filtering. - */ - if_setcapenablebit(ifp, 0, IFCAP_VLAN_HWFILTER); adapter->phy_layer = ixgbe_get_supported_physical_layer(&adapter->hw); ixgbe_add_media_types(ctx); From owner-svn-src-head@freebsd.org Sun Jul 15 18:54:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C62104B03B; Sun, 15 Jul 2018 18:54:46 +0000 (UTC) (envelope-from rmacklem@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 9AD3C93580; Sun, 15 Jul 2018 18:54:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 787B811DE3; Sun, 15 Jul 2018 18:54:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FIsjGL034914; Sun, 15 Jul 2018 18:54:45 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FIsi68034911; Sun, 15 Jul 2018 18:54:44 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807151854.w6FIsi68034911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 15 Jul 2018 18:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336312 - in head/sys/fs: nfs nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient X-SVN-Commit-Revision: 336312 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 18:54:46 -0000 Author: rmacklem Date: Sun Jul 15 18:54:44 2018 New Revision: 336312 URL: https://svnweb.freebsd.org/changeset/base/336312 Log: Shut down the TCP connection to a DS in the pNFS client when Renew fails. When a NFSv4.1 client mount using pNFS detects a failure trying to do a Renew (actually just a Sequence operation), the code would simply try again and again and again every 30sec. This would tie up the "nfscl" thread, which should also be doing other things like Renews on other DSs and the MDS. This patch adds code which closes down the TCP connection and marks it defunct when Renew detects an failure to communicate with the DS, so further Renews will not be attempted until a new working TCP connection to the DS is established. It also makes the call to nfscl_cancelreqs() unconditional, since nfscl_cancelreqs() checks the NFSCLDS_SAMECONN flag and does so while holding the lock. This fix only applies to the NFSv4.1 client whne using pNFS and without it the only effect would have been an "nfscl" thread busy doing Renew attempts on an unresponsive DS. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sun Jul 15 18:03:56 2018 (r336311) +++ head/sys/fs/nfs/nfs_var.h Sun Jul 15 18:54:44 2018 (r336312) @@ -603,6 +603,7 @@ struct nfscllayout *nfscl_getlayout(struct nfsclclient uint64_t, struct nfsclflayout **, int *); void nfscl_dserr(uint32_t, uint32_t, struct nfscldevinfo *, struct nfscllayout *, struct nfsclds *); +void nfscl_cancelreqs(struct nfsclds *); void nfscl_rellayout(struct nfscllayout *, int); struct nfscldevinfo *nfscl_getdevinfo(struct nfsclclient *, uint8_t *, struct nfscldevinfo *); Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Jul 15 18:03:56 2018 (r336311) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Jul 15 18:54:44 2018 (r336312) @@ -4408,9 +4408,12 @@ nfsrpc_renew(struct nfsclclient *clp, struct nfsclds * if (dsp == NULL) error = newnfs_request(nd, nmp, NULL, nrp, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); - else + else { error = newnfs_request(nd, nmp, NULL, nrp, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, &dsp->nfsclds_sess); + if (error == ENXIO) + nfscl_cancelreqs(dsp); + } if (error) return (error); error = nd->nd_repstat; Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sun Jul 15 18:03:56 2018 (r336311) +++ head/sys/fs/nfsclient/nfs_clstate.c Sun Jul 15 18:54:44 2018 (r336312) @@ -125,7 +125,6 @@ static struct nfscldeleg *nfscl_finddeleg(struct nfscl static void nfscl_retoncloselayout(vnode_t, struct nfsclclient *, uint8_t *, int, struct nfsclrecalllayout **); static void nfscl_reldevinfo_locked(struct nfscldevinfo *); -static void nfscl_cancelreqs(struct nfsclds *); static struct nfscllayout *nfscl_findlayout(struct nfsclclient *, u_int8_t *, int); static struct nfscldevinfo *nfscl_finddevinfo(struct nfsclclient *, uint8_t *); @@ -5001,16 +5000,17 @@ nfscl_dserr(uint32_t op, uint32_t stat, struct nfsclde free(recallp, M_NFSLAYRECALL); } - /* If the connection isn't used for other DSs, we can shut it down. */ - if ((dsp->nfsclds_flags & NFSCLDS_SAMECONN) == 0) - nfscl_cancelreqs(dsp); + /* And shut the TCP connection down. */ + nfscl_cancelreqs(dsp); } /* * Cancel all RPCs for this "dsp" by closing the connection. * Also, mark the session as defunct. + * If NFSCLDS_SAMECONN is set, the connection is shared with other DSs and + * cannot be shut down. */ -static void +APPLESTATIC void nfscl_cancelreqs(struct nfsclds *dsp) { struct __rpc_client *cl; From owner-svn-src-head@freebsd.org Sun Jul 15 19:04:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96815104B553; Sun, 15 Jul 2018 19:04:26 +0000 (UTC) (envelope-from marius@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 480AB93ACD; Sun, 15 Jul 2018 19:04:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24C7311F71; Sun, 15 Jul 2018 19:04:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FJ4Qs5039908; Sun, 15 Jul 2018 19:04:26 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FJ4NNg039896; Sun, 15 Jul 2018 19:04:23 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807151904.w6FJ4NNg039896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 15 Jul 2018 19:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336313 - in head/sys: dev/bnxt dev/e1000 dev/ixgbe dev/ixl net sys X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: in head/sys: dev/bnxt dev/e1000 dev/ixgbe dev/ixl net sys X-SVN-Commit-Revision: 336313 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 19:04:27 -0000 Author: marius Date: Sun Jul 15 19:04:23 2018 New Revision: 336313 URL: https://svnweb.freebsd.org/changeset/base/336313 Log: Assorted TSO fixes for em(4)/iflib(9) and dead code removal: - Ever since the workaround for the silicon bug of TSO4 causing MAC hangs was committed in r295133, CSUM_TSO always got disabled unconditionally by em(4) on the first invocation of em_init_locked(). However, even with that problem fixed, it turned out that for at least e. g. 82579 not all necessary TSO workarounds are in place, still causing MAC hangs even at Gigabit speed. Thus, for stable/11, TSO usage was deliberately disabled in r323292 (r323293 for stable/10) for the EM-class by default, allowing users to turn it on if it happens to work with their particular EM MAC in a Gigabit-only environment. In head, the TSO workaround for speeds other than Gigabit was lost with the conversion to iflib(9) in r311849 (possibly along with another one or two TSO workarounds). Yet at the same time, for EM-class MACs TSO4 got enabled by default again, causing device hangs. Therefore, change the default for this hardware class back to have TSO4 off, allowing users to turn it on manually if it happens to work in their environment as we do in stable/{10,11}. An alternative would be to add a whitelist of EM-class devices where TSO4 actually is reliable with the workarounds in place, but given that the advantage of TSO at Gigabit speed is rather limited - especially with the overhead of these workarounds -, that's really not worth it. [1] This change includes the addition of an isc_capabilities to struct if_softc_ctx so iflib(9) can also handle interface capabilities that shouldn't be enabled by default which is used to handle the default-off capabilities of e1000 as suggested by shurd@ and moving their handling from em_setup_interface() to em_if_attach_pre() accordingly. - Although 82543 support TSO4 in theory, the former lem(4) didn't have support for TSO4, presumably because TSO4 is even more broken in the LEM-class of MACs than the later EM ones. Still, TSO4 for LEM-class devices was enabled as part of the conversion to iflib(9) in r311849, causing device hangs. So revert back to the pre-r311849 behavior of not supporting TSO4 for LEM-class at all, which includes not creating a TSO DMA tag in iflib(9) for devices not having IFCAP_TSO4 set. [2] - In fact, the FreeBSD TCP stack can handle a TSO size of IP_MAXPACKET (65535) rather than FREEBSD_TSO_SIZE_MAX (65518). However, the TSO DMA must have a maxsize of the maximum TSO size plus the size of a VLAN header for software VLAN tagging. The iflib(9) converted em(4), thus, first correctly sets scctx->isc_tx_tso_size_max to EM_TSO_SIZE in em_if_attach_pre(), but later on overrides it with IP_MAXPACKET in em_setup_interface() (apparently, left-over from pre-iflib(9) times). So remove the later and correct iflib(9) to correctly cap the maximum TSO size reported to the stack at IP_MAXPACKET. While at it, let iflib(9) use if_sethwtsomax*(). This change includes the addition of isc_tso_max{seg,}size DMA engine constraints for the TSO DMA tag to struct if_shared_ctx and letting iflib_txsd_alloc() automatically adjust the maxsize of that tag in case IFCAP_VLAN_MTU is supported as requested by shurd@. - Move the if_setifheaderlen(9) call for adjusting the maximum Ethernet header length from {ixgbe,ixl,ixlv,ixv,em}_setup_interface() to iflib(9) so adjustment is automatically done in case IFCAP_VLAN_MTU is supported. As a consequence, this adjustment now is also done in case of bnxt(4) which missed it previously. - Move the reduction of the maximum TSO segment count reported to the stack by the number of m_pullup(9) calls (which in the worst case, can add another mbuf and, thus, the requirement for another DMA segment each) in the transmit path for performance reasons from em_setup_interface() to iflib_txsd_alloc() as these pull-ups are now done in iflib_parse_header() rather than in the no longer existing em_xmit(). Moreover, this optimization applies to all drivers using iflib(9) and not just em(4); all in-tree iflib(9) consumers still have enough room to handle full size TSO packets. Also, reduce the adjustment to the maximum number of m_pullup(9)'s now performed in iflib_parse_header(). - Prior to the conversion of em(4)/igb(4)/lem(4) and ixl(4) to iflib(9) in r311849 and r335338 respectively, these drivers didn't enable IFCAP_VLAN_HWFILTER by default due to VLAN events not being passed through by lagg(4). With iflib(9), IFCAP_VLAN_HWFILTER was turned on by default but also lagg(4) was fixed in that regard in r203548. So just remove the now redundant and defunct IFCAP_VLAN_HWFILTER handling in {em,ixl,ixlv}_setup_interface(). - Nuke other redundant IFCAP_* setting in {em,ixl,ixlv}_setup_interface() which is (more completely) already done in {em,ixl,ixlv}_if_attach_pre() now. - Remove some redundant/dead setting of scctx->isc_tx_csum_flags in em_if_attach_pre(). - Remove some IFCAP_* duplicated either directly or indirectly (e. g. via IFCAP_HWCSUM) in {EM,IGB,IXL}_CAPS. - Don't bother to fiddle with IFCAP_HWSTATS in ixgbe(4)/ixgbev(4) as iflib(9) adds that capability unconditionally. - Remove some unused macros from em(4). - Bump __FreeBSD_version as some of the above changes require the modules of drivers using iflib(9) to be recompiled. Okayed by: sbruno@ at 201806 DevSummit Transport Working Group [1] Reviewed by: sbruno (earlier version), erj PR: 219428 (part of; comment #10) [1], 220997 (part of; comment #3) [2] Differential Revision: https://reviews.freebsd.org/D15720 Modified: head/sys/dev/bnxt/if_bnxt.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl_pf_main.c head/sys/net/iflib.c head/sys/net/iflib.h head/sys/sys/param.h Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/bnxt/if_bnxt.c Sun Jul 15 19:04:23 2018 (r336313) @@ -300,10 +300,12 @@ static struct if_shared_ctx bnxt_sctx_init = { .isc_nfl = 2, // Number of Free Lists .isc_flags = IFLIB_HAS_RXCQ | IFLIB_HAS_TXCQ | IFLIB_NEED_ETHER_PAD, .isc_q_align = PAGE_SIZE, - .isc_tx_maxsize = BNXT_TSO_SIZE, - .isc_tx_maxsegsize = BNXT_TSO_SIZE, - .isc_rx_maxsize = BNXT_TSO_SIZE, - .isc_rx_maxsegsize = BNXT_TSO_SIZE, + .isc_tx_maxsize = BNXT_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tx_maxsegsize = BNXT_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsize = BNXT_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsegsize = BNXT_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_rx_maxsize = BNXT_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_rx_maxsegsize = BNXT_TSO_SIZE + sizeof(struct ether_vlan_header), // Only use a single segment to avoid page size constraints .isc_rx_nsegments = 1, @@ -784,7 +786,7 @@ bnxt_attach_pre(if_ctx_t ctx) scctx->isc_txrx = &bnxt_txrx; scctx->isc_tx_csum_flags = (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO); - scctx->isc_capenable = + scctx->isc_capabilities = scctx->isc_capenable = /* These are translated to hwassit bits */ IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | IFCAP_TSO4 | IFCAP_TSO6 | /* These are checked by iflib */ Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/e1000/if_em.c Sun Jul 15 19:04:23 2018 (r336313) @@ -410,7 +410,6 @@ static driver_t em_if_driver = { #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define M_TSO_LEN 66 #define MAX_INTS_PER_SEC 8000 #define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) @@ -420,8 +419,6 @@ static driver_t em_if_driver = { #define CSUM_TSO 0 #endif -#define TSO_WORKAROUND 4 - static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver parameters"); static int em_disable_crc_stripping = 0; @@ -484,8 +481,10 @@ extern struct if_txrx lem_txrx; static struct if_shared_ctx em_sctx_init = { .isc_magic = IFLIB_MAGIC, .isc_q_align = PAGE_SIZE, - .isc_tx_maxsize = EM_TSO_SIZE, + .isc_tx_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), .isc_tx_maxsegsize = PAGE_SIZE, + .isc_tso_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsegsize = EM_TSO_SEG_SIZE, .isc_rx_maxsize = MJUM9BYTES, .isc_rx_nsegments = 1, .isc_rx_maxsegsize = MJUM9BYTES, @@ -697,16 +696,19 @@ em_set_num_queues(if_ctx_t ctx) return (maxqueues); } +#define LEM_CAPS \ + IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | \ + IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER -#define EM_CAPS \ - IFCAP_TSO4 | IFCAP_TXCSUM | IFCAP_LRO | IFCAP_RXCSUM | IFCAP_VLAN_HWFILTER | IFCAP_WOL_MAGIC | \ - IFCAP_WOL_MCAST | IFCAP_WOL | IFCAP_VLAN_HWTSO | IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING | \ - IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU; +#define EM_CAPS \ + IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | \ + IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER | IFCAP_TSO4 | \ + IFCAP_LRO | IFCAP_VLAN_HWTSO -#define IGB_CAPS \ - IFCAP_TSO4 | IFCAP_TXCSUM | IFCAP_LRO | IFCAP_RXCSUM | IFCAP_VLAN_HWFILTER | IFCAP_WOL_MAGIC | \ - IFCAP_WOL_MCAST | IFCAP_WOL | IFCAP_VLAN_HWTSO | IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM | \ - IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU | IFCAP_TXCSUM_IPV6 | IFCAP_HWCSUM_IPV6 | IFCAP_JUMBO_MTU; +#define IGB_CAPS \ + IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | \ + IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER | IFCAP_TSO4 | \ + IFCAP_LRO | IFCAP_VLAN_HWTSO | IFCAP_JUMBO_MTU | IFCAP_HWCSUM_IPV6; /********************************************************************* * Device initialization routine @@ -773,18 +775,11 @@ em_if_attach_pre(if_ctx_t ctx) /* Determine hardware and mac info */ em_identify_hardware(ctx); - /* Set isc_msix_bar */ scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); scctx->isc_tx_nsegments = EM_MAX_SCATTER; - scctx->isc_tx_tso_segments_max = scctx->isc_tx_nsegments; - scctx->isc_tx_tso_size_max = EM_TSO_SIZE; - scctx->isc_tx_tso_segsize_max = EM_TSO_SEG_SIZE; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO; - - if (adapter->hw.mac.type >= igb_mac_min) { int try_second_bar; @@ -793,7 +788,10 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_adv_rx_desc); scctx->isc_txrx = &igb_txrx; - scctx->isc_capenable = IGB_CAPS; + scctx->isc_tx_tso_segments_max = EM_MAX_SCATTER; + scctx->isc_tx_tso_size_max = EM_TSO_SIZE; + scctx->isc_tx_tso_segsize_max = EM_TSO_SEG_SIZE; + scctx->isc_capabilities = scctx->isc_capenable = IGB_CAPS; scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO | CSUM_IP6_TCP \ | CSUM_IP6_UDP | CSUM_IP6_TCP; if (adapter->hw.mac.type != e1000_82575) @@ -807,26 +805,44 @@ em_if_attach_pre(if_ctx_t ctx) try_second_bar = pci_read_config(dev, scctx->isc_msix_bar, 4); if (try_second_bar == 0) scctx->isc_msix_bar += 4; - } else if (adapter->hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(union e1000_rx_desc_extended); scctx->isc_txrx = &em_txrx; - scctx->isc_capenable = EM_CAPS; + scctx->isc_tx_tso_segments_max = EM_MAX_SCATTER; + scctx->isc_tx_tso_size_max = EM_TSO_SIZE; + scctx->isc_tx_tso_segsize_max = EM_TSO_SEG_SIZE; + scctx->isc_capabilities = scctx->isc_capenable = EM_CAPS; + /* + * For EM-class devices, don't enable IFCAP_{TSO4,VLAN_HWTSO} + * by default as we don't have workarounds for all associated + * silicon errata. E. g., with several MACs such as 82573E, + * TSO only works at Gigabit speed and otherwise can cause the + * hardware to hang (which also would be next to impossible to + * work around given that already queued TSO-using descriptors + * would need to be flushed and vlan(4) reconfigured at runtime + * in case of a link speed change). Moreover, MACs like 82579 + * still can hang at Gigabit even with all publicly documented + * TSO workarounds implemented. Generally, the penality of + * these workarounds is rather high and may involve copying + * mbuf data around so advantages of TSO lapse. Still, TSO may + * work for a few MACs of this class - at least when sticking + * with Gigabit - in which case users may enable TSO manually. + */ + scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO; } else { scctx->isc_txqsizes[0] = roundup2((scctx->isc_ntxd[0] + 1) * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2((scctx->isc_nrxd[0] + 1) * sizeof(struct e1000_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); scctx->isc_rxd_size[0] = sizeof(struct e1000_rx_desc); - scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO; + scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP; scctx->isc_txrx = &lem_txrx; - scctx->isc_capenable = EM_CAPS; + scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; if (adapter->hw.mac.type < e1000_82543) scctx->isc_capenable &= ~(IFCAP_HWCSUM|IFCAP_VLAN_HWCSUM); - scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO; scctx->isc_msix_bar = 0; } @@ -1007,6 +1023,11 @@ em_if_attach_pre(if_ctx_t ctx) */ em_get_wakeup(ctx); + /* Enable only WOL MAGIC by default */ + scctx->isc_capenable &= ~IFCAP_WOL; + if (adapter->wol != 0) + scctx->isc_capenable |= IFCAP_WOL_MAGIC; + iflib_set_mac(ctx, hw->mac.addr); return (0); @@ -2750,49 +2771,13 @@ em_setup_interface(if_ctx_t ctx) struct ifnet *ifp = iflib_get_ifp(ctx); struct adapter *adapter = iflib_get_softc(ctx); if_softc_ctx_t scctx = adapter->shared; - uint64_t cap = 0; INIT_DEBUGOUT("em_setup_interface: begin"); - /* TSO parameters */ - if_sethwtsomax(ifp, IP_MAXPACKET); - /* Take m_pullup(9)'s in em_xmit() w/ TSO into acount. */ - if_sethwtsomaxsegcount(ifp, EM_MAX_SCATTER - 5); - if_sethwtsomaxsegsize(ifp, EM_TSO_SEG_SIZE); - /* Single Queue */ if (adapter->tx_num_queues == 1) { if_setsendqlen(ifp, scctx->isc_ntxd[0] - 1); if_setsendqready(ifp); - } - - cap = IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO4; - cap |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU; - - /* - * Tell the upper layer(s) we - * support full VLAN capability - */ - if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); - if_setcapabilitiesbit(ifp, cap, 0); - - /* - * Don't turn this on by default, if vlans are - * created on another pseudo device (eg. lagg) - * then vlan events are not passed thru, breaking - * operation, but with HW FILTER off it works. If - * using vlans directly on the em driver you can - * enable this and get full hardware tag filtering. - */ - if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWFILTER,0); - - /* Enable only WOL MAGIC by default */ - if (adapter->wol) { - if_setcapenablebit(ifp, IFCAP_WOL_MAGIC, - IFCAP_WOL_MCAST| IFCAP_WOL_UCAST); - } else { - if_setcapenablebit(ifp, 0, IFCAP_WOL_MAGIC | - IFCAP_WOL_MCAST| IFCAP_WOL_UCAST); } /* Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/e1000/if_em.h Sun Jul 15 19:04:23 2018 (r336313) @@ -250,11 +250,6 @@ #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 -#define IGB_MAX_SCATTER 40 -#define IGB_VFTA_SIZE 128 -#define IGB_BR_SIZE 4096 /* ring buf size */ -#define IGB_TSO_SIZE (65535 + sizeof(struct ether_vlan_header)) -#define IGB_TSO_SEG_SIZE 4096 /* Max dma segment size */ #define IGB_TXPBSIZE 20408 #define IGB_HDR_BUF 128 #define IGB_PKTTYPE_MASK 0x0000FFF0 @@ -340,7 +335,7 @@ #define EM_MAX_SCATTER 40 #define EM_VFTA_SIZE 128 -#define EM_TSO_SIZE (65535 + sizeof(struct ether_vlan_header)) +#define EM_TSO_SIZE 65535 #define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */ #define EM_MSIX_MASK 0x01F00000 /* For 82574 use */ #define EM_MSIX_LINK 0x01000000 /* For 82574 use */ Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/ixgbe/if_ix.c Sun Jul 15 19:04:23 2018 (r336313) @@ -364,10 +364,10 @@ extern struct if_txrx ixgbe_txrx; static struct if_shared_ctx ixgbe_sctx_init = { .isc_magic = IFLIB_MAGIC, .isc_q_align = PAGE_SIZE,/* max(DBA_ALIGN, PAGE_SIZE) */ - .isc_tx_maxsize = IXGBE_TSO_SIZE, - + .isc_tx_maxsize = IXGBE_TSO_SIZE + sizeof(struct ether_vlan_header), .isc_tx_maxsegsize = PAGE_SIZE, - + .isc_tso_maxsize = IXGBE_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsegsize = PAGE_SIZE, .isc_rx_maxsize = PAGE_SIZE*4, .isc_rx_nsegments = 1, .isc_rx_maxsegsize = PAGE_SIZE*4, @@ -1034,7 +1034,7 @@ ixgbe_if_attach_pre(if_ctx_t ctx) scctx->isc_txrx = &ixgbe_txrx; - scctx->isc_capenable = IXGBE_CAPS; + scctx->isc_capabilities = scctx->isc_capenable = IXGBE_CAPS; return (0); @@ -1175,7 +1175,6 @@ ixgbe_setup_interface(if_ctx_t ctx) INIT_DEBUGOUT("ixgbe_setup_interface: begin"); - if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); if_setbaudrate(ifp, IF_Gbps(10)); adapter->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/ixgbe/if_ixv.c Sun Jul 15 19:04:23 2018 (r336313) @@ -209,10 +209,10 @@ extern struct if_txrx ixgbe_txrx; static struct if_shared_ctx ixv_sctx_init = { .isc_magic = IFLIB_MAGIC, .isc_q_align = PAGE_SIZE,/* max(DBA_ALIGN, PAGE_SIZE) */ - .isc_tx_maxsize = IXGBE_TSO_SIZE, - + .isc_tx_maxsize = IXGBE_TSO_SIZE + sizeof(struct ether_vlan_header), .isc_tx_maxsegsize = PAGE_SIZE, - + .isc_tso_maxsize = IXGBE_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsegsize = PAGE_SIZE, .isc_rx_maxsize = MJUM16BYTES, .isc_rx_nsegments = 1, .isc_rx_maxsegsize = MJUM16BYTES, @@ -507,11 +507,11 @@ ixv_if_attach_pre(if_ctx_t ctx) /* * Tell the upper layer(s) we support everything the PF * driver does except... - * hardware stats * Wake-on-LAN */ - scctx->isc_capenable = IXGBE_CAPS; - scctx->isc_capenable ^= IFCAP_HWSTATS | IFCAP_WOL; + scctx->isc_capabilities = IXGBE_CAPS; + scctx->isc_capabilities ^= IFCAP_WOL; + scctx->isc_capenable = scctx->isc_capabilities; INIT_DEBUGOUT("ixv_if_attach_pre: end"); @@ -1163,7 +1163,6 @@ ixv_setup_interface(if_ctx_t ctx) INIT_DEBUGOUT("ixv_setup_interface: begin"); - if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); if_setbaudrate(ifp, IF_Gbps(10)); ifp->if_snd.ifq_maxlen = scctx->isc_ntxd[0] - 2; Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/ixgbe/ixgbe.h Sun Jul 15 19:04:23 2018 (r336313) @@ -215,7 +215,7 @@ #define IXGBE_CAPS (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_TSO | \ IFCAP_LRO | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | \ IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU | \ - IFCAP_HWSTATS | IFCAP_VLAN_HWFILTER | IFCAP_WOL) + IFCAP_VLAN_HWFILTER | IFCAP_WOL) /* Backward compatibility items for very old versions */ #ifndef pci_find_cap Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/ixl/if_ixl.c Sun Jul 15 19:04:23 2018 (r336313) @@ -295,9 +295,10 @@ extern struct if_txrx ixl_txrx_dwb; static struct if_shared_ctx ixl_sctx_init = { .isc_magic = IFLIB_MAGIC, .isc_q_align = PAGE_SIZE, - .isc_tx_maxsize = IXL_TSO_SIZE, + .isc_tx_maxsize = IXL_TSO_SIZE + sizeof(struct ether_vlan_header), .isc_tx_maxsegsize = IXL_MAX_DMA_SEG_SIZE, - + .isc_tso_maxsize = IXL_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsegsize = IXL_MAX_DMA_SEG_SIZE, .isc_rx_maxsize = 16384, .isc_rx_nsegments = IXL_MAX_RX_SEGS, .isc_rx_maxsegsize = IXL_MAX_DMA_SEG_SIZE, @@ -552,7 +553,7 @@ ixl_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_tso_segsize_max = IXL_MAX_DMA_SEG_SIZE; scctx->isc_rss_table_size = pf->hw.func_caps.rss_table_size; scctx->isc_tx_csum_flags = CSUM_OFFLOAD; - scctx->isc_capenable = IXL_CAPS; + scctx->isc_capabilities = scctx->isc_capenable = IXL_CAPS; INIT_DEBUGOUT("ixl_if_attach_pre: end"); return (0); Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/ixl/if_ixlv.c Sun Jul 15 19:04:23 2018 (r336313) @@ -256,10 +256,10 @@ extern struct if_txrx ixl_txrx; static struct if_shared_ctx ixlv_sctx_init = { .isc_magic = IFLIB_MAGIC, .isc_q_align = PAGE_SIZE,/* max(DBA_ALIGN, PAGE_SIZE) */ - .isc_tx_maxsize = IXL_TSO_SIZE, - + .isc_tx_maxsize = IXL_TSO_SIZE + sizeof(struct ether_vlan_header), .isc_tx_maxsegsize = PAGE_SIZE, - + .isc_tso_maxsize = IXL_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsegsize = PAGE_SIZE, // TODO: Review the rx_maxsize and rx_maxsegsize params // Where are they used in iflib? .isc_rx_maxsize = 16384, @@ -446,7 +446,7 @@ ixlv_if_attach_pre(if_ctx_t ctx) // TODO: Probably needs changing vsi->shared->isc_rss_table_size = sc->hw.func_caps.rss_table_size; scctx->isc_tx_csum_flags = CSUM_OFFLOAD; - scctx->isc_capenable = IXL_CAPS; + scctx->isc_capabilities = scctx->isc_capenable = IXL_CAPS; INIT_DBG_DEV(dev, "end"); return (0); @@ -1841,11 +1841,6 @@ ixlv_setup_interface(device_t dev, struct ixl_vsi *vsi INIT_DBG_DEV(dev, "begin"); - /* initialize fast path functions */ - cap = IXL_CAPS; - if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); - if_setcapabilitiesbit(ifp, cap, 0); - if_setcapenable(ifp, if_getcapabilities(ifp)); /* TODO: Remove VLAN_ENCAP_LEN? */ vsi->shared->isc_max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN @@ -1855,16 +1850,6 @@ ixlv_setup_interface(device_t dev, struct ixl_vsi *vsi #else if_initbaudrate(ifp, IF_Gbps(40)); #endif - - /* - ** Don't turn this on by default, if vlans are - ** created on another pseudo device (eg. lagg) - ** then vlan events are not passed thru, breaking - ** operation, but with HW FILTER off it works. If - ** using vlans directly on the ixl driver you can - ** enable this and get full hardware tag filtering. - */ - if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWFILTER, 0); /* Media types based on reported link speed over AdminQ */ ifmedia_add(&sc->media, IFM_ETHER | IFM_100_TX, 0, NULL); Modified: head/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- head/sys/dev/ixl/ixl_pf_main.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/dev/ixl/ixl_pf_main.c Sun Jul 15 19:04:23 2018 (r336313) @@ -1026,29 +1026,12 @@ ixl_setup_interface(device_t dev, struct ixl_pf *pf) struct i40e_aq_get_phy_abilities_resp abilities; enum i40e_status_code aq_error = 0; - uint64_t cap; - INIT_DBG_DEV(dev, "begin"); - /* initialize fast path functions */ - cap = IXL_CAPS; - if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); - if_setcapabilitiesbit(ifp, cap, 0); - if_setcapenable(ifp, if_getcapabilities(ifp)); /* TODO: Remove VLAN_ENCAP_LEN? */ vsi->shared->isc_max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; - - /* - ** Don't turn this on by default, if vlans are - ** created on another pseudo device (eg. lagg) - ** then vlan events are not passed thru, breaking - ** operation, but with HW FILTER off it works. If - ** using vlans directly on the ixl driver you can - ** enable this and get full hardware tag filtering. - */ - if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWFILTER, 0); aq_error = i40e_aq_get_phy_capabilities(hw, FALSE, TRUE, &abilities, NULL); Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/net/iflib.c Sun Jul 15 19:04:23 2018 (r336313) @@ -1574,14 +1574,22 @@ iflib_txsd_alloc(iflib_txq_t txq) if_shared_ctx_t sctx = ctx->ifc_sctx; if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; device_t dev = ctx->ifc_dev; + bus_size_t tsomaxsize; int err, nsegments, ntsosegments; nsegments = scctx->isc_tx_nsegments; ntsosegments = scctx->isc_tx_tso_segments_max; + tsomaxsize = scctx->isc_tx_tso_size_max; + if (if_getcapabilities(ctx->ifc_ifp) & IFCAP_VLAN_MTU) + tsomaxsize += sizeof(struct ether_vlan_header); MPASS(scctx->isc_ntxd[0] > 0); MPASS(scctx->isc_ntxd[txq->ift_br_offset] > 0); MPASS(nsegments > 0); - MPASS(ntsosegments > 0); + if (if_getcapabilities(ctx->ifc_ifp) & IFCAP_TSO) { + MPASS(ntsosegments > 0); + MPASS(sctx->isc_tso_maxsize >= tsomaxsize); + } + /* * Setup DMA descriptor areas. */ @@ -1602,14 +1610,15 @@ iflib_txsd_alloc(iflib_txq_t txq) (uintmax_t)sctx->isc_tx_maxsize, nsegments, (uintmax_t)sctx->isc_tx_maxsegsize); goto fail; } - if ((err = bus_dma_tag_create(bus_get_dma_tag(dev), + if ((if_getcapabilities(ctx->ifc_ifp) & IFCAP_TSO) & + (err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - scctx->isc_tx_tso_size_max, /* maxsize */ + tsomaxsize, /* maxsize */ ntsosegments, /* nsegments */ - scctx->isc_tx_tso_segsize_max, /* maxsegsize */ + sctx->isc_tso_maxsegsize,/* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ @@ -3279,6 +3288,8 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { desc_tag = txq->ift_tso_desc_tag; max_segs = scctx->isc_tx_tso_segments_max; + MPASS(desc_tag != NULL); + MPASS(max_segs > 0); } else { desc_tag = txq->ift_desc_tag; max_segs = scctx->isc_tx_nsegments; @@ -4379,12 +4390,12 @@ iflib_device_register(device_t dev, void *sc, if_share ctx->ifc_txrx = *scctx->isc_txrx; #ifdef INVARIANTS - MPASS(scctx->isc_capenable); - if (scctx->isc_capenable & IFCAP_TXCSUM) + MPASS(scctx->isc_capabilities); + if (scctx->isc_capabilities & IFCAP_TXCSUM) MPASS(scctx->isc_tx_csum_flags); #endif - if_setcapabilities(ifp, scctx->isc_capenable | IFCAP_HWSTATS); + if_setcapabilities(ifp, scctx->isc_capabilities | IFCAP_HWSTATS); if_setcapenable(ifp, scctx->isc_capenable | IFCAP_HWSTATS); if (scctx->isc_ntxqsets == 0 || (scctx->isc_ntxqsets_max && scctx->isc_ntxqsets_max < scctx->isc_ntxqsets)) @@ -4432,16 +4443,25 @@ iflib_device_register(device_t dev, void *sc, if_share scctx->isc_tx_tso_segments_max = max(1, scctx->isc_ntxd[main_txq] / MAX_SINGLE_PACKET_FRACTION); - /* - * Protect the stack against modern hardware - */ - if (scctx->isc_tx_tso_size_max > FREEBSD_TSO_SIZE_MAX) - scctx->isc_tx_tso_size_max = FREEBSD_TSO_SIZE_MAX; - /* TSO parameters - dig these out of the data sheet - simply correspond to tag setup */ - ifp->if_hw_tsomaxsegcount = scctx->isc_tx_tso_segments_max; - ifp->if_hw_tsomax = scctx->isc_tx_tso_size_max; - ifp->if_hw_tsomaxsegsize = scctx->isc_tx_tso_segsize_max; + if (if_getcapabilities(ifp) & IFCAP_TSO) { + /* + * The stack can't handle a TSO size larger than IP_MAXPACKET, + * but some MACs do. + */ + if_sethwtsomax(ifp, min(scctx->isc_tx_tso_size_max, + IP_MAXPACKET)); + /* + * Take maximum number of m_pullup(9)'s in iflib_parse_header() + * into account. In the worst case, each of these calls will + * add another mbuf and, thus, the requirement for another DMA + * segment. So for best performance, it doesn't make sense to + * advertize a maximum of TSO segments that typically will + * require defragmentation in iflib_encap(). + */ + if_sethwtsomaxsegcount(ifp, scctx->isc_tx_tso_segments_max - 3); + if_sethwtsomaxsegsize(ifp, scctx->isc_tx_tso_segsize_max); + } if (scctx->isc_rss_table_size == 0) scctx->isc_rss_table_size = 64; scctx->isc_rss_table_mask = scctx->isc_rss_table_size-1; @@ -4512,11 +4532,22 @@ iflib_device_register(device_t dev, void *sc, if_share goto fail_intr_free; } } + ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac); + if ((err = IFDI_ATTACH_POST(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); goto fail_detach; } + + /* + * Tell the upper layer(s) if IFCAP_VLAN_MTU is supported. + * This must appear after the call to ether_ifattach() because + * ether_ifattach() sets if_hdrlen to the default value. + */ + if (if_getcapabilities(ifp) & IFCAP_VLAN_MTU) + if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); + if ((err = iflib_netmap_attach(ctx))) { device_printf(ctx->ifc_dev, "netmap attach failed: %d\n", err); goto fail_detach; @@ -4599,12 +4630,12 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc ifmedia_set(&ctx->ifc_media, IFM_ETHER | IFM_AUTO); #ifdef INVARIANTS - MPASS(scctx->isc_capenable); - if (scctx->isc_capenable & IFCAP_TXCSUM) + MPASS(scctx->isc_capabilities); + if (scctx->isc_capabilities & IFCAP_TXCSUM) MPASS(scctx->isc_tx_csum_flags); #endif - if_setcapabilities(ifp, scctx->isc_capenable | IFCAP_HWSTATS | IFCAP_LINKSTATE); + if_setcapabilities(ifp, scctx->isc_capabilities | IFCAP_HWSTATS | IFCAP_LINKSTATE); if_setcapenable(ifp, scctx->isc_capenable | IFCAP_HWSTATS | IFCAP_LINKSTATE); ifp->if_flags |= IFF_NOGROUP; @@ -4617,6 +4648,15 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc } *ctxp = ctx; + /* + * Tell the upper layer(s) if IFCAP_VLAN_MTU is supported. + * This must appear after the call to ether_ifattach() because + * ether_ifattach() sets if_hdrlen to the default value. + */ + if (if_getcapabilities(ifp) & IFCAP_VLAN_MTU) + if_setifheaderlen(ifp, + sizeof(struct ether_vlan_header)); + if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter); iflib_add_device_sysctl_post(ctx); ctx->ifc_flags |= IFC_INIT_DONE; @@ -4662,16 +4702,25 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc scctx->isc_tx_tso_segments_max = max(1, scctx->isc_ntxd[main_txq] / MAX_SINGLE_PACKET_FRACTION); - /* - * Protect the stack against modern hardware - */ - if (scctx->isc_tx_tso_size_max > FREEBSD_TSO_SIZE_MAX) - scctx->isc_tx_tso_size_max = FREEBSD_TSO_SIZE_MAX; - /* TSO parameters - dig these out of the data sheet - simply correspond to tag setup */ - ifp->if_hw_tsomaxsegcount = scctx->isc_tx_tso_segments_max; - ifp->if_hw_tsomax = scctx->isc_tx_tso_size_max; - ifp->if_hw_tsomaxsegsize = scctx->isc_tx_tso_segsize_max; + if (if_getcapabilities(ifp) & IFCAP_TSO) { + /* + * The stack can't handle a TSO size larger than IP_MAXPACKET, + * but some MACs do. + */ + if_sethwtsomax(ifp, min(scctx->isc_tx_tso_size_max, + IP_MAXPACKET)); + /* + * Take maximum number of m_pullup(9)'s in iflib_parse_header() + * into account. In the worst case, each of these calls will + * add another mbuf and, thus, the requirement for another DMA + * segment. So for best performance, it doesn't make sense to + * advertize a maximum of TSO segments that typically will + * require defragmentation in iflib_encap(). + */ + if_sethwtsomaxsegcount(ifp, scctx->isc_tx_tso_segments_max - 3); + if_sethwtsomaxsegsize(ifp, scctx->isc_tx_tso_segsize_max); + } if (scctx->isc_rss_table_size == 0) scctx->isc_rss_table_size = 64; scctx->isc_rss_table_mask = scctx->isc_rss_table_size-1; @@ -4693,6 +4742,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc device_printf(dev, "qset structure setup failed %d\n", err); goto fail_queues; } + /* * XXX What if anything do we want to do about interrupts? */ @@ -4701,6 +4751,15 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); goto fail_detach; } + + /* + * Tell the upper layer(s) if IFCAP_VLAN_MTU is supported. + * This must appear after the call to ether_ifattach() because + * ether_ifattach() sets if_hdrlen to the default value. + */ + if (if_getcapabilities(ifp) & IFCAP_VLAN_MTU) + if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); + /* XXX handle more than one queue */ for (i = 0; i < scctx->isc_nrxqsets; i++) IFDI_RX_CLSET(ctx, 0, i, ctx->ifc_rxqs[i].ifr_fl[0].ifl_sds.ifsd_cl); Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/net/iflib.h Sun Jul 15 19:04:23 2018 (r336313) @@ -45,14 +45,7 @@ struct if_clone; */ typedef uint16_t qidx_t; #define QIDX_INVALID 0xFFFF -/* - * Most cards can handle much larger TSO requests - * but the FreeBSD TCP stack will break on larger - * values - */ -#define FREEBSD_TSO_SIZE_MAX 65518 - struct iflib_ctx; typedef struct iflib_ctx *if_ctx_t; struct if_shared_ctx; @@ -216,6 +209,7 @@ typedef struct if_softc_ctx { int isc_tx_tso_size_max; int isc_tx_tso_segsize_max; int isc_tx_csum_flags; + int isc_capabilities; int isc_capenable; int isc_rss_table_size; int isc_rss_table_mask; @@ -242,6 +236,8 @@ struct if_shared_ctx { bus_size_t isc_q_align; bus_size_t isc_tx_maxsize; bus_size_t isc_tx_maxsegsize; + bus_size_t isc_tso_maxsize; + bus_size_t isc_tso_maxsegsize; bus_size_t isc_rx_maxsize; bus_size_t isc_rx_maxsegsize; int isc_rx_nsegments; Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Jul 15 18:54:44 2018 (r336312) +++ head/sys/sys/param.h Sun Jul 15 19:04:23 2018 (r336313) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200072 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200073 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sun Jul 15 19:25:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF52E104C415; Sun, 15 Jul 2018 19:25:16 +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 8C7CA94AE8; Sun, 15 Jul 2018 19:25:16 +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 67392122BB; Sun, 15 Jul 2018 19:25:16 +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 w6FJPGB0050257; Sun, 15 Jul 2018 19:25:16 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FJPGKq050256; Sun, 15 Jul 2018 19:25:16 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201807151925.w6FJPGKq050256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 15 Jul 2018 19:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336314 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 336314 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 19:25:17 -0000 Author: alc Date: Sun Jul 15 19:25:15 2018 New Revision: 336314 URL: https://svnweb.freebsd.org/changeset/base/336314 Log: Test PGA_REFERENCED after calling pmap_ts_referenced(), rather than before, so that a reference from a concurrently destroyed mapping is observed during the current scan. Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16277 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Jul 15 19:04:23 2018 (r336313) +++ head/sys/vm/vm_pageout.c Sun Jul 15 19:25:15 2018 (r336314) @@ -793,18 +793,22 @@ recheck: * If the page has been referenced and the object is not dead, * reactivate or requeue the page depending on whether the * object is mapped. + * + * Test PGA_REFERENCED after calling pmap_ts_referenced() so + * that a reference from a concurrently destroyed mapping is + * observed here and now. */ - if ((m->aflags & PGA_REFERENCED) != 0) { - vm_page_aflag_clear(m, PGA_REFERENCED); - act_delta = 1; - } else - act_delta = 0; if (object->ref_count != 0) - act_delta += pmap_ts_referenced(m); + act_delta = pmap_ts_referenced(m); else { KASSERT(!pmap_page_is_mapped(m), ("page %p is mapped", m)); + act_delta = 0; } + if ((m->aflags & PGA_REFERENCED) != 0) { + vm_page_aflag_clear(m, PGA_REFERENCED); + act_delta++; + } if (act_delta != 0) { if (object->ref_count != 0) { VM_CNT_INC(v_reactivated); @@ -1215,14 +1219,11 @@ act_scan: /* * Check to see "how much" the page has been used. - */ - if ((m->aflags & PGA_REFERENCED) != 0) { - vm_page_aflag_clear(m, PGA_REFERENCED); - act_delta = 1; - } else - act_delta = 0; - - /* + * + * Test PGA_REFERENCED after calling pmap_ts_referenced() so + * that a reference from a concurrently destroyed mapping is + * observed here and now. + * * Perform an unsynchronized object ref count check. While * the page lock ensures that the page is not reallocated to * another object, in particular, one with unmanaged mappings @@ -1236,7 +1237,13 @@ act_scan: * worst, we will deactivate and reactivate the page. */ if (m->object->ref_count != 0) - act_delta += pmap_ts_referenced(m); + act_delta = pmap_ts_referenced(m); + else + act_delta = 0; + if ((m->aflags & PGA_REFERENCED) != 0) { + vm_page_aflag_clear(m, PGA_REFERENCED); + act_delta++; + } /* * Advance or decay the act_count based on recent usage. @@ -1482,17 +1489,21 @@ recheck: * If the page has been referenced and the object is not dead, * reactivate or requeue the page depending on whether the * object is mapped. + * + * Test PGA_REFERENCED after calling pmap_ts_referenced() so + * that a reference from a concurrently destroyed mapping is + * observed here and now. */ - if ((m->aflags & PGA_REFERENCED) != 0) { - vm_page_aflag_clear(m, PGA_REFERENCED); - act_delta = 1; - } else - act_delta = 0; - if (object->ref_count != 0) { - act_delta += pmap_ts_referenced(m); - } else { + if (object->ref_count != 0) + act_delta = pmap_ts_referenced(m); + else { KASSERT(!pmap_page_is_mapped(m), ("page %p is mapped", m)); + act_delta = 0; + } + if ((m->aflags & PGA_REFERENCED) != 0) { + vm_page_aflag_clear(m, PGA_REFERENCED); + act_delta++; } if (act_delta != 0) { if (object->ref_count != 0) { From owner-svn-src-head@freebsd.org Sun Jul 15 20:34:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6306710279E1; Sun, 15 Jul 2018 20:34:23 +0000 (UTC) (envelope-from tuexen@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 1564E96ED9; Sun, 15 Jul 2018 20:34:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB59A12E0E; Sun, 15 Jul 2018 20:34:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FKYMwL085940; Sun, 15 Jul 2018 20:34:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FKYMlR085937; Sun, 15 Jul 2018 20:34:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807152034.w6FKYMlR085937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 15 Jul 2018 20:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336315 - in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/ip usr.sbin/dtrace/tests/tools X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/ip usr.sbin/dtrace/tests/tools X-SVN-Commit-Revision: 336315 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 20:34:23 -0000 Author: tuexen Date: Sun Jul 15 20:34:22 2018 New Revision: 336315 URL: https://svnweb.freebsd.org/changeset/base/336315 Log: Fix the UDP tests for dtrace. The code imported from opensolaris was depending on ping supporting UDP for sending probes. Since this is not supported by ping on FreeBSD use a perl script instead. The remote test requires the usage of ksh93, so state that in the sheband. Enable the local test, but keep the remote test disabled, since it requires a remote machine on the LAN. Reviewed by: markj@, gnn@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16268 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh Sun Jul 15 19:25:15 2018 (r336314) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh Sun Jul 15 20:34:22 2018 (r336315) @@ -1,4 +1,4 @@ -#!/usr/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # @@ -36,14 +36,14 @@ # 4. An unlikely race causes the unlocked global send/receive # variables to be corrupted. # -# This test sends a UDP message using ping and checks that at least the +# This test sends a UDP message using perl and checks that at least the # following counts were traced: # -# 1 x ip:::send (UDP sent to ping's base UDP port) -# 1 x udp:::send (UDP sent to ping's base UDP port) +# 1 x ip:::send (UDP sent to UDP port 33434) +# 1 x udp:::send (UDP sent to UDP port 33434) # 1 x ip:::receive (UDP received) # -# No udp:::receive event is expected as the response ping -U elicits is +# No udp:::receive event is expected since the UDP packet elicts # an ICMP PORT_UNREACHABLE response rather than a UDP packet, and locally # the echo request UDP packet only reaches IP, so the udp:::receive probe # is not triggered by it. @@ -56,8 +56,25 @@ fi dtrace=$1 local=127.0.0.1 +port=33434 +DIR=/var/tmp/dtest.$$ -$dtrace -c "/sbin/ping -U $local" -qs /dev/stdin < test.pl <<-EOPERL + use IO::Socket; + my \$s = IO::Socket::INET->new( + Proto => "udp", + PeerAddr => "$local", + PeerPort => $port); + die "Could not create UDP socket $local port $port" unless \$s; + send \$s, "Hello", 0; + close \$s; + sleep(2); +EOPERL + +$dtrace -c 'perl test.pl' -qs /dev/stdin <= 1 ? "yes" : "no"); printf("udp:::send - %s\n", udpsend >= 1 ? "yes" : "no"); } -EOF +EODTRACE + +status=$? + +cd / +/bin/rm -rf $DIR + +exit $status Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh Sun Jul 15 19:25:15 2018 (r336314) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh Sun Jul 15 20:34:22 2018 (r336315) @@ -1,4 +1,4 @@ -#!/usr/bin/ksh +#!/usr/bin/env ksh93 # # CDDL HEADER START # @@ -36,7 +36,7 @@ # 4. An unlikely race causes the unlocked global send/receive # variables to be corrupted. # -# This test sends a UDP message using ping and checks that at least the +# This test sends a UDP message using perl and checks that at least the # following counts were traced: # # 1 x ip:::send (UDP sent to ping's base UDP port) @@ -50,6 +50,8 @@ fi dtrace=$1 getaddr=./get.ipv4remote.pl +port=33434 +DIR=/var/tmp/dtest.$$ if [[ ! -x $getaddr ]]; then print -u2 "could not find or execute sub program: $getaddr" @@ -60,7 +62,22 @@ if (( $? != 0 )); then exit 4 fi -$dtrace -c "/sbin/ping -U $dest" -qs /dev/stdin < test.pl <<-EOPERL + use IO::Socket; + my \$s = IO::Socket::INET->new( + Proto => "udp", + PeerAddr => "$dest", + PeerPort => $port); + die "Could not create UDP socket $dest port $port" unless \$s; + send \$s, "Hello", 0; + close \$s; + sleep(2); +EOPERL + +$dtrace -c 'perl test.pl' -qs /dev/stdin <= 1 ? "yes" : "no"); printf("udp:::send - %s\n", udpsend >= 1 ? "yes" : "no"); } -EOF +EODTRACE + +status=$? + +cd / +/bin/rm -rf $DIR + +exit $status Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Sun Jul 15 19:25:15 2018 (r336314) +++ head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Sun Jul 15 20:34:22 2018 (r336315) @@ -33,7 +33,6 @@ exclude EXFAIL common/funcs/tst.copyin.d exclude EXFAIL common/funcs/tst.copyinto.d exclude EXFAIL common/funcs/tst.ddi_pathname.d exclude EXFAIL common/io/tst.fds.d -exclude EXFAIL common/ip/tst.ipv4localudp.ksh exclude EXFAIL common/mdb/tst.dtracedcmd.ksh exclude EXFAIL common/misc/tst.dofmax.ksh exclude EXFAIL common/misc/tst.include.ksh From owner-svn-src-head@freebsd.org Sun Jul 15 20:41:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61DDD1027F13; Sun, 15 Jul 2018 20:41:17 +0000 (UTC) (envelope-from tuexen@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 12D979729C; Sun, 15 Jul 2018 20:41:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E817712E4F; Sun, 15 Jul 2018 20:41:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FKfG1a086985; Sun, 15 Jul 2018 20:41:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FKfG1M086984; Sun, 15 Jul 2018 20:41:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807152041.w6FKfG1M086984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 15 Jul 2018 20:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336316 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip X-SVN-Commit-Revision: 336316 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 20:41:17 -0000 Author: tuexen Date: Sun Jul 15 20:41:16 2018 New Revision: 336316 URL: https://svnweb.freebsd.org/changeset/base/336316 Log: Don't require a local sshd for the local TCP state dtrace test This change is similar to the one done in r286171 for tst.ipv4localtcp.ksh. This not only reduces the requirements on the system used for testing but results also in a graceful teardown of the TCP connection. Reviewed by: gnn@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16276 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh Sun Jul 15 20:34:22 2018 (r336315) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh Sun Jul 15 20:41:16 2018 (r336316) @@ -36,12 +36,11 @@ # 1. A change to the ip stack breaking expected probe behavior, # which is the reason we are testing. # 2. The lo0 interface missing or not up. -# 3. The local ssh service is not online. -# 4. An unlikely race causes the unlocked global send/receive +# 3. An unlikely race causes the unlocked global send/receive # variables to be corrupted. # -# This test performs a TCP connection to the ssh service (port 22) and -# checks that at least the following packet counts were traced: +# This test performs a TCP connection and checks that at least the +# following packet counts were traced: # # 3 x ip:::send (2 during the TCP handshake, then a FIN) # 4 x tcp:::send (2 during the TCP handshake, 1 message then a FIN) @@ -63,12 +62,25 @@ fi dtrace=$1 local=127.0.0.1 -tcpport=22 DIR=/var/tmp/dtest.$$ +tcpport=1024 +bound=5000 +while [ $tcpport -lt $bound ]; do + nc -z $local $tcpport >/dev/null || break + tcpport=$(($tcpport + 1)) +done +if [ $tcpport -eq $bound ]; then + echo "couldn't find an available TCP port" + exit 1 +fi + mkdir $DIR cd $DIR +# nc will exit when the connection is closed. +nc -l $local $tcpport & + cat > test.pl <<-EOPERL use IO::Socket; my \$s = IO::Socket::INET->new( @@ -77,7 +89,6 @@ cat > test.pl <<-EOPERL PeerPort => $tcpport, Timeout => 3); die "Could not connect to host $local port $tcpport" unless \$s; - print \$s "testing state machine transitions"; close \$s; sleep(2); EOPERL From owner-svn-src-head@freebsd.org Sun Jul 15 20:42:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 875D01028075; Sun, 15 Jul 2018 20:42:48 +0000 (UTC) (envelope-from tuexen@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 3C04A974FE; Sun, 15 Jul 2018 20:42:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D48A12FBD; Sun, 15 Jul 2018 20:42:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FKglm3091103; Sun, 15 Jul 2018 20:42:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FKglKW091102; Sun, 15 Jul 2018 20:42:47 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807152042.w6FKglKW091102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 15 Jul 2018 20:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336317 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip X-SVN-Commit-Revision: 336317 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 20:42:48 -0000 Author: tuexen Date: Sun Jul 15 20:42:47 2018 New Revision: 336317 URL: https://svnweb.freebsd.org/changeset/base/336317 Log: Adjust comment to reality since r286171. Sponsored by: Netflix, Inc. Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh Sun Jul 15 20:41:16 2018 (r336316) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh Sun Jul 15 20:42:47 2018 (r336317) @@ -32,8 +32,7 @@ # 1. A change to the ip stack breaking expected probe behavior, # which is the reason we are testing. # 2. The lo0 interface missing or not up. -# 3. The local ssh service is not online. -# 4. An unlikely race causes the unlocked global send/receive +# 3. An unlikely race causes the unlocked global send/receive # variables to be corrupted. # # This test performs a TCP connection and checks that at least the From owner-svn-src-head@freebsd.org Sun Jul 15 21:04:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82159102950F; Sun, 15 Jul 2018 21:04:22 +0000 (UTC) (envelope-from pstef@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 2B714704A3; Sun, 15 Jul 2018 21:04:22 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0994A132F6; Sun, 15 Jul 2018 21:04:22 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FL4L2n001430; Sun, 15 Jul 2018 21:04:21 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FL4LN4001427; Sun, 15 Jul 2018 21:04:21 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201807152104.w6FL4LN4001427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Sun, 15 Jul 2018 21:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336318 - head/usr.bin/indent X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: head/usr.bin/indent X-SVN-Commit-Revision: 336318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 21:04:22 -0000 Author: pstef Date: Sun Jul 15 21:04:21 2018 New Revision: 336318 URL: https://svnweb.freebsd.org/changeset/base/336318 Log: indent(1): move case_indent from parser state to the options struct This was missed in r334927. Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent_globs.h head/usr.bin/indent/parse.c Modified: head/usr.bin/indent/args.c ============================================================================== --- head/usr.bin/indent/args.c Sun Jul 15 20:42:47 2018 (r336317) +++ head/usr.bin/indent/args.c Sun Jul 15 21:04:21 2018 (r336318) @@ -255,7 +255,7 @@ set_defaults(void) * Because ps.case_indent is a float, we can't initialize it from the * table: */ - ps.case_indent = 0.0; /* -cli0.0 */ + opt.case_indent = 0.0; /* -cli0.0 */ for (p = pro; p->p_name; p++) if (p->p_type != PRO_SPECIAL) *p->p_obj = p->p_default; @@ -284,7 +284,7 @@ found: case CLI: if (*param_start == 0) goto need_param; - ps.case_indent = atof(param_start); + opt.case_indent = atof(param_start); break; case STDIN: Modified: head/usr.bin/indent/indent_globs.h ============================================================================== --- head/usr.bin/indent/indent_globs.h Sun Jul 15 20:42:47 2018 (r336317) +++ head/usr.bin/indent/indent_globs.h Sun Jul 15 21:04:21 2018 (r336318) @@ -165,6 +165,8 @@ struct options { int cuddle_else; /* true if else should cuddle up to '}' */ int continuation_indent; /* set to the indentation between the * edge of code and continuation lines */ + float case_indent; /* The distance to indent case labels from the + * switch statement */ int com_ind; /* the column in which comments to the right * of code should start */ int decl_indent; /* column to indent declared identifiers to */ @@ -304,8 +306,6 @@ struct parser_state { * ignored in some cases.) */ int keyword; /* the type of a keyword or 0 */ int dumped_decl_indent; - float case_indent; /* The distance to indent case labels from the - * switch statement */ int in_parameter_declaration; int tos; /* pointer to top of stack */ char procname[100]; /* The name of the current procedure */ Modified: head/usr.bin/indent/parse.c ============================================================================== --- head/usr.bin/indent/parse.c Sun Jul 15 20:42:47 2018 (r336317) +++ head/usr.bin/indent/parse.c Sun Jul 15 21:04:21 2018 (r336318) @@ -128,7 +128,7 @@ parse(int tk) /* tk: the code for the construct scanne /* * it is a group as part of a while, for, etc. */ - if (ps.p_stack[ps.tos] == swstmt && ps.case_indent >= 1) + if (ps.p_stack[ps.tos] == swstmt && opt.case_indent >= 1) --ps.ind_level; /* * for a switch, brace should be two levels out from the code @@ -189,10 +189,10 @@ parse(int tk) /* tk: the code for the construct scanne ps.cstk[ps.tos] = case_ind; /* save current case indent level */ ps.il[ps.tos] = ps.i_l_follow; - case_ind = ps.i_l_follow + ps.case_indent; /* cases should be one + case_ind = ps.i_l_follow + opt.case_indent; /* cases should be one * level down from * switch */ - ps.i_l_follow += ps.case_indent + 1; /* statements should be two + ps.i_l_follow += opt.case_indent + 1; /* statements should be two * levels in */ ps.search_brace = opt.btype_2; break; From owner-svn-src-head@freebsd.org Sun Jul 15 21:10:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8B4D1029D29; Sun, 15 Jul 2018 21:10:20 +0000 (UTC) (envelope-from asomers@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 612A070946; Sun, 15 Jul 2018 21:10:20 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 434EA132FD; Sun, 15 Jul 2018 21:10:20 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FLAKG1001742; Sun, 15 Jul 2018 21:10:20 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FLAKhR001741; Sun, 15 Jul 2018 21:10:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807152110.w6FLAKhR001741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 15 Jul 2018 21:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336319 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 336319 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 21:10:20 -0000 Author: asomers Date: Sun Jul 15 21:10:19 2018 New Revision: 336319 URL: https://svnweb.freebsd.org/changeset/base/336319 Log: auditon(2): fix A_SETPOLICY with 64-bit values A_SETPOLICY is supposed to work with either 64 or 32-bit values, but due to a typo the 64-bit version has never worked correctly. Submitted by: aniketp Reviewed by: asomers, cem MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16222 Modified: head/sys/security/audit/audit_syscalls.c Modified: head/sys/security/audit/audit_syscalls.c ============================================================================== --- head/sys/security/audit/audit_syscalls.c Sun Jul 15 21:04:21 2018 (r336318) +++ head/sys/security/audit/audit_syscalls.c Sun Jul 15 21:10:19 2018 (r336319) @@ -251,7 +251,7 @@ sys_auditon(struct thread *td, struct auditon_args *ua case A_OLDSETPOLICY: case A_SETPOLICY: if (uap->length == sizeof(udata.au_policy64)) { - if (udata.au_policy & (~AUDIT_CNT|AUDIT_AHLT| + if (udata.au_policy & ~(AUDIT_CNT|AUDIT_AHLT| AUDIT_ARGV|AUDIT_ARGE)) return (EINVAL); audit_fail_stop = ((udata.au_policy64 & AUDIT_CNT) == From owner-svn-src-head@freebsd.org Sun Jul 15 21:55:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EB95102BB84; Sun, 15 Jul 2018 21:55:19 +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 317DC724F1; Sun, 15 Jul 2018 21:55:19 +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 07CAF13B4C; Sun, 15 Jul 2018 21:55:19 +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 w6FLtIQp026936; Sun, 15 Jul 2018 21:55:18 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FLtH0w026930; Sun, 15 Jul 2018 21:55:17 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201807152155.w6FLtH0w026930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 15 Jul 2018 21:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336320 - in head/bin/sh: . tests/builtins X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in head/bin/sh: . tests/builtins X-SVN-Commit-Revision: 336320 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 21:55:19 -0000 Author: jilles Date: Sun Jul 15 21:55:17 2018 New Revision: 336320 URL: https://svnweb.freebsd.org/changeset/base/336320 Log: sh: Don't treat % specially in CDPATH Added: head/bin/sh/tests/builtins/cd11.0 (contents, props changed) Modified: head/bin/sh/cd.c head/bin/sh/exec.c head/bin/sh/exec.h head/bin/sh/main.c head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/cd.c ============================================================================== --- head/bin/sh/cd.c Sun Jul 15 21:10:19 2018 (r336319) +++ head/bin/sh/cd.c Sun Jul 15 21:55:17 2018 (r336320) @@ -120,7 +120,7 @@ cdcmd(int argc __unused, char **argv __unused) (dest[0] == '.' && dest[1] == '.' && (dest[2] == '/' || dest[2] == '\0')) || (path = bltinlookup("CDPATH", 1)) == NULL) path = ""; - while ((p = padvance(&path, dest)) != NULL) { + while ((p = padvance(&path, NULL, dest)) != NULL) { if (stat(p, &statb) < 0) { if (errno != ENOENT) errno1 = errno; Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Sun Jul 15 21:10:19 2018 (r336319) +++ head/bin/sh/exec.c Sun Jul 15 21:55:17 2018 (r336320) @@ -113,6 +113,7 @@ void shellexec(char **argv, char **envp, const char *path, int idx) { char *cmdname; + const char *opt; int e; if (strchr(argv[0], '/') != NULL) { @@ -120,8 +121,8 @@ shellexec(char **argv, char **envp, const char *path, e = errno; } else { e = ENOENT; - while ((cmdname = padvance(&path, argv[0])) != NULL) { - if (--idx < 0 && pathopt == NULL) { + while ((cmdname = padvance(&path, &opt, argv[0])) != NULL) { + if (--idx < 0 && opt == NULL) { tryexec(cmdname, argv, envp); if (errno != ENOENT && errno != ENOTDIR) e = errno; @@ -174,16 +175,14 @@ tryexec(char *cmd, char **argv, char **envp) * Do a path search. The variable path (passed by reference) should be * set to the start of the path before the first call; padvance will update * this value as it proceeds. Successive calls to padvance will return - * the possible path expansions in sequence. If an option (indicated by - * a percent sign) appears in the path entry then the global variable - * pathopt will be set to point to it; otherwise pathopt will be set to - * NULL. + * the possible path expansions in sequence. If popt is not NULL, options + * are processed: if an option (indicated by a percent sign) appears in + * the path entry then *popt will be set to point to it; else *popt will be + * set to NULL. If popt is NULL, percent signs are not special. */ -const char *pathopt; - char * -padvance(const char **path, const char *name) +padvance(const char **path, const char **popt, const char *name) { const char *p, *start; char *q; @@ -192,8 +191,12 @@ padvance(const char **path, const char *name) if (*path == NULL) return NULL; start = *path; - for (p = start; *p && *p != ':' && *p != '%'; p++) - ; /* nothing */ + if (popt != NULL) + for (p = start; *p && *p != ':' && *p != '%'; p++) + ; /* nothing */ + else + for (p = start; *p && *p != ':'; p++) + ; /* nothing */ namelen = strlen(name); len = p - start + namelen + 2; /* "2" is for '/' and '\0' */ STARTSTACKSTR(q); @@ -204,10 +207,12 @@ padvance(const char **path, const char *name) *q++ = '/'; } memcpy(q, name, namelen + 1); - pathopt = NULL; - if (*p == '%') { - pathopt = ++p; - while (*p && *p != ':') p++; + if (popt != NULL) { + if (*p == '%') { + *popt = ++p; + while (*p && *p != ':') p++; + } else + *popt = NULL; } if (*p == ':') *path = p + 1; @@ -277,14 +282,14 @@ static void printentry(struct tblentry *cmdp, int verbose) { int idx; - const char *path; + const char *path, *opt; char *name; if (cmdp->cmdtype == CMDNORMAL) { idx = cmdp->param.index; path = pathval(); do { - name = padvance(&path, cmdp->cmdname); + name = padvance(&path, &opt, cmdp->cmdname); stunalloc(name); } while (--idx >= 0); out1str(name); @@ -321,6 +326,7 @@ find_command(const char *name, struct cmdentry *entry, { struct tblentry *cmdp, loc_cmd; int idx; + const char *opt; char *fullname; struct stat statb; int e; @@ -363,10 +369,11 @@ find_command(const char *name, struct cmdentry *entry, e = ENOENT; idx = -1; - for (;(fullname = padvance(&path, name)) != NULL; stunalloc(fullname)) { + for (;(fullname = padvance(&path, &opt, name)) != NULL; + stunalloc(fullname)) { idx++; - if (pathopt) { - if (strncmp(pathopt, "func", 4) == 0) { + if (opt) { + if (strncmp(opt, "func", 4) == 0) { /* handled below */ } else { continue; /* ignore unimplemented options */ @@ -382,7 +389,7 @@ find_command(const char *name, struct cmdentry *entry, e = EACCES; /* if we fail, this will be the error */ if (!S_ISREG(statb.st_mode)) continue; - if (pathopt) { /* this is a %func directory */ + if (opt) { /* this is a %func directory */ readcmdfile(fullname); if ((cmdp = cmdlookup(name, 0)) == NULL || cmdp->cmdtype != CMDFUNCTION) error("%s not defined in %s", name, fullname); @@ -703,10 +710,11 @@ typecmd_impl(int argc, char **argv, int cmd, const cha case CMDNORMAL: { if (strchr(argv[i], '/') == NULL) { const char *path2 = path; + const char *opt2; char *name; int j = entry.u.index; do { - name = padvance(&path2, argv[i]); + name = padvance(&path2, &opt2, argv[i]); stunalloc(name); } while (--j >= 0); if (cmd == TYPECMD_SMALLV) Modified: head/bin/sh/exec.h ============================================================================== --- head/bin/sh/exec.h Sun Jul 15 21:10:19 2018 (r336319) +++ head/bin/sh/exec.h Sun Jul 15 21:55:17 2018 (r336320) @@ -61,11 +61,10 @@ struct cmdentry { #define DO_ERR 0x01 /* prints errors */ #define DO_NOFUNC 0x02 /* don't return shell functions, for command */ -extern const char *pathopt; /* set by padvance */ extern int exerrno; /* last exec error */ void shellexec(char **, char **, const char *, int) __dead2; -char *padvance(const char **, const char *); +char *padvance(const char **, const char **, const char *); void find_command(const char *, struct cmdentry *, int, const char *); int find_builtin(const char *, int *); void hashcd(void); Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sun Jul 15 21:10:19 2018 (r336319) +++ head/bin/sh/main.c Sun Jul 15 21:55:17 2018 (r336320) @@ -294,6 +294,7 @@ static char * find_dot_file(char *basename) { char *fullname; + const char *opt; const char *path = pathval(); struct stat statb; @@ -301,7 +302,7 @@ find_dot_file(char *basename) if( strchr(basename, '/')) return basename; - while ((fullname = padvance(&path, basename)) != NULL) { + while ((fullname = padvance(&path, &opt, basename)) != NULL) { if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) { /* * Don't bother freeing here, since it will Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sun Jul 15 21:10:19 2018 (r336319) +++ head/bin/sh/tests/builtins/Makefile Sun Jul 15 21:55:17 2018 (r336320) @@ -53,6 +53,7 @@ ${PACKAGE}FILES+= cd7.0 ${PACKAGE}FILES+= cd8.0 ${PACKAGE}FILES+= cd9.0 cd9.0.stdout ${PACKAGE}FILES+= cd10.0 +${PACKAGE}FILES+= cd11.0 ${PACKAGE}FILES+= command1.0 ${PACKAGE}FILES+= command2.0 ${PACKAGE}FILES+= command3.0 Added: head/bin/sh/tests/builtins/cd11.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/cd11.0 Sun Jul 15 21:55:17 2018 (r336320) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +set -e +T=$(mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXX") +trap 'rm -rf "$T"' 0 + +mkdir "$T/%?^&*" +cd -P "$T/%?^&*" +D=$(pwd) + +mkdir a a/1 b b/1 b/2 + +CDPATH=$D/a: +# Basic test. +cd 1 >/dev/null +[ "$(pwd)" = "$D/a/1" ] +# Test that the current directory is not checked before CDPATH. +cd "$D/b" +cd 1 >/dev/null +[ "$(pwd)" = "$D/a/1" ] +# Test not using a CDPATH entry. +cd "$D/b" +cd 2 +[ "$(pwd)" = "$D/b/2" ] From owner-svn-src-head@freebsd.org Sun Jul 15 22:18:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C53D9102C9A5; Sun, 15 Jul 2018 22:18:32 +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 7828373013; Sun, 15 Jul 2018 22:18: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 40BA913E97; Sun, 15 Jul 2018 22:18: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 w6FMIWG0037065; Sun, 15 Jul 2018 22:18:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FMIVYV037063; Sun, 15 Jul 2018 22:18:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807152218.w6FMIVYV037063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 15 Jul 2018 22:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336321 - in head/sys/i386: i386 include X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/i386: i386 include X-SVN-Commit-Revision: 336321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 22:18:33 -0000 Author: markj Date: Sun Jul 15 22:18:31 2018 New Revision: 336321 URL: https://svnweb.freebsd.org/changeset/base/336321 Log: Restore the check for the page size extension after r332489. Without this, the support for transparent superpage promotion on i386 was left disabled. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D16279 Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Jul 15 21:55:17 2018 (r336320) +++ head/sys/i386/i386/pmap.c Sun Jul 15 22:18:31 2018 (r336321) @@ -201,8 +201,8 @@ struct pmap kernel_pmap_store; vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ -int pgeflag = 0; /* PG_G or-in */ -int pseflag = 0; /* PG_PS or-in */ +static int pgeflag = 0; /* PG_G or-in */ +static int pseflag = 0; /* PG_PS or-in */ static int nkpt = NKPT; vm_offset_t kernel_vm_end = /* 0 + */ NKPT * NBPDR; @@ -518,6 +518,7 @@ pmap_cold(void) ncr4 = 0; if ((cpu_feature & CPUID_PSE) != 0) { ncr4 |= CR4_PSE; + pseflag = PG_PS; /* * Superpage mapping of the kernel text. Existing 4k * page table pages are wasted. @@ -1791,7 +1792,7 @@ pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr sva = va; while (start < end) { if ((start & PDRMASK) == 0 && end - start >= NBPDR && - pseflag) { + pseflag != 0) { KASSERT((va & PDRMASK) == 0, ("pmap_map: misaligned va %#x", va)); newpde = start | PG_PS | PG_RW | PG_V; @@ -4175,7 +4176,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_ VM_OBJECT_ASSERT_WLOCKED(object); KASSERT(object->type == OBJT_DEVICE || object->type == OBJT_SG, ("pmap_object_init_pt: non-device object")); - if (pseflag && + if (pg_ps_enabled && (addr & (NBPDR - 1)) == 0 && (size & (NBPDR - 1)) == 0) { if (!vm_object_populate(object, pindex, pindex + atop(size))) return; Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Sun Jul 15 21:55:17 2018 (r336320) +++ head/sys/i386/include/pmap.h Sun Jul 15 22:18:31 2018 (r336321) @@ -360,8 +360,6 @@ extern caddr_t CADDR3; extern pt_entry_t *CMAP3; extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; -extern int pseflag; -extern int pgeflag; extern char *ptvmmap; /* poor name! */ extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; From owner-svn-src-head@freebsd.org Mon Jul 16 01:07:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A31461033241; Mon, 16 Jul 2018 01:07:29 +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.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 4A1167841B; Mon, 16 Jul 2018 01:07:29 +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 2063B159A7; Mon, 16 Jul 2018 01:07:29 +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 w6G17SJf023128; Mon, 16 Jul 2018 01:07:28 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6G17SKC023127; Mon, 16 Jul 2018 01:07:28 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201807160107.w6G17SKC023127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 16 Jul 2018 01:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336325 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 336325 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 01:07:29 -0000 Author: gonzo Date: Mon Jul 16 01:07:28 2018 New Revision: 336325 URL: https://svnweb.freebsd.org/changeset/base/336325 Log: Remove two checks that are always false Outer loop condition contradicts inner check so code under inner condition is not reachable. Remove it. PR: 229722 Reported by: David Binderman Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Mon Jul 16 00:28:33 2018 (r336324) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Mon Jul 16 01:07:28 2018 (r336325) @@ -1022,12 +1022,8 @@ bcm_sdhost_read_multi_4(device_t dev, struct sdhci_slo for (i = 0; i < count;) { edm = RD4(sc, HC_DEBUG); avail = ((edm >> 4) & 0x1f); - if (i + avail > count) { - if (i >= count) - return; - else - avail = count - i; - } + if (i + avail > count) + avail = count - i; if (avail > 0) bus_space_read_multi_4(sc->sc_bst, sc->sc_bsh, HC_DATAPORT, data + i, avail); @@ -1234,12 +1230,8 @@ bcm_sdhost_write_multi_4(device_t dev, struct sdhci_sl for (i = 0; i < count;) { edm = RD4(sc, HC_DEBUG); space = HC_FIFO_SIZE - ((edm >> 4) & 0x1f); - if (i + space > count) { - if (i >= count) - return; - else - space = count - i; - } + if (i + space > count) + space = count - i; if (space > 0) bus_space_write_multi_4(sc->sc_bst, sc->sc_bsh, HC_DATAPORT, data + i, space); From owner-svn-src-head@freebsd.org Mon Jul 16 01:34:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 937261034497; Mon, 16 Jul 2018 01:34:46 +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.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 42E0D79552; Mon, 16 Jul 2018 01:34:46 +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 2371D15E6B; Mon, 16 Jul 2018 01:34:46 +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 w6G1YkGL038304; Mon, 16 Jul 2018 01:34:46 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6G1YkNR038303; Mon, 16 Jul 2018 01:34:46 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201807160134.w6G1YkNR038303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 16 Jul 2018 01:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336326 - head/sys/dev/ichiic X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/ichiic X-SVN-Commit-Revision: 336326 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 01:34:46 -0000 Author: gonzo Date: Mon Jul 16 01:34:45 2018 New Revision: 336326 URL: https://svnweb.freebsd.org/changeset/base/336326 Log: Remove MODULE_PNP_INFO for ig4(4) driver ig4(4) does not support suspend/resume but present on the hardware where such functionality is critical, like laptops. Remove PNP info to avoid breaking suspend/resume on the systems where ig4(4) load is not explicitly requested by the user. PR: 229791 Reported by: Ali Abdallah Modified: head/sys/dev/ichiic/ig4_pci.c Modified: head/sys/dev/ichiic/ig4_pci.c ============================================================================== --- head/sys/dev/ichiic/ig4_pci.c Mon Jul 16 01:07:28 2018 (r336325) +++ head/sys/dev/ichiic/ig4_pci.c Mon Jul 16 01:34:45 2018 (r336326) @@ -228,5 +228,7 @@ DRIVER_MODULE_ORDERED(ig4iic_pci, pci, ig4iic_pci_driv MODULE_DEPEND(ig4iic_pci, pci, 1, 1, 1); MODULE_DEPEND(ig4iic_pci, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); MODULE_VERSION(ig4iic_pci, 1); -MODULE_PNP_INFO("W32:vendor/device", pci, ig4iic_pci, ig4iic_pci_devices, - sizeof(ig4iic_pci_devices[0]), nitems(ig4iic_pci_devices)); +/* + * Loading this module breaks suspend/resume on laptops + * Do not add MODULE_PNP_INFO until it's impleneted + */ From owner-svn-src-head@freebsd.org Mon Jul 16 05:46:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6F28103FD6E; Mon, 16 Jul 2018 05:46:52 +0000 (UTC) (envelope-from pstef@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 67A8781812; Mon, 16 Jul 2018 05:46:52 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4584D187AD; Mon, 16 Jul 2018 05:46:52 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6G5kqI2066336; Mon, 16 Jul 2018 05:46:52 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6G5kp69066331; Mon, 16 Jul 2018 05:46:51 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201807160546.w6G5kp69066331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 16 Jul 2018 05:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336333 - in head/usr.bin/indent: . tests X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: in head/usr.bin/indent: . tests X-SVN-Commit-Revision: 336333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 05:46:53 -0000 Author: pstef Date: Mon Jul 16 05:46:50 2018 New Revision: 336333 URL: https://svnweb.freebsd.org/changeset/base/336333 Log: indent(1): rewrite the integer/floating constant scanning part of lexi.c Remove procedural code that did the scanning, which was faulty and didn't support complex constants such as 0x1p-61. Replace it with a finite state machine expressed as a transition table. The table was rewritten by hand from lx's output, given parts of grammar expressed as regular expressions. lx is Katherine Flavel's lexer generator, currently available at https://github.com/katef/libfsm and the parts of grammar were taken from http://quut.com/c/ANSI-C-grammar-l-2011.html and extended to support binary integer constants which are a popular GCC extension. Reported by: bde Modified: head/usr.bin/indent/indent.c head/usr.bin/indent/indent.h head/usr.bin/indent/lexi.c head/usr.bin/indent/tests/float.0 head/usr.bin/indent/tests/float.0.stdout Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Mon Jul 16 05:36:42 2018 (r336332) +++ head/usr.bin/indent/indent.c Mon Jul 16 05:46:50 2018 (r336333) @@ -120,6 +120,7 @@ main(int argc, char **argv) if (tokenbuf == NULL) err(1, NULL); alloc_typenames(); + init_constant_tt(); l_com = combuf + bufsize - 5; l_lab = labbuf + bufsize - 5; l_code = codebuf + bufsize - 5; Modified: head/usr.bin/indent/indent.h ============================================================================== --- head/usr.bin/indent/indent.h Mon Jul 16 05:36:42 2018 (r336332) +++ head/usr.bin/indent/indent.h Mon Jul 16 05:46:50 2018 (r336333) @@ -36,6 +36,7 @@ int compute_code_target(void); int compute_label_target(void); int count_spaces(int, char *); int count_spaces_until(int, char *, char *); +void init_constant_tt(void); int lexi(struct parser_state *); void diag2(int, const char *); void diag3(int, const char *, int); Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Mon Jul 16 05:36:42 2018 (r336332) +++ head/usr.bin/indent/lexi.c Mon Jul 16 05:46:50 2018 (r336333) @@ -54,15 +54,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + #include "indent_globs.h" #include "indent_codes.h" #include "indent.h" -#define alphanum 1 -#ifdef undef -#define opchar 3 -#endif - struct templ { const char *rwd; int rwcode; @@ -122,26 +119,48 @@ const char **typenames; int typename_count; int typename_top = -1; -char chartype[128] = -{ /* this is used to facilitate the decision of - * what type (alphanumeric, operator) each - * character is */ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 1, 3, 3, 0, - 0, 0, 3, 3, 0, 3, 0, 3, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 3, 3, 3, 3, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 3, 1, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 3, 0, 3, 0 +/* + * The transition table below was rewritten by hand from lx's output, given + * the following definitions. lx is Katherine Flavel's lexer generator. + * + * O = /[0-7]/; D = /[0-9]/; NZ = /[1-9]/; + * H = /[a-f0-9]/i; B = /[0-1]/; HP = /0x/i; + * BP = /0b/i; E = /e[+\-]?/i D+; P = /p[+\-]?/i D+; + * FS = /[fl]/i; IS = /u/i /(l|L|ll|LL)/? | /(l|L|ll|LL)/ /u/i?; + * + * D+ E FS? -> $float; + * D* "." D+ E? FS? -> $float; + * D+ "." E? FS? -> $float; HP H+ IS? -> $int; + * HP H+ P FS? -> $float; NZ D* IS? -> $int; + * HP H* "." H+ P FS? -> $float; "0" O* IS? -> $int; + * HP H+ "." P FS -> $float; BP B+ IS? -> $int; + */ +static char const *table[] = { + /* examples: + 00 + s 0xx + t 00xaa + a 11 101100xxa.. + r 11ee0001101lbuuxx.a.pp + t.01.e+008bLuxll0Ll.aa.p+0 + states: ABCDEFGHIJKLMNOPQRSTUVWXYZ */ + ['0'] = "CEIDEHHHIJQ U Q VUVVZZZ", + ['1'] = "DEIDEHHHIJQ U Q VUVVZZZ", + ['7'] = "DEIDEHHHIJ U VUVVZZZ", + ['9'] = "DEJDEHHHJJ U VUVVZZZ", + ['a'] = " U VUVV ", + ['b'] = " K U VUVV ", + ['e'] = " FFF FF U VUVV ", + ['f'] = " f f U VUVV f", + ['u'] = " MM M i iiM M ", + ['x'] = " N ", + ['p'] = " FFX ", + ['L'] = " LLf fL PR Li L f", + ['l'] = " OOf fO S P O i O f", + ['+'] = " G Y ", + ['.'] = "B EE EE T W ", + /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */ + [0] = "uuiifuufiuuiiuiiiiiuiuuuuu", }; static int @@ -173,7 +192,7 @@ lexi(struct parser_state *state) } /* Scan an alphanumeric token */ - if (chartype[*buf_ptr & 127] == alphanum || + if (isalnum((unsigned char)*buf_ptr) || (buf_ptr[0] == '.' && isdigit((unsigned char)buf_ptr[1]))) { /* * we have a character or number @@ -182,73 +201,28 @@ lexi(struct parser_state *state) if (isdigit((unsigned char)*buf_ptr) || (buf_ptr[0] == '.' && isdigit((unsigned char)buf_ptr[1]))) { - int seendot = 0, - seenexp = 0, - seensfx = 0; + char s; + unsigned char i; - /* - * base 2, base 8, base 16: - */ - if (buf_ptr[0] == '0' && buf_ptr[1] != '.') { - int len; - - if (buf_ptr[1] == 'b' || buf_ptr[1] == 'B') - len = strspn(buf_ptr + 2, "01") + 2; - else if (buf_ptr[1] == 'x' || buf_ptr[1] == 'X') - len = strspn(buf_ptr + 2, "0123456789ABCDEFabcdef") + 2; - else - len = strspn(buf_ptr + 1, "012345678") + 1; - if (len > 0) { - CHECK_SIZE_TOKEN(len); - memcpy(e_token, buf_ptr, len); - e_token += len; - buf_ptr += len; + for (s = 'A'; s != 'f' && s != 'i' && s != 'u'; ) { + i = (unsigned char)*buf_ptr; + if (i >= nitems(table) || table[i] == NULL || + table[i][s - 'A'] == ' ') { + s = table[0][s - 'A']; + break; } - else - diag2(1, "Unterminated literal"); + s = table[i][s - 'A']; + CHECK_SIZE_TOKEN(1); + *e_token++ = *buf_ptr++; + if (buf_ptr >= buf_end) + fill_buffer(); } - else /* base 10: */ - while (1) { - if (*buf_ptr == '.') { - if (seendot) - break; - else - seendot++; - } - CHECK_SIZE_TOKEN(3); - *e_token++ = *buf_ptr++; - if (!isdigit((unsigned char)*buf_ptr) && *buf_ptr != '.') { - if ((*buf_ptr != 'E' && *buf_ptr != 'e') || seenexp) - break; - else { - seenexp++; - seendot++; - *e_token++ = *buf_ptr++; - if (*buf_ptr == '+' || *buf_ptr == '-') - *e_token++ = *buf_ptr++; - } - } - } - - while (1) { - CHECK_SIZE_TOKEN(2); - if (!(seensfx & 1) && (*buf_ptr == 'U' || *buf_ptr == 'u')) { - *e_token++ = *buf_ptr++; - seensfx |= 1; - continue; - } - if (!(seensfx & 2) && (strchr("fFlL", *buf_ptr) != NULL)) { - if (buf_ptr[1] == buf_ptr[0]) - *e_token++ = *buf_ptr++; - *e_token++ = *buf_ptr++; - seensfx |= 2; - continue; - } - break; - } + /* s now indicates the type: f(loating), i(integer), u(nknown) */ } else - while (chartype[*buf_ptr & 127] == alphanum || *buf_ptr == BACKSLASH) { + while (isalnum((unsigned char)*buf_ptr) || + *buf_ptr == BACKSLASH || + *buf_ptr == '_') { /* fill_buffer() terminates buffer with newline */ if (*buf_ptr == BACKSLASH) { if (*(buf_ptr + 1) == '\n') { @@ -527,21 +501,11 @@ stop_lit: case '=': if (state->in_or_st) state->block_init = 1; -#ifdef undef - if (chartype[*buf_ptr & 127] == opchar) { /* we have two char assignment */ - e_token[-1] = *buf_ptr++; - if ((e_token[-1] == '<' || e_token[-1] == '>') && e_token[-1] == *buf_ptr) - *e_token++ = *buf_ptr++; - *e_token++ = '='; /* Flip =+ to += */ - *e_token = 0; - } -#else if (*buf_ptr == '=') {/* == */ *e_token++ = '='; /* Flip =+ to += */ buf_ptr++; *e_token = 0; } -#endif code = binary_op; unary_delim = true; break; @@ -623,6 +587,22 @@ stop_lit: CHECK_SIZE_TOKEN(1); *e_token = '\0'; /* null terminate the token */ return (code); +} + +/* Initialize constant transition table */ +void +init_constant_tt(void) +{ + table['-'] = table['+']; + table['8'] = table['9']; + table['2'] = table['3'] = table['4'] = table['5'] = table['6'] = table['7']; + table['A'] = table['C'] = table['D'] = table['c'] = table['d'] = table['a']; + table['B'] = table['b']; + table['E'] = table['e']; + table['U'] = table['u']; + table['X'] = table['x']; + table['P'] = table['p']; + table['F'] = table['f']; } void Modified: head/usr.bin/indent/tests/float.0 ============================================================================== --- head/usr.bin/indent/tests/float.0 Mon Jul 16 05:36:42 2018 (r336332) +++ head/usr.bin/indent/tests/float.0 Mon Jul 16 05:46:50 2018 (r336333) @@ -1,6 +1,7 @@ /* $FreeBSD$ */ -/* See r303499 */ void t(void) { unsigned long x = 314UL; - float y = 3.14f; + double y[] = {0x1P+9F, 0.3, .1, 1.2f, 0xa.p01f, 3.14f, 2.L}; + int z = 0b0101; + DO_NOTHING; } Modified: head/usr.bin/indent/tests/float.0.stdout ============================================================================== --- head/usr.bin/indent/tests/float.0.stdout Mon Jul 16 05:36:42 2018 (r336332) +++ head/usr.bin/indent/tests/float.0.stdout Mon Jul 16 05:46:50 2018 (r336333) @@ -1,8 +1,9 @@ /* $FreeBSD$ */ -/* See r303499 */ void t(void) { unsigned long x = 314UL; - float y = 3.14f; + double y[] = {0x1P+9F, 0.3, .1, 1.2f, 0xa.p01f, 3.14f, 2.L}; + int z = 0b0101; + DO_NOTHING; } From owner-svn-src-head@freebsd.org Mon Jul 16 10:57:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15D70104A92F; Mon, 16 Jul 2018 10:57:28 +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.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 B916E8B00B; Mon, 16 Jul 2018 10:57:27 +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 963E81B999; Mon, 16 Jul 2018 10:57:27 +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 w6GAvRsG023997; Mon, 16 Jul 2018 10:57:27 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GAvRON023995; Mon, 16 Jul 2018 10:57:27 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201807161057.w6GAvRON023995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 16 Jul 2018 10:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336335 - in head: lib/libnv tools/build X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: lib/libnv tools/build X-SVN-Commit-Revision: 336335 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 10:57:28 -0000 Author: arichardson Date: Mon Jul 16 10:57:26 2018 New Revision: 336335 URL: https://svnweb.freebsd.org/changeset/base/336335 Log: No longer install sys/nv.h and sys/cnv.h in lib/libnv/Makefile Use tools/build/Makefile to install the headers into ${WORLDTMP}/legacy instead. Compared to r336026 this has the minor advantage that it avoids unncessary header installation when building the non-bootstrap libnv. Reviewed By: bdrewery, kevans Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D16187 Modified: head/lib/libnv/Makefile head/tools/build/Makefile Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Mon Jul 16 10:32:11 2018 (r336334) +++ head/lib/libnv/Makefile Mon Jul 16 10:57:26 2018 (r336335) @@ -17,9 +17,6 @@ SRCS+= msgio.c SRCS+= nvlist.c SRCS+= nvpair.c -INCSDIR= ${INCLUDEDIR}/sys -INCS= ${SRCTOP}/sys/sys/cnv.h ${SRCTOP}/sys/sys/nv.h - HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Mon Jul 16 10:32:11 2018 (r336334) +++ head/tools/build/Makefile Mon Jul 16 10:57:26 2018 (r336335) @@ -49,4 +49,7 @@ SRCS= dummy.c SUBDIR= cross-build .endif +# Needed to build config (since it uses libnv) +SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h + .include From owner-svn-src-head@freebsd.org Mon Jul 16 11:03:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 079D4104ADD3; Mon, 16 Jul 2018 11:03:07 +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.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 ACB318B5DB; Mon, 16 Jul 2018 11:03:06 +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 73B421BB2D; Mon, 16 Jul 2018 11:03:06 +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 w6GB36TN028711; Mon, 16 Jul 2018 11:03:06 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GB36nj028709; Mon, 16 Jul 2018 11:03:06 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201807161103.w6GB36nj028709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 16 Jul 2018 11:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336336 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 336336 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 11:03:07 -0000 Author: arichardson Date: Mon Jul 16 11:03:05 2018 New Revision: 336336 URL: https://svnweb.freebsd.org/changeset/base/336336 Log: Fix buildworld on FreeBSD 10 Since r336126 we depend on explicit_bzero() for the libmd bootstrap. Add it to -legacy if it is not found in /usr/include/strings.h. Reviewed By: ian Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D16245 Added: head/tools/build/strings.h (contents, props changed) Modified: head/tools/build/Makefile Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Mon Jul 16 10:57:26 2018 (r336335) +++ head/tools/build/Makefile Mon Jul 16 11:03:05 2018 (r336336) @@ -41,6 +41,13 @@ SYSINCS+= stat.h SRCS+= futimens.c utimensat.c .endif +_WITH_EXPLICIT_BZERO!= grep -c explicit_bzero /usr/include/strings.h || true +.if ${_WITH_EXPLICIT_BZERO} == 0 +.PATH: ${SRCTOP}/sys/libkern +INCS+= strings.h +SRCS+= explicit_bzero.c +.endif + .if empty(SRCS) SRCS= dummy.c .endif Added: head/tools/build/strings.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/strings.h Mon Jul 16 11:03:05 2018 (r336336) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2015 Dimitry Andric + * Copyright (c) 2018 Alex Richardson + * + * 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 _LEGACY_STRINGS_H_ +#define _LEGACY_STRINGS_H_ + +#include_next + +__BEGIN_DECLS + +#if __BSD_VISIBLE +void explicit_bzero(void *, size_t); +#endif /* __BSD_VISIBLE */ + +__END_DECLS + +#endif /* !_LEGACY_STRINGS_H_ */ From owner-svn-src-head@freebsd.org Mon Jul 16 13:14:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5193810271F5; Mon, 16 Jul 2018 13:14:54 +0000 (UTC) (envelope-from kevans@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 F28EA70960; Mon, 16 Jul 2018 13:14:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF99C1D02E; Mon, 16 Jul 2018 13:14:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GDEr3S096104; Mon, 16 Jul 2018 13:14:53 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GDErPn096103; Mon, 16 Jul 2018 13:14:53 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807161314.w6GDErPn096103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Jul 2018 13:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336337 - head X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336337 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 13:14:54 -0000 Author: kevans Date: Mon Jul 16 13:14:53 2018 New Revision: 336337 URL: https://svnweb.freebsd.org/changeset/base/336337 Log: Unconditionally build libnv in legacy Rather than using a config(8) built from new tree linking libnv built on host. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jul 16 11:03:05 2018 (r336336) +++ head/Makefile.inc1 Mon Jul 16 13:14:53 2018 (r336337) @@ -1941,19 +1941,13 @@ update: .PHONY _elftoolchain_libs= lib/libelf lib/libdwarf .endif -# An updated libnv is needed for the cnv(9) API used in config(8). -# r335343 stabilized the cnvlist API used by config(8) -.if ${BOOTSTRAPPING} < 1200070 -_libnv= lib/libnv -.endif - legacy: .PHONY .if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0 @echo "ERROR: Source upgrades from versions prior to ${MINIMUM_SUPPORTED_REL} are not supported."; \ false .endif -.for _tool in tools/build ${_elftoolchain_libs} ${_libnv} +.for _tool in tools/build ${_elftoolchain_libs} lib/libnv ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ From owner-svn-src-head@freebsd.org Mon Jul 16 13:38:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B4A31028104; Mon, 16 Jul 2018 13:38:17 +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.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 1F6AE7166D; Mon, 16 Jul 2018 13:38:17 +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 008231D381; Mon, 16 Jul 2018 13:38: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 w6GDcGuu006334; Mon, 16 Jul 2018 13:38:16 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GDcG8W006333; Mon, 16 Jul 2018 13:38:16 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807161338.w6GDcG8W006333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 16 Jul 2018 13:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336339 - head/sys/arm/allwinner/clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 336339 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 13:38:17 -0000 Author: manu Date: Mon Jul 16 13:38:16 2018 New Revision: 336339 URL: https://svnweb.freebsd.org/changeset/base/336339 Log: allwinner: a83t: Fix PLL_CPU clocks The PLL_CPU clocks formula is 24Mhz * N and not 24Mhz / N Fix it by using a NKMP clock with fixed factor values for the one unused. Modified: head/sys/arm/allwinner/clkng/ccu_a83t.c Modified: head/sys/arm/allwinner/clkng/ccu_a83t.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a83t.c Mon Jul 16 13:21:49 2018 (r336338) +++ head/sys/arm/allwinner/clkng/ccu_a83t.c Mon Jul 16 13:38:16 2018 (r336339) @@ -206,24 +206,29 @@ FIXED_CLK(osc12m_clk, 2, /* div */ 0); /* flags */ +/* CPU PLL are 24Mhz * N / P */ static const char *pll_c0cpux_parents[] = {"osc24M"}; static const char *pll_c1cpux_parents[] = {"osc24M"}; -NM_CLK(pll_c0cpux_clk, +NKMP_CLK(pll_c0cpux_clk, CLK_PLL_C0CPUX, /* id */ "pll_c0cpux", pll_c0cpux_parents, /* name, parents */ 0x00, /* offset */ 8, 8, 0, AW_CLK_FACTOR_ZERO_BASED, /* n factor */ - 0, 0, 1, AW_CLK_FACTOR_FIXED, /* m factor (fake) */ - 0, 0, /* mux */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* k factor (fake) */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* m factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* p factor (fake) */ + 0, 0, /* lock */ 31, /* gate */ AW_CLK_HAS_GATE | AW_CLK_SCALE_CHANGE); /* flags */ -NM_CLK(pll_c1cpux_clk, +NKMP_CLK(pll_c1cpux_clk, CLK_PLL_C1CPUX, /* id */ "pll_c1cpux", pll_c1cpux_parents, /* name, parents */ 0x04, /* offset */ 8, 8, 0, AW_CLK_FACTOR_ZERO_BASED, /* n factor */ - 0, 0, 1, AW_CLK_FACTOR_FIXED, /* m factor (fake) */ - 0, 0, /* mux */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* k factor (fake) */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* m factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* p factor (fake) */ + 0, 0, /* lock */ 31, /* gate */ AW_CLK_HAS_GATE | AW_CLK_SCALE_CHANGE); /* flags */ @@ -689,8 +694,8 @@ static struct aw_ccung_clk a83t_clks[] = { { .type = AW_CLK_NKMP, .clk.nkmp = &pll_hsic_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_de_clk}, { .type = AW_CLK_NKMP, .clk.nkmp = &pll_video1_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_c0cpux_clk}, - { .type = AW_CLK_NM, .clk.nm = &pll_c1cpux_clk}, + { .type = AW_CLK_NKMP, .clk.nkmp = &pll_c0cpux_clk}, + { .type = AW_CLK_NKMP, .clk.nkmp = &pll_c1cpux_clk}, { .type = AW_CLK_NM, .clk.nm = &apb2_clk}, { .type = AW_CLK_NM, .clk.nm = &nand_clk}, { .type = AW_CLK_NM, .clk.nm = &mmc0_clk}, From owner-svn-src-head@freebsd.org Mon Jul 16 15:29:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46AA7102D11B; Mon, 16 Jul 2018 15:29:33 +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 EB5B6761D6; Mon, 16 Jul 2018 15:29:32 +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 C7E3F1E551; Mon, 16 Jul 2018 15:29:32 +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 w6GFTWvo063333; Mon, 16 Jul 2018 15:29:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GFTWUf063332; Mon, 16 Jul 2018 15:29:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807161529.w6GFTWUf063332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 16 Jul 2018 15:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336347 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336347 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 15:29:33 -0000 Author: imp Date: Mon Jul 16 15:29:32 2018 New Revision: 336347 URL: https://svnweb.freebsd.org/changeset/base/336347 Log: Add pointer to freebsd-numerics for libm. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Mon Jul 16 15:02:21 2018 (r336346) +++ head/MAINTAINERS Mon Jul 16 15:29:32 2018 (r336347) @@ -58,6 +58,7 @@ kqueue jmg Pre-commit review requested. Documentatio libdpv dteske Pre-commit review requested. Keep in sync with dpv(1). libfetch des Pre-commit review requested, email only. libfigpar dteske Pre-commit review requested. +libm freebsd-numerics Send email with patches to freebsd-numerics@ libpam des Pre-commit review requested, email only. linprocfs des Pre-commit review requested, email only. lpr gad Pre-commit review requested, particularly for From owner-svn-src-head@freebsd.org Mon Jul 16 15:39:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFB32102D785; Mon, 16 Jul 2018 15:39:34 +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 901F376837; Mon, 16 Jul 2018 15:39:34 +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 5361D1E6E2; Mon, 16 Jul 2018 15:39:34 +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 w6GFdYi0068669; Mon, 16 Jul 2018 15:39:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GFdXrN068666; Mon, 16 Jul 2018 15:39:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807161539.w6GFdXrN068666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 16 Jul 2018 15:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336348 - in head/sys: conf crypto/armv8 modules/armv8crypto X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: conf crypto/armv8 modules/armv8crypto X-SVN-Commit-Revision: 336348 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 15:39:35 -0000 Author: andrew Date: Mon Jul 16 15:39:33 2018 New Revision: 336348 URL: https://svnweb.freebsd.org/changeset/base/336348 Log: Create an empty stdint.h for arm_neon.h to include. The armv8crypto module includes arm_neon.h for the compiler intrinsic functions. This includes the userland stdint.h file that doesn't exist in the kernel. Fix this by providing an empty stdint.h to be used when we include arm_neon.h. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16254 Added: head/sys/crypto/armv8/stdint.h (contents, props changed) Modified: head/sys/conf/files.arm64 head/sys/modules/armv8crypto/Makefile Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Jul 16 15:29:32 2018 (r336347) +++ head/sys/conf/files.arm64 Mon Jul 16 15:39:33 2018 (r336348) @@ -177,7 +177,7 @@ contrib/vchiq/interface/vchiq_arm/vchiq_util.c optiona crypto/armv8/armv8_crypto.c optional armv8crypto armv8_crypto_wrap.o optional armv8crypto \ dependency "$S/crypto/armv8/armv8_crypto_wrap.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "armv8_crypto_wrap.o" crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support Added: head/sys/crypto/armv8/stdint.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/armv8/stdint.h Mon Jul 16 15:39:33 2018 (r336348) @@ -0,0 +1,5 @@ +/* + * This is here as arm_neon.h includes . It can be empty as + * we already include the needed headers. + */ +/* $FreeBSD$ */ Modified: head/sys/modules/armv8crypto/Makefile ============================================================================== --- head/sys/modules/armv8crypto/Makefile Mon Jul 16 15:29:32 2018 (r336347) +++ head/sys/modules/armv8crypto/Makefile Mon Jul 16 15:39:33 2018 (r336348) @@ -11,6 +11,7 @@ OBJS+= armv8_crypto_wrap.o # Remove -nostdinc so we can get the intrinsics. armv8_crypto_wrap.o: armv8_crypto_wrap.c ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \ + -I${SRCTOP}/sys/crypto/armv8 \ ${WERROR} ${PROF} \ -march=armv8-a+crypto ${.IMPSRC} ${CTFCONVERT_CMD} From owner-svn-src-head@freebsd.org Mon Jul 16 16:57:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 232A61030D66; Mon, 16 Jul 2018 16:57:12 +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 C3CA079B44; Mon, 16 Jul 2018 16:57:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (unknown [IPv6:2601:648:8880:1e30:75c5:bfc5:76a7:2a31]) by mail.baldwin.cx (Postfix) with ESMTPSA id 57C4510B476; Mon, 16 Jul 2018 12:57:10 -0400 (EDT) Subject: Re: svn commit: r336326 - head/sys/dev/ichiic To: Oleksandr Tymoshenko , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807160134.w6G1YkNR038303@repo.freebsd.org> From: John Baldwin Message-ID: <829a4a12-20d1-e48d-c338-9dd3f67a3969@FreeBSD.org> Date: Mon, 16 Jul 2018 09:57:09 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201807160134.w6G1YkNR038303@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 16 Jul 2018 12:57:10 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 16:57:12 -0000 On 7/15/18 6:34 PM, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Mon Jul 16 01:34:45 2018 > New Revision: 336326 > URL: https://svnweb.freebsd.org/changeset/base/336326 > > Log: > Remove MODULE_PNP_INFO for ig4(4) driver > > ig4(4) does not support suspend/resume but present on the hardware where > such functionality is critical, like laptops. Remove PNP info to avoid > breaking suspend/resume on the systems where ig4(4) load is not explicitly > requested by the user. > > PR: 229791 > Reported by: Ali Abdallah I wonder if we don't want instead a way to tag a module as "don't autoload" so that you can still have a way to say "show me which unprobed devices have modules available". One option would be to have an rc.conf knob which is a regex that gets used with 'egrep -v' in the rc.d script on the output of devmatch. This has the slight advantage that a user can customize it via rc.conf. (For example, when working on cxgbe(4) on my dev boxes I don't want it to autoload, but in a production environment we might want it to autoload by default.) Another option might be to add some new type of PNP info that is a boolean "autoload" that defaults to true and teach devmatch to honor the boolean. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jul 16 18:21:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A35A710341AD for ; Mon, 16 Jul 2018 18:21:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 219977CB84 for ; Mon, 16 Jul 2018 18:21:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22d.google.com with SMTP id q9-v6so38729698ioj.8 for ; Mon, 16 Jul 2018 11:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=br4eHWhhzxqDnaNahEKYlicSV7XO9hnwH/yx3JqM+Ls=; b=jswqKIYG5QVpnv8d0h8z+FbBdyV4pap5QDDEolq8cEYuiFTBk7DhlKuLAppoOnjZEn ik9AJ+HCd00mh91RNMVQHHAMYEXHivqz1+KfBujAc+6CRyF9HfZk3VlM7bgJuMj5XnF/ eC4t3WAcJV2EmAj2SXJP/AupYnI03LzfRrcqcbaOyNB+TSvKbH/IzBC1FN6iL22mtUZs RDnVKx9EoLVxanqinNUXwatB4z3DrKF5DWqmh3/7Dp+IyxYx8nhtSAWvvI8JyC/iI//a KxldVDoXua5kGek4jy1yuoRKOaSjRZgLAp8s0YFsBx/azK8GCcgqadzm5AGBeGlX0ZJX RVCA== 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=br4eHWhhzxqDnaNahEKYlicSV7XO9hnwH/yx3JqM+Ls=; b=etX+NE2TBrb04q9Ymozec5VTcM5kd9QMQUUsPngHCVvMLSpPpIhWCNxB8CB0FWwOcC rIVK1MuVR8QpCzld0+/FVVTz059HpIUFPc/+ahcKvzFzORsa8t3sY23uQL6e6SSbLVDo BJtUkzyd/LzV+SpZKlwUUKXp95pFfYjz//Ijai3E1sjI9o7bDYhmSGaFlJBeiX7wOfqv HK40j2qEiN5yjCqzIDq4TvI2uc8W6iw2xT2BjulOnfcI8FRJIxrEcGJ69pdf4ts+K/D5 JpSV0aKWXVJiue1DVZ52LoLBIqm4h2+V+dJyoKeemZH+4Xdg+XyMDGIyV/S0rIdt1Lfv jqpA== X-Gm-Message-State: AOUpUlFNHd5lukAmlQ6WR0RUAc5LJrLjkU8NVGSKkPy7LlvKvTpDQ6FO HPzGyhQKD+dgjbU+5wtdxo4WsQ12Nu6qKU8EDeJKxw== X-Google-Smtp-Source: AAOMgpdxjojM8bdP8VP6kDqmAdM6J20vFhyRb5UprSlpUw8JQCtomvpeddMbgB7JxUjStstx6hZtnjwtTrg0/RUefm0= X-Received: by 2002:a6b:f719:: with SMTP id k25-v6mr10293675iog.37.1531765271070; Mon, 16 Jul 2018 11:21:11 -0700 (PDT) MIME-Version: 1.0 References: <201807160134.w6G1YkNR038303@repo.freebsd.org> <829a4a12-20d1-e48d-c338-9dd3f67a3969@FreeBSD.org> In-Reply-To: <829a4a12-20d1-e48d-c338-9dd3f67a3969@FreeBSD.org> From: Warner Losh Date: Mon, 16 Jul 2018 12:20:59 -0600 Message-ID: Subject: Re: svn commit: r336326 - head/sys/dev/ichiic To: John Baldwin Cc: Oleksandr Tymoshenko , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 18:21:13 -0000 On Mon, Jul 16, 2018, 10:57 AM John Baldwin wrote: > On 7/15/18 6:34 PM, Oleksandr Tymoshenko wrote: > > Author: gonzo > > Date: Mon Jul 16 01:34:45 2018 > > New Revision: 336326 > > URL: https://svnweb.freebsd.org/changeset/base/336326 > > > > Log: > > Remove MODULE_PNP_INFO for ig4(4) driver > > > > ig4(4) does not support suspend/resume but present on the hardware > where > > such functionality is critical, like laptops. Remove PNP info to avoid > > breaking suspend/resume on the systems where ig4(4) load is not > explicitly > > requested by the user. > > > > PR: 229791 > > Reported by: Ali Abdallah > > I wonder if we don't want instead a way to tag a module as "don't autoload" > so that you can still have a way to say "show me which unprobed devices > have modules available". One option would be to have an rc.conf knob which > is a regex that gets used with 'egrep -v' in the rc.d script on the output > of devmatch. This has the slight advantage that a user can customize it > via rc.conf. (For example, when working on cxgbe(4) on my dev boxes I > don't > want it to autoload, but in a production environment we might want it to > autoload by default.) Another option might be to add some new type of > PNP info that is a boolean "autoload" that defaults to true and teach > devmatch to honor the boolean. > How does this break suspend / resume? That makes no sense to me at all. I think if this changes anything, it only we could fix that by accident. I get wanting to have a blacklist, but that belongs in rc, not the driver. That's on my soon list. But I need to implement the freeze thaw of proving first so I can re.ove the ugly kludge for usb first so we can filter again. We also need a newbus flag that says the device has been attached at least once so kldunload works... Warner > From owner-svn-src-head@freebsd.org Mon Jul 16 18:21:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBFCD1034215; Mon, 16 Jul 2018 18:21:30 +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 91F677CCE2; Mon, 16 Jul 2018 18:21:30 +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 5B93C202CB; Mon, 16 Jul 2018 18:21:30 +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 w6GILUYs052750; Mon, 16 Jul 2018 18:21:30 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GILULx052749; Mon, 16 Jul 2018 18:21:30 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807161821.w6GILULx052749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 16 Jul 2018 18:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336349 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 336349 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 18:21:31 -0000 Author: andrew Date: Mon Jul 16 18:21:29 2018 New Revision: 336349 URL: https://svnweb.freebsd.org/changeset/base/336349 Log: Don't use the static keyword with DPCPU defines in arm64 modules. On arm64 compiler will create PC-relative loads and stores for static data. This means it doesn't emit a relocation. Unfortunately the in-kernel linker expects there to be one for DPCPU defines so it can modify its value so the code will use the correct DPCPU region. To workaround the lack of a relocation with static data remove it when building modules on arm64. The kernel is unaffected as it doesn't rely on modifying these relocations to find the data. PR: 225684 Reported by: Johannes Lundberg Reported by: Jose Luis Duran Reported by: Greg V Reviewed by: bz Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D16145 Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Mon Jul 16 15:39:33 2018 (r336348) +++ head/sys/sys/pcpu.h Mon Jul 16 18:21:29 2018 (r336349) @@ -84,8 +84,26 @@ extern uintptr_t dpcpu_off[]; /* struct _hack is to stop this from being used with the static keyword. */ #define DPCPU_DEFINE(t, n) \ struct _hack; t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#if defined(KLD_MODULE) && defined(__aarch64__) +/* + * On some architectures the compiler will use PC-relative load to + * find the address of DPCPU data with the static keyword. We then + * use this to find the offset of the data in a per-CPU region. + * This works for in the kernel as we can allocate the space ahead + * of time, however modules need to allocate a sepatate space and + * then use relocations to fix the address of the data. As + * PC-relative data doesn't have a relocation there is nothing for + * the kernel module linker to fix so data is accessed from the + * wrong location. + * + * This is a workaround until a better solution can be found. +*/ #define DPCPU_DEFINE_STATIC(t, n) \ + t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#else +#define DPCPU_DEFINE_STATIC(t, n) \ static t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#endif /* * Accessors with a given base. From owner-svn-src-head@freebsd.org Mon Jul 16 18:53:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D65C610358D2; Mon, 16 Jul 2018 18:53:18 +0000 (UTC) (envelope-from dteske@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 851147E2E6; Mon, 16 Jul 2018 18:53:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6642620910; Mon, 16 Jul 2018 18:53:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GIrID6071433; Mon, 16 Jul 2018 18:53:18 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GIrIXD071432; Mon, 16 Jul 2018 18:53:18 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201807161853.w6GIrIXD071432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 16 Jul 2018 18:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336350 - head/usr.sbin/sysrc X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/usr.sbin/sysrc X-SVN-Commit-Revision: 336350 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 18:53:19 -0000 Author: dteske Date: Mon Jul 16 18:53:17 2018 New Revision: 336350 URL: https://svnweb.freebsd.org/changeset/base/336350 Log: sysrc(8): Send error message to stderr (not stdout) PR: bin/229806 Reported by: Andreas Sommer MFC after: 3 days X-MFC-to: stable/11 stable/10 stable/9 Sponsored by: Smule, Inc. Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Mon Jul 16 18:21:29 2018 (r336349) +++ head/usr.sbin/sysrc/sysrc Mon Jul 16 18:53:17 2018 (r336350) @@ -874,7 +874,8 @@ while [ $# -gt 0 ]; do *) if ! IGNORED=$( f_sysrc_get "$NAME?" ); then [ "$IGNORE_UNKNOWNS" -o "$QUIET" ] || - echo "$pgm: unknown variable '$NAME'" + f_err "%s: unknown variable '%s'\n" \ + "$pgm" "$NAME" shift 1 status=$FAILURE continue From owner-svn-src-head@freebsd.org Mon Jul 16 18:53:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93DE91035935; Mon, 16 Jul 2018 18:53:29 +0000 (UTC) (envelope-from pfg@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 30F547E3FA; Mon, 16 Jul 2018 18:53:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12D2E20914; Mon, 16 Jul 2018 18:53:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GIrShj071507; Mon, 16 Jul 2018 18:53:28 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GIrS98071506; Mon, 16 Jul 2018 18:53:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201807161853.w6GIrS98071506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 16 Jul 2018 18:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336351 - head/gnu/lib/libstdc++ X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/gnu/lib/libstdc++ X-SVN-Commit-Revision: 336351 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 18:53:29 -0000 Author: pfg Date: Mon Jul 16 18:53:28 2018 New Revision: 336351 URL: https://svnweb.freebsd.org/changeset/base/336351 Log: Update libstdc++ configuration. Its been quite a while since the last time we updated this and since then we have grown iconv and a bunch of complex math functions. This only applies to the platforms which still use GCC 4.2.1 in the toolchain. Differential Revision: https://reviews.freebsd.org/D16289 Modified: head/gnu/lib/libstdc++/config.h Modified: head/gnu/lib/libstdc++/config.h ============================================================================== --- head/gnu/lib/libstdc++/config.h Mon Jul 16 18:53:17 2018 (r336350) +++ head/gnu/lib/libstdc++/config.h Mon Jul 16 18:53:28 2018 (r336351) @@ -28,7 +28,7 @@ #define HAVE_ATANF 1 /* Define to 1 if you have the `atanl' function. */ -/* #undef HAVE_ATANL */ +#define HAVE_ATANL 1 /* Define to 1 if you have the `ceilf' function. */ #define HAVE_CEILF 1 @@ -55,10 +55,10 @@ #define HAVE_COSHF 1 /* Define to 1 if you have the `coshl' function. */ -/* #undef HAVE_COSHL */ +#define HAVE_COSHL 1 /* Define to 1 if you have the `cosl' function. */ -/* #undef HAVE_COSL */ +#define HAVE_COSL 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_ENDIAN_H */ @@ -137,13 +137,13 @@ #define HAVE_HYPOTL 1 /* Define to 1 if you have the `iconv' function. */ -/* #undef HAVE_ICONV */ +#define HAVE_ICONV 1 /* Define to 1 if you have the `iconv_close' function. */ -/* #undef HAVE_ICONV_CLOSE */ +#define HAVE_ICONV_CLOSE 1 /* Define to 1 if you have the `iconv_open' function. */ -/* #undef HAVE_ICONV_OPEN */ +#define HAVE_ICONV_OPEN 1 /* Define to 1 if you have the header file. */ #define HAVE_IEEEFP_H 1 @@ -257,7 +257,7 @@ #define HAVE_POWF 1 /* Define to 1 if you have the `powl' function. */ -/* #undef HAVE_POWL */ +#define HAVE_POWL 1 /* Define to 1 if you have the `qfpclass' function. */ /* #undef HAVE_QFPCLASS */ @@ -269,13 +269,13 @@ #define HAVE_SIGSETJMP 1 /* Define to 1 if you have the `sincos' function. */ -/* #undef HAVE_SINCOS */ +#define HAVE_SINCOS 1 /* Define to 1 if you have the `sincosf' function. */ -/* #undef HAVE_SINCOSF */ +#define HAVE_SINCOSF 1 /* Define to 1 if you have the `sincosl' function. */ -/* #undef HAVE_SINCOSL */ +#define HAVE_SINCOSL 1 /* Define to 1 if you have the `sinf' function. */ #define HAVE_SINF 1 @@ -284,10 +284,10 @@ #define HAVE_SINHF 1 /* Define to 1 if you have the `sinhl' function. */ -/* #undef HAVE_SINHL */ +#define HAVE_SINHL 1 /* Define to 1 if you have the `sinl' function. */ -/* #undef HAVE_SINL */ +#define HAVE_SINL 1 /* Define to 1 if you have the `sqrtf' function. */ #define HAVE_SQRTF 1 @@ -323,7 +323,7 @@ #define HAVE_STRTOLD 1 /* Define if strxfrm_l is available in . */ -/* #undef HAVE_STRXFRM_L */ +#define HAVE_STRXFRM_L 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_FILIO_H 1 @@ -341,7 +341,7 @@ /* #undef HAVE_SYS_MACHINE_H */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ +#define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_RESOURCE_H 1 @@ -362,9 +362,6 @@ #define HAVE_SYS_UIO_H 1 /* Define if S_IFREG is available in . */ -/* #undef HAVE_S_IFREG */ - -/* Define if S_IFREG is available in . */ #define HAVE_S_ISREG 1 /* Define to 1 if you have the `tanf' function. */ @@ -374,10 +371,10 @@ #define HAVE_TANHF 1 /* Define to 1 if you have the `tanhl' function. */ -/* #undef HAVE_TANHL */ +#define HAVE_TANHL 1 /* Define to 1 if you have the `tanl' function. */ -/* #undef HAVE_TANL */ +#define HAVE_TANL 1 /* Define to 1 if the target supports thread-local storage. */ #if !defined(__mips__) @@ -731,7 +728,7 @@ /* Define if C99 functions in should be used in . Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ -/* #undef _GLIBCXX_USE_C99_COMPLEX */ +#define _GLIBCXX_USE_C99_COMPLEX 1 /* Define if C99 functions in should be used in . Using compiler builtins for these functions requires corresponding C99 From owner-svn-src-head@freebsd.org Mon Jul 16 18:54:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7408D1035AD3; Mon, 16 Jul 2018 18:54:55 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE557E63D; Mon, 16 Jul 2018 18:54:55 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.41] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 7011FCF58; Mon, 16 Jul 2018 18:54:54 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.f.0.180709 Date: Mon, 16 Jul 2018 11:54:44 -0700 Subject: Re: svn commit: r336348 - in head/sys: conf crypto/armv8 modules/armv8crypto From: Ravi Pokala To: Andrew Turner , , , Message-ID: <88CA4FD0-F7E6-4AFF-817C-F331A427FD19@panasas.com> Thread-Topic: svn commit: r336348 - in head/sys: conf crypto/armv8 modules/armv8crypto References: <201807161539.w6GFdXrN068666@repo.freebsd.org> In-Reply-To: <201807161539.w6GFdXrN068666@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 18:54:55 -0000 -----Original Message----- From: on behalf of Andrew Turner Date: 2018-07-16, Monday at 08:39 To: , , Subject: svn commit: r336348 - in head/sys: conf crypto/armv8 modules/armv8crypto > Author: andrew > Date: Mon Jul 16 15:39:33 2018 > New Revision: 336348 > URL: https://svnweb.freebsd.org/changeset/base/336348 > > Log: > Create an empty stdint.h for arm_neon.h to include. > > The armv8crypto module includes arm_neon.h for the compiler intrinsic > functions. This includes the userland stdint.h file that doesn't exist in > the kernel. Fix this by providing an empty stdint.h to be used when we > include arm_neon.h. > > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D16254 THANK YOU!!! This one file was preventing being able to do tinderbox with just "UNIVERSE_TARGET=kernel-toolchain" followed by "-DMAKE_JUST_KERNELS". I've periodically mentioned this for like a year, but lacked the knowledge to fix it myself. :-) -Ravi (rpokala@) From owner-svn-src-head@freebsd.org Mon Jul 16 19:01:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C45211035E1F; Mon, 16 Jul 2018 19:01:07 +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 7667C7E901; Mon, 16 Jul 2018 19:01:07 +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 3EE012093F; Mon, 16 Jul 2018 19:01:07 +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 w6GJ171M072906; Mon, 16 Jul 2018 19:01:07 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GJ16Gg072901; Mon, 16 Jul 2018 19:01:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807161901.w6GJ16Gg072901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 16 Jul 2018 19:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336352 - in head/sys: geom/eli kgssapi/krb5 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: geom/eli kgssapi/krb5 X-SVN-Commit-Revision: 336352 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 19:01:08 -0000 Author: cem Date: Mon Jul 16 19:01:05 2018 New Revision: 336352 URL: https://svnweb.freebsd.org/changeset/base/336352 Log: OCF: Convert consumers to the session id typedef These were missed in the earlier r336269. No functional change. Sponsored by: Dell EMC Isilon Modified: head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_crypto.c head/sys/kgssapi/krb5/kcrypto_aes.c head/sys/kgssapi/krb5/kcrypto_des.c head/sys/kgssapi/krb5/kcrypto_des3.c Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Mon Jul 16 18:53:28 2018 (r336351) +++ head/sys/geom/eli/g_eli.h Mon Jul 16 19:01:05 2018 (r336352) @@ -179,7 +179,7 @@ struct g_eli_worker { struct g_eli_softc *w_softc; struct proc *w_proc; u_int w_number; - uint64_t w_sid; + crypto_session_t w_sid; boolean_t w_active; LIST_ENTRY(g_eli_worker) w_next; }; Modified: head/sys/geom/eli/g_eli_crypto.c ============================================================================== --- head/sys/geom/eli/g_eli_crypto.c Mon Jul 16 18:53:28 2018 (r336351) +++ head/sys/geom/eli/g_eli_crypto.c Mon Jul 16 19:01:05 2018 (r336352) @@ -64,7 +64,7 @@ g_eli_crypto_cipher(u_int algo, int enc, u_char *data, struct cryptoini cri; struct cryptop *crp; struct cryptodesc *crd; - uint64_t sid; + crypto_session_t sid; u_char *p; int error; Modified: head/sys/kgssapi/krb5/kcrypto_aes.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_aes.c Mon Jul 16 18:53:28 2018 (r336351) +++ head/sys/kgssapi/krb5/kcrypto_aes.c Mon Jul 16 19:01:05 2018 (r336352) @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); struct aes_state { struct mtx as_lock; - uint64_t as_session_aes; - uint64_t as_session_sha1; + crypto_session_t as_session_aes; + crypto_session_t as_session_sha1; }; static void Modified: head/sys/kgssapi/krb5/kcrypto_des.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_des.c Mon Jul 16 18:53:28 2018 (r336351) +++ head/sys/kgssapi/krb5/kcrypto_des.c Mon Jul 16 19:01:05 2018 (r336352) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); struct des1_state { struct mtx ds_lock; - uint64_t ds_session; + crypto_session_t ds_session; }; static void Modified: head/sys/kgssapi/krb5/kcrypto_des3.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_des3.c Mon Jul 16 18:53:28 2018 (r336351) +++ head/sys/kgssapi/krb5/kcrypto_des3.c Mon Jul 16 19:01:05 2018 (r336352) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); struct des3_state { struct mtx ds_lock; - uint64_t ds_session; + crypto_session_t ds_session; }; static void From owner-svn-src-head@freebsd.org Mon Jul 16 19:05:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA653103818C; Mon, 16 Jul 2018 19:05:52 +0000 (UTC) (envelope-from kevans@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 9A38E7F20B; Mon, 16 Jul 2018 19:05:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7409E20AA5; Mon, 16 Jul 2018 19:05:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GJ5q69076835; Mon, 16 Jul 2018 19:05:52 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GJ5oP1076822; Mon, 16 Jul 2018 19:05:50 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807161905.w6GJ5oP1076822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Jul 2018 19:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336353 - in head: sys/conf usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: sys/conf usr.sbin/config X-SVN-Commit-Revision: 336353 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 19:05:53 -0000 Author: kevans Date: Mon Jul 16 19:05:50 2018 New Revision: 336353 URL: https://svnweb.freebsd.org/changeset/base/336353 Log: config(8): Bump major version after r335998 config-generated hints.c/env.c from r335998 and later are incompatible with earlier kernels due to no longer setting envmode/hintmode. A minor bump for this is insufficient, as matching major version with a later minor version is still viewed as backwards-compatible. This was an MI kernel change, soo all VERSREQ's are bumped. Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.arm64 head/sys/conf/Makefile.i386 head/sys/conf/Makefile.mips head/sys/conf/Makefile.powerpc head/sys/conf/Makefile.riscv head/sys/conf/Makefile.sparc64 head/usr.sbin/config/configvers.h Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.amd64 Mon Jul 16 19:05:50 2018 (r336353) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.arm Mon Jul 16 19:05:50 2018 (r336353) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600013 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm64 ============================================================================== --- head/sys/conf/Makefile.arm64 Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.arm64 Mon Jul 16 19:05:50 2018 (r336353) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.i386 ============================================================================== --- head/sys/conf/Makefile.i386 Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.i386 Mon Jul 16 19:05:50 2018 (r336353) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.mips Mon Jul 16 19:05:50 2018 (r336353) @@ -15,7 +15,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.powerpc Mon Jul 16 19:05:50 2018 (r336353) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.riscv ============================================================================== --- head/sys/conf/Makefile.riscv Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.riscv Mon Jul 16 19:05:50 2018 (r336353) @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.sparc64 ============================================================================== --- head/sys/conf/Makefile.sparc64 Mon Jul 16 19:01:05 2018 (r336352) +++ head/sys/conf/Makefile.sparc64 Mon Jul 16 19:05:50 2018 (r336353) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Mon Jul 16 19:01:05 2018 (r336352) +++ head/usr.sbin/config/configvers.h Mon Jul 16 19:05:50 2018 (r336353) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600015 +#define CONFIGVERS 700000 #define MAJOR_VERS(x) ((x) / 100000) From owner-svn-src-head@freebsd.org Mon Jul 16 19:07:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D052010382A8; Mon, 16 Jul 2018 19:07:14 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60E0A7F3BD; Mon, 16 Jul 2018 19:07:14 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id F0DA9D055; Mon, 16 Jul 2018 19:07:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f178.google.com with SMTP id 203-v6so19852950ljj.13; Mon, 16 Jul 2018 12:07:13 -0700 (PDT) X-Gm-Message-State: AOUpUlENZyc6tc1JH5jEbbLrJrZsfz+9jGU9pntZ5gDPhhWGpIHXIud3 PENg2a6TKcnWW4IR27D2d9+8lFVLf2ehghXW8+k= X-Google-Smtp-Source: AAOMgpeZFB0gHz8tZ7u6TtkkA1w9aNM7UAN+UdRoSZTGjLJn69o4XFz65DvEZptKbjMxtBegtoS3kOlFW7Gk+jw7+b8= X-Received: by 2002:a2e:498:: with SMTP id a24-v6mr10716888ljf.27.1531768032567; Mon, 16 Jul 2018 12:07:12 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Mon, 16 Jul 2018 12:06:52 -0700 (PDT) In-Reply-To: <201807161905.w6GJ5oP1076822@repo.freebsd.org> References: <201807161905.w6GJ5oP1076822@repo.freebsd.org> From: Kyle Evans Date: Mon, 16 Jul 2018 14:06:52 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336353 - in head: sys/conf usr.sbin/config To: Kyle Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 19:07:15 -0000 On Mon, Jul 16, 2018 at 2:05 PM, Kyle Evans wrote: > Author: kevans > Date: Mon Jul 16 19:05:50 2018 > New Revision: 336353 > URL: https://svnweb.freebsd.org/changeset/base/336353 > > Log: > config(8): Bump major version after r335998 > > config-generated hints.c/env.c from r335998 and later are incompatible with > earlier kernels due to no longer setting envmode/hintmode. A minor bump for > this is insufficient, as matching major version with a later minor version > is still viewed as backwards-compatible. > > This was an MI kernel change, soo all VERSREQ's are bumped. > I jumped the gun here... Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D16214 From owner-svn-src-head@freebsd.org Mon Jul 16 19:21:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B955F1038B5D; Mon, 16 Jul 2018 19:21:51 +0000 (UTC) (envelope-from lwhsu@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 6C7AA7FC02; Mon, 16 Jul 2018 19:21:51 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DB2120CA2; Mon, 16 Jul 2018 19:21:51 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GJLpXA083209; Mon, 16 Jul 2018 19:21:51 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GJLpnX083208; Mon, 16 Jul 2018 19:21:51 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201807161921.w6GJLpnX083208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 16 Jul 2018 19:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336354 - head/stand/i386/zfsboot X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/stand/i386/zfsboot X-SVN-Commit-Revision: 336354 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 19:21:51 -0000 Author: lwhsu (ports committer) Date: Mon Jul 16 19:21:50 2018 New Revision: 336354 URL: https://svnweb.freebsd.org/changeset/base/336354 Log: zfsboot: fix build with WITHOUT_LOADER_GELI Reviewed by: ian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16292 Modified: head/stand/i386/zfsboot/zfsboot.c Modified: head/stand/i386/zfsboot/zfsboot.c ============================================================================== --- head/stand/i386/zfsboot/zfsboot.c Mon Jul 16 19:05:50 2018 (r336353) +++ head/stand/i386/zfsboot/zfsboot.c Mon Jul 16 19:21:50 2018 (r336354) @@ -708,7 +708,9 @@ main(void) setheap(heap_next, heap_end); zdsk = malloc(sizeof(struct zfsdsk)); +#ifdef LOADER_GELI_SUPPORT zdsk->gdev = NULL; +#endif zdsk->dsk.drive = *(uint8_t *)PTOV(ARGS); zdsk->dsk.type = zdsk->dsk.drive & DRV_HARD ? TYPE_AD : TYPE_FD; zdsk->dsk.unit = zdsk->dsk.drive & DRV_MASK; From owner-svn-src-head@freebsd.org Mon Jul 16 19:47:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 909F0103A6ED; Mon, 16 Jul 2018 19:47: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.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 40349809E6; Mon, 16 Jul 2018 19:47:30 +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 214C221113; Mon, 16 Jul 2018 19:47:30 +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 w6GJlTc8097350; Mon, 16 Jul 2018 19:47:29 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GJlTx5097349; Mon, 16 Jul 2018 19:47:29 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807161947.w6GJlTx5097349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 16 Jul 2018 19:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336355 - head/sys/cddl/dev/dtrace/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/cddl/dev/dtrace/powerpc X-SVN-Commit-Revision: 336355 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 19:47:30 -0000 Author: jhibbits Date: Mon Jul 16 19:47:29 2018 New Revision: 336355 URL: https://svnweb.freebsd.org/changeset/base/336355 Log: dtrace/powerpc: Correct register indices for non-indexed registers in the trapframe Fix an off-by-one error, LR starts at index 32, not index 33, and the others follow suit. Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Mon Jul 16 19:21:50 2018 (r336354) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Mon Jul 16 19:47:29 2018 (r336355) @@ -561,19 +561,19 @@ dtrace_getreg(struct trapframe *rp, uint_t reg) return (rp->fixreg[reg]); switch (reg) { - case 33: + case 32: return (rp->lr); - case 34: + case 33: return (rp->cr); - case 35: + case 34: return (rp->xer); - case 36: + case 35: return (rp->ctr); - case 37: + case 36: return (rp->srr0); - case 38: + case 37: return (rp->srr1); - case 39: + case 38: return (rp->exc); default: DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); From owner-svn-src-head@freebsd.org Mon Jul 16 19:47:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34D6E103A78E; Mon, 16 Jul 2018 19:47:58 +0000 (UTC) (envelope-from marius@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 D727D80B35; Mon, 16 Jul 2018 19:47:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9D6E21115; Mon, 16 Jul 2018 19:47:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GJlv1D097411; Mon, 16 Jul 2018 19:47:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GJlvBS097410; Mon, 16 Jul 2018 19:47:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807161947.w6GJlvBS097410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 16 Jul 2018 19:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336356 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 336356 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 19:47:58 -0000 Author: marius Date: Mon Jul 16 19:47:57 2018 New Revision: 336356 URL: https://svnweb.freebsd.org/changeset/base/336356 Log: Update igb_sctx_init for r336313, missed when incorporating shurd@'s feedback on the initial D15720. Reported by: kib Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Jul 16 19:47:29 2018 (r336355) +++ head/sys/dev/e1000/if_em.c Mon Jul 16 19:47:57 2018 (r336356) @@ -507,12 +507,13 @@ static struct if_shared_ctx em_sctx_init = { if_shared_ctx_t em_sctx = &em_sctx_init; - static struct if_shared_ctx igb_sctx_init = { .isc_magic = IFLIB_MAGIC, .isc_q_align = PAGE_SIZE, - .isc_tx_maxsize = EM_TSO_SIZE, + .isc_tx_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), .isc_tx_maxsegsize = PAGE_SIZE, + .isc_tso_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), + .isc_tso_maxsegsize = EM_TSO_SEG_SIZE, .isc_rx_maxsize = MJUM9BYTES, .isc_rx_nsegments = 1, .isc_rx_maxsegsize = MJUM9BYTES, From owner-svn-src-head@freebsd.org Mon Jul 16 21:32:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94A8B103E4A3; Mon, 16 Jul 2018 21:32:51 +0000 (UTC) (envelope-from rmacklem@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 3653984255; Mon, 16 Jul 2018 21:32:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 123CC22306; Mon, 16 Jul 2018 21:32:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GLWoe9053248; Mon, 16 Jul 2018 21:32:50 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GLWoTX053245; Mon, 16 Jul 2018 21:32:50 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807162132.w6GLWoTX053245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 16 Jul 2018 21:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336357 - in head/sys/fs: nfs nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 336357 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 21:32:51 -0000 Author: rmacklem Date: Mon Jul 16 21:32:50 2018 New Revision: 336357 URL: https://svnweb.freebsd.org/changeset/base/336357 Log: Modify the reasons for not issuing a delegation in the NFSv4.1 server. The ESXi NFSv4.1 client will generate warning messages when the reason for not issuing a delegation is two. Two refers to a resource limit and I do not see why it would be considered invalid. However it probably was not the best choice of reason for not issuing a delegation. This patch changes the reasons used to ones that the ESXi client doesn't complain about. This change does not affect the FreeBSD client and does not appear to affect behaviour of the Linux NFSv4.1 client. RFC5661 defines these "reasons" but does not give any guidance w.r.t. which ones are more appropriate to return to a client. Tested by: andreas.nagy@frequentis.com PR: 226650 MFC after: 2 weeks Modified: head/sys/fs/nfs/nfsproto.h head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfsproto.h ============================================================================== --- head/sys/fs/nfs/nfsproto.h Mon Jul 16 19:47:57 2018 (r336356) +++ head/sys/fs/nfs/nfsproto.h Mon Jul 16 21:32:50 2018 (r336357) @@ -568,6 +568,7 @@ #define NFSV4OPEN_WDRESOURCE 0x00080000 #define NFSV4OPEN_WDCONTENTION 0x00100000 #define NFSV4OPEN_WDNOTWANTED 0x00200000 +#define NFSV4OPEN_WDSUPPFTYPE 0x00400000 /* * NFS V4 File Handle types Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Mon Jul 16 19:47:57 2018 (r336356) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Mon Jul 16 21:32:50 2018 (r336357) @@ -3095,7 +3095,13 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is *tl = txdr_unsigned(NFSV4OPEN_DELEGATEWRITE); else if (retext != 0) { *tl = txdr_unsigned(NFSV4OPEN_DELEGATENONEEXT); - if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) { + if ((rflags & NFSV4OPEN_WDNOTWANTED) != 0) { + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OPEN_NOTWANTED); + } else if ((rflags & NFSV4OPEN_WDSUPPFTYPE) != 0) { + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OPEN_NOTSUPPFTYPE); + } else if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OPEN_CONTENTION); *tl = newnfs_false; Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Jul 16 19:47:57 2018 (r336356) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Jul 16 21:32:50 2018 (r336357) @@ -3097,7 +3097,13 @@ tryagain: /* * This is where we can choose to issue a delegation. */ - if (delegate == 0 || writedeleg == 0 || + if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) + *rflagsp |= NFSV4OPEN_WDNOTWANTED; + else if (nfsrv_issuedelegs == 0) + *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; + else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) + *rflagsp |= NFSV4OPEN_WDRESOURCE; + else if (delegate == 0 || writedeleg == 0 || NFSVNO_EXRDONLY(exp) || (readonly != 0 && nfsrv_writedelegifpos == 0) || !NFSVNO_DELEGOK(vp) || @@ -3105,11 +3111,6 @@ tryagain: (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != LCL_CALLBACKSON) *rflagsp |= NFSV4OPEN_WDCONTENTION; - else if (nfsrv_issuedelegs == 0 || - NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) - *rflagsp |= NFSV4OPEN_WDRESOURCE; - else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) - *rflagsp |= NFSV4OPEN_WDNOTWANTED; else { new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; new_deleg->ls_stateid.other[0] = delegstateidp->other[0] @@ -3160,16 +3161,17 @@ tryagain: /* * This is where we can choose to issue a delegation. */ - if (delegate == 0 || (writedeleg == 0 && readonly == 0) || - !NFSVNO_DELEGOK(vp) || + if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) + *rflagsp |= NFSV4OPEN_WDNOTWANTED; + else if (nfsrv_issuedelegs == 0) + *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; + else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) + *rflagsp |= NFSV4OPEN_WDRESOURCE; + else if (delegate == 0 || (writedeleg == 0 && + readonly == 0) || !NFSVNO_DELEGOK(vp) || (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != LCL_CALLBACKSON) *rflagsp |= NFSV4OPEN_WDCONTENTION; - else if (nfsrv_issuedelegs == 0 || - NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) - *rflagsp |= NFSV4OPEN_WDRESOURCE; - else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) - *rflagsp |= NFSV4OPEN_WDNOTWANTED; else { new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; new_deleg->ls_stateid.other[0] = delegstateidp->other[0] From owner-svn-src-head@freebsd.org Mon Jul 16 21:53:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 780F6103F099; Mon, 16 Jul 2018 21:53:32 +0000 (UTC) (envelope-from kevans@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 22D4384C82; Mon, 16 Jul 2018 21:53:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02C0A2263B; Mon, 16 Jul 2018 21:53:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GLrVZv063770; Mon, 16 Jul 2018 21:53:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GLrUgr063763; Mon, 16 Jul 2018 21:53:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807162153.w6GLrUgr063763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Jul 2018 21:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336358 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 336358 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 21:53:32 -0000 Author: kevans Date: Mon Jul 16 21:53:30 2018 New Revision: 336358 URL: https://svnweb.freebsd.org/changeset/base/336358 Log: Partially revert r336353: sys/conf/* %VERSREQ bumps The changes made in r335998 don't strictly require a newer config(8), though it is advised. The %VERSREQ bumps were premature. Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.arm64 head/sys/conf/Makefile.i386 head/sys/conf/Makefile.mips head/sys/conf/Makefile.powerpc head/sys/conf/Makefile.riscv head/sys/conf/Makefile.sparc64 Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.amd64 Mon Jul 16 21:53:30 2018 (r336358) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.arm Mon Jul 16 21:53:30 2018 (r336358) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600013 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm64 ============================================================================== --- head/sys/conf/Makefile.arm64 Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.arm64 Mon Jul 16 21:53:30 2018 (r336358) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.i386 ============================================================================== --- head/sys/conf/Makefile.i386 Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.i386 Mon Jul 16 21:53:30 2018 (r336358) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.mips Mon Jul 16 21:53:30 2018 (r336358) @@ -15,7 +15,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.powerpc Mon Jul 16 21:53:30 2018 (r336358) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.riscv ============================================================================== --- head/sys/conf/Makefile.riscv Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.riscv Mon Jul 16 21:53:30 2018 (r336358) @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.sparc64 ============================================================================== --- head/sys/conf/Makefile.sparc64 Mon Jul 16 21:32:50 2018 (r336357) +++ head/sys/conf/Makefile.sparc64 Mon Jul 16 21:53:30 2018 (r336358) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso From owner-svn-src-head@freebsd.org Mon Jul 16 23:32:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F17C31042642; Mon, 16 Jul 2018 23:32:26 +0000 (UTC) (envelope-from kevans@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 A318788A10; Mon, 16 Jul 2018 23:32:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 846D023643; Mon, 16 Jul 2018 23:32:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6GNWQMG013828; Mon, 16 Jul 2018 23:32:26 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6GNWOo4013819; Mon, 16 Jul 2018 23:32:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807162332.w6GNWOo4013819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Jul 2018 23:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336359 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 336359 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 23:32:27 -0000 Author: kevans Date: Mon Jul 16 23:32:24 2018 New Revision: 336359 URL: https://svnweb.freebsd.org/changeset/base/336359 Log: Revert 336358 and step away fron machine for the day... VERSREQ < 7.+ physically will not work with new config(8) due to major bump, which is why I bumped it in the first place... Back to the original version Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.arm64 head/sys/conf/Makefile.i386 head/sys/conf/Makefile.mips head/sys/conf/Makefile.powerpc head/sys/conf/Makefile.riscv head/sys/conf/Makefile.sparc64 Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.amd64 Mon Jul 16 23:32:24 2018 (r336359) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.arm Mon Jul 16 23:32:24 2018 (r336359) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600013 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm64 ============================================================================== --- head/sys/conf/Makefile.arm64 Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.arm64 Mon Jul 16 23:32:24 2018 (r336359) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.i386 ============================================================================== --- head/sys/conf/Makefile.i386 Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.i386 Mon Jul 16 23:32:24 2018 (r336359) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.mips Mon Jul 16 23:32:24 2018 (r336359) @@ -15,7 +15,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.powerpc Mon Jul 16 23:32:24 2018 (r336359) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.riscv ============================================================================== --- head/sys/conf/Makefile.riscv Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.riscv Mon Jul 16 23:32:24 2018 (r336359) @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.sparc64 ============================================================================== --- head/sys/conf/Makefile.sparc64 Mon Jul 16 21:53:30 2018 (r336358) +++ head/sys/conf/Makefile.sparc64 Mon Jul 16 23:32:24 2018 (r336359) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 700000 STD8X16FONT?= iso From owner-svn-src-head@freebsd.org Tue Jul 17 00:12:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36566104408F; Tue, 17 Jul 2018 00:12:03 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [18.222.6.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF0C88A129; Tue, 17 Jul 2018 00:12:02 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (unknown [18.188.142.31]) by mail.soaustin.net (Postfix) with ESMTPSA id 7833C24933; Tue, 17 Jul 2018 00:11:56 +0000 (UTC) Date: Tue, 17 Jul 2018 00:11:55 +0000 From: Mark Linimon To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336351 - head/gnu/lib/libstdc++ Message-ID: <20180717001154.GA24830@lonesome.com> References: <201807161853.w6GIrS98071506@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807161853.w6GIrS98071506@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 00:12:03 -0000 On Mon, Jul 16, 2018 at 06:53:28PM +0000, Pedro F. Giffuni wrote: > Update libstdc++ configuration. Will FreeBSD version be incremented for this? mcl From owner-svn-src-head@freebsd.org Tue Jul 17 02:11:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20119104ABB3 for ; Tue, 17 Jul 2018 02:11:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic301-2.consmr.mail.bf2.yahoo.com (sonic301-2.consmr.mail.bf2.yahoo.com [74.6.129.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B40018EF4D for ; Tue, 17 Jul 2018 02:11:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1531793461; bh=9tNCFGlo371RxqgslqjbhckpoScGJBirNA/TtS3fk68=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=DLErtFwqW2W1zYpXch4vQJrO97h0s1GuXIgqefVrqeJSEIRswCjaasvT2GRL0a5pja6Oj5m5mKD+E1UtFgE9naFTgJdYT22N8jktx5UAD1/iQ3HmZtRLIGNT0XfsMEBUlvt2cysSShFW7DNWQB05AmSk/ccEw0NGF1Jnrr+6/HXTG8F7n9b+NmDJtH8XOGi7emVnE+vRuZRyZBkNKkXNrnE2GlTNPCJinsrcjpxF349HnzhkN+/JtGmF4BSHCUI1L774rs3mHz9yv/QkW37f2qI7eKJXV8kxc6w9OtvWaovQ1lVzdqB6hnqeVPjIR1hnRtWcvQtZtwwSWXYuOZ0l4g== X-YMail-OSG: BfafJN4VM1lhPYlP.b8.KuTvn2GHwFI_tzJDbX8pk_Xoje.kIMpoezBxpQyWy4p RE1SN8AaEG05pQlQdOl2Zl6G09GKMXqntT.c13RzgftQ9JODlOnEl6tzz0_AayTEPs6NkngN2JbE c0AeJ9q8ivOgmCNlPGmrhLdaw8WQ7V6n36cgrenpzyozvI3jDaK86eOIwC8SSRwk4YCP5JvSl6.a sVD_cI0ICsTHUoB1_sCTLKZCLdpbA18tYQHzYLTGab6ykl8GZRAOPFC37zjmDJm76sAqg7upoCPM CRhhEOiWGYf6iKcSG_JrpyBUd5X280LeaBNSJeeDLQiWU2jItylA2QGGxk2VcFJxwardpPgUfXYw jfN_slJKwiK6OrEmIHCdra9Go.BPXpVl4JAMqtAzivTiR67.eVxm0mI2QshJ_MtLGaEFLvN9BTQH t5z4bp9R5xZP_vwm540vPLXCMtzR.Z3HRB2SdQ6lQUND.BQHc7eXxhlChDyTKiDYFp4NA.WQ4ZcD pAiS4TBF8XYSPuKyQsQ_DPcQUVSLdqVy6UBoShZsG0pqnFxaCRF1EG8hjTpQyHz0D3rizPXwYXNG wrU0joPYegHZoUFEB4OosP9DMaMY1W6LBSmVVgi4H5iZ3k5.gyQoM4kMzbwHnGvcoccMpJuCsKu. 5RBVeCtHHNgkgdjUT64aeMlHlrsaCU_kQlOhJSOEivkcy7B2l3Q2X9qYHfd150IdS5lYjqR9Xb2d W44FDQtcnP9ofZ2feEaQVBoDsSolPTrGpt03EdYbisQpMvGF7sYSdcWZJmkt5bFmDwqNErC6Emo2 8oAECngKBRbaud.UBuk025Snu7loXvPFqB0ZROUpnIYe4cuBttsmJApGLWRTiXX0O0lnR3RJ7LEL .zGak02zRNFK985zuwT93dqhWAThgQTUC0HcmDRIlD4FMCzlgRpF33VXK4OJiriR71PzQAPRcE._ aCRTo3YSq0TrLvL97R8UYp5Pp2hspoXN8Wy4pDn8z Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.bf2.yahoo.com with HTTP; Tue, 17 Jul 2018 02:11:01 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.5]) ([181.52.72.201]) by smtp417.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 55500c283a276a6890df7d033267f835; Tue, 17 Jul 2018 02:11:00 +0000 (UTC) Subject: Re: svn commit: r336351 - head/gnu/lib/libstdc++ To: Mark Linimon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807161853.w6GIrS98071506@repo.freebsd.org> <20180717001154.GA24830@lonesome.com> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: Date: Mon, 16 Jul 2018 21:10:59 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180717001154.GA24830@lonesome.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 02:11:08 -0000 On 16/07/2018 19:11, Mark Linimon wrote: > On Mon, Jul 16, 2018 at 06:53:28PM +0000, Pedro F. Giffuni wrote: >> Update libstdc++ configuration. > Will FreeBSD version be incremented for this? > > mcl I thought about it, but then I was not sure anyone will notice. Nevermind, version bumps are cheap I will do it. Pedro. From owner-svn-src-head@freebsd.org Tue Jul 17 02:20:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7425E104B189; Tue, 17 Jul 2018 02:20:52 +0000 (UTC) (envelope-from pfg@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 1F88A8F42B; Tue, 17 Jul 2018 02:20:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00A2A252B5; Tue, 17 Jul 2018 02:20:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6H2Kp1g097292; Tue, 17 Jul 2018 02:20:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H2KpdE097291; Tue, 17 Jul 2018 02:20:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201807170220.w6H2KpdE097291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 17 Jul 2018 02:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336360 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 336360 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 02:20:52 -0000 Author: pfg Date: Tue Jul 17 02:20:51 2018 New Revision: 336360 URL: https://svnweb.freebsd.org/changeset/base/336360 Log: FreeBSD_version bump as per r336351, Updating the libstdc++ is likely to have consequences for archs that are still using the older GCC based toolchain. Requested by: mcl Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Jul 16 23:32:24 2018 (r336359) +++ head/sys/sys/param.h Tue Jul 17 02:20:51 2018 (r336360) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200073 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200074 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Tue Jul 17 04:43:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46F771028E3D; Tue, 17 Jul 2018 04:43: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.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 DC4D67409D; Tue, 17 Jul 2018 04:43: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 9DB8926A8C; Tue, 17 Jul 2018 04:43: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 w6H4hwKt073890; Tue, 17 Jul 2018 04:43:58 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H4hwnQ073889; Tue, 17 Jul 2018 04:43:58 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201807170443.w6H4hwnQ073889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 17 Jul 2018 04:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336361 - in head/sys/ufs: ffs ufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head/sys/ufs: ffs ufs X-SVN-Commit-Revision: 336361 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 04:43:59 -0000 Author: mckusick Date: Tue Jul 17 04:43:58 2018 New Revision: 336361 URL: https://svnweb.freebsd.org/changeset/base/336361 Log: Add needed locking for um_flags added in -r335808. While here document required locking details in ufsmount structure. Reported by: kib Reviewed by: kib Modified: head/sys/ufs/ffs/ffs_suspend.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- head/sys/ufs/ffs/ffs_suspend.c Tue Jul 17 02:20:51 2018 (r336360) +++ head/sys/ufs/ffs/ffs_suspend.c Tue Jul 17 04:43:58 2018 (r336361) @@ -210,7 +210,9 @@ ffs_susp_suspend(struct mount *mp) if ((error = vfs_write_suspend(mp, VS_SKIP_UNMOUNT)) != 0) return (error); + UFS_LOCK(ump); ump->um_flags |= UM_WRITESUSPENDED; + UFS_UNLOCK(ump); return (0); } @@ -255,7 +257,9 @@ ffs_susp_dtor(void *data) vfs_write_resume(mp, 0); vfs_unbusy(mp); + UFS_LOCK(ump); ump->um_flags &= ~UM_WRITESUSPENDED; + UFS_UNLOCK(ump); sx_xunlock(&ffs_susp_lock); } Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Tue Jul 17 02:20:51 2018 (r336360) +++ head/sys/ufs/ufs/ufsmount.h Tue Jul 17 04:43:58 2018 (r336361) @@ -64,31 +64,44 @@ struct inodedep; TAILQ_HEAD(inodedeplst, inodedep); LIST_HEAD(bmsafemaphd, bmsafemap); -/* This structure describes the UFS specific mount structure data. */ +/* + * This structure describes the UFS specific mount structure data. + * The function operators are used to support different versions of + * UFS (UFS1, UFS2, etc). + * + * Lock reference: + * a - atomic operations + * c - set at allocation then constant until freed + * i - ufsmount interlock (UFS_LOCK / UFS_UNLOCK) + * q - associated quota file is locked + * r - ref to parent mount structure is held (vfs_busy / vfs_unbusy) + * u - managed by user process fsck_ufs + */ struct ufsmount { - struct mount *um_mountp; /* filesystem vfs structure */ - struct cdev *um_dev; /* device mounted */ - struct g_consumer *um_cp; - struct bufobj *um_bo; /* Buffer cache object */ - struct vnode *um_devvp; /* block device mounted vnode */ - u_long um_fstype; /* type of filesystem */ - struct fs *um_fs; /* pointer to superblock */ - struct ufs_extattr_per_mount um_extattr; /* extended attrs */ - u_long um_nindir; /* indirect ptrs per block */ - u_long um_bptrtodb; /* indir ptr to disk block */ - u_long um_seqinc; /* inc between seq blocks */ - struct mtx um_lock; /* Protects ufsmount & fs */ - pid_t um_fsckpid; /* PID permitted fsck sysctls */ - struct mount_softdeps *um_softdep; /* softdep mgmt structure */ - struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */ - struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */ - time_t um_btime[MAXQUOTAS]; /* block quota time limit */ - time_t um_itime[MAXQUOTAS]; /* inode quota time limit */ - char um_qflags[MAXQUOTAS]; /* quota specific flags */ - int64_t um_savedmaxfilesize; /* XXX - limit maxfilesize */ - u_int um_flags; /* filesystem flags */ - u_int um_trim_inflight; /* outstanding trim count */ - struct taskqueue *um_trim_tq; /* trim request queue */ + struct mount *um_mountp; /* (r) filesystem vfs struct */ + struct cdev *um_dev; /* (r) device mounted */ + struct g_consumer *um_cp; /* (r) GEOM access point */ + struct bufobj *um_bo; /* (r) Buffer cache object */ + struct vnode *um_devvp; /* (r) blk dev mounted vnode */ + u_long um_fstype; /* (c) type of filesystem */ + struct fs *um_fs; /* (r) pointer to superblock */ + struct ufs_extattr_per_mount um_extattr; /* (c) extended attrs */ + u_long um_nindir; /* (c) indirect ptrs per blk */ + u_long um_bptrtodb; /* (c) indir disk block ptr */ + u_long um_seqinc; /* (c) inc between seq blocks */ + struct mtx um_lock; /* (c) Protects ufsmount & fs */ + pid_t um_fsckpid; /* (u) PID can do fsck sysctl */ + struct mount_softdeps *um_softdep; /* (c) softdep mgmt structure */ + struct vnode *um_quotas[MAXQUOTAS]; /* (q) pointer to quota files */ + struct ucred *um_cred[MAXQUOTAS]; /* (q) quota file access cred */ + time_t um_btime[MAXQUOTAS]; /* (q) block quota time limit */ + time_t um_itime[MAXQUOTAS]; /* (q) inode quota time limit */ + char um_qflags[MAXQUOTAS]; /* (i) quota specific flags */ + int64_t um_savedmaxfilesize; /* (c) track maxfilesize */ + u_int um_flags; /* (i) filesystem flags */ + u_int um_trim_inflight; /* (a) outstanding trim count */ + struct taskqueue *um_trim_tq; /* (c) trim request queue */ + /* (c) - below function ptrs */ int (*um_balloc)(struct vnode *, off_t, int, struct ucred *, int, struct buf **); int (*um_blkatoff)(struct vnode *, off_t, char **, struct buf **); From owner-svn-src-head@freebsd.org Tue Jul 17 06:27:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CEA7102BD75 for ; Tue, 17 Jul 2018 06:27:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-12.consmr.mail.ne1.yahoo.com (sonic308-12.consmr.mail.ne1.yahoo.com [66.163.187.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BAD476753 for ; Tue, 17 Jul 2018 06:27:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 7NvtL4AVM1k.jXyQ10Eag6ofixLspV9qHoRFjIMi_ZDjqyfeaLSc2gjw.K6K20P ZPGkrd3EnTJpRnLQQjvv2Isp7cGumig8m4Lt0LPPRpLMGQHkMJSLAvLduXKokQ_2GREl8gp7ahuG R3RNc34Bfdo.qLEqt3F_Ts3I043o1g8ivmY.iHS8rBuwr7LxpDcRw0QwvLkWsodzKVLeN.DkQFSZ ZxaqzDturucD4z0vGVHEYM96nQPiX1pttqIfe5OCMPQVvnCdZaPB.dDqjzRvZ3TdQIswFFc4zGHm TASil.vJ.4nvQ51_dLvpX9HPBtnxdd83k2k4jgcstUMySR3mG63lEfKcb.9XRjHnCfhUgjW.ZEO_ 65ImkHy.HJUzo76R7Lj.WzRY_ljS6xk0XUsdUSIinTbOyJ53Ml8892m5su0OtHU3Kz1BzEDCsDZk x5FaB.fV57UDyZBZRQ0C1lLFDsU6Uljbx4ROc4q7LL6ZCyErF22kJV6yHmtjklQZjhENEoy2U5jP f6sTLmqTdZe8xBcVn0g33FWRYW7nbuaOxfXF3oYeA29gL6NPDEK.w3gGnapFNeHIMZ3mbydhGNNw 56rm0AvFO74N7Ihk.V1_B1o9qm4eoLDc0vA_TDU43.dllGftsMQLoHsLi35zHjIFDWKMXGmWFuQ9 VwKrNOz6d1ZNfTMM7c4u5ps1v9vjZgHRmA5enNS9ZSlW3jmkOSbraC2df4.BRkmRbddreeF.MEvr h8DuEWkQXm5FDFzGk86g6gcRw7O6wZVNYyopBtAqoOEH7w_1AFTnHvrEdlLtX1UHkvCb6.UrgcXz WtNSTNvRHvk7uUaLcgytNWJuytvk5k0mEU33UWdPSouFOJIXlfbiF62UwbAmePzHD9Ms73hir.Yw kiPjTzJeFhMS9T0tW27b9tUpQtedsw9qrNDgLrBY00CwLN6PIq5VZa9dhQU8I.NUGf_SZ7pyQErQ xhrx6JaEC_PNRwvQilRkjJZ_LoAjV2KcWuoEeTWrf3hbDIEIWQ7JP_L4fIDDbrcU- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Tue, 17 Jul 2018 06:27:22 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp409.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 183b733193674b237cac0aae09e96821; Tue, 17 Jul 2018 06:27:21 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: Date: Mon, 16 Jul 2018 23:27:19 -0700 Cc: Dimitry Andric , Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: 7bit Message-Id: <9251BE92-A8CE-45E3-B4BF-706E7219321A@yahoo.com> References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> <49BF6569-96A9-4104-BDE6-8BB94C0D9626@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 06:27:29 -0000 On 2018-Jul-1, at 6:34 AM, Mark Millard wrote: > My brain finally engaged for showing exactly what files are included > for the gcc builds: the .meta files include that information explicitly > (along with other files that are opened during the operation). > > amd64 is as I reported, just one header file from gcc: float.h . > > powerpc64 builds Lex/Lexer.cpp without defining __ALTIVEC__ and so > is not including . Building without __ALTIVEC__ might > be an error itself but would be a workaround for the altivec.h > file name aliasing vs. search-path problem. > > . . . Going in a different direction, what of the unchanged Makefile.inc1 code block: .if ${WANT_COMPILER_TYPE} == gcc || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) # GCC requires -isystem and -L when using a cross-compiler. --sysroot # won't set header path and -L is used to ensure the base library path # is added before the port PREFIX library path. CD2CFLAGS+= -isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib # GCC requires -B to find /usr/lib/crti.o when using a cross-compiler # combined with --sysroot. CD2CFLAGS+= -B${XDDESTDIR}/usr/lib # Force using libc++ for external GCC. .if defined(X_COMPILER_TYPE) && \ ${X_COMPILER_TYPE} == gcc && ${X_COMPILER_VERSION} >= 40800 CD2CXXFLAGS+= -isystem ${XDDESTDIR}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ .endif .endif Why is that pair of -isystem uses that gives the old search order okay? Or was the block just missed? (Similarly for other options listed above.) Note: Locally I've reverted the -r335782 changes in order for my use of devel/*-gcc as cross compilers to work where they used to (hopefully: still building), restoring the historical search order for the directories for now. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Tue Jul 17 07:42:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02D70102E7B4; Tue, 17 Jul 2018 07:42:22 +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 A6C3178F56; Tue, 17 Jul 2018 07:42: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 89014776; Tue, 17 Jul 2018 07:42: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 w6H7gLRp065776; Tue, 17 Jul 2018 07:42:21 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H7gFhg065742; Tue, 17 Jul 2018 07:42:15 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807170742.w6H7gFhg065742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 17 Jul 2018 07:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336362 - in head/lib/msun: ld128 ld80 src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: in head/lib/msun: ld128 ld80 src X-SVN-Commit-Revision: 336362 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 07:42:22 -0000 Author: bde Date: Tue Jul 17 07:42:14 2018 New Revision: 336362 URL: https://svnweb.freebsd.org/changeset/base/336362 Log: Add a macro nan_mix() and use it to get NaN results that are (bitwise) independent of the precision in most cases. This is mainly to simplify checking for errors. r176266 did this for e_pow[f].c using a less refined expression that often didn't work. r176276 fixes an error in the log message for r176266. The main refinement is to always expand to long double precision. See old log messages (especially these 2) and the comment on the macro for more general details. Specific details: - using nan_mix() consistently for the new and old pow*() functions was the only thing needed to make my consistency test for powl() vs pow() pass on amd64. - catrig[fl].c already had all the refinements, but open-coded. - e_atan2[fl].c, e_fmod[fl].c and s_remquo[fl] only had primitive NaN mixing. - e_hypot[fl].c already had a different refined version of r176266. Refine this further. nan_mix() is not directly usable here since we want to clear the sign bit. - e_remainder[f].c already had an earlier version of r176266. - s_ccosh[f].c,/s_csinh[f].c already had a version equivalent to r176266. Refine this further. nan_mix() is not directly usable here since the expression has to handle some non-NaN cases. - s_csqrt.[fl]: the mixing was special and mostly wrong. Partially fix the special version. - s_ctanh[f].c already had a version of r176266. Modified: head/lib/msun/ld128/e_powl.c head/lib/msun/ld80/e_powl.c head/lib/msun/src/catrig.c head/lib/msun/src/catrigf.c head/lib/msun/src/catrigl.c head/lib/msun/src/e_atan2.c head/lib/msun/src/e_atan2f.c head/lib/msun/src/e_atan2l.c head/lib/msun/src/e_fmod.c head/lib/msun/src/e_fmodf.c head/lib/msun/src/e_fmodl.c head/lib/msun/src/e_hypot.c head/lib/msun/src/e_hypotf.c head/lib/msun/src/e_hypotl.c head/lib/msun/src/e_pow.c head/lib/msun/src/e_powf.c head/lib/msun/src/e_remainder.c head/lib/msun/src/e_remainderf.c head/lib/msun/src/math_private.h head/lib/msun/src/s_ccosh.c head/lib/msun/src/s_ccoshf.c head/lib/msun/src/s_csinh.c head/lib/msun/src/s_csinhf.c head/lib/msun/src/s_csqrt.c head/lib/msun/src/s_csqrtf.c head/lib/msun/src/s_csqrtl.c head/lib/msun/src/s_ctanh.c head/lib/msun/src/s_ctanhf.c head/lib/msun/src/s_remquo.c head/lib/msun/src/s_remquof.c head/lib/msun/src/s_remquol.c Modified: head/lib/msun/ld128/e_powl.c ============================================================================== --- head/lib/msun/ld128/e_powl.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/ld128/e_powl.c Tue Jul 17 07:42:14 2018 (r336362) @@ -182,7 +182,7 @@ powl(long double x, long double y) || (iy > 0x7fff0000) || ((iy == 0x7fff0000) && ((q.parts32.mswlo | q.parts32.lswhi | q.parts32.lswlo) != 0))) - return x + y; + return nan_mix(x, y); /* determine if y is an odd int when x < 0 * yisint = 0 ... y is not an integer Modified: head/lib/msun/ld80/e_powl.c ============================================================================== --- head/lib/msun/ld80/e_powl.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/ld80/e_powl.c Tue Jul 17 07:42:14 2018 (r336362) @@ -216,9 +216,9 @@ if( x == 1.0L ) return( 1.0L ); if( isnan(x) ) - return( x ); + return ( nan_mix(x, y) ); if( isnan(y) ) - return( y ); + return ( nan_mix(x, y) ); if( y == 1.0L ) return( x ); Modified: head/lib/msun/src/catrig.c ============================================================================== --- head/lib/msun/src/catrig.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/catrig.c Tue Jul 17 07:42:14 2018 (r336362) @@ -300,7 +300,7 @@ casinh(double complex z) * C99 leaves it optional whether to raise invalid if one of * the arguments is not NaN, so we opt not to raise it. */ - return (CMPLX(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLX(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) { @@ -384,7 +384,7 @@ cacos(double complex z) * C99 leaves it optional whether to raise invalid if one of * the arguments is not NaN, so we opt not to raise it. */ - return (CMPLX(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLX(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) { @@ -601,7 +601,7 @@ catanh(double complex z) * C99 leaves it optional whether to raise invalid if one of * the arguments is not NaN, so we opt not to raise it. */ - return (CMPLX(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLX(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) Modified: head/lib/msun/src/catrigf.c ============================================================================== --- head/lib/msun/src/catrigf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/catrigf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -163,7 +163,7 @@ casinhf(float complex z) return (CMPLXF(y, x + x)); if (y == 0) return (CMPLXF(x + x, y)); - return (CMPLXF(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLXF(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) { @@ -221,7 +221,7 @@ cacosf(float complex z) return (CMPLXF(x + x, -y)); if (x == 0) return (CMPLXF(pio2_hi + pio2_lo, y + y)); - return (CMPLXF(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLXF(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) { @@ -359,7 +359,7 @@ catanhf(float complex z) if (isinf(y)) return (CMPLXF(copysignf(0, x), copysignf(pio2_hi + pio2_lo, y))); - return (CMPLXF(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLXF(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) Modified: head/lib/msun/src/catrigl.c ============================================================================== --- head/lib/msun/src/catrigl.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/catrigl.c Tue Jul 17 07:42:14 2018 (r336362) @@ -182,7 +182,7 @@ casinhl(long double complex z) return (CMPLXL(y, x + x)); if (y == 0) return (CMPLXL(x + x, y)); - return (CMPLXL(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLXL(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) { @@ -241,7 +241,7 @@ cacosl(long double complex z) return (CMPLXL(x + x, -y)); if (x == 0) return (CMPLXL(pio2_hi + pio2_lo, y + y)); - return (CMPLXL(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLXL(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) { @@ -380,7 +380,7 @@ catanhl(long double complex z) if (isinf(y)) return (CMPLXL(copysignl(0, x), copysignl(pio2_hi + pio2_lo, y))); - return (CMPLXL(x + 0.0L + (y + 0), x + 0.0L + (y + 0))); + return (CMPLXL(nan_mix(x, y), nan_mix(x, y))); } if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) Modified: head/lib/msun/src/e_atan2.c ============================================================================== --- head/lib/msun/src/e_atan2.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_atan2.c Tue Jul 17 07:42:14 2018 (r336362) @@ -70,7 +70,7 @@ __ieee754_atan2(double y, double x) iy = hy&0x7fffffff; if(((ix|((lx|-lx)>>31))>0x7ff00000)|| ((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */ - return x+y; + return nan_mix(x, y); if(hx==0x3ff00000&&lx==0) return atan(y); /* x=1.0 */ m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */ Modified: head/lib/msun/src/e_atan2f.c ============================================================================== --- head/lib/msun/src/e_atan2f.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_atan2f.c Tue Jul 17 07:42:14 2018 (r336362) @@ -41,7 +41,7 @@ __ieee754_atan2f(float y, float x) iy = hy&0x7fffffff; if((ix>0x7f800000)|| (iy>0x7f800000)) /* x or y is NaN */ - return x+y; + return nan_mix(x, y); if(hx==0x3f800000) return atanf(y); /* x=1.0 */ m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */ Modified: head/lib/msun/src/e_atan2l.c ============================================================================== --- head/lib/msun/src/e_atan2l.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_atan2l.c Tue Jul 17 07:42:14 2018 (r336362) @@ -62,7 +62,7 @@ atan2l(long double y, long double x) ((ux.bits.manh&~LDBL_NBIT)|ux.bits.manl)!=0) || /* x is NaN */ (expty==BIAS+LDBL_MAX_EXP && ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)!=0)) /* y is NaN */ - return x+y; + return nan_mix(x, y); if (expsignx==BIAS && ((ux.bits.manh&~LDBL_NBIT)|ux.bits.manl)==0) return atanl(y); /* x=1.0 */ m = ((expsigny>>15)&1)|((expsignx>>14)&2); /* 2*sign(x)+sign(y) */ Modified: head/lib/msun/src/e_fmod.c ============================================================================== --- head/lib/msun/src/e_fmod.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_fmod.c Tue Jul 17 07:42:14 2018 (r336362) @@ -42,7 +42,7 @@ __ieee754_fmod(double x, double y) /* purge off exception values */ if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ ((hy|((ly|-ly)>>31))>0x7ff00000)) /* or y is NaN */ - return (x*y)/(x*y); + return nan_mix(x, y)/nan_mix(x, y); if(hx<=hy) { if((hx=0x7f800000)|| /* y=0,or x not finite */ (hy>0x7f800000)) /* or y is NaN */ - return (x*y)/(x*y); + return nan_mix(x, y)/nan_mix(x, y); if(hx>31]; /* |x|=|y| return x*0*/ Modified: head/lib/msun/src/e_fmodl.c ============================================================================== --- head/lib/msun/src/e_fmodl.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_fmodl.c Tue Jul 17 07:42:14 2018 (r336362) @@ -79,7 +79,7 @@ fmodl(long double x, long double y) (ux.bits.exp == BIAS + LDBL_MAX_EXP) || /* or x not finite */ (uy.bits.exp == BIAS + LDBL_MAX_EXP && ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)!=0)) /* or y is NaN */ - return (x*y)/(x*y); + return nan_mix(x, y)/nan_mix(x, y); if(ux.bits.exp<=uy.bits.exp) { if((ux.bits.exp= 0x7ff00000) { /* Inf or NaN */ u_int32_t low; /* Use original arg order iff result is NaN; quieten sNaNs. */ - w = fabs(x+0.0)-fabs(y+0.0); + w = fabsl(x+0.0L)-fabs(y+0); GET_LOW_WORD(low,a); if(((ha&0xfffff)|low)==0) w = a; GET_LOW_WORD(low,b); Modified: head/lib/msun/src/e_hypotf.c ============================================================================== --- head/lib/msun/src/e_hypotf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_hypotf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -37,7 +37,7 @@ __ieee754_hypotf(float x, float y) if(ha > 0x58800000) { /* a>2**50 */ if(ha >= 0x7f800000) { /* Inf or NaN */ /* Use original arg order iff result is NaN; quieten sNaNs. */ - w = fabsf(x+0.0F)-fabsf(y+0.0F); + w = fabsl(x+0.0L)-fabsf(y+0); if(ha == 0x7f800000) w = a; if(hb == 0x7f800000) w = b; return w; Modified: head/lib/msun/src/e_hypotl.c ============================================================================== --- head/lib/msun/src/e_hypotl.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_hypotl.c Tue Jul 17 07:42:14 2018 (r336362) @@ -64,7 +64,7 @@ hypotl(long double x, long double y) if(ha >= ESW(MAX_EXP)) { /* Inf or NaN */ man_t manh, manl; /* Use original arg order iff result is NaN; quieten sNaNs. */ - w = fabsl(x+0.0)-fabsl(y+0.0); + w = fabsl(x+0.0L)-fabsl(y+0); GET_LDBL_MAN(manh,manl,a); if (manh == LDBL_NBIT && manl == 0) w = a; GET_LDBL_MAN(manh,manl,b); Modified: head/lib/msun/src/e_pow.c ============================================================================== --- head/lib/msun/src/e_pow.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_pow.c Tue Jul 17 07:42:14 2018 (r336362) @@ -119,7 +119,7 @@ __ieee754_pow(double x, double y) /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) - return (x+0.0)+(y+0.0); + return nan_mix(x, y); /* determine if y is an odd int when x < 0 * yisint = 0 ... y is not an integer Modified: head/lib/msun/src/e_powf.c ============================================================================== --- head/lib/msun/src/e_powf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_powf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -76,7 +76,7 @@ __ieee754_powf(float x, float y) /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7f800000 || iy > 0x7f800000) - return (x+0.0F)+(y+0.0F); + return nan_mix(x, y); /* determine if y is an odd int when x < 0 * yisint = 0 ... y is not an integer Modified: head/lib/msun/src/e_remainder.c ============================================================================== --- head/lib/msun/src/e_remainder.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_remainder.c Tue Jul 17 07:42:14 2018 (r336362) @@ -45,11 +45,11 @@ __ieee754_remainder(double x, double p) hx &= 0x7fffffff; /* purge off exception values */ - if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */ - if((hx>=0x7ff00000)|| /* x not finite */ + if(((hp|lp)==0)|| /* p = 0 */ + (hx>=0x7ff00000)|| /* x not finite */ ((hp>=0x7ff00000)&& /* p is NaN */ (((hp-0x7ff00000)|lp)!=0))) - return ((long double)x*p)/((long double)x*p); + return nan_mix(x, p)/nan_mix(x, p); if (hp<=0x7fdfffff) x = __ieee754_fmod(x,p+p); /* now x < 2p */ Modified: head/lib/msun/src/e_remainderf.c ============================================================================== --- head/lib/msun/src/e_remainderf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/e_remainderf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -36,10 +36,10 @@ __ieee754_remainderf(float x, float p) hx &= 0x7fffffff; /* purge off exception values */ - if(hp==0) return (x*p)/(x*p); /* p = 0 */ - if((hx>=0x7f800000)|| /* x not finite */ + if((hp==0)|| /* p = 0 */ + (hx>=0x7f800000)|| /* x not finite */ ((hp>0x7f800000))) /* p is NaN */ - return ((long double)x*p)/((long double)x*p); + return nan_mix(x, p)/nan_mix(x, p); if (hp<=0x7effffff) x = __ieee754_fmodf(x,p+p); /* now x < 2p */ Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/math_private.h Tue Jul 17 07:42:14 2018 (r336362) @@ -478,6 +478,24 @@ do { \ */ void _scan_nan(uint32_t *__words, int __num_words, const char *__s); +/* + * Mix 1 or 2 NaNs. First add 0 to each arg. This normally just turns + * signaling NaNs into quiet NaNs by setting a quiet bit. We do this + * because we want to never return a signaling NaN, and also because we + * don't want the quiet bit to affect the result. Then mix the converted + * args using addition. The result is typically the arg whose mantissa + * bits (considered as in integer) are largest. + * + * Technical complications: the result in bits might depend on the precision + * and/or on compiler optimizations, especially when different register sets + * are used for different precisions. Try to make the result not depend on + * at least the precision by always doing the main mixing step in long double + * precision. Try to reduce dependencies on optimizations by adding the + * the 0's in different precisions (unless everything is in long double + * precision). + */ +#define nan_mix(x, y) (((x) + 0.0L) + ((y) + 0)) + #ifdef _COMPLEX_H /* Modified: head/lib/msun/src/s_ccosh.c ============================================================================== --- head/lib/msun/src/s_ccosh.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_ccosh.c Tue Jul 17 07:42:14 2018 (r336362) @@ -146,7 +146,8 @@ ccosh(double complex z) * Optionally raises the invalid floating-point exception for finite * nonzero y. Choice = don't raise (except for signaling NaNs). */ - return (CMPLX((x * x) * (y - y), (x + x) * (y - y))); + return (CMPLX(((long double)x * x) * (y - y), + ((long double)x + x) * (y - y))); } double complex Modified: head/lib/msun/src/s_ccoshf.c ============================================================================== --- head/lib/msun/src/s_ccoshf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_ccoshf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -92,7 +92,8 @@ ccoshf(float complex z) return (CMPLXF(INFINITY * cosf(y), x * sinf(y))); } - return (CMPLXF((x * x) * (y - y), (x + x) * (y - y))); + return (CMPLXF(((long double)x * x) * (y - y), + ((long double)x + x) * (y - y))); } float complex Modified: head/lib/msun/src/s_csinh.c ============================================================================== --- head/lib/msun/src/s_csinh.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_csinh.c Tue Jul 17 07:42:14 2018 (r336362) @@ -145,7 +145,8 @@ csinh(double complex z) * Optionally raises the invalid floating-point exception for finite * nonzero y. Choice = don't raise (except for signaling NaNs). */ - return (CMPLX((x + x) * (y - y), (x * x) * (y - y))); + return (CMPLX(((long double)x + x) * (y - y), + ((long double)x * x) * (y - y))); } double complex Modified: head/lib/msun/src/s_csinhf.c ============================================================================== --- head/lib/msun/src/s_csinhf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_csinhf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -92,7 +92,8 @@ csinhf(float complex z) return (CMPLXF(x * cosf(y), INFINITY * sinf(y))); } - return (CMPLXF((x + x) * (y - y), (x * x) * (y - y))); + return (CMPLXF(((long double)x + x) * (y - y), + ((long double)x * x) * (y - y))); } float complex Modified: head/lib/msun/src/s_csqrt.c ============================================================================== --- head/lib/msun/src/s_csqrt.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_csqrt.c Tue Jul 17 07:42:14 2018 (r336362) @@ -65,7 +65,7 @@ csqrt(double complex z) return (CMPLX(INFINITY, b)); if (isnan(a)) { t = (b - b) / (b - b); /* raise invalid if b is not a NaN */ - return (CMPLX(a, t)); /* return NaN + NaN i */ + return (CMPLX(a + 0.0L + t, a + 0.0L + t)); /* NaN + NaN i */ } if (isinf(a)) { /* @@ -79,10 +79,10 @@ csqrt(double complex z) else return (CMPLX(a, copysign(b - b, b))); } - /* - * The remaining special case (b is NaN) is handled just fine by - * the normal code path below. - */ + if (isnan(b)) { + t = (a - a) / (a - a); /* raise invalid */ + return (CMPLX(b + 0.0L + t, b + 0.0L + t)); /* NaN + NaN i */ + } /* Scale to avoid overflow. */ if (fabs(a) >= THRESH || fabs(b) >= THRESH) { Modified: head/lib/msun/src/s_csqrtf.c ============================================================================== --- head/lib/msun/src/s_csqrtf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_csqrtf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -56,7 +56,7 @@ csqrtf(float complex z) return (CMPLXF(INFINITY, b)); if (isnan(a)) { t = (b - b) / (b - b); /* raise invalid if b is not a NaN */ - return (CMPLXF(a, t)); /* return NaN + NaN i */ + return (CMPLXF(a + 0.0L + t, a + 0.0L + t)); /* NaN + NaN i */ } if (isinf(a)) { /* @@ -70,10 +70,10 @@ csqrtf(float complex z) else return (CMPLXF(a, copysignf(b - b, b))); } - /* - * The remaining special case (b is NaN) is handled just fine by - * the normal code path below. - */ + if (isnan(b)) { + t = (a - a) / (a - a); /* raise invalid */ + return (CMPLXF(b + 0.0L + t, b + 0.0L + t)); /* NaN + NaN i */ + } /* * We compute t in double precision to avoid overflow and to Modified: head/lib/msun/src/s_csqrtl.c ============================================================================== --- head/lib/msun/src/s_csqrtl.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_csqrtl.c Tue Jul 17 07:42:14 2018 (r336362) @@ -73,7 +73,7 @@ csqrtl(long double complex z) return (CMPLXL(INFINITY, b)); if (isnan(a)) { t = (b - b) / (b - b); /* raise invalid if b is not a NaN */ - return (CMPLXL(a, t)); /* return NaN + NaN i */ + return (CMPLXL(a + 0.0L + t, a + 0.0L + t)); /* NaN + NaN i */ } if (isinf(a)) { /* @@ -87,10 +87,10 @@ csqrtl(long double complex z) else return (CMPLXL(a, copysignl(b - b, b))); } - /* - * The remaining special case (b is NaN) is handled just fine by - * the normal code path below. - */ + if (isnan(b)) { + t = (a - a) / (a - a); /* raise invalid */ + return (CMPLXL(b + 0.0L + t, b + 0.0L + t)); /* NaN + NaN i */ + } /* Scale to avoid overflow. */ if (fabsl(a) >= THRESH || fabsl(b) >= THRESH) { Modified: head/lib/msun/src/s_ctanh.c ============================================================================== --- head/lib/msun/src/s_ctanh.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_ctanh.c Tue Jul 17 07:42:14 2018 (r336362) @@ -104,8 +104,8 @@ ctanh(double complex z) */ if (ix >= 0x7ff00000) { if ((ix & 0xfffff) | lx) /* x is NaN */ - return (CMPLX((x + 0) * (y + 0), - y == 0 ? y : (x + 0) * (y + 0))); + return (CMPLX(nan_mix(x, y), + y == 0 ? y : nan_mix(x, y))); SET_HIGH_WORD(x, hx - 0x40000000); /* x = copysign(1, x) */ return (CMPLX(x, copysign(0, isinf(y) ? y : sin(y) * cos(y)))); } Modified: head/lib/msun/src/s_ctanhf.c ============================================================================== --- head/lib/msun/src/s_ctanhf.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_ctanhf.c Tue Jul 17 07:42:14 2018 (r336362) @@ -53,8 +53,8 @@ ctanhf(float complex z) if (ix >= 0x7f800000) { if (ix & 0x7fffff) - return (CMPLXF((x + 0) * (y + 0), - y == 0 ? y : (x + 0) * (y + 0))); + return (CMPLXF(nan_mix(x, y), + y == 0 ? y : nan_mix(x, y))); SET_FLOAT_WORD(x, hx - 0x40000000); return (CMPLXF(x, copysignf(0, isinf(y) ? y : sinf(y) * cosf(y)))); Modified: head/lib/msun/src/s_remquo.c ============================================================================== --- head/lib/msun/src/s_remquo.c Tue Jul 17 04:43:58 2018 (r336361) +++ head/lib/msun/src/s_remquo.c Tue Jul 17 07:42:14 2018 (r336362) @@ -44,7 +44,7 @@ remquo(double x, double y, int *quo) /* purge off exception values */ if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ ((hy|((ly|-ly)>>31))>0x7ff00000)) /* or y is NaN */ - return (x*y)/(x*y); + return nan_mix(x, y)/nan_mix(x, y); if(hx<=hy) { if((hx=0x7f800000||hy>0x7f800000) /* y=0,NaN;or x not finite */ - return (x*y)/(x*y); + return nan_mix(x, y)/nan_mix(x, y); if(hx Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FED5103072E; Tue, 17 Jul 2018 08:34: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.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 3CF8A7AAE5; Tue, 17 Jul 2018 08:34: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 1A542F89; Tue, 17 Jul 2018 08:34: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 w6H8Yn6L091424; Tue, 17 Jul 2018 08:34:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H8Ynrn091423; Tue, 17 Jul 2018 08:34:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170834.w6H8Ynrn091423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 08:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336363 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336363 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 08:34:50 -0000 Author: hselasky Date: Tue Jul 17 08:34:49 2018 New Revision: 336363 URL: https://svnweb.freebsd.org/changeset/base/336363 Log: Process address resolve requests at least one time per second in ibcore. When setting a large address resolve timeout it was observed that the address resolving would succeed at the timeout and not when the address was available. Make sure the address resolving requests are processed no slower than one time every second. While at it use "int" for jiffies instead of "unsigned long" to match FreeBSD ticks. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 07:42:14 2018 (r336362) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 08:34:49 2018 (r336363) @@ -63,7 +63,7 @@ struct addr_req { void *context; void (*callback)(int status, struct sockaddr *src_addr, struct rdma_dev_addr *addr, void *context); - unsigned long timeout; + int timeout; int status; }; @@ -190,13 +190,15 @@ int rdma_translate_ip(const struct sockaddr *addr, } EXPORT_SYMBOL(rdma_translate_ip); -static void set_timeout(unsigned long time) +static void set_timeout(int time) { int delay; /* under FreeBSD ticks are 32-bit */ delay = time - jiffies; if (delay <= 0) delay = 1; + else if (delay > hz) + delay = hz; mod_delayed_work(addr_wq, &work, delay); } From owner-svn-src-head@freebsd.org Tue Jul 17 08:48:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38C841030ED4; Tue, 17 Jul 2018 08:48: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.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 DECDA7B3E9; Tue, 17 Jul 2018 08:48:30 +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 BF86A1144; Tue, 17 Jul 2018 08:48: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 w6H8mUc2096892; Tue, 17 Jul 2018 08:48:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H8mUeZ096891; Tue, 17 Jul 2018 08:48:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170848.w6H8mUeZ096891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 08:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336364 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336364 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 08:48:31 -0000 Author: hselasky Date: Tue Jul 17 08:48:30 2018 New Revision: 336364 URL: https://svnweb.freebsd.org/changeset/base/336364 Log: Only update source address when resolving is successful in ibcore. When resolving an IP address in ibcore, only update the source address upon normal completion. The ibcore address resolve function does not care about the scope ID value of the IPv6 link-local addresses and expects this information has already been extracted into the bound_dev_if field. Because the same IPv6 link-local address can exist on multiple interfaces the ibcore address resolver gets confused and returns ENETUNREACH. Instead of updating both source address and bound_dev_if just keep the address set to any address until resolving completes. For the sake of code symmetry a similar change has been applied to the IPv4 address resolve path. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 08:34:49 2018 (r336363) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 08:48:30 2018 (r336364) @@ -257,7 +257,7 @@ static int addr4_resolve(struct sockaddr_in *src_in, }; struct sockaddr_in dst_tmp = *dst_in; in_port_t src_port; - struct sockaddr *saddr; + struct sockaddr *saddr = NULL; struct rtentry *rte; struct ifnet *ifp; int error; @@ -333,11 +333,6 @@ static int addr4_resolve(struct sockaddr_in *src_in, /* get destination network interface from route */ ifp = rte->rt_ifp; dev_hold(ifp); - - /* update source address */ - src_port = src_in->sin_port; - memcpy(src_in, saddr, rdma_addr_size(saddr)); - src_in->sin_port = src_port; /* preserve port number */ break; default: break; @@ -369,6 +364,15 @@ static int addr4_resolve(struct sockaddr_in *src_in, addr->network = RDMA_NETWORK_IPV4; } + /* + * Step 4 - update source address, if any + */ + if (saddr != NULL) { + src_port = src_in->sin_port; + memcpy(src_in, saddr, rdma_addr_size(saddr)); + src_in->sin_port = src_port; /* preserve port number */ + } + if (rte != NULL) RTFREE(rte); @@ -412,7 +416,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, }; struct sockaddr_in6 dst_tmp = *dst_in; in_port_t src_port; - struct sockaddr *saddr; + struct sockaddr *saddr = NULL; struct rtentry *rte; struct ifnet *ifp; int error; @@ -502,10 +506,6 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, /* get destination network interface from route */ ifp = rte->rt_ifp; dev_hold(ifp); - - src_port = src_in->sin6_port; - memcpy(src_in, saddr, rdma_addr_size(saddr)); - src_in->sin6_port = src_port; /* preserve port number */ break; default: break; @@ -532,6 +532,15 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, goto error_put_ifp; else if (is_gw != 0) addr->network = RDMA_NETWORK_IPV6; + } + + /* + * Step 4 - update source address, if any + */ + if (saddr != NULL) { + src_port = src_in->sin6_port; + memcpy(src_in, saddr, rdma_addr_size(saddr)); + src_in->sin6_port = src_port; /* preserve port number */ } if (rte != NULL) From owner-svn-src-head@freebsd.org Tue Jul 17 08:52:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F17C1031281; Tue, 17 Jul 2018 08:52: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.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 138577B845; Tue, 17 Jul 2018 08:52:30 +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 E87ED12E1; Tue, 17 Jul 2018 08:52: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 w6H8qTJG002178; Tue, 17 Jul 2018 08:52:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H8qTQd002176; Tue, 17 Jul 2018 08:52:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170852.w6H8qTQd002176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 08:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336365 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336365 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 08:52:30 -0000 Author: hselasky Date: Tue Jul 17 08:52:29 2018 New Revision: 336365 URL: https://svnweb.freebsd.org/changeset/base/336365 Log: Add lock to multicast handlers in ibcore. When two handlers used the same object in the old schema, we blocked the process in the kernel. The new schema just returns -EBUSY. This could lead to different behaviour in applications between the old schema and the new schema. In most cases, using such handlers concurrently could lead to crashing the process. For example, if thread A destroys a QP and thread B modifies it, we could have the destruction happens before the modification. In this case, we are accessing freed memory which could lead to crashing the process. This is true for most cases. However, attaching and detaching a multicast address from QP concurrently is safe. Therefore, we preserve the original behaviour by adding a lock there. Linux commit: f48b726920d96dcd1860df06143bdea7d6d7dcc3 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c head/sys/ofed/drivers/infiniband/core/uverbs.h Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 08:48:30 2018 (r336364) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 08:52:29 2018 (r336365) @@ -1794,6 +1794,7 @@ static int create_qp(struct ib_uverbs_file *file, init_uobj(&obj->uevent.uobject, cmd->user_handle, file->ucontext, &qp_lock_class); + mutex_init(&obj->mcast_lock); down_write(&obj->uevent.uobject.mutex); if (cmd_sz >= offsetof(typeof(*cmd), rwq_ind_tbl_handle) + sizeof(cmd->rwq_ind_tbl_handle) && @@ -3030,6 +3031,7 @@ ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file * obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); + mutex_lock(&obj->mcast_lock); list_for_each_entry(mcast, &obj->mcast_list, list) if (cmd.mlid == mcast->lid && !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) { @@ -3053,6 +3055,7 @@ ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file * kfree(mcast); out_put: + mutex_unlock(&obj->mcast_lock); put_qp_write(qp); return ret ? ret : in_len; @@ -3076,12 +3079,13 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file * if (!qp) return -EINVAL; + obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); + mutex_lock(&obj->mcast_lock); + ret = ib_detach_mcast(qp, (union ib_gid *) cmd.gid, cmd.mlid); if (ret) goto out_put; - obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); - list_for_each_entry(mcast, &obj->mcast_list, list) if (cmd.mlid == mcast->lid && !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) { @@ -3091,6 +3095,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file * } out_put: + mutex_unlock(&obj->mcast_lock); put_qp_write(qp); return ret ? ret : in_len; Modified: head/sys/ofed/drivers/infiniband/core/uverbs.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs.h Tue Jul 17 08:48:30 2018 (r336364) +++ head/sys/ofed/drivers/infiniband/core/uverbs.h Tue Jul 17 08:52:29 2018 (r336365) @@ -166,6 +166,8 @@ struct ib_usrq_object { struct ib_uqp_object { struct ib_uevent_object uevent; + /* lock for mcast list */ + struct mutex mcast_lock; struct list_head mcast_list; struct ib_uxrcd_object *uxrcd; }; From owner-svn-src-head@freebsd.org Tue Jul 17 08:54:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CE2010313CB; Tue, 17 Jul 2018 08:54: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.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 CF7217BA17; Tue, 17 Jul 2018 08:54: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 AB5AE12E9; Tue, 17 Jul 2018 08:54: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 w6H8seiV002305; Tue, 17 Jul 2018 08:54:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H8seSI002304; Tue, 17 Jul 2018 08:54:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170854.w6H8seSI002304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 08:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336366 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336366 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 08:54:41 -0000 Author: hselasky Date: Tue Jul 17 08:54:40 2018 New Revision: 336366 URL: https://svnweb.freebsd.org/changeset/base/336366 Log: If the MGID/MLID pair is not on the list return an error in ibcore. A list of MGID/MLID pairs is built when doing a multicast attach. When the multicast detach is called, the list is searched, and regardless of the search outcome, the driver detach is called. If an MGID/MLID pair is not on the list, driver detach should not be called, and an error should be returned. Calling the driver without removing an MGID/MLID pair from the list can leave the core and driver out of sync. Linux commit: 20c7840a77ddcb2ed2fbd66e8197db2868495751 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 08:52:29 2018 (r336365) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 08:54:40 2018 (r336366) @@ -3071,6 +3071,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file * struct ib_qp *qp; struct ib_uverbs_mcast_entry *mcast; int ret = -EINVAL; + bool found = false; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; @@ -3082,17 +3083,21 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file * obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); mutex_lock(&obj->mcast_lock); - ret = ib_detach_mcast(qp, (union ib_gid *) cmd.gid, cmd.mlid); - if (ret) - goto out_put; - list_for_each_entry(mcast, &obj->mcast_list, list) if (cmd.mlid == mcast->lid && !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) { list_del(&mcast->list); kfree(mcast); + found = true; break; } + + if (!found) { + ret = -EINVAL; + goto out_put; + } + + ret = ib_detach_mcast(qp, (union ib_gid *)cmd.gid, cmd.mlid); out_put: mutex_unlock(&obj->mcast_lock); From owner-svn-src-head@freebsd.org Tue Jul 17 08:59:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA3B8103162F; Tue, 17 Jul 2018 08:59: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.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 8B0957BCDE; Tue, 17 Jul 2018 08:59: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 6841F12EB; Tue, 17 Jul 2018 08:59: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 w6H8xZa9003367; Tue, 17 Jul 2018 08:59:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H8xZsa003366; Tue, 17 Jul 2018 08:59:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170859.w6H8xZsa003366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 08:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336367 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336367 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 08:59:36 -0000 Author: hselasky Date: Tue Jul 17 08:59:34 2018 New Revision: 336367 URL: https://svnweb.freebsd.org/changeset/base/336367 Log: Add native FreeBSD support for multicast in ibcore. This change adds support for registering multicast addresses, both IPv4 and IPv6. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 08:54:40 2018 (r336366) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 08:59:34 2018 (r336367) @@ -346,9 +346,12 @@ static int addr4_resolve(struct sockaddr_in *src_in, ifp->if_addrlen, MAX_ADDR_LEN); error = 0; } else if (IN_MULTICAST(ntohl(dst_tmp.sin_addr.s_addr))) { + bool is_gw = (rte->rt_flags & RTF_GATEWAY) != 0; error = addr_resolve_multi(edst, ifp, (struct sockaddr *)&dst_tmp); if (error != 0) goto error_put_ifp; + else if (is_gw) + addr->network = RDMA_NETWORK_IPV4; } else if (ifp->if_flags & IFF_LOOPBACK) { memset(edst, 0, MAX_ADDR_LEN); error = 0; @@ -360,7 +363,7 @@ static int addr4_resolve(struct sockaddr_in *src_in, edst, NULL, NULL); if (error != 0) goto error_put_ifp; - else if (is_gw != 0) + else if (is_gw) addr->network = RDMA_NETWORK_IPV4; } @@ -515,10 +518,13 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, * Step 3 - resolve destination MAC address */ if (IN6_IS_ADDR_MULTICAST(&dst_tmp.sin6_addr)) { + bool is_gw = (rte->rt_flags & RTF_GATEWAY) != 0; error = addr_resolve_multi(edst, ifp, (struct sockaddr *)&dst_tmp); if (error != 0) goto error_put_ifp; + else if (is_gw) + addr->network = RDMA_NETWORK_IPV6; } else if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { memset(edst, 0, MAX_ADDR_LEN); error = 0; @@ -530,7 +536,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, edst, NULL, NULL); if (error != 0) goto error_put_ifp; - else if (is_gw != 0) + else if (is_gw) addr->network = RDMA_NETWORK_IPV6; } Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 08:54:40 2018 (r336366) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 08:59:34 2018 (r336367) @@ -427,6 +427,30 @@ static inline void cma_set_ip_ver(struct cma_hdr *hdr, hdr->ip_version = (ip_ver << 4) | (hdr->ip_version & 0xF); } +static int cma_igmp_send(struct net_device *ndev, const union ib_gid *mgid, bool join) +{ + int retval; + + if (ndev) { + union { + struct sockaddr sock; + struct sockaddr_storage storage; + } addr; + + rdma_gid2ip(&addr.sock, mgid); + + CURVNET_SET_QUIET(ndev->if_vnet); + if (join) + retval = -if_addmulti(ndev, &addr.sock, NULL); + else + retval = -if_delmulti(ndev, &addr.sock); + CURVNET_RESTORE(); + } else { + retval = -ENODEV; + } + return retval; +} + static void _cma_attach_to_dev(struct rdma_id_private *id_priv, struct cma_device *cma_dev) { @@ -1621,6 +1645,9 @@ static void cma_leave_mc_groups(struct rdma_id_private ndev = dev_get_by_index(dev_addr->net, dev_addr->bound_dev_if); if (ndev) { + cma_igmp_send(ndev, + &mc->multicast.ib->rec.mgid, + false); dev_put(ndev); } } @@ -4024,7 +4051,10 @@ static int cma_iboe_join_multicast(struct rdma_id_priv if (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) { mc->multicast.ib->rec.hop_limit = IPV6_DEFAULT_HOPLIMIT; if (!send_only) { - mc->igmp_joined = true; + err = cma_igmp_send(ndev, &mc->multicast.ib->rec.mgid, + true); + if (!err) + mc->igmp_joined = true; } } } else { @@ -4129,6 +4159,9 @@ void rdma_leave_multicast(struct rdma_cm_id *id, struc ndev = dev_get_by_index(dev_addr->net, dev_addr->bound_dev_if); if (ndev) { + cma_igmp_send(ndev, + &mc->multicast.ib->rec.mgid, + false); dev_put(ndev); } mc->igmp_joined = false; From owner-svn-src-head@freebsd.org Tue Jul 17 09:02:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ECFB1031AC5; Tue, 17 Jul 2018 09:02: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.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 B00237C0E2; Tue, 17 Jul 2018 09:02:30 +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 912EA1473; Tue, 17 Jul 2018 09:02: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 w6H92U7u007953; Tue, 17 Jul 2018 09:02:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H92UE0007950; Tue, 17 Jul 2018 09:02:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170902.w6H92UE0007950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336368 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336368 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:02:31 -0000 Author: hselasky Date: Tue Jul 17 09:02:29 2018 New Revision: 336368 URL: https://svnweb.freebsd.org/changeset/base/336368 Log: Fix for RDMA loopback over VLAN in ibcore. Implement a more generic solution for detecting loopback. The problem was that the default netdevice was resolved for loopback also when VLAN was used. Use real network device instead of loopback device for bound device interface. How to test: ucmatose -b 127.0.0.1 -p 20090 ucmatose -s 5.6.5.1 -p 20090 Note that RDMA treats the IPv4 and IPv6 loopback addresses like any address. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_sa_query.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 08:59:34 2018 (r336367) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:02:29 2018 (r336368) @@ -124,7 +124,7 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, str const unsigned char *dst_dev_addr) { /* check for loopback device */ - if (dev->if_type == IFT_LOOP) { + if (dev->if_flags & IFF_LOOPBACK) { dev_addr->dev_type = ARPHRD_ETHER; memset(dev_addr->src_dev_addr, 0, MAX_ADDR_LEN); memset(dev_addr->broadcast, 0, MAX_ADDR_LEN); @@ -153,19 +153,12 @@ EXPORT_SYMBOL(rdma_copy_addr); int rdma_translate_ip(const struct sockaddr *addr, struct rdma_dev_addr *dev_addr) { - struct net_device *dev = NULL; - int ret = -EADDRNOTAVAIL; + struct net_device *dev; + int ret; if (dev_addr->bound_dev_if) { dev = dev_get_by_index(dev_addr->net, dev_addr->bound_dev_if); - if (!dev) - return -ENODEV; - ret = rdma_copy_addr(dev_addr, dev, NULL); - dev_put(dev); - return ret; - } - - switch (addr->sa_family) { + } else switch (addr->sa_family) { #ifdef INET case AF_INET: dev = ip_dev_find(dev_addr->net, @@ -179,12 +172,19 @@ int rdma_translate_ip(const struct sockaddr *addr, break; #endif default: + dev = NULL; break; } if (dev != NULL) { - ret = rdma_copy_addr(dev_addr, dev, NULL); + /* disallow connections through 127.0.0.1 itself */ + if (dev->if_flags & IFF_LOOPBACK) + ret = -EINVAL; + else + ret = rdma_copy_addr(dev_addr, dev, NULL); dev_put(dev); + } else { + ret = -ENODEV; } return ret; } @@ -305,20 +305,39 @@ static int addr4_resolve(struct sockaddr_in *src_in, /* Step 2 - find outgoing network interface */ switch (type) { case ADDR_VALID: - /* check for loopback device */ - if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { - ifp = rte->rt_ifp; - dev_hold(ifp); - } else if (addr->bound_dev_if != 0) { + /* get source interface */ + if (addr->bound_dev_if != 0) { ifp = dev_get_by_index(addr->net, addr->bound_dev_if); } else { ifp = ip_dev_find(addr->net, src_in->sin_addr.s_addr); } + /* check source interface */ if (ifp == NULL) { error = ENETUNREACH; goto error_rt_free; + } else if (ifp->if_flags & IFF_LOOPBACK) { + /* + * Source address cannot be a loopback device. + */ + error = EHOSTUNREACH; + goto error_put_ifp; + } else if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { + if (memcmp(&src_in->sin_addr, &dst_in->sin_addr, + sizeof(src_in->sin_addr))) { + /* + * Destination is loopback, but source + * and destination address is not the + * same. + */ + error = EHOSTUNREACH; + goto error_put_ifp; + } } else if (ifp != rte->rt_ifp) { + /* + * Source and destination interfaces are + * different. + */ error = ENETUNREACH; goto error_put_ifp; } @@ -481,20 +500,39 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, /* Step 2 - find outgoing network interface */ switch (type) { case ADDR_VALID: - /* check for loopback device */ - if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { - ifp = rte->rt_ifp; - dev_hold(ifp); - } else if (addr->bound_dev_if != 0) { + /* get source interface */ + 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); } + /* check source interface */ if (ifp == NULL) { error = ENETUNREACH; goto error_rt_free; + } else if (ifp->if_flags & IFF_LOOPBACK) { + /* + * Source address cannot be a loopback device. + */ + error = EHOSTUNREACH; + goto error_put_ifp; + } else if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { + if (memcmp(&src_in->sin6_addr, &dst_in->sin6_addr, + sizeof(src_in->sin6_addr))) { + /* + * Destination is loopback, but source + * and destination address is not the + * same. + */ + error = EHOSTUNREACH; + goto error_put_ifp; + } } else if (ifp != rte->rt_ifp) { + /* + * Source and destination interfaces are + * different. + */ error = ENETUNREACH; goto error_put_ifp; } @@ -586,11 +624,14 @@ 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; + ret = rdma_translate_ip(dst_in, addr); - if (!ret) + if (ret == 0) { memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN); - + } return ret; } @@ -603,8 +644,7 @@ static int addr_resolve_neigh(struct ifnet *dev, static int addr_resolve(struct sockaddr *src_in, const struct sockaddr *dst_in, - struct rdma_dev_addr *addr, - bool resolve_neigh) + struct rdma_dev_addr *addr) { struct net_device *ndev = NULL; u8 edst[MAX_ADDR_LEN]; @@ -613,27 +653,30 @@ static int addr_resolve(struct sockaddr *src_in, if (dst_in->sa_family != src_in->sa_family) return -EINVAL; - if (src_in->sa_family == AF_INET) { + switch (src_in->sa_family) { + case AF_INET: ret = addr4_resolve((struct sockaddr_in *)src_in, (const struct sockaddr_in *)dst_in, addr, edst, &ndev); - if (ret) - return ret; - - if (resolve_neigh) - ret = addr_resolve_neigh(ndev, dst_in, edst, addr); - } else { + break; + case AF_INET6: ret = addr6_resolve((struct sockaddr_in6 *)src_in, (const struct sockaddr_in6 *)dst_in, addr, edst, &ndev); - if (ret) - return ret; - - if (resolve_neigh) - ret = addr_resolve_neigh(ndev, dst_in, edst, addr); + break; + default: + ret = -EADDRNOTAVAIL; + break; } - addr->bound_dev_if = ndev->if_index; + /* check for error */ + if (ret != 0) + return ret; + + /* store MAC addresses and check for loopback */ + ret = addr_resolve_neigh(ndev, dst_in, edst, addr); + + /* set belonging VNET, if any */ addr->net = dev_net(ndev); dev_put(ndev); @@ -653,8 +696,7 @@ static void process_req(struct work_struct *work) if (req->status == -ENODATA) { src_in = (struct sockaddr *) &req->src_addr; dst_in = (struct sockaddr *) &req->dst_addr; - req->status = addr_resolve(src_in, dst_in, req->addr, - true); + req->status = addr_resolve(src_in, dst_in, req->addr); if (req->status && time_after_eq(jiffies, req->timeout)) req->status = -ETIMEDOUT; else if (req->status == -ENODATA) @@ -714,7 +756,7 @@ int rdma_resolve_ip(struct rdma_addr_client *client, req->client = client; atomic_inc(&client->refcount); - req->status = addr_resolve(src_in, dst_in, addr, true); + req->status = addr_resolve(src_in, dst_in, addr); switch (req->status) { case 0: req->timeout = jiffies; @@ -752,7 +794,7 @@ int rdma_resolve_ip_route(struct sockaddr *src_addr, src_in->sa_family = dst_addr->sa_family; } - return addr_resolve(src_in, dst_addr, addr, false); + return addr_resolve(src_in, dst_addr, addr); } EXPORT_SYMBOL(rdma_resolve_ip_route); Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 08:59:34 2018 (r336367) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:02:29 2018 (r336368) @@ -568,12 +568,12 @@ static int cma_translate_addr(struct sockaddr *addr, s static inline int cma_validate_port(struct ib_device *device, u8 port, enum ib_gid_type gid_type, - union ib_gid *gid, int dev_type, - struct vnet *net, - int bound_if_index) + union ib_gid *gid, + const struct rdma_dev_addr *dev_addr) { + const int dev_type = dev_addr->dev_type; + struct net_device *ndev; int ret = -ENODEV; - struct net_device *ndev = NULL; if ((dev_type == ARPHRD_INFINIBAND) && !rdma_protocol_ib(device, port)) return ret; @@ -582,19 +582,9 @@ static inline int cma_validate_port(struct ib_device * return ret; if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) { - ndev = dev_get_by_index(net, bound_if_index); - if (ndev && ndev->if_flags & IFF_LOOPBACK) { - pr_info("detected loopback device\n"); - dev_put(ndev); - - if (!device->get_netdev) - return -EOPNOTSUPP; - - ndev = device->get_netdev(device, port); - if (!ndev) - return -ENODEV; - } + ndev = dev_get_by_index(dev_addr->net, dev_addr->bound_dev_if); } else { + ndev = NULL; gid_type = IB_GID_TYPE_IB; } @@ -636,10 +626,7 @@ static int cma_acquire_dev(struct rdma_id_private *id_ 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->dev_type, - dev_addr->net, - dev_addr->bound_dev_if); + listen_id_priv->gid_type, gidp, dev_addr); if (!ret) { id_priv->id.port_num = port; goto out; @@ -660,9 +647,7 @@ static int cma_acquire_dev(struct rdma_id_private *id_ rdma_protocol_ib(cma_dev->device, port) ? IB_GID_TYPE_IB : cma_dev->default_gid_type[port - 1], - gidp, dev_addr->dev_type, - dev_addr->net, - dev_addr->bound_dev_if); + gidp, dev_addr); if (!ret) { id_priv->id.port_num = port; goto out; @@ -2521,21 +2506,6 @@ static int cma_resolve_iboe_route(struct rdma_id_priva if (!ndev) { ret = -ENODEV; goto err2; - } - - if (ndev->if_flags & IFF_LOOPBACK) { - dev_put(ndev); - if (!id_priv->id.device->get_netdev) { - ret = -EOPNOTSUPP; - goto err2; - } - - ndev = id_priv->id.device->get_netdev(id_priv->id.device, - id_priv->id.port_num); - if (!ndev) { - ret = -ENODEV; - goto err2; - } } route->path_rec->net = ndev->if_vnet; Modified: head/sys/ofed/drivers/infiniband/core/ib_sa_query.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_sa_query.c Tue Jul 17 08:59:34 2018 (r336367) +++ head/sys/ofed/drivers/infiniband/core/ib_sa_query.c Tue Jul 17 09:02:29 2018 (r336368) @@ -696,10 +696,9 @@ int ib_init_ah_from_path(struct ib_device *device, u8 resolved_dev = dev_get_by_index(dev_addr.net, dev_addr.bound_dev_if); - if (resolved_dev->if_flags & IFF_LOOPBACK) { - dev_put(resolved_dev); - resolved_dev = idev; - dev_hold(resolved_dev); + if (!resolved_dev) { + dev_put(idev); + return -ENODEV; } ndev = ib_get_ndev_from_path(rec); rcu_read_lock(); From owner-svn-src-head@freebsd.org Tue Jul 17 09:04:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2AA01031BCE; Tue, 17 Jul 2018 09:04: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.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 5F6F47C278; Tue, 17 Jul 2018 09:04: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 3C61A1478; Tue, 17 Jul 2018 09:04: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 w6H94bK5008080; Tue, 17 Jul 2018 09:04:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H94bYX008079; Tue, 17 Jul 2018 09:04:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170904.w6H94bYX008079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336369 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336369 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:04:37 -0000 Author: hselasky Date: Tue Jul 17 09:04:36 2018 New Revision: 336369 URL: https://svnweb.freebsd.org/changeset/base/336369 Log: For multicast functions in ibcore, verify that LIDs are multicast LIDs. The Infiniband spec defines "A multicast address is defined by a MGID and a MLID" (section 10.5). Add check to verify that the MLID value is in the correct address range. RoCE Annex (A16.9.10/11) declares that during attach (detach) QP to a multicast group, if the QP is associated with a RoCE port, the multicast group MLID is unused and is ignored. During attach or detach multicast, when the QP is associated with a port, it is enough to check the port's link layer and validate the LID only if it is Infiniband. Otherwise, avoid validating the multicast LID. Linux commit: 8561eae60ff9417a50fa1fb2b83ae950dc5c1e21 5236333592244557a19694a51337df6ac018f0a7 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:02:29 2018 (r336368) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:04:36 2018 (r336369) @@ -1467,13 +1467,52 @@ EXPORT_SYMBOL(ib_dealloc_fmr); /* Multicast groups */ +static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid) +{ + struct ib_qp_init_attr init_attr = {}; + struct ib_qp_attr attr = {}; + int num_eth_ports = 0; + int port; + + /* If QP state >= init, it is assigned to a port and we can check this + * port only. + */ + if (!ib_query_qp(qp, &attr, IB_QP_STATE | IB_QP_PORT, &init_attr)) { + if (attr.qp_state >= IB_QPS_INIT) { + if (rdma_port_get_link_layer(qp->device, attr.port_num) != + IB_LINK_LAYER_INFINIBAND) + return true; + goto lid_check; + } + } + + /* Can't get a quick answer, iterate over all ports */ + for (port = 0; port < qp->device->phys_port_cnt; port++) + if (rdma_port_get_link_layer(qp->device, port) != + IB_LINK_LAYER_INFINIBAND) + num_eth_ports++; + + /* If we have at lease one Ethernet port, RoCE annex declares that + * multicast LID should be ignored. We can't tell at this step if the + * QP belongs to an IB or Ethernet port. + */ + if (num_eth_ports) + return true; + + /* If all the ports are IB, we can check according to IB spec. */ +lid_check: + return !(lid < be16_to_cpu(IB_MULTICAST_LID_BASE) || + lid == be16_to_cpu(IB_LID_PERMISSIVE)); +} + int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid) { int ret; if (!qp->device->attach_mcast) return -ENOSYS; - if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) + if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD || + !is_valid_mcast_lid(qp, lid)) return -EINVAL; ret = qp->device->attach_mcast(qp, gid, lid); @@ -1489,7 +1528,8 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gi if (!qp->device->detach_mcast) return -ENOSYS; - if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) + if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD || + !is_valid_mcast_lid(qp, lid)) return -EINVAL; ret = qp->device->detach_mcast(qp, gid, lid); From owner-svn-src-head@freebsd.org Tue Jul 17 09:07:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CDA81031D1A; Tue, 17 Jul 2018 09:07: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.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 398CF7C42D; Tue, 17 Jul 2018 09:07: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 13C5E1479; Tue, 17 Jul 2018 09:07: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 w6H97aRA008253; Tue, 17 Jul 2018 09:07:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H97aBE008250; Tue, 17 Jul 2018 09:07:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170907.w6H97aBE008250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336370 - in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Commit-Revision: 336370 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:07:37 -0000 Author: hselasky Date: Tue Jul 17 09:07:36 2018 New Revision: 336370 URL: https://svnweb.freebsd.org/changeset/base/336370 Log: Set RoCEv2 MGID according to spec in ibcore. RoCEv2 Annex states that for RoCEv2 over IPv4, the corresponding IPv4 address is encoded into the GID according to the following rule: GID= :ffff: Remove the 0xff0e prefix for RoCEv2 packets with IPv4 and leave it zeroed and change rdma_is_multicast_addr() to consider the new logic. Linux commit: be1d325a335840a86c133a56c6a911c368bac0fd 1c3aea2bc8f0b2e5b57375ead40457ff75a3a2ec MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_verbs.c head/sys/ofed/include/rdma/ib_addr.h Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:04:36 2018 (r336369) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:07:36 2018 (r336370) @@ -3947,7 +3947,8 @@ static void iboe_mcast_work_handler(struct work_struct kfree(mw); } -static void cma_iboe_set_mgid(struct sockaddr *addr, union ib_gid *mgid) +static void cma_iboe_set_mgid(struct sockaddr *addr, union ib_gid *mgid, + enum ib_gid_type gid_type) { struct sockaddr_in *sin = (struct sockaddr_in *)addr; struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)addr; @@ -3957,8 +3958,8 @@ static void cma_iboe_set_mgid(struct sockaddr *addr, u } else if (addr->sa_family == AF_INET6) { memcpy(mgid, &sin6->sin6_addr, sizeof *mgid); } else { - mgid->raw[0] = 0xff; - mgid->raw[1] = 0x0e; + mgid->raw[0] = (gid_type == IB_GID_TYPE_IB) ? 0xff : 0; + mgid->raw[1] = (gid_type == IB_GID_TYPE_IB) ? 0x0e : 0; mgid->raw[2] = 0; mgid->raw[3] = 0; mgid->raw[4] = 0; @@ -3999,7 +4000,9 @@ static int cma_iboe_join_multicast(struct rdma_id_priv goto out1; } - cma_iboe_set_mgid(addr, &mc->multicast.ib->rec.mgid); + gid_type = id_priv->cma_dev->default_gid_type[id_priv->id.port_num - + rdma_start_port(id_priv->cma_dev->device)]; + cma_iboe_set_mgid(addr, &mc->multicast.ib->rec.mgid, gid_type); mc->multicast.ib->rec.pkey = cpu_to_be16(0xffff); if (id_priv->id.ps == RDMA_PS_UDP) @@ -4015,8 +4018,6 @@ static int cma_iboe_join_multicast(struct rdma_id_priv mc->multicast.ib->rec.hop_limit = 1; mc->multicast.ib->rec.mtu = iboe_get_mtu(ndev->if_mtu); - gid_type = id_priv->cma_dev->default_gid_type[id_priv->id.port_num - - rdma_start_port(id_priv->cma_dev->device)]; if (addr->sa_family == AF_INET) { if (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) { mc->multicast.ib->rec.hop_limit = IPV6_DEFAULT_HOPLIMIT; Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:04:36 2018 (r336369) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:07:36 2018 (r336370) @@ -1511,8 +1511,9 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gi if (!qp->device->attach_mcast) return -ENOSYS; - if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD || - !is_valid_mcast_lid(qp, lid)) + + if (!rdma_is_multicast_addr((struct in6_addr *)gid->raw) || + qp->qp_type != IB_QPT_UD || !is_valid_mcast_lid(qp, lid)) return -EINVAL; ret = qp->device->attach_mcast(qp, gid, lid); @@ -1528,8 +1529,9 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gi if (!qp->device->detach_mcast) return -ENOSYS; - if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD || - !is_valid_mcast_lid(qp, lid)) + + if (!rdma_is_multicast_addr((struct in6_addr *)gid->raw) || + qp->qp_type != IB_QPT_UD || !is_valid_mcast_lid(qp, lid)) return -EINVAL; ret = qp->device->detach_mcast(qp, gid, lid); Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:04:36 2018 (r336369) +++ head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:07:36 2018 (r336370) @@ -318,7 +318,13 @@ static inline void rdma_get_ll_mac(struct in6_addr *ad static inline int rdma_is_multicast_addr(struct in6_addr *addr) { - return addr->s6_addr[0] == 0xff; + __be32 ipv4_addr; + + if (addr->s6_addr[0] == 0xff) + return 1; + + ipv4_addr = addr->s6_addr32[3]; + return (ipv6_addr_v4mapped(addr) && ipv4_is_multicast(ipv4_addr)); } static inline void rdma_get_mcast_mac(struct in6_addr *addr, u8 *mac) From owner-svn-src-head@freebsd.org Tue Jul 17 09:09:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C3DB1031ED7; Tue, 17 Jul 2018 09:09: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.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 771BF7C69C; Tue, 17 Jul 2018 09:09: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 586D5147D; Tue, 17 Jul 2018 09:09: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 w6H99Iqn008454; Tue, 17 Jul 2018 09:09:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H99ITD008453; Tue, 17 Jul 2018 09:09:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170909.w6H99ITD008453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336371 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:09:19 -0000 Author: hselasky Date: Tue Jul 17 09:09:17 2018 New Revision: 336371 URL: https://svnweb.freebsd.org/changeset/base/336371 Log: Set default GID type as RoCE when resolving RoCE route in ibcore. cma_iboe_set_mgid() is updated to reflect the RoCEv2 GID check. Linux commit: 5c181bda77f409d89ad513528eccac5f3a416474 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:07:36 2018 (r336370) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:09:17 2018 (r336371) @@ -3958,8 +3958,10 @@ static void cma_iboe_set_mgid(struct sockaddr *addr, u } else if (addr->sa_family == AF_INET6) { memcpy(mgid, &sin6->sin6_addr, sizeof *mgid); } else { - mgid->raw[0] = (gid_type == IB_GID_TYPE_IB) ? 0xff : 0; - mgid->raw[1] = (gid_type == IB_GID_TYPE_IB) ? 0x0e : 0; + mgid->raw[0] = + (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) ? 0 : 0xff; + mgid->raw[1] = + (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) ? 0 : 0x0e; mgid->raw[2] = 0; mgid->raw[3] = 0; mgid->raw[4] = 0; From owner-svn-src-head@freebsd.org Tue Jul 17 09:11:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 162F31032075; Tue, 17 Jul 2018 09:11: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.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 B881C7CA53; Tue, 17 Jul 2018 09:11: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 9AFD614E4; Tue, 17 Jul 2018 09:11: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 w6H9BscF010824; Tue, 17 Jul 2018 09:11:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9BreP010820; Tue, 17 Jul 2018 09:11:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170911.w6H9BreP010820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336372 - in head/sys: dev/mlx4/mlx4_ib dev/mlx5/mlx5_ib ofed/drivers/infiniband/core ofed/include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: dev/mlx4/mlx4_ib dev/mlx5/mlx5_ib ofed/drivers/infiniband/core ofed/include/rdma X-SVN-Commit-Revision: 336372 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:11:55 -0000 Author: hselasky Date: Tue Jul 17 09:11:53 2018 New Revision: 336372 URL: https://svnweb.freebsd.org/changeset/base/336372 Log: Add support for prio-tagged traffic for RDMA in ibcore. When receiving a PCP change all GID entries are reloaded. This ensures the relevant GID entries use prio tagging, by setting VLAN present and VLAN ID to zero. The priority for prio tagged traffic is set using the regular rdma_set_service_type() function. Fake the real network device to have a VLAN ID of zero when prio tagging is enabled. This is logic is hidden inside the rdma_vlan_dev_vlan_id() function which must always be used to retrieve the VLAN ID throughout all of ibcore and the infiniband network drivers. The VLAN presence information then propagates through all of ibcore and so incoming connections will have the VLAN bit set. The incoming VLAN ID is then checked against the return value of rdma_vlan_dev_vlan_id(). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c head/sys/ofed/drivers/infiniband/core/ib_verbs.c head/sys/ofed/include/rdma/ib_addr.h Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c Tue Jul 17 09:09:17 2018 (r336371) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c Tue Jul 17 09:11:53 2018 (r336372) @@ -96,8 +96,7 @@ static struct ib_ah *create_iboe_ah(struct ib_pd *pd, return ERR_PTR(ret); eth_zero_addr(ah->av.eth.s_mac); if (gid_attr.ndev) { - if (is_vlan_dev(gid_attr.ndev)) - vlan_tag = vlan_dev_vlan_id(gid_attr.ndev); + vlan_tag = rdma_vlan_dev_vlan_id(gid_attr.ndev); memcpy(ah->av.eth.s_mac, IF_LLADDR(gid_attr.ndev), ETH_ALEN); dev_put(gid_attr.ndev); } Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:09:17 2018 (r336371) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:11:53 2018 (r336372) @@ -285,14 +285,16 @@ static void ib_gid_to_mlx5_roce_addr(const union ib_gi source_l3_address); void *mlx5_addr_mac = MLX5_ADDR_OF(roce_addr_layout, mlx5_addr, source_mac_47_32); + u16 vlan_id; if (!gid) return; ether_addr_copy(mlx5_addr_mac, IF_LLADDR(attr->ndev)); - if (is_vlan_dev(attr->ndev)) { + vlan_id = rdma_vlan_dev_vlan_id(attr->ndev); + if (vlan_id != 0xffff) { MLX5_SET_RA(mlx5_addr, vlan_valid, 1); - MLX5_SET_RA(mlx5_addr, vlan_id, vlan_dev_vlan_id(attr->ndev)); + MLX5_SET_RA(mlx5_addr, vlan_id, vlan_id); } switch (attr->gid_type) { Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue Jul 17 09:09:17 2018 (r336371) +++ head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue Jul 17 09:11:53 2018 (r336372) @@ -402,7 +402,20 @@ static struct notifier_block nb_inetaddr = { .notifier_call = inetaddr_event }; +static eventhandler_tag eh_ifnet_event; + static void +roce_ifnet_event(void *arg, struct ifnet *ifp, int event) +{ + if (event != IFNET_EVENT_PCP || is_vlan_dev(ifp)) + return; + + /* make sure GID table is reloaded */ + roce_gid_delete_all_event(ifp); + roce_gid_queue_scan_event(ifp); +} + +static void roce_rescan_device_handler(struct work_struct *_work) { struct roce_rescan_work *work = @@ -445,11 +458,18 @@ int __init roce_gid_mgmt_init(void) */ register_netdevice_notifier(&nb_inetaddr); + eh_ifnet_event = EVENTHANDLER_REGISTER(ifnet_event, + roce_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); + return 0; } void __exit roce_gid_mgmt_cleanup(void) { + + if (eh_ifnet_event != NULL) + EVENTHANDLER_DEREGISTER(ifnet_event, eh_ifnet_event); + unregister_inetaddr_notifier(&nb_inetaddr); unregister_netdevice_notifier(&nb_inetaddr); Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:09:17 2018 (r336371) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:11:53 2018 (r336372) @@ -402,12 +402,8 @@ static bool find_gid_index(const union ib_gid *gid, if (ctx->gid_type != gid_attr->gid_type) return false; - - if ((!!(ctx->vlan_id != 0xffff) == !is_vlan_dev(gid_attr->ndev)) || - (is_vlan_dev(gid_attr->ndev) && - vlan_dev_vlan_id(gid_attr->ndev) != ctx->vlan_id)) + if (rdma_vlan_dev_vlan_id(gid_attr->ndev) != ctx->vlan_id) return false; - return true; } @@ -484,7 +480,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po if (rdma_protocol_roce(device, port_num)) { struct ib_gid_attr dgid_attr; - const u16 vlan_id = wc->wc_flags & IB_WC_WITH_VLAN ? + const u16 vlan_id = (wc->wc_flags & IB_WC_WITH_VLAN) ? wc->vlan_id : 0xffff; if (!(wc->wc_flags & IB_WC_GRH)) Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:09:17 2018 (r336371) +++ head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:11:53 2018 (r336372) @@ -166,6 +166,8 @@ static inline u16 rdma_vlan_dev_vlan_id(const struct n { uint16_t tag; + if (dev->if_pcp != IFNET_PCP_NONE) + return 0x0000; /* prio-tagged traffic */ if (VLAN_TAG(__DECONST(struct ifnet *, dev), &tag) != 0) return 0xffff; return tag; @@ -345,8 +347,10 @@ static inline u16 rdma_get_vlan_id(union ib_gid *dgid) return vid < 0x1000 ? vid : 0xffff; } -static inline struct net_device *rdma_vlan_dev_real_dev(const struct net_device *dev) +static inline struct net_device *rdma_vlan_dev_real_dev(struct net_device *dev) { + if (dev->if_pcp != IFNET_PCP_NONE) + return dev; /* prio-tagged traffic */ return VLAN_TRUNKDEV(__DECONST(struct ifnet *, dev)); } From owner-svn-src-head@freebsd.org Tue Jul 17 09:13:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99FD31032260; Tue, 17 Jul 2018 09:13:12 +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 080937CC36; Tue, 17 Jul 2018 09:13: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 DEB82160B; Tue, 17 Jul 2018 09:13: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 w6H9DBlT013128; Tue, 17 Jul 2018 09:13:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9DBPF013127; Tue, 17 Jul 2018 09:13:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170913.w6H9DBPF013127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336373 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336373 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:13:12 -0000 Author: hselasky Date: Tue Jul 17 09:13:11 2018 New Revision: 336373 URL: https://svnweb.freebsd.org/changeset/base/336373 Log: Ensure that CM_ID exists prior to access it in ibcore. Prior to access UCMA commands, the context should be initialized and connected to CM_ID with ucma_create_id(). In case user skips this step, he can provide non-valid ctx without CM_ID and cause to multiple NULL dereferences. Also there are situations where the create_id can be raced with other user access, ensure that the context is only shared to other threads once it is fully initialized to avoid the races. Linux commit: e8980d67d6017c8eee8f9c35f782c4bd68e004c9 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:11:53 2018 (r336372) +++ head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:13:11 2018 (r336373) @@ -124,7 +124,7 @@ static inline struct ucma_context *_ucma_find_context( ctx = idr_find(&ctx_idr, id); if (!ctx) ctx = ERR_PTR(-ENOENT); - else if (ctx->file != file) + else if (ctx->file != file || !ctx->cm_id) ctx = ERR_PTR(-EINVAL); return ctx; } @@ -446,6 +446,7 @@ static ssize_t ucma_create_id(struct ucma_file *file, struct rdma_ucm_create_id cmd; struct rdma_ucm_create_id_resp resp; struct ucma_context *ctx; + struct rdma_cm_id *cm_id; enum ib_qp_type qp_type; int ret; @@ -465,11 +466,10 @@ static ssize_t ucma_create_id(struct ucma_file *file, if (!ctx) return -ENOMEM; - ctx->uid = cmd.uid; - ctx->cm_id = rdma_create_id(TD_TO_VNET(curthread), - ucma_event_handler, ctx, cmd.ps, qp_type); - if (IS_ERR(ctx->cm_id)) { - ret = PTR_ERR(ctx->cm_id); + cm_id = rdma_create_id(TD_TO_VNET(curthread), + ucma_event_handler, ctx, cmd.ps, qp_type); + if (IS_ERR(cm_id)) { + ret = PTR_ERR(cm_id); goto err1; } @@ -479,10 +479,12 @@ static ssize_t ucma_create_id(struct ucma_file *file, ret = -EFAULT; goto err2; } + + ctx->cm_id = cm_id; return 0; err2: - rdma_destroy_id(ctx->cm_id); + rdma_destroy_id(cm_id); err1: mutex_lock(&mut); idr_remove(&ctx_idr, ctx->id); From owner-svn-src-head@freebsd.org Tue Jul 17 09:14:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADDCD1032383; Tue, 17 Jul 2018 09:14:21 +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 5E9EE7CDB6; Tue, 17 Jul 2018 09:14: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 3FD81160D; Tue, 17 Jul 2018 09:14: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 w6H9ELNu013214; Tue, 17 Jul 2018 09:14:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9EL5n013213; Tue, 17 Jul 2018 09:14:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170914.w6H9EL5n013213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336374 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336374 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:14:21 -0000 Author: hselasky Date: Tue Jul 17 09:14:20 2018 New Revision: 336374 URL: https://svnweb.freebsd.org/changeset/base/336374 Log: Avoid that ib_drain_qp() triggers an out-of-bounds stack access in ibcore. Linux commit: a1ae7d0345edd593d6725d3218434d903a0af95d MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:13:11 2018 (r336373) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:14:20 2018 (r336374) @@ -1940,7 +1940,13 @@ static void __ib_drain_sq(struct ib_qp *qp) { struct ib_qp_attr attr = { .qp_state = IB_QPS_ERR }; struct ib_drain_cqe sdrain; - struct ib_send_wr swr = {}, *bad_swr; + struct ib_send_wr *bad_swr; + struct ib_rdma_wr swr = { + .wr = { + .opcode = IB_WR_RDMA_WRITE, + .wr_cqe = &sdrain.cqe, + }, + }; int ret; if (qp->send_cq->poll_ctx == IB_POLL_DIRECT) { @@ -1949,7 +1955,6 @@ static void __ib_drain_sq(struct ib_qp *qp) return; } - swr.wr_cqe = &sdrain.cqe; sdrain.cqe.done = ib_drain_qp_done; init_completion(&sdrain.done); @@ -1959,7 +1964,7 @@ static void __ib_drain_sq(struct ib_qp *qp) return; } - ret = ib_post_send(qp, &swr, &bad_swr); + ret = ib_post_send(qp, &swr.wr, &bad_swr); if (ret) { WARN_ONCE(ret, "failed to drain send queue: %d\n", ret); return; From owner-svn-src-head@freebsd.org Tue Jul 17 09:15:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5BA51032486; Tue, 17 Jul 2018 09:15: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.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 83C627CF39; Tue, 17 Jul 2018 09:15: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 66724160E; Tue, 17 Jul 2018 09:15: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 w6H9FpeF013321; Tue, 17 Jul 2018 09:15:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9FpaT013320; Tue, 17 Jul 2018 09:15:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170915.w6H9FpaT013320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336375 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336375 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:15:52 -0000 Author: hselasky Date: Tue Jul 17 09:15:50 2018 New Revision: 336375 URL: https://svnweb.freebsd.org/changeset/base/336375 Log: Fix access to non-initialized CM_ID object in ibcore. The attempt to join multicast group without ensuring that CMA device exists will lead to the following crash reported by syzkaller. Linux commit: 7688f2c3bbf55e52388e37ac5d63ca471a7712e1 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:14:20 2018 (r336374) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:15:50 2018 (r336375) @@ -4064,6 +4064,9 @@ int rdma_join_multicast(struct rdma_cm_id *id, struct struct cma_multicast *mc; int ret; + if (!id->device) + return -EINVAL; + id_priv = container_of(id, struct rdma_id_private, id); if (!cma_comp(id_priv, RDMA_CM_ADDR_BOUND) && !cma_comp(id_priv, RDMA_CM_ADDR_RESOLVED)) From owner-svn-src-head@freebsd.org Tue Jul 17 09:16:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E33F1032570; Tue, 17 Jul 2018 09:16: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.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 533127D0B4; Tue, 17 Jul 2018 09:16: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 347A4160F; Tue, 17 Jul 2018 09:16: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 w6H9GsFK013406; Tue, 17 Jul 2018 09:16:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9GsYh013405; Tue, 17 Jul 2018 09:16:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170916.w6H9GsYh013405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336376 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336376 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:16:55 -0000 Author: hselasky Date: Tue Jul 17 09:16:54 2018 New Revision: 336376 URL: https://svnweb.freebsd.org/changeset/base/336376 Log: Fix NULL pointer dereference during device removal in ibcore. As part of ib_uverbs_remove_one which might be triggered upon reset flow, we trigger IB_EVENT_DEVICE_FATAL event to userspace application. If device was removed after uverbs fd was opened but before ib_uverbs_get_context was called, the event file will be accessed before it was allocated, result in NULL pointer dereference: Linux commit: 870201f95fcbd19538aef630393fe9d583eff82e MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Tue Jul 17 09:15:50 2018 (r336375) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Tue Jul 17 09:16:54 2018 (r336376) @@ -1274,7 +1274,6 @@ static void ib_uverbs_free_hw_resources(struct ib_uver kref_get(&file->ref); mutex_unlock(&uverbs_dev->lists_mutex); - ib_uverbs_event_handler(&file->event_handler, &event); mutex_lock(&file->cleanup_mutex); ucontext = file->ucontext; @@ -1291,6 +1290,7 @@ static void ib_uverbs_free_hw_resources(struct ib_uver * for example due to freeing the resources * (e.g mmput). */ + ib_uverbs_event_handler(&file->event_handler, &event); ib_dev->disassociate_ucontext(ucontext); ib_uverbs_cleanup_ucontext(file, ucontext); } From owner-svn-src-head@freebsd.org Tue Jul 17 09:18:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EB6010326AD; Tue, 17 Jul 2018 09:18: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.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 315DF7D2EA; Tue, 17 Jul 2018 09:18: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 1219D1611; Tue, 17 Jul 2018 09:18: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 w6H9IGlf013505; Tue, 17 Jul 2018 09:18:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9IGYf013504; Tue, 17 Jul 2018 09:18:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170918.w6H9IGYf013504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336377 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:18:17 -0000 Author: hselasky Date: Tue Jul 17 09:18:16 2018 New Revision: 336377 URL: https://svnweb.freebsd.org/changeset/base/336377 Log: Fix kernel panic while using XRC_TGT QP type in ibcore. Attempt to modify XRC_TGT QP type from the user space (ibv_xsrq_pingpong invocation) will trigger the following kernel panic. It is caused by the fact that such QPs missed uobject initialization. Linux commit: f45765872e7aae7b81feb3044aaf9886b21885ef MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:16:54 2018 (r336376) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:18:16 2018 (r336377) @@ -1943,6 +1943,9 @@ static int create_qp(struct ib_uverbs_file *file, atomic_inc(&attr.srq->usecnt); if (ind_tbl) atomic_inc(&ind_tbl->usecnt); + } else { + /* It is done in _ib_create_qp for other QP types */ + qp->uobject = &obj->uevent.uobject; } qp->uobject = &obj->uevent.uobject; From owner-svn-src-head@freebsd.org Tue Jul 17 09:21:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5C0F1032890; Tue, 17 Jul 2018 09:21:06 +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 688D07D562; Tue, 17 Jul 2018 09:21:06 +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 49D011766; Tue, 17 Jul 2018 09:21:06 +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 w6H9L6G8013682; Tue, 17 Jul 2018 09:21:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9L6Yq013681; Tue, 17 Jul 2018 09:21:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170921.w6H9L6Yq013681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336378 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336378 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:21:06 -0000 Author: hselasky Date: Tue Jul 17 09:21:05 2018 New Revision: 336378 URL: https://svnweb.freebsd.org/changeset/base/336378 Log: Restore initialisation of ctx->uid in ucma_create_id() in ibcore. This fixes a regression issue after r336373. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:18:16 2018 (r336377) +++ head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:21:05 2018 (r336378) @@ -466,6 +466,7 @@ static ssize_t ucma_create_id(struct ucma_file *file, if (!ctx) return -ENOMEM; + ctx->uid = cmd.uid; cm_id = rdma_create_id(TD_TO_VNET(curthread), ucma_event_handler, ctx, cmd.ps, qp_type); if (IS_ERR(cm_id)) { From owner-svn-src-head@freebsd.org Tue Jul 17 09:22:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62CB31032B08; Tue, 17 Jul 2018 09:22: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.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 101157D8CC; Tue, 17 Jul 2018 09:22: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 E53C217CB; Tue, 17 Jul 2018 09:22: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 w6H9MQXO018727; Tue, 17 Jul 2018 09:22:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9MQHN018726; Tue, 17 Jul 2018 09:22:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170922.w6H9MQHN018726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336379 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336379 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:22:27 -0000 Author: hselasky Date: Tue Jul 17 09:22:26 2018 New Revision: 336379 URL: https://svnweb.freebsd.org/changeset/base/336379 Log: Check for a cm_id->device in all user calls that need it in ibcore. This was done by auditing all callers of ucma_get_ctx and switching the ones that unconditionally touch ->device to ucma_get_ctx_dev. This covers a little less than half of the call sites. The 11 remaining call sites to ucma_get_ctx() were manually audited. Linux commit: 4b658d1bbc16605330694bb3ef2570c465ef383d 8b77586bd8fe600d97f922c79f7222c46f37c118 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:21:05 2018 (r336378) +++ head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:22:26 2018 (r336379) @@ -151,6 +151,23 @@ static void ucma_put_ctx(struct ucma_context *ctx) complete(&ctx->comp); } +/* + * Same as ucm_get_ctx but requires that ->cm_id->device is valid, eg that the + * CM_ID is bound. + */ +static struct ucma_context *ucma_get_ctx_dev(struct ucma_file *file, int id) +{ + struct ucma_context *ctx = ucma_get_ctx(file, id); + + if (IS_ERR(ctx)) + return ctx; + if (!ctx->cm_id->device) { + ucma_put_ctx(ctx); + return ERR_PTR(-EINVAL); + } + return ctx; +} + static void ucma_close_event_id(struct work_struct *work) { struct ucma_event *uevent_close = container_of(work, struct ucma_event, close_work); @@ -712,7 +729,7 @@ static ssize_t ucma_resolve_route(struct ucma_file *fi if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - ctx = ucma_get_ctx(file, cmd.id); + ctx = ucma_get_ctx_dev(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); @@ -1020,7 +1037,7 @@ static ssize_t ucma_connect(struct ucma_file *file, co if (!cmd.conn_param.valid) return -EINVAL; - ctx = ucma_get_ctx(file, cmd.id); + ctx = ucma_get_ctx_dev(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); @@ -1062,7 +1079,7 @@ static ssize_t ucma_accept(struct ucma_file *file, con if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - ctx = ucma_get_ctx(file, cmd.id); + ctx = ucma_get_ctx_dev(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); @@ -1090,7 +1107,7 @@ static ssize_t ucma_reject(struct ucma_file *file, con if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - ctx = ucma_get_ctx(file, cmd.id); + ctx = ucma_get_ctx_dev(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); @@ -1109,7 +1126,7 @@ static ssize_t ucma_disconnect(struct ucma_file *file, if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - ctx = ucma_get_ctx(file, cmd.id); + ctx = ucma_get_ctx_dev(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); @@ -1134,7 +1151,7 @@ static ssize_t ucma_init_qp_attr(struct ucma_file *fil if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - ctx = ucma_get_ctx(file, cmd.id); + ctx = ucma_get_ctx_dev(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); @@ -1329,7 +1346,7 @@ static ssize_t ucma_process_join(struct ucma_file *fil else return -EINVAL; - ctx = ucma_get_ctx(file, cmd->id); + ctx = ucma_get_ctx_dev(file, cmd->id); if (IS_ERR(ctx)) return PTR_ERR(ctx); From owner-svn-src-head@freebsd.org Tue Jul 17 09:24:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CD6F1032CE8; Tue, 17 Jul 2018 09:24: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.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 41B587DB98; Tue, 17 Jul 2018 09:24: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 22F4417D5; Tue, 17 Jul 2018 09:24: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 w6H9OeCv018854; Tue, 17 Jul 2018 09:24:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9OdGR018851; Tue, 17 Jul 2018 09:24:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170924.w6H9OdGR018851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336380 - in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Commit-Revision: 336380 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:24:40 -0000 Author: hselasky Date: Tue Jul 17 09:24:39 2018 New Revision: 336380 URL: https://svnweb.freebsd.org/changeset/base/336380 Log: Check AF family prior resolving address and introduce safer rdma_addr_size() variants in ibcore. Garbage supplied by user will cause to UCMA module provide zero memory size for memcpy(), because it wasn't checked, it will produce unpredictable results in rdma_resolve_addr(). There are several places in the ucma ABI where userspace can pass in a sockaddr but set the address family to AF_IB. When that happens, rdma_addr_size() will return a size bigger than sizeof struct sockaddr_in6, and the ucma kernel code might end up copying past the end of a buffer not sized for a struct sockaddr_ib. Fix this by introducing new variants int rdma_addr_size_in6(struct sockaddr_in6 *addr); int rdma_addr_size_kss(struct __kernel_sockaddr_storage *addr); that are type-safe for the types used in the ucma ABI and return 0 if the size computed is bigger than the size of the type passed in. We can use these new variants to check what size userspace has passed in before copying any addresses. Linux commit: 2975d5de6428ff6d9317e9948f0968f7d42e5d74 09abfe7b5b2f442a85f4c4d59ecf582ad76088d7 84652aefb347297aa08e91e283adf7b18f77c2d5 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c head/sys/ofed/drivers/infiniband/core/ib_ucma.c head/sys/ofed/include/rdma/ib_addr.h Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:22:26 2018 (r336379) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:24:39 2018 (r336380) @@ -89,6 +89,22 @@ int rdma_addr_size(struct sockaddr *addr) } EXPORT_SYMBOL(rdma_addr_size); +int rdma_addr_size_in6(struct sockaddr_in6 *addr) +{ + int ret = rdma_addr_size((struct sockaddr *) addr); + + return ret <= sizeof(*addr) ? ret : 0; +} +EXPORT_SYMBOL(rdma_addr_size_in6); + +int rdma_addr_size_kss(struct sockaddr_storage *addr) +{ + int ret = rdma_addr_size((struct sockaddr *) addr); + + return ret <= sizeof(*addr) ? ret : 0; +} +EXPORT_SYMBOL(rdma_addr_size_kss); + static struct rdma_addr_client self; void rdma_addr_register_client(struct rdma_addr_client *client) Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:22:26 2018 (r336379) +++ head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:24:39 2018 (r336380) @@ -636,6 +636,9 @@ static ssize_t ucma_bind_ip(struct ucma_file *file, co if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; + if (!rdma_addr_size_in6(&cmd.addr)) + return -EINVAL; + ctx = ucma_get_ctx(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); @@ -649,22 +652,21 @@ static ssize_t ucma_bind(struct ucma_file *file, const int in_len, int out_len) { struct rdma_ucm_bind cmd; - struct sockaddr *addr; struct ucma_context *ctx; int ret; if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - addr = (struct sockaddr *) &cmd.addr; - if (cmd.reserved || !cmd.addr_size || (cmd.addr_size != rdma_addr_size(addr))) + if (cmd.reserved || !cmd.addr_size || + cmd.addr_size != rdma_addr_size_kss(&cmd.addr)) return -EINVAL; ctx = ucma_get_ctx(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); - ret = rdma_bind_addr(ctx->cm_id, addr); + ret = rdma_bind_addr(ctx->cm_id, (struct sockaddr *) &cmd.addr); ucma_put_ctx(ctx); return ret; } @@ -680,13 +682,16 @@ static ssize_t ucma_resolve_ip(struct ucma_file *file, if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; + if ((cmd.src_addr.sin6_family && !rdma_addr_size_in6(&cmd.src_addr)) || + !rdma_addr_size_in6(&cmd.dst_addr)) + return -EINVAL; + ctx = ucma_get_ctx(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); ret = rdma_resolve_addr(ctx->cm_id, (struct sockaddr *) &cmd.src_addr, - (struct sockaddr *) &cmd.dst_addr, - cmd.timeout_ms); + (struct sockaddr *) &cmd.dst_addr, cmd.timeout_ms); ucma_put_ctx(ctx); return ret; } @@ -696,24 +701,23 @@ static ssize_t ucma_resolve_addr(struct ucma_file *fil int in_len, int out_len) { struct rdma_ucm_resolve_addr cmd; - struct sockaddr *src, *dst; struct ucma_context *ctx; int ret; if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - src = (struct sockaddr *) &cmd.src_addr; - dst = (struct sockaddr *) &cmd.dst_addr; - if (cmd.reserved || (cmd.src_size && (cmd.src_size != rdma_addr_size(src))) || - !cmd.dst_size || (cmd.dst_size != rdma_addr_size(dst))) + if (cmd.reserved || + (cmd.src_size && (cmd.src_size != rdma_addr_size_kss(&cmd.src_addr))) || + !cmd.dst_size || (cmd.dst_size != rdma_addr_size_kss(&cmd.dst_addr))) return -EINVAL; ctx = ucma_get_ctx(file, cmd.id); if (IS_ERR(ctx)) return PTR_ERR(ctx); - ret = rdma_resolve_addr(ctx->cm_id, src, dst, cmd.timeout_ms); + ret = rdma_resolve_addr(ctx->cm_id, (struct sockaddr *) &cmd.src_addr, + (struct sockaddr *) &cmd.dst_addr, cmd.timeout_ms); ucma_put_ctx(ctx); return ret; } @@ -1403,7 +1407,7 @@ static ssize_t ucma_join_ip_multicast(struct ucma_file join_cmd.response = cmd.response; join_cmd.uid = cmd.uid; join_cmd.id = cmd.id; - join_cmd.addr_size = rdma_addr_size((struct sockaddr *) &cmd.addr); + join_cmd.addr_size = rdma_addr_size_in6(&cmd.addr); join_cmd.join_flags = RDMA_MC_JOIN_FLAG_FULLMEMBER; memcpy(&join_cmd.addr, &cmd.addr, join_cmd.addr_size); @@ -1418,6 +1422,9 @@ static ssize_t ucma_join_multicast(struct ucma_file *f if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; + + if (!rdma_addr_size_kss(&cmd.addr)) + return -EINVAL; return ucma_process_join(file, &cmd, out_len); } Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:22:26 2018 (r336379) +++ head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:24:39 2018 (r336380) @@ -134,6 +134,8 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, str const unsigned char *dst_dev_addr); int rdma_addr_size(struct sockaddr *addr); +int rdma_addr_size_in6(struct sockaddr_in6 *addr); +int rdma_addr_size_kss(struct sockaddr_storage *addr); int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid, const union ib_gid *dgid, From owner-svn-src-head@freebsd.org Tue Jul 17 09:26:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E50F81032E32; Tue, 17 Jul 2018 09:26: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.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 938317DD70; Tue, 17 Jul 2018 09:26: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 5BB6D17D6; Tue, 17 Jul 2018 09:26: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 w6H9QA2Q018964; Tue, 17 Jul 2018 09:26:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9QAA0018963; Tue, 17 Jul 2018 09:26:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170926.w6H9QAA0018963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336381 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336381 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:26:11 -0000 Author: hselasky Date: Tue Jul 17 09:26:09 2018 New Revision: 336381 URL: https://svnweb.freebsd.org/changeset/base/336381 Log: Fix kernel crash during fail to initialize device in ibcore. This patch fixes the kernel crash that occurs during ib_dealloc_device() called due to provider driver fails with an error after ib_alloc_device() and before it can register using ib_register_device(). This crashed seen in tha lab as below which can occur with any IB device which fails to perform its device initialization before invoking ib_register_device(). This patch avoids touching cache and port immutable structures if device is not yet initialized. It also releases related memory when cache and port immutable data structure initialization fails during register_device() state. Linux commit: 4be3a4fa51f432ef045546d16f25c68a1ab525b9 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_device.c Modified: head/sys/ofed/drivers/infiniband/core/ib_device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_device.c Tue Jul 17 09:24:39 2018 (r336380) +++ head/sys/ofed/drivers/infiniband/core/ib_device.c Tue Jul 17 09:26:09 2018 (r336381) @@ -174,8 +174,16 @@ static void ib_device_release(struct device *device) { struct ib_device *dev = container_of(device, struct ib_device, dev); - ib_cache_release_one(dev); - kfree(dev->port_immutable); + WARN_ON(dev->reg_state == IB_DEV_REGISTERED); + if (dev->reg_state == IB_DEV_UNREGISTERED) { + /* + * In IB_DEV_UNINITIALIZED state, cache or port table + * is not even created. Free cache and port table only when + * device reaches UNREGISTERED state. + */ + ib_cache_release_one(dev); + kfree(dev->port_immutable); + } kfree(dev); } @@ -347,23 +355,21 @@ int ib_register_device(struct ib_device *device, ret = ib_cache_setup_one(device); if (ret) { pr_warn("Couldn't set up InfiniBand P_Key/GID cache\n"); - goto out; + goto port_cleanup; } memset(&device->attrs, 0, sizeof(device->attrs)); ret = device->query_device(device, &device->attrs, &uhw); if (ret) { pr_warn("Couldn't query the device attributes\n"); - ib_cache_cleanup_one(device); - goto out; + goto cache_cleanup; } ret = ib_device_register_sysfs(device, port_callback); if (ret) { pr_warn("Couldn't register device %s with driver model\n", device->name); - ib_cache_cleanup_one(device); - goto out; + goto cache_cleanup; } device->reg_state = IB_DEV_REGISTERED; @@ -375,6 +381,14 @@ int ib_register_device(struct ib_device *device, down_write(&lists_rwsem); list_add_tail(&device->core_list, &device_list); up_write(&lists_rwsem); + mutex_unlock(&device_mutex); + return 0; + +cache_cleanup: + ib_cache_cleanup_one(device); + ib_cache_release_one(device); +port_cleanup: + kfree(device->port_immutable); out: mutex_unlock(&device_mutex); return ret; From owner-svn-src-head@freebsd.org Tue Jul 17 09:27:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A68CC1032FC0; Tue, 17 Jul 2018 09:27: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.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 561E97DF82; Tue, 17 Jul 2018 09:27: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 38B8317D7; Tue, 17 Jul 2018 09:27: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 w6H9RW3U019059; Tue, 17 Jul 2018 09:27:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9RWt5019058; Tue, 17 Jul 2018 09:27:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170927.w6H9RWt5019058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336382 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336382 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:27:32 -0000 Author: hselasky Date: Tue Jul 17 09:27:31 2018 New Revision: 336382 URL: https://svnweb.freebsd.org/changeset/base/336382 Log: Depend on IPv6 stack to resolve link local address for RoCEv2 in ibcore. RoCEv1 does not use the IPv6 stack to resolve the link local DGID since it uses GID address. It forms the DMAC directly from the DGID. Linux commit: 56d0a7d9a0f045ee27a001762deac28c7d28e2e4 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:26:09 2018 (r336381) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:27:31 2018 (r336382) @@ -1160,7 +1160,10 @@ EXPORT_SYMBOL(ib_modify_qp_is_ok); int ib_resolve_eth_dmac(struct ib_device *device, struct ib_ah_attr *ah_attr) { - int ret = 0; + struct ib_gid_attr sgid_attr; + union ib_gid sgid; + int hop_limit; + int ret; if (ah_attr->port_num < rdma_start_port(device) || ah_attr->port_num > rdma_end_port(device)) @@ -1169,35 +1172,22 @@ int ib_resolve_eth_dmac(struct ib_device *device, if (!rdma_cap_eth_ah(device, ah_attr->port_num)) return 0; - if (rdma_link_local_addr((struct in6_addr *)ah_attr->grh.dgid.raw)) { - rdma_get_ll_mac((struct in6_addr *)ah_attr->grh.dgid.raw, - ah_attr->dmac); - } else { - union ib_gid sgid; - struct ib_gid_attr sgid_attr; - int hop_limit; + ret = ib_query_gid(device, + ah_attr->port_num, + ah_attr->grh.sgid_index, + &sgid, &sgid_attr); + if (ret != 0) + return (ret); + if (!sgid_attr.ndev) + return -ENXIO; - ret = ib_query_gid(device, - ah_attr->port_num, - ah_attr->grh.sgid_index, - &sgid, &sgid_attr); + ret = rdma_addr_find_l2_eth_by_grh(&sgid, + &ah_attr->grh.dgid, + ah_attr->dmac, + sgid_attr.ndev, &hop_limit); + dev_put(sgid_attr.ndev); - if (ret || !sgid_attr.ndev) { - if (!ret) - ret = -ENXIO; - goto out; - } - - ret = rdma_addr_find_l2_eth_by_grh(&sgid, - &ah_attr->grh.dgid, - ah_attr->dmac, - sgid_attr.ndev, &hop_limit); - - dev_put(sgid_attr.ndev); - - ah_attr->grh.hop_limit = hop_limit; - } -out: + ah_attr->grh.hop_limit = hop_limit; return ret; } EXPORT_SYMBOL(ib_resolve_eth_dmac); From owner-svn-src-head@freebsd.org Tue Jul 17 09:29:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 811B1103314F; Tue, 17 Jul 2018 09:29: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 319D87E1BE; Tue, 17 Jul 2018 09:29: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 0F3F217D8; Tue, 17 Jul 2018 09:29: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 w6H9TEcq019185; Tue, 17 Jul 2018 09:29:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9TEUa019180; Tue, 17 Jul 2018 09:29:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170929.w6H9TEUa019180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336383 - in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Commit-Revision: 336383 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:29:15 -0000 Author: hselasky Date: Tue Jul 17 09:29:14 2018 New Revision: 336383 URL: https://svnweb.freebsd.org/changeset/base/336383 Log: Check port number supplied by user verbs cmds in ibcore. The ib_uverbs_create_ah() ind ib_uverbs_modify_qp() calls receive the port number from user input as part of its attributes and assumes it is valid. Down on the stack, that parameter is used to access kernel data structures. If the value is invalid, the kernel accesses memory it should not. To prevent this, verify the port number before using it. Linux commit: 5ecce4c9b17bed4dc9cb58bfb10447307569b77b a62ab66b13a0f9bcb17b7b761f6670941ed5cd62 5a7a88f1b488e4ee49eb3d5b82612d4d9ffdf2c3 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c head/sys/ofed/include/rdma/ib_verbs.h Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:27:31 2018 (r336382) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:29:14 2018 (r336383) @@ -983,6 +983,8 @@ int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib } else ret = iw_cm_init_qp_attr(id_priv->cm_id.iw, qp_attr, qp_attr_mask); + qp_attr->port_num = id_priv->id.port_num; + *qp_attr_mask |= IB_QP_PORT; } else ret = -ENOSYS; Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:27:31 2018 (r336382) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:29:14 2018 (r336383) @@ -2366,6 +2366,25 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *fil goto out; } + if ((cmd.attr_mask & IB_QP_PORT) && + !rdma_is_port_valid(qp->device, cmd.port_num)) { + ret = -EINVAL; + goto release_qp; + } + + if ((cmd.attr_mask & IB_QP_AV) && + !rdma_is_port_valid(qp->device, cmd.dest.port_num)) { + ret = -EINVAL; + goto release_qp; + } + + if ((cmd.attr_mask & IB_QP_ALT_PATH) && + (!rdma_is_port_valid(qp->device, cmd.alt_port_num) || + !rdma_is_port_valid(qp->device, cmd.alt_dest.port_num))) { + ret = -EINVAL; + goto release_qp; + } + attr->qp_state = cmd.qp_state; attr->cur_qp_state = cmd.cur_qp_state; attr->path_mtu = cmd.path_mtu; @@ -2895,6 +2914,9 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *fil if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; + + if (!rdma_is_port_valid(ib_dev, cmd.attr.port_num)) + return -EINVAL; INIT_UDATA(&udata, buf + sizeof(cmd), (unsigned long)cmd.response + sizeof(resp), Modified: head/sys/ofed/include/rdma/ib_verbs.h ============================================================================== --- head/sys/ofed/include/rdma/ib_verbs.h Tue Jul 17 09:27:31 2018 (r336382) +++ head/sys/ofed/include/rdma/ib_verbs.h Tue Jul 17 09:29:14 2018 (r336383) @@ -2260,6 +2260,13 @@ static inline u8 rdma_end_port(const struct ib_device return rdma_cap_ib_switch(device) ? 0 : device->phys_port_cnt; } +static inline int rdma_is_port_valid(const struct ib_device *device, + unsigned int port) +{ + return (port >= rdma_start_port(device) && + port <= rdma_end_port(device)); +} + static inline bool rdma_protocol_ib(const struct ib_device *device, u8 port_num) { return device->port_immutable[port_num].core_cap_flags & RDMA_CORE_CAP_PROT_IB; From owner-svn-src-head@freebsd.org Tue Jul 17 09:30:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1B3F1033308; Tue, 17 Jul 2018 09:30: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.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 5FC8F7E38E; Tue, 17 Jul 2018 09:30: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 411EF17DD; Tue, 17 Jul 2018 09:30: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 w6H9UXOO019309; Tue, 17 Jul 2018 09:30:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9UXGa019308; Tue, 17 Jul 2018 09:30:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170930.w6H9UXGa019308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336384 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336384 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:30:33 -0000 Author: hselasky Date: Tue Jul 17 09:30:32 2018 New Revision: 336384 URL: https://svnweb.freebsd.org/changeset/base/336384 Log: Fix for loopback detection in address resolve logic in ibcore. When a loopback address is detected use the network interface which has the loopback flag set to trigger loopback logic in address resolve. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:29:14 2018 (r336383) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:30:32 2018 (r336384) @@ -349,6 +349,10 @@ static int addr4_resolve(struct sockaddr_in *src_in, error = EHOSTUNREACH; goto error_put_ifp; } + /* get destination network interface from route */ + dev_put(ifp); + ifp = rte->rt_ifp; + dev_hold(ifp); } else if (ifp != rte->rt_ifp) { /* * Source and destination interfaces are @@ -544,6 +548,10 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, error = EHOSTUNREACH; goto error_put_ifp; } + /* get destination network interface from route */ + dev_put(ifp); + ifp = rte->rt_ifp; + dev_hold(ifp); } else if (ifp != rte->rt_ifp) { /* * Source and destination interfaces are From owner-svn-src-head@freebsd.org Tue Jul 17 09:32:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D40C41033492; Tue, 17 Jul 2018 09:32:09 +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 85DDF7E691; Tue, 17 Jul 2018 09:32: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 6844A194A; Tue, 17 Jul 2018 09:32: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 w6H9W9DQ023249; Tue, 17 Jul 2018 09:32:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9W9TD023248; Tue, 17 Jul 2018 09:32:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170932.w6H9W9TD023248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336385 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336385 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:32:10 -0000 Author: hselasky Date: Tue Jul 17 09:32:09 2018 New Revision: 336385 URL: https://svnweb.freebsd.org/changeset/base/336385 Log: Set IPv4 TOS and IPv6 traffic class field for RoCEv2 traffic in ibcore. The current implementation assumes a static mapping between the TOS bits and the priority code point, PCP bits. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:30:32 2018 (r336384) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:32:09 2018 (r336385) @@ -2451,15 +2451,9 @@ static int cma_resolve_iw_route(struct rdma_id_private static int iboe_tos_to_sl(struct net_device *ndev, int tos) { - /* get service level, SL, from type of service, TOS */ - int sl = tos; + /* get service level, SL, from IPv4 type of service, TOS */ + int sl = (tos >> 5) & 0x7; - /* range check input argument and map 1:1 */ - if (sl > 255) - sl = 255; - else if (sl < 0) - sl = 0; - /* final mappings are done by the vendor specific drivers */ return sl; } @@ -2543,6 +2537,7 @@ static int cma_resolve_iboe_route(struct rdma_id_priva route->path_rec->pkey = cpu_to_be16(0xffff); route->path_rec->mtu_selector = IB_SA_EQ; route->path_rec->sl = iboe_tos_to_sl(ndev, id_priv->tos); + route->path_rec->traffic_class = id_priv->tos; route->path_rec->mtu = iboe_get_mtu(ndev->if_mtu); route->path_rec->rate_selector = IB_SA_EQ; route->path_rec->rate = iboe_get_rate(ndev); From owner-svn-src-head@freebsd.org Tue Jul 17 09:33:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7DA710336CD; Tue, 17 Jul 2018 09:33:21 +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 837767E960; Tue, 17 Jul 2018 09:33: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 64E281967; Tue, 17 Jul 2018 09:33: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 w6H9XLrQ024143; Tue, 17 Jul 2018 09:33:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9XLHL024142; Tue, 17 Jul 2018 09:33:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170933.w6H9XLHL024142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336386 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336386 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:33:22 -0000 Author: hselasky Date: Tue Jul 17 09:33:20 2018 New Revision: 336386 URL: https://svnweb.freebsd.org/changeset/base/336386 Log: Honor port_num while resolving GID for IB link layer in ibcore. ah_attr contains the port number to which cm_id is bound. However, while searching for GID table for matching GID entry, the port number is ignored. This could cause the wrong GID to be used when the ah_attr is converted to an AH. Linux commit: 563c4ba3bd2b8b0b21c65669ec2226b1cfa1138b MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_multicast.c Modified: head/sys/ofed/drivers/infiniband/core/ib_multicast.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_multicast.c Tue Jul 17 09:32:09 2018 (r336385) +++ head/sys/ofed/drivers/infiniband/core/ib_multicast.c Tue Jul 17 09:33:20 2018 (r336386) @@ -727,21 +727,19 @@ int ib_init_ah_from_mcmember(struct ib_device *device, { int ret; u16 gid_index; - u8 p; - if (rdma_protocol_roce(device, port_num)) { - ret = ib_find_cached_gid_by_port(device, &rec->port_gid, - gid_type, port_num, - ndev, - &gid_index); - } else if (rdma_protocol_ib(device, port_num)) { - ret = ib_find_cached_gid(device, &rec->port_gid, - IB_GID_TYPE_IB, NULL, &p, - &gid_index); - } else { - ret = -EINVAL; - } + /* GID table is not based on the netdevice for IB link layer, + * so ignore ndev during search. + */ + if (rdma_protocol_ib(device, port_num)) + ndev = NULL; + else if (!rdma_protocol_roce(device, port_num)) + return -EINVAL; + ret = ib_find_cached_gid_by_port(device, &rec->port_gid, + gid_type, port_num, + ndev, + &gid_index); if (ret) return ret; From owner-svn-src-head@freebsd.org Tue Jul 17 09:34:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2572010337CF; Tue, 17 Jul 2018 09:34: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.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 CC3CC7F024; Tue, 17 Jul 2018 09:34: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 AD9241969; Tue, 17 Jul 2018 09:34: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 w6H9YTWf024236; Tue, 17 Jul 2018 09:34:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9YT6s024234; Tue, 17 Jul 2018 09:34:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170934.w6H9YT6s024234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336387 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336387 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:34:30 -0000 Author: hselasky Date: Tue Jul 17 09:34:29 2018 New Revision: 336387 URL: https://svnweb.freebsd.org/changeset/base/336387 Log: Honor return status of ib_init_ah_from_mcmember() in ibcore. The return status of ib_init_ah_from_mcmember() is ignored by cma_ib_mc_handler(). Honor it and return error event if ah attribute initialization failed. Linux commit: 6d337179f28cc50ddd7e224f677b4cda70b275fc MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:33:20 2018 (r336386) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:34:29 2018 (r336387) @@ -3764,10 +3764,14 @@ static int cma_ib_mc_handler(int status, struct ib_sa_ rdma_start_port(id_priv->cma_dev->device)]; event.event = RDMA_CM_EVENT_MULTICAST_JOIN; - ib_init_ah_from_mcmember(id_priv->id.device, - id_priv->id.port_num, &multicast->rec, - ndev, gid_type, - &event.param.ud.ah_attr); + ret = ib_init_ah_from_mcmember(id_priv->id.device, + id_priv->id.port_num, + &multicast->rec, + ndev, gid_type, + &event.param.ud.ah_attr); + if (ret) + event.event = RDMA_CM_EVENT_MULTICAST_ERROR; + event.param.ud.qp_num = 0xFFFFFF; event.param.ud.qkey = be32_to_cpu(multicast->rec.qkey); if (ndev) From owner-svn-src-head@freebsd.org Tue Jul 17 09:36:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B88F01033985; Tue, 17 Jul 2018 09:36:05 +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 69A477F26F; Tue, 17 Jul 2018 09:36:05 +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 4AA3C196A; Tue, 17 Jul 2018 09:36:05 +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 w6H9a5bK024364; Tue, 17 Jul 2018 09:36:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9a5p9024363; Tue, 17 Jul 2018 09:36:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170936.w6H9a5p9024363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336388 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336388 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:36:05 -0000 Author: hselasky Date: Tue Jul 17 09:36:04 2018 New Revision: 336388 URL: https://svnweb.freebsd.org/changeset/base/336388 Log: Add support for RoCEv2 multicast in ibcore. When creating address handle from multicast GID, set MAC according to the appropriate formula instead of searching for it in the GID table: - For IPv4 multicast GID use ip_eth_mc_map(). - For IPv6 multicast GID use ipv6_eth_mc_map(). Linux commit: 9636a56fa864464896bf7d1272c701f2b9a57737 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:34:29 2018 (r336387) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:36:04 2018 (r336388) @@ -1172,6 +1172,19 @@ int ib_resolve_eth_dmac(struct ib_device *device, if (!rdma_cap_eth_ah(device, ah_attr->port_num)) return 0; + if (rdma_is_multicast_addr((struct in6_addr *)ah_attr->grh.dgid.raw)) { + if (ipv6_addr_v4mapped((struct in6_addr *)ah_attr->grh.dgid.raw)) { + __be32 addr = 0; + + memcpy(&addr, ah_attr->grh.dgid.raw + 12, 4); + ip_eth_mc_map(addr, (char *)ah_attr->dmac); + } else { + ipv6_eth_mc_map((struct in6_addr *)ah_attr->grh.dgid.raw, + (char *)ah_attr->dmac); + } + return 0; + } + ret = ib_query_gid(device, ah_attr->port_num, ah_attr->grh.sgid_index, From owner-svn-src-head@freebsd.org Tue Jul 17 09:37:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C6A61033A9A; Tue, 17 Jul 2018 09:37: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.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 DD9B47F41A; Tue, 17 Jul 2018 09:37: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 BEFDD196B; Tue, 17 Jul 2018 09:37: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 w6H9bGiq024455; Tue, 17 Jul 2018 09:37:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9bG3T024454; Tue, 17 Jul 2018 09:37:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170937.w6H9bG3T024454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336389 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 336389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:37:17 -0000 Author: hselasky Date: Tue Jul 17 09:37:16 2018 New Revision: 336389 URL: https://svnweb.freebsd.org/changeset/base/336389 Log: Add support for IPv6 multicast in ibcore. This change allows us to join IPv6 multicast networks. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:36:04 2018 (r336388) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:37:16 2018 (r336389) @@ -4021,7 +4021,7 @@ static int cma_iboe_join_multicast(struct rdma_id_priv mc->multicast.ib->rec.hop_limit = 1; mc->multicast.ib->rec.mtu = iboe_get_mtu(ndev->if_mtu); - if (addr->sa_family == AF_INET) { + if (addr->sa_family == AF_INET || addr->sa_family == AF_INET6) { if (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) { mc->multicast.ib->rec.hop_limit = IPV6_DEFAULT_HOPLIMIT; if (!send_only) { From owner-svn-src-head@freebsd.org Tue Jul 17 09:44:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96D941033F8A; Tue, 17 Jul 2018 09:44: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.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 3C5967FB3F; Tue, 17 Jul 2018 09:44: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 1E22C1AFA; Tue, 17 Jul 2018 09:44: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 w6H9iGDw029455; Tue, 17 Jul 2018 09:44:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9iGJN029454; Tue, 17 Jul 2018 09:44:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170944.w6H9iGJN029454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336390 - head/sys/ofed/include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/include/rdma X-SVN-Commit-Revision: 336390 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:44:17 -0000 Author: hselasky Date: Tue Jul 17 09:44:16 2018 New Revision: 336390 URL: https://svnweb.freebsd.org/changeset/base/336390 Log: Remove blank line. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/rdma/ib_addr.h Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:37:16 2018 (r336389) +++ head/sys/ofed/include/rdma/ib_addr.h Tue Jul 17 09:44:16 2018 (r336390) @@ -52,7 +52,6 @@ #include #include - struct rdma_addr_client { atomic_t refcount; struct completion comp; From owner-svn-src-head@freebsd.org Tue Jul 17 09:47:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912D310340DB; Tue, 17 Jul 2018 09:47: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.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 3AC1B7FCD6; Tue, 17 Jul 2018 09:47: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 0E4E81AFB; Tue, 17 Jul 2018 09:47: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 w6H9lM5o029662; Tue, 17 Jul 2018 09:47:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9lETg029616; Tue, 17 Jul 2018 09:47:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170947.w6H9lETg029616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336391 - in head/sys/ofed/drivers/infiniband: core ulp/ipoib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/ofed/drivers/infiniband: core ulp/ipoib X-SVN-Commit-Revision: 336391 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:47:23 -0000 Author: hselasky Date: Tue Jul 17 09:47:14 2018 New Revision: 336391 URL: https://svnweb.freebsd.org/changeset/base/336391 Log: Use __FBSDID() for RCS tags in ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c head/sys/ofed/drivers/infiniband/core/ib_agent.c head/sys/ofed/drivers/infiniband/core/ib_cache.c head/sys/ofed/drivers/infiniband/core/ib_cm.c head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_cq.c head/sys/ofed/drivers/infiniband/core/ib_device.c head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c head/sys/ofed/drivers/infiniband/core/ib_iwcm.c head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c head/sys/ofed/drivers/infiniband/core/ib_mad.c head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c head/sys/ofed/drivers/infiniband/core/ib_multicast.c head/sys/ofed/drivers/infiniband/core/ib_packer.c head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c head/sys/ofed/drivers/infiniband/core/ib_sa_query.c head/sys/ofed/drivers/infiniband/core/ib_smi.c head/sys/ofed/drivers/infiniband/core/ib_sysfs.c head/sys/ofed/drivers/infiniband/core/ib_ucm.c head/sys/ofed/drivers/infiniband/core/ib_ucma.c head/sys/ofed/drivers/infiniband/core/ib_ud_header.c head/sys/ofed/drivers/infiniband/core/ib_umem.c head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c head/sys/ofed/drivers/infiniband/core/ib_user_mad.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c head/sys/ofed/drivers/infiniband/core/ib_verbs.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:47:14 2018 (r336391) @@ -33,9 +33,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_agent.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_agent.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_agent.c Tue Jul 17 09:47:14 2018 (r336391) @@ -35,9 +35,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_cache.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cache.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_cache.c Tue Jul 17 09:47:14 2018 (r336391) @@ -33,9 +33,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cm.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_cm.c Tue Jul 17 09:47:14 2018 (r336391) @@ -33,9 +33,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Tue Jul 17 09:47:14 2018 (r336391) @@ -33,9 +33,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_cq.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cq.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_cq.c Tue Jul 17 09:47:14 2018 (r336391) @@ -30,9 +30,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_device.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_device.c Tue Jul 17 09:47:14 2018 (r336391) @@ -31,9 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c Tue Jul 17 09:47:14 2018 (r336391) @@ -31,9 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_iwcm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_iwcm.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_iwcm.c Tue Jul 17 09:47:14 2018 (r336391) @@ -35,9 +35,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c Tue Jul 17 09:47:14 2018 (r336391) @@ -31,9 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include "iwpm_util.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c Tue Jul 17 09:47:14 2018 (r336391) @@ -31,9 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include "iwpm_util.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_mad.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_mad.c Tue Jul 17 09:47:14 2018 (r336391) @@ -34,9 +34,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #define LINUXKPI_PARAM_PREFIX ibcore_ #define KBUILD_MODNAME "ibcore" Modified: head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,9 +32,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include Modified: head/sys/ofed/drivers/infiniband/core/ib_multicast.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_multicast.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_multicast.c Tue Jul 17 09:47:14 2018 (r336391) @@ -30,9 +30,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_packer.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_packer.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_packer.c Tue Jul 17 09:47:14 2018 (r336391) @@ -31,9 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue Jul 17 09:47:14 2018 (r336391) @@ -30,9 +30,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include "core_priv.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_sa_query.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_sa_query.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_sa_query.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,9 +32,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_smi.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_smi.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_smi.c Tue Jul 17 09:47:14 2018 (r336391) @@ -36,9 +36,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include "smi.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_sysfs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_sysfs.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_sysfs.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,9 +32,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include "core_priv.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_ucm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucm.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_ucm.c Tue Jul 17 09:47:14 2018 (r336391) @@ -31,9 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_ucma.c Tue Jul 17 09:47:14 2018 (r336391) @@ -30,9 +30,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_ud_header.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ud_header.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_ud_header.c Tue Jul 17 09:47:14 2018 (r336391) @@ -31,9 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_umem.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_umem.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_umem.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,9 +32,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c Tue Jul 17 09:47:14 2018 (r336391) @@ -30,9 +30,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c Tue Jul 17 09:47:14 2018 (r336391) @@ -30,9 +30,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_user_mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Tue Jul 17 09:47:14 2018 (r336391) @@ -33,9 +33,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #define pr_fmt(fmt) "user_mad: " fmt Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Tue Jul 17 09:47:14 2018 (r336391) @@ -33,9 +33,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Tue Jul 17 09:47:14 2018 (r336391) @@ -34,9 +34,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c Tue Jul 17 09:47:14 2018 (r336391) @@ -30,9 +30,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Tue Jul 17 09:47:14 2018 (r336391) @@ -36,9 +36,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Tue Jul 17 09:47:14 2018 (r336391) @@ -32,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef _IPOIB_H Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,6 +32,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include "ipoib.h" #ifdef CONFIG_INFINIBAND_IPOIB_CM Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,6 +32,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,6 +32,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Tue Jul 17 09:47:14 2018 (r336391) @@ -35,6 +35,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include "ipoib.h" #include Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue Jul 17 09:47:14 2018 (r336391) @@ -34,6 +34,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include "ipoib.h" static int ipoib_resolvemulti(struct ifnet *, struct sockaddr **, @@ -320,8 +323,8 @@ ipoib_ioctl(struct ifnet *ifp, u_long command, caddr_t break; case SIOCGIFADDR: - bcopy(IF_LLADDR(ifp), &ifr->ifr_addr.sa_data[0], - INFINIBAND_ALEN); + bcopy(IF_LLADDR(ifp), &ifr->ifr_addr.sa_data[0], + INFINIBAND_ALEN); break; case SIOCSIFMTU: Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Tue Jul 17 09:47:14 2018 (r336391) @@ -34,6 +34,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include "ipoib.h" #include Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c Tue Jul 17 09:47:14 2018 (r336391) @@ -33,6 +33,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include "ipoib.h" int ipoib_mcast_attach(struct ipoib_dev_priv *priv, u16 mlid, union ib_gid *mgid, int set_qkey) Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c Tue Jul 17 09:44:16 2018 (r336390) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c Tue Jul 17 09:47:14 2018 (r336391) @@ -32,6 +32,9 @@ * SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include From owner-svn-src-head@freebsd.org Tue Jul 17 09:56:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AE7F10347EA; Tue, 17 Jul 2018 09:56: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.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 4B10A80344; Tue, 17 Jul 2018 09:56: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 27C371C9E; Tue, 17 Jul 2018 09:56: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 w6H9uhJu034499; Tue, 17 Jul 2018 09:56:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9ueXV034487; Tue, 17 Jul 2018 09:56:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170956.w6H9ueXV034487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:56:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336392 - in head/sys/dev/mlx5: . mlx5_core mlx5_en mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en mlx5_ib X-SVN-Commit-Revision: 336392 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:56:44 -0000 Author: hselasky Date: Tue Jul 17 09:56:40 2018 New Revision: 336392 URL: https://svnweb.freebsd.org/changeset/base/336392 Log: Implement support for Differentiated Service Code Point, DSCP, in mlx5en(4). The DSCP feature is controlled using a set of sysctl(8) fields under the qos sysctl directory entry for mlx5en(4). For Routable RoCE QPs, the DSCP should be set in the QP's address path. The DSCP's value is derived from the traffic class. Linux commit: ed88451e1f2d400fd6a743d0a481631cf9f97550 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/device.h head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_fw.c head/sys/dev/mlx5/mlx5_core/mlx5_port.c head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c head/sys/dev/mlx5/mlx5_ifc.h head/sys/dev/mlx5/port.h Modified: head/sys/dev/mlx5/device.h ============================================================================== --- head/sys/dev/mlx5/device.h Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/device.h Tue Jul 17 09:56:40 2018 (r336392) @@ -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 @@ -47,11 +47,15 @@ #define __mlx5_nullp(typ) ((struct mlx5_ifc_##typ##_bits *)0) #define __mlx5_bit_sz(typ, fld) sizeof(__mlx5_nullp(typ)->fld) #define __mlx5_bit_off(typ, fld) __offsetof(struct mlx5_ifc_##typ##_bits, fld) +#define __mlx5_16_off(typ, fld) (__mlx5_bit_off(typ, fld) / 16) #define __mlx5_dw_off(typ, fld) (__mlx5_bit_off(typ, fld) / 32) #define __mlx5_64_off(typ, fld) (__mlx5_bit_off(typ, fld) / 64) +#define __mlx5_16_bit_off(typ, fld) (16 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0xf)) #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f)) #define __mlx5_mask(typ, fld) ((u32)((1ull << __mlx5_bit_sz(typ, fld)) - 1)) #define __mlx5_dw_mask(typ, fld) (__mlx5_mask(typ, fld) << __mlx5_dw_bit_off(typ, fld)) +#define __mlx5_mask16(typ, fld) ((u16)((1ull << __mlx5_bit_sz(typ, fld)) - 1)) +#define __mlx5_16_mask(typ, fld) (__mlx5_mask16(typ, fld) << __mlx5_16_bit_off(typ, fld)) #define __mlx5_st_sz_bits(typ) sizeof(struct mlx5_ifc_##typ##_bits) #define MLX5_FLD_SZ_BYTES(typ, fld) (__mlx5_bit_sz(typ, fld) / 8) @@ -109,6 +113,19 @@ __mlx5_mask(typ, fld)) #define MLX5_GET64(typ, p, fld) be64_to_cpu(*((__be64 *)(p) + __mlx5_64_off(typ, fld))) +#define MLX5_GET16(typ, p, fld) ((be16_to_cpu(*((__be16 *)(p) +\ +__mlx5_16_off(typ, fld))) >> __mlx5_16_bit_off(typ, fld)) & \ +__mlx5_mask16(typ, fld)) + +#define MLX5_SET16(typ, p, fld, v) do { \ + u16 _v = v; \ + BUILD_BUG_ON(__mlx5_st_sz_bits(typ) % 16); \ + *((__be16 *)(p) + __mlx5_16_off(typ, fld)) = \ + cpu_to_be16((be16_to_cpu(*((__be16 *)(p) + __mlx5_16_off(typ, fld))) & \ + (~__mlx5_16_mask(typ, fld))) | (((_v) & __mlx5_mask16(typ, fld)) \ + << __mlx5_16_bit_off(typ, fld))); \ +} while (0) + #define MLX5_GET64_BE(typ, p, fld) (*((__be64 *)(p) +\ __mlx5_64_off(typ, fld))) @@ -897,6 +914,14 @@ enum mlx5_cap_type { MLX5_CAP_NUM }; +enum mlx5_qcam_reg_groups { + MLX5_QCAM_REGS_FIRST_128 = 0x0, +}; + +enum mlx5_qcam_feature_groups { + MLX5_QCAM_FEATURE_ENHANCED_FEATURES = 0x0, +}; + /* GET Dev Caps macros */ #define MLX5_CAP_GEN(mdev, cap) \ MLX5_GET(cmd_hca_cap, mdev->hca_caps_cur[MLX5_CAP_GENERAL], cap) @@ -1001,6 +1026,12 @@ enum mlx5_cap_type { #define MLX5_CAP_QOS_MAX(mdev, cap) \ MLX5_GET(qos_cap,\ mdev->hca_caps_max[MLX5_CAP_QOS], cap) + +#define MLX5_CAP_QCAM_REG(mdev, fld) \ + MLX5_GET(qcam_reg, (mdev)->caps.qcam, qos_access_reg_cap_mask.reg_cap.fld) + +#define MLX5_CAP_QCAM_FEATURE(mdev, fld) \ + MLX5_GET(qcam_reg, (mdev)->caps.qcam, qos_feature_cap_mask.feature_cap.fld) enum { MLX5_CMD_STAT_OK = 0x0, Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/driver.h Tue Jul 17 09:56:40 2018 (r336392) @@ -121,10 +121,13 @@ enum { }; enum { + MLX5_REG_QPTS = 0x4002, MLX5_REG_QETCR = 0x4005, MLX5_REG_QPDP = 0x4007, MLX5_REG_QTCT = 0x400A, + MLX5_REG_QPDPM = 0x4013, MLX5_REG_QHLL = 0x4016, + MLX5_REG_QCAM = 0x4019, MLX5_REG_DCBX_PARAM = 0x4020, MLX5_REG_DCBX_APP = 0x4021, MLX5_REG_PCAP = 0x5001, @@ -652,6 +655,9 @@ struct mlx5_core_dev { struct mlx5_port_caps port_caps[MLX5_MAX_PORTS]; u32 hca_caps_cur[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; u32 hca_caps_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)]; + struct { + u32 qcam[MLX5_ST_SZ_DW(qcam_reg)]; + } caps; phys_addr_t iseg_base; struct mlx5_init_seg __iomem *iseg; enum mlx5_device_state state; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Tue Jul 17 09:56:40 2018 (r336392) @@ -80,6 +80,8 @@ struct mlx5_core_dev; int mlx5_query_hca_caps(struct mlx5_core_dev *dev); int mlx5_query_board_id(struct mlx5_core_dev *dev); +int mlx5_query_qcam_reg(struct mlx5_core_dev *mdev, u32 *qcam, + u8 feature_group, u8 access_reg_group); int mlx5_cmd_init_hca(struct mlx5_core_dev *dev); int mlx5_cmd_teardown_hca(struct mlx5_core_dev *dev); int mlx5_cmd_force_teardown_hca(struct mlx5_core_dev *dev); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fw.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_fw.c Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fw.c Tue Jul 17 09:56:40 2018 (r336392) @@ -110,6 +110,13 @@ static int mlx5_core_query_special_contexts(struct mlx return err; } +static int mlx5_get_qcam_reg(struct mlx5_core_dev *dev) +{ + return mlx5_query_qcam_reg(dev, dev->caps.qcam, + MLX5_QCAM_FEATURE_ENHANCED_FEATURES, + MLX5_QCAM_REGS_FIRST_128); +} + int mlx5_query_hca_caps(struct mlx5_core_dev *dev) { int err; @@ -185,6 +192,12 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev) if (MLX5_CAP_GEN(dev, qos)) { err = mlx5_core_get_caps(dev, MLX5_CAP_QOS); + if (err) + return err; + } + + if (MLX5_CAP_GEN(dev, qcam_reg)) { + err = mlx5_get_qcam_reg(dev); if (err) return err; } Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_port.c Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_core/mlx5_port.c Tue Jul 17 09:56:40 2018 (r336392) @@ -66,6 +66,19 @@ out: } EXPORT_SYMBOL_GPL(mlx5_core_access_reg); +int mlx5_query_qcam_reg(struct mlx5_core_dev *mdev, u32 *qcam, + u8 feature_group, u8 access_reg_group) +{ + u32 in[MLX5_ST_SZ_DW(qcam_reg)] = {}; + int sz = MLX5_ST_SZ_BYTES(qcam_reg); + + MLX5_SET(qcam_reg, in, feature_group, feature_group); + MLX5_SET(qcam_reg, in, access_reg_group, access_reg_group); + + return mlx5_core_access_reg(mdev, in, sz, qcam, sz, MLX5_REG_QCAM, 0, 0); +} +EXPORT_SYMBOL_GPL(mlx5_query_qcam_reg); + struct mlx5_reg_pcap { u8 rsvd0; u8 port_num; @@ -966,4 +979,102 @@ int mlx5_query_diagnostic_counters(struct mlx5_core_de MLX5_SET(query_diagnostic_counters_in, in, sample_index, sample_index); return mlx5_cmd_exec(mdev, in, sizeof(in), out, out_size); +} + +int mlx5_set_trust_state(struct mlx5_core_dev *mdev, u8 trust_state) +{ + u32 out[MLX5_ST_SZ_DW(qpts_reg)] = {}; + u32 in[MLX5_ST_SZ_DW(qpts_reg)] = {}; + int err; + + MLX5_SET(qpts_reg, in, local_port, 1); + MLX5_SET(qpts_reg, in, trust_state, trust_state); + + err = mlx5_core_access_reg(mdev, in, sizeof(in), out, + sizeof(out), MLX5_REG_QPTS, 0, 1); + return err; +} + +int mlx5_query_trust_state(struct mlx5_core_dev *mdev, u8 *trust_state) +{ + u32 out[MLX5_ST_SZ_DW(qpts_reg)] = {}; + u32 in[MLX5_ST_SZ_DW(qpts_reg)] = {}; + int err; + + MLX5_SET(qpts_reg, in, local_port, 1); + + err = mlx5_core_access_reg(mdev, in, sizeof(in), out, + sizeof(out), MLX5_REG_QPTS, 0, 0); + if (!err) + *trust_state = MLX5_GET(qpts_reg, out, trust_state); + + return err; +} + +int mlx5_set_dscp2prio(struct mlx5_core_dev *mdev, const u8 *dscp2prio) +{ + int sz = MLX5_ST_SZ_BYTES(qpdpm_reg); + void *qpdpm_dscp; + void *out; + void *in; + int err; + int i; + + in = kzalloc(sz, GFP_KERNEL); + out = kzalloc(sz, GFP_KERNEL); + if (!in || !out) { + err = -ENOMEM; + goto out; + } + + MLX5_SET(qpdpm_reg, in, local_port, 1); + err = mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_QPDPM, 0, 0); + if (err) + goto out; + + memcpy(in, out, sz); + MLX5_SET(qpdpm_reg, in, local_port, 1); + + /* Update the corresponding dscp entry */ + for (i = 0; i < MLX5_MAX_SUPPORTED_DSCP; i++) { + qpdpm_dscp = MLX5_ADDR_OF(qpdpm_reg, in, dscp[i]); + MLX5_SET16(qpdpm_dscp_reg, qpdpm_dscp, prio, dscp2prio[i]); + MLX5_SET16(qpdpm_dscp_reg, qpdpm_dscp, e, 1); + } + err = mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_QPDPM, 0, 1); +out: + kfree(in); + kfree(out); + return err; +} + +int mlx5_query_dscp2prio(struct mlx5_core_dev *mdev, u8 *dscp2prio) +{ + int sz = MLX5_ST_SZ_BYTES(qpdpm_reg); + void *qpdpm_dscp; + void *out; + void *in; + int err; + int i; + + in = kzalloc(sz, GFP_KERNEL); + out = kzalloc(sz, GFP_KERNEL); + if (!in || !out) { + err = -ENOMEM; + goto out; + } + + MLX5_SET(qpdpm_reg, in, local_port, 1); + err = mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_QPDPM, 0, 0); + if (err) + goto out; + + for (i = 0; i < MLX5_MAX_SUPPORTED_DSCP; i++) { + qpdpm_dscp = MLX5_ADDR_OF(qpdpm_reg, out, dscp[i]); + dscp2prio[i] = MLX5_GET16(qpdpm_dscp_reg, qpdpm_dscp, prio); + } +out: + kfree(in); + kfree(out); + return err; } Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_en/en.h Tue Jul 17 09:56:40 2018 (r336392) @@ -477,6 +477,8 @@ struct mlx5e_params_ethtool { MLX5E_PARAMS(MLX5E_STATS_VAR) u64 max_bw_value[IEEE_8021QAZ_MAX_TCS]; u8 prio_tc[IEEE_8021QAZ_MAX_TCS]; + u8 dscp2prio[MLX5_MAX_SUPPORTED_DSCP]; + u8 trust_state; }; /* EEPROM Standards for plug in modules */ Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Jul 17 09:56:40 2018 (r336392) @@ -121,6 +121,30 @@ done: } static int +mlx5e_get_dscp(struct mlx5e_priv *priv) +{ + struct mlx5_core_dev *mdev = priv->mdev; + int err; + + if (MLX5_CAP_GEN(mdev, qcam_reg) == 0 || + MLX5_CAP_QCAM_REG(mdev, qpts) == 0 || + MLX5_CAP_QCAM_REG(mdev, qpdpm) == 0) + return (EOPNOTSUPP); + + PRIV_LOCK(priv); + err = -mlx5_query_dscp2prio(mdev, priv->params_ethtool.dscp2prio); + if (err) + goto done; + + err = -mlx5_query_trust_state(mdev, &priv->params_ethtool.trust_state); + if (err) + goto done; +done: + PRIV_UNLOCK(priv); + return (err); +} + +static int mlx5e_tc_maxrate_handler(SYSCTL_HANDLER_ARGS) { struct mlx5e_priv *priv = arg1; @@ -229,6 +253,84 @@ done: return (err); } +static int +mlx5e_trust_state_handler(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + struct mlx5_core_dev *mdev = priv->mdev; + int err; + u8 result; + + PRIV_LOCK(priv); + result = priv->params_ethtool.trust_state; + err = sysctl_handle_8(oidp, &result, 0, req); + if (err || !req->newptr || + result == priv->params_ethtool.trust_state) + goto done; + + switch (result) { + case MLX5_QPTS_TRUST_PCP: + case MLX5_QPTS_TRUST_DSCP: + break; + case MLX5_QPTS_TRUST_BOTH: + if (!MLX5_CAP_QCAM_FEATURE(mdev, qpts_trust_both)) { + err = EOPNOTSUPP; + goto done; + } + break; + default: + err = ERANGE; + goto done; + } + + err = -mlx5_set_trust_state(mdev, result); + if (err) + goto done; + + priv->params_ethtool.trust_state = result; +done: + PRIV_UNLOCK(priv); + return (err); +} + +static int +mlx5e_dscp_prio_handler(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + int prio_index = arg2; + struct mlx5_core_dev *mdev = priv->mdev; + uint8_t dscp2prio[MLX5_MAX_SUPPORTED_DSCP]; + uint8_t x; + int err; + + PRIV_LOCK(priv); + err = SYSCTL_OUT(req, priv->params_ethtool.dscp2prio + prio_index, + sizeof(priv->params_ethtool.dscp2prio) / 8); + if (err || !req->newptr) + goto done; + + memcpy(dscp2prio, priv->params_ethtool.dscp2prio, sizeof(dscp2prio)); + err = SYSCTL_IN(req, dscp2prio + prio_index, sizeof(dscp2prio) / 8); + if (err) + goto done; + for (x = 0; x != MLX5_MAX_SUPPORTED_DSCP; x++) { + if (dscp2prio[x] > 7) { + err = ERANGE; + goto done; + } + } + err = -mlx5_set_dscp2prio(mdev, dscp2prio); + if (err) + goto done; + + /* update local array */ + memcpy(priv->params_ethtool.dscp2prio, dscp2prio, + sizeof(priv->params_ethtool.dscp2prio)); +done: + PRIV_UNLOCK(priv); + return (err); +} + #define MLX5_PARAM_OFFSET(n) \ __offsetof(struct mlx5e_priv, params_ethtool.n) @@ -1009,5 +1111,21 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) OID_AUTO, name, CTLTYPE_U8 | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, i, mlx5e_prio_to_tc_handler, "CU", "Set priority to traffic class"); + } + + /* DSCP support */ + if (mlx5e_get_dscp(priv) == 0) { + for (i = 0; i != MLX5_MAX_SUPPORTED_DSCP; i += 8) { + char name[32]; + snprintf(name, sizeof(name), "dscp_%d_%d_prio", i, i + 7); + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), + OID_AUTO, name, CTLTYPE_U8 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + priv, i, mlx5e_dscp_prio_handler, "CU", + "Set DSCP to priority mapping, 0..7"); + } + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), + OID_AUTO, "trust_state", CTLTYPE_U8 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + priv, 0, mlx5e_trust_state_handler, "CU", + "Set trust state, 1:PCP 2:DSCP 3:BOTH"); } } Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Tue Jul 17 09:56:40 2018 (r336392) @@ -939,6 +939,8 @@ int mlx5_ib_set_vf_guid(struct ib_device *device, int __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num, int index); +int mlx5_get_roce_gid_type(struct mlx5_ib_dev *dev, u8 port_num, + int index, enum ib_gid_type *gid_type); /* GSI QP helper functions */ struct ib_qp *mlx5_ib_gsi_create_qp(struct ib_pd *pd, Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:56:40 2018 (r336392) @@ -380,6 +380,27 @@ __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev return cpu_to_be16(MLX5_CAP_ROCE(dev->mdev, r_roce_min_src_udp_port)); } +int mlx5_get_roce_gid_type(struct mlx5_ib_dev *dev, u8 port_num, + int index, enum ib_gid_type *gid_type) +{ + struct ib_gid_attr attr; + union ib_gid gid; + int ret; + + ret = ib_get_cached_gid(&dev->ib_dev, port_num, index, &gid, &attr); + if (ret) + return ret; + + if (!attr.ndev) + return -ENODEV; + + dev_put(attr.ndev); + + *gid_type = attr.gid_type; + + return 0; +} + static int mlx5_use_mad_ifc(struct mlx5_ib_dev *dev) { if (MLX5_CAP_GEN(dev->mdev, port_type) == MLX5_CAP_PORT_TYPE_IB) Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c Tue Jul 17 09:56:40 2018 (r336392) @@ -2195,6 +2195,7 @@ static int mlx5_set_path(struct mlx5_ib_dev *dev, stru { enum rdma_link_layer ll = rdma_port_get_link_layer(&dev->ib_dev, port); int err; + enum ib_gid_type gid_type; if (attr_mask & IB_QP_PKEY_INDEX) path->pkey_index = cpu_to_be16(alt ? attr->alt_pkey_index : @@ -2213,10 +2214,16 @@ static int mlx5_set_path(struct mlx5_ib_dev *dev, stru if (ll == IB_LINK_LAYER_ETHERNET) { if (!(ah->ah_flags & IB_AH_GRH)) return -EINVAL; + err = mlx5_get_roce_gid_type(dev, port, ah->grh.sgid_index, + &gid_type); + if (err) + return err; memcpy(path->rmac, ah->dmac, sizeof(ah->dmac)); path->udp_sport = mlx5_get_roce_udp_sport(dev, port, ah->grh.sgid_index); path->dci_cfi_prio_sl = (ah->sl & 0x7) << 4; + if (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) + path->ecn_dscp = (ah->grh.traffic_class >> 2) & 0x3f; } else { path->fl_free_ar = (path_flags & MLX5_PATH_FLAG_FL) ? 0x80 : 0; path->fl_free_ar |= Modified: head/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ifc.h Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/mlx5_ifc.h Tue Jul 17 09:56:40 2018 (r336392) @@ -962,7 +962,8 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 cc_modify_allowed[0x1]; u8 start_pad[0x1]; u8 cache_line_128byte[0x1]; - u8 reserved_15[0xb]; + u8 reserved_at_165[0xa]; + u8 qcam_reg[0x1]; u8 gid_table_size[0x10]; u8 out_of_seq_cnt[0x1]; @@ -8383,6 +8384,43 @@ struct mlx5_ifc_peir_reg_bits { u8 error_type[0x8]; }; +struct mlx5_ifc_qcam_access_reg_cap_mask { + u8 qcam_access_reg_cap_mask_127_to_20[0x6C]; + u8 qpdpm[0x1]; + u8 qcam_access_reg_cap_mask_18_to_4[0x0F]; + u8 qdpm[0x1]; + u8 qpts[0x1]; + u8 qcap[0x1]; + u8 qcam_access_reg_cap_mask_0[0x1]; +}; + +struct mlx5_ifc_qcam_qos_feature_cap_mask { + u8 qcam_qos_feature_cap_mask_127_to_1[0x7F]; + u8 qpts_trust_both[0x1]; +}; + +struct mlx5_ifc_qcam_reg_bits { + u8 reserved_at_0[0x8]; + u8 feature_group[0x8]; + u8 reserved_at_10[0x8]; + u8 access_reg_group[0x8]; + u8 reserved_at_20[0x20]; + + union { + struct mlx5_ifc_qcam_access_reg_cap_mask reg_cap; + u8 reserved_at_0[0x80]; + } qos_access_reg_cap_mask; + + u8 reserved_at_c0[0x80]; + + union { + struct mlx5_ifc_qcam_qos_feature_cap_mask feature_cap; + u8 reserved_at_0[0x80]; + } qos_feature_cap_mask; + + u8 reserved_at_1c0[0x80]; +}; + struct mlx5_ifc_pcap_reg_bits { u8 reserved_0[0x8]; u8 local_port[0x8]; @@ -9695,5 +9733,24 @@ union mlx5_ifc_uplink_pci_interface_document_bits { u8 reserved_0[0x20120]; }; +struct mlx5_ifc_qpdpm_dscp_reg_bits { + u8 e[0x1]; + u8 reserved_at_01[0x0b]; + u8 prio[0x04]; +}; + +struct mlx5_ifc_qpdpm_reg_bits { + u8 reserved_at_0[0x8]; + u8 local_port[0x8]; + u8 reserved_at_10[0x10]; + struct mlx5_ifc_qpdpm_dscp_reg_bits dscp[64]; +}; + +struct mlx5_ifc_qpts_reg_bits { + u8 reserved_at_0[0x8]; + u8 local_port[0x8]; + u8 reserved_at_10[0x2d]; + u8 trust_state[0x3]; +}; #endif /* MLX5_IFC_H */ Modified: head/sys/dev/mlx5/port.h ============================================================================== --- head/sys/dev/mlx5/port.h Tue Jul 17 09:47:14 2018 (r336391) +++ head/sys/dev/mlx5/port.h Tue Jul 17 09:56:40 2018 (r336392) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2016-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 @@ -102,6 +102,12 @@ enum mlx5e_connector_type { MLX5E_CONNECTOR_TYPE_NUMBER, }; +enum mlx5_qpts_trust_state { + MLX5_QPTS_TRUST_PCP = 1, + MLX5_QPTS_TRUST_DSCP = 2, + MLX5_QPTS_TRUST_BOTH = 3, +}; + #define MLX5E_PROT_MASK(link_mode) (1 << (link_mode)) #define PORT_MODULE_EVENT_MODULE_STATUS_MASK 0xF @@ -155,4 +161,11 @@ 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_trust_state(struct mlx5_core_dev *mdev, u8 trust_state); +int mlx5_query_trust_state(struct mlx5_core_dev *mdev, u8 *trust_state); + +#define MLX5_MAX_SUPPORTED_DSCP 64 +int mlx5_set_dscp2prio(struct mlx5_core_dev *mdev, const u8 *dscp2prio); +int mlx5_query_dscp2prio(struct mlx5_core_dev *mdev, u8 *dscp2prio); + #endif /* __MLX5_PORT_H__ */ From owner-svn-src-head@freebsd.org Tue Jul 17 09:58:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBCB6103497C; Tue, 17 Jul 2018 09:58: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.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 98C9A80528; Tue, 17 Jul 2018 09:58: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 79D9E1C9F; Tue, 17 Jul 2018 09:58: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 w6H9wBIq034601; Tue, 17 Jul 2018 09:58:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9wBR7034600; Tue, 17 Jul 2018 09:58:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170958.w6H9wBR7034600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336393 - head/sys/dev/mlx5/mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 336393 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:58:12 -0000 Author: hselasky Date: Tue Jul 17 09:58:11 2018 New Revision: 336393 URL: https://svnweb.freebsd.org/changeset/base/336393 Log: Use static device naming instead of dynamic one in mlx5ib. When resetting mlx5core instances it can happen that the order of attach and detach for mlx5ib instances is changed. Take the unit number for mlx5_%d from the parent PCI device, similarly to what is done in mlx5en(4), so that there is a direct relationship between mce and mlx5_. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:56:40 2018 (r336392) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:58:11 2018 (r336393) @@ -2957,7 +2957,6 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) struct mlx5_ib_dev *dev; enum rdma_link_layer ll; int port_type_cap; - const char *name; int err; int i; @@ -2990,9 +2989,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) MLX5_INIT_DOORBELL_LOCK(&dev->uar_lock); - name = "mlx5_%d"; - - strlcpy(dev->ib_dev.name, name, IB_DEVICE_NAME_MAX); + snprintf(dev->ib_dev.name, IB_DEVICE_NAME_MAX, "mlx5_%d", device_get_unit(mdev->pdev->dev.bsddev)); dev->ib_dev.owner = THIS_MODULE; dev->ib_dev.node_type = RDMA_NODE_IB_CA; dev->ib_dev.local_dma_lkey = 0 /* not supported for now */; From owner-svn-src-head@freebsd.org Tue Jul 17 09:59:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B43F1034BFD; Tue, 17 Jul 2018 09:59: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.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 F1A04807D3; Tue, 17 Jul 2018 09:59: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 D40F61CA1; Tue, 17 Jul 2018 09:59: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 w6H9xt6T034714; Tue, 17 Jul 2018 09:59:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6H9xtWE034713; Tue, 17 Jul 2018 09:59:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807170959.w6H9xtWE034713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 09:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336394 - head/sys/dev/mlx5/mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 336394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 09:59:56 -0000 Author: hselasky Date: Tue Jul 17 09:59:55 2018 New Revision: 336394 URL: https://svnweb.freebsd.org/changeset/base/336394 Log: Don't pass unsupported events to ibcore from mlx5ib. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:58:11 2018 (r336393) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:59:55 2018 (r336394) @@ -2381,14 +2381,15 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, v break; default: - break; + /* unsupported event */ + return; } ibev.device = &ibdev->ib_dev; ibev.element.port_num = port; if (port < 1 || port > ibdev->num_ports) { - mlx5_ib_warn(ibdev, "warning: event on port %d\n", port); + mlx5_ib_warn(ibdev, "warning: event(%d) on port %d\n", event, port); return; } From owner-svn-src-head@freebsd.org Tue Jul 17 10:07:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6199F10353D1; Tue, 17 Jul 2018 10: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.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 0E81080DF2; Tue, 17 Jul 2018 10:07: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 E3D9D1E35; Tue, 17 Jul 2018 10: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 w6HA7ev7040041; Tue, 17 Jul 2018 10:07:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HA7e0P040039; Tue, 17 Jul 2018 10:07:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171007.w6HA7e0P040039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 10:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336395 - head/sys/dev/mlx5/mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 336395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 10:07:41 -0000 Author: hselasky Date: Tue Jul 17 10:07:40 2018 New Revision: 336395 URL: https://svnweb.freebsd.org/changeset/base/336395 Log: Update version information for the mlx5ib module. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 09:59:55 2018 (r336394) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Jul 17 10:07:40 2018 (r336395) @@ -51,8 +51,10 @@ #include "mlx5_ib.h" #define DRIVER_NAME "mlx5_ib" -#define DRIVER_VERSION "3.4.1-BETA" -#define DRIVER_RELDATE "October 2017" +#ifndef DRIVER_VERSION +#define DRIVER_VERSION "3.4.2" +#endif +#define DRIVER_RELDATE "July 2018" MODULE_DESCRIPTION("Mellanox Connect-IB HCA IB driver"); MODULE_LICENSE("Dual BSD/GPL"); @@ -65,8 +67,8 @@ static int deprecated_prof_sel = 2; module_param_named(prof_sel, deprecated_prof_sel, int, 0444); MODULE_PARM_DESC(prof_sel, "profile selector. Deprecated here. Moved to module mlx5_core"); -static char mlx5_version[] = - DRIVER_NAME ": Mellanox Connect-IB Infiniband driver v" +static const char mlx5_version[] = + DRIVER_NAME ": Mellanox Connect-IB Infiniband driver " DRIVER_VERSION " (" DRIVER_RELDATE ")\n"; enum { From owner-svn-src-head@freebsd.org Tue Jul 17 10:11:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4661F103551F; Tue, 17 Jul 2018 10:11: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.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 ED2FD81104; Tue, 17 Jul 2018 10:11: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 CE60F1E5C; Tue, 17 Jul 2018 10:11: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 w6HAB0k6044225; Tue, 17 Jul 2018 10:11:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HAB0gv044224; Tue, 17 Jul 2018 10:11:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171011.w6HAB0gv044224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 10:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336396 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 336396 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 10:11:01 -0000 Author: hselasky Date: Tue Jul 17 10:11:00 2018 New Revision: 336396 URL: https://svnweb.freebsd.org/changeset/base/336396 Log: Remove redundant newline character in mlx5core. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fw.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fw.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_fw.c Tue Jul 17 10:07:40 2018 (r336395) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fw.c Tue Jul 17 10:11:00 2018 (r336396) @@ -159,8 +159,7 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev) return err; } - if ( - MLX5_CAP_GEN(dev, eswitch_flow_table)) { + if (MLX5_CAP_GEN(dev, eswitch_flow_table)) { err = mlx5_core_get_caps(dev, MLX5_CAP_ESWITCH_FLOW_TABLE); if (err) return err; From owner-svn-src-head@freebsd.org Tue Jul 17 10:16:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3751C1035B13; Tue, 17 Jul 2018 10:16: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 DD38A814C9; Tue, 17 Jul 2018 10: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 BB0881FC4; Tue, 17 Jul 2018 10: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 w6HAGX6t045177; Tue, 17 Jul 2018 10:16:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HAGWCB045171; Tue, 17 Jul 2018 10:16:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171016.w6HAGWCB045171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 10:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336397 - in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core modules/mlx5 X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core modules/mlx5 X-SVN-Commit-Revision: 336397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 10:16:34 -0000 Author: hselasky Date: Tue Jul 17 10:16:32 2018 New Revision: 336397 URL: https://svnweb.freebsd.org/changeset/base/336397 Log: Refactor access to CR-space into using VSC APIs in mlx5core. Remove no longer used files and APIs. MFC after: 1 week Sponsored by: Mellanox Technologies Deleted: head/sys/dev/mlx5/mlx5_core/mlx5_crspace.c Modified: head/sys/conf/files head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_health.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/dev/mlx5/mlx5_core/mlx5_vsc.c head/sys/modules/mlx5/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jul 17 10:11:00 2018 (r336396) +++ head/sys/conf/files Tue Jul 17 10:16:32 2018 (r336397) @@ -4745,8 +4745,6 @@ dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ compile-with "${OFED_C}" -dev/mlx5/mlx5_core/mlx5_crspace.c optional mlx5 pci \ - compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_diagnostics.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Tue Jul 17 10:11:00 2018 (r336396) +++ head/sys/dev/mlx5/driver.h Tue Jul 17 10:16:32 2018 (r336397) @@ -682,7 +682,6 @@ struct mlx5_core_dev { struct mlx5_flow_root_namespace *sniffer_tx_root_ns; u32 num_q_counter_allocated[MLX5_INTERFACE_NUMBER]; struct mlx5_dump_data *dump_data; - u32 vsec_addr; }; enum { @@ -1055,8 +1054,11 @@ int mlx5_vsc_find_cap(struct mlx5_core_dev *mdev); int mlx5_vsc_lock(struct mlx5_core_dev *mdev); void mlx5_vsc_unlock(struct mlx5_core_dev *mdev); int mlx5_vsc_set_space(struct mlx5_core_dev *mdev, u16 space); -int mlx5_vsc_write(struct mlx5_core_dev *mdev, u32 addr, u32 *data); +int mlx5_vsc_write(struct mlx5_core_dev *mdev, u32 addr, const u32 *data); int mlx5_vsc_read(struct mlx5_core_dev *mdev, u32 addr, u32 *data); +int mlx5_vsc_lock_addr_space(struct mlx5_core_dev *mdev, u32 addr); +int mlx5_vsc_unlock_addr_space(struct mlx5_core_dev *mdev, u32 addr); + static inline u32 mlx5_mkey_to_idx(u32 mkey) { return mkey >> 8; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Tue Jul 17 10:11:00 2018 (r336396) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Tue Jul 17 10:16:32 2018 (r336397) @@ -70,12 +70,6 @@ enum mlx5_semaphore_space_address { MLX5_SEMAPHORE_SW_RESET = 0x20, }; -enum { - UNLOCK = 0, - LOCK = 1, - CAP_ID = 0x9, -}; - struct mlx5_core_dev; int mlx5_query_hca_caps(struct mlx5_core_dev *dev); @@ -109,8 +103,4 @@ struct mlx5_crspace_regmap { extern struct pci_driver mlx5_core_driver; -void mlx5_vsec_init(struct mlx5_core_dev *dev); -int mlx5_pciconf_cap9_sem(struct mlx5_core_dev *dev, int state); -int mlx5_pciconf_set_sem_addr_space(struct mlx5_core_dev *dev, - u32 sem_space_address, int state); #endif /* __MLX5_CORE_H__ */ Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Jul 17 10:11:00 2018 (r336396) +++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Jul 17 10:16:32 2018 (r336397) @@ -59,19 +59,19 @@ enum { MLX5_SENSOR_FW_SYND_RFR = 5, }; -static int lock_sem_sw_reset(struct mlx5_core_dev *dev, int state) +static int lock_sem_sw_reset(struct mlx5_core_dev *dev) { - int ret, err; + int ret; /* Lock GW access */ - ret = mlx5_pciconf_cap9_sem(dev, LOCK); + ret = -mlx5_vsc_lock(dev); if (ret) { - mlx5_core_warn(dev, "Timed out locking gateway %d, %d\n", state, ret); + mlx5_core_warn(dev, "Timed out locking gateway %d\n", ret); return ret; } - ret = mlx5_pciconf_set_sem_addr_space(dev, MLX5_SEMAPHORE_SW_RESET, state); - if (ret && state == LOCK) { + ret = -mlx5_vsc_lock_addr_space(dev, MLX5_SEMAPHORE_SW_RESET); + if (ret) { if (ret == -EBUSY) mlx5_core_dbg(dev, "SW reset FW semaphore already locked, another function will handle the reset\n"); else @@ -79,13 +79,30 @@ static int lock_sem_sw_reset(struct mlx5_core_dev *dev } /* Unlock GW access */ - err = mlx5_pciconf_cap9_sem(dev, UNLOCK); - if (err) - mlx5_core_warn(dev, "Timed out unlocking gateway: state %d, err %d\n", state, err); + mlx5_vsc_unlock(dev); return ret; } +static int unlock_sem_sw_reset(struct mlx5_core_dev *dev) +{ + int ret; + + /* Lock GW access */ + ret = -mlx5_vsc_lock(dev); + if (ret) { + mlx5_core_warn(dev, "Timed out locking gateway %d\n", ret); + return ret; + } + + ret = -mlx5_vsc_unlock_addr_space(dev, MLX5_SEMAPHORE_SW_RESET); + + /* Unlock GW access */ + mlx5_vsc_unlock(dev); + + return ret; +} + static u8 get_nic_mode(struct mlx5_core_dev *dev) { return (ioread32be(&dev->iseg->cmdq_addr_l_sz) >> 8) & 7; @@ -223,7 +240,7 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, if (fatal_error == MLX5_SENSOR_FW_SYND_RFR) { /* Get cr-dump and reset FW semaphore */ if (mlx5_core_is_pf(dev)) - lock = lock_sem_sw_reset(dev, LOCK); + lock = lock_sem_sw_reset(dev); /* Execute cr-dump and SW reset */ if (lock != -EBUSY) { @@ -249,7 +266,7 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, /* Release FW semaphore if you are the lock owner */ if (!lock) - lock_sem_sw_reset(dev, UNLOCK); + unlock_sem_sw_reset(dev); mlx5_core_err(dev, "system error event triggered\n"); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Tue Jul 17 10:11:00 2018 (r336396) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Tue Jul 17 10:16:32 2018 (r336397) @@ -873,7 +873,9 @@ static int mlx5_init_once(struct mlx5_core_dev *dev, s struct pci_dev *pdev = dev->pdev; int err; - mlx5_vsec_init(dev); + err = mlx5_vsc_find_cap(dev); + if (err) + dev_err(&pdev->dev, "Unable to find vendor specific capabilities\n"); err = mlx5_query_hca_caps(dev); if (err) { Modified: head/sys/dev/mlx5/mlx5_core/mlx5_vsc.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_vsc.c Tue Jul 17 10:11:00 2018 (r336396) +++ head/sys/dev/mlx5/mlx5_core/mlx5_vsc.c Tue Jul 17 10:16:32 2018 (r336397) @@ -29,6 +29,8 @@ #include #include +#define MLX5_SEMAPHORE_SPACE_DOMAIN 0xA + struct mlx5_ifc_vsc_space_bits { u8 status[0x3]; u8 reserved0[0xd]; @@ -139,7 +141,7 @@ int mlx5_vsc_set_space(struct mlx5_core_dev *mdev, u16 return 0; } -int mlx5_vsc_write(struct mlx5_core_dev *mdev, u32 addr, u32 *data) +int mlx5_vsc_write(struct mlx5_core_dev *mdev, u32 addr, const u32 *data) { device_t dev = mdev->pdev->dev.bsddev; int vsc_addr = mdev->vsc_addr; @@ -185,6 +187,60 @@ int mlx5_vsc_read(struct mlx5_core_dev *mdev, u32 addr } *data = pci_read_config(dev, vsc_addr + MLX5_VSC_DATA_OFFSET, 4); + + return 0; +} + +int mlx5_vsc_lock_addr_space(struct mlx5_core_dev *mdev, u32 addr) +{ + device_t dev = mdev->pdev->dev.bsddev; + int vsc_addr = mdev->vsc_addr; + u32 data; + int ret; + u32 id; + + ret = mlx5_vsc_set_space(mdev, MLX5_SEMAPHORE_SPACE_DOMAIN); + if (ret) + return ret; + + /* Get a unique ID based on the counter */ + id = pci_read_config(dev, vsc_addr + MLX5_VSC_COUNTER_OFFSET, 4); + + /* Try to modify lock */ + ret = mlx5_vsc_write(mdev, addr, &id); + if (ret) + return ret; + + /* Verify */ + ret = mlx5_vsc_read(mdev, addr, &data); + if (ret) + return ret; + if (data != id) + return EBUSY; + + return 0; +} + +int mlx5_vsc_unlock_addr_space(struct mlx5_core_dev *mdev, u32 addr) +{ + u32 data = 0; + int ret; + + ret = mlx5_vsc_set_space(mdev, MLX5_SEMAPHORE_SPACE_DOMAIN); + if (ret) + return ret; + + /* Try to modify lock */ + ret = mlx5_vsc_write(mdev, addr, &data); + if (ret) + return ret; + + /* Verify */ + ret = mlx5_vsc_read(mdev, addr, &data); + if (ret) + return ret; + if (data != 0) + return EBUSY; return 0; } Modified: head/sys/modules/mlx5/Makefile ============================================================================== --- head/sys/modules/mlx5/Makefile Tue Jul 17 10:11:00 2018 (r336396) +++ head/sys/modules/mlx5/Makefile Tue Jul 17 10:16:32 2018 (r336397) @@ -6,7 +6,6 @@ SRCS= \ mlx5_alloc.c \ mlx5_cmd.c \ mlx5_cq.c \ -mlx5_crspace.c \ mlx5_diagnostics.c \ mlx5_eq.c \ mlx5_fs_cmd.c \ From owner-svn-src-head@freebsd.org Tue Jul 17 10:20:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 833261035E16; Tue, 17 Jul 2018 10:20: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.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 38AA1818CB; Tue, 17 Jul 2018 10:20:02 +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 1B0D11FCE; Tue, 17 Jul 2018 10:20:02 +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 w6HAK1rk045662; Tue, 17 Jul 2018 10:20:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HAK1IT045660; Tue, 17 Jul 2018 10:20:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171020.w6HAK1IT045660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 10:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336398 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 336398 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 10:20:02 -0000 Author: hselasky Date: Tue Jul 17 10:20:01 2018 New Revision: 336398 URL: https://svnweb.freebsd.org/changeset/base/336398 Log: Make sure the state variable is set atomically instead of using a mutex in mlx5core. Device detach and setting error state may deadlock over the interface mutex like this: a) Detach code in mlx5en waits until error state is set while the interface mutex is locked. b) The set error handler needs to lock the interface mutex before it can set the error state. The solution is to use atomics to set the error state. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Jul 17 10:16:32 2018 (r336397) +++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Jul 17 10:20:01 2018 (r336398) @@ -219,21 +219,19 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, u32 fatal_error; int lock = -EBUSY; - mutex_lock(&dev->intf_state_mutex); - if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) { - goto unlock; - return; - } - fatal_error = check_fatal_sensors(dev); if (fatal_error || force) { + if (xchg(&dev->state, MLX5_DEVICE_STATE_INTERNAL_ERROR) == + MLX5_DEVICE_STATE_INTERNAL_ERROR) + return; if (!force) mlx5_core_err(dev, "internal state error detected\n"); - dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR; mlx5_trigger_cmd_completions(dev); } + mutex_lock(&dev->intf_state_mutex); + if (force) goto err_state_done; @@ -272,7 +270,6 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev, err_state_done: mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 0); -unlock: mutex_unlock(&dev->intf_state_mutex); } From owner-svn-src-head@freebsd.org Tue Jul 17 10:27:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 201E110383C1; Tue, 17 Jul 2018 10:27: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.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 C039081E25; Tue, 17 Jul 2018 10:27: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 A1E49216E; Tue, 17 Jul 2018 10:27: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 w6HARkDr050410; Tue, 17 Jul 2018 10:27:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HARkEW050409; Tue, 17 Jul 2018 10:27:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171027.w6HARkEW050409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 10:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336399 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 336399 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 10:27:47 -0000 Author: hselasky Date: Tue Jul 17 10:27:46 2018 New Revision: 336399 URL: https://svnweb.freebsd.org/changeset/base/336399 Log: Remove redundant call to mlx5_vsc_find_cap() in mlx5core. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Tue Jul 17 10:20:01 2018 (r336398) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Tue Jul 17 10:27:46 2018 (r336399) @@ -846,10 +846,7 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, st goto err_clr_master; } - if (mlx5_vsc_find_cap(dev)) - dev_err(&pdev->dev, "Unable to find vendor specific capabilities\n"); - - return 0; + return 0; err_clr_master: pci_clear_master(dev->pdev); From owner-svn-src-head@freebsd.org Tue Jul 17 10:44:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4162C1039995; Tue, 17 Jul 2018 10:44:18 +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 DB3FF829CC; Tue, 17 Jul 2018 10:44:17 +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 BAEEA248C; Tue, 17 Jul 2018 10:44:17 +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 w6HAiHZI060851; Tue, 17 Jul 2018 10:44:17 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HAiHKp060849; Tue, 17 Jul 2018 10:44:17 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807171044.w6HAiHKp060849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 17 Jul 2018 10:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336400 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 336400 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 10:44:18 -0000 Author: bde Date: Tue Jul 17 10:44:16 2018 New Revision: 336400 URL: https://svnweb.freebsd.org/changeset/base/336400 Log: Fix scaling bugs which gave innaccuracies and spurious underflows in csqrt() and csqrtl(). When one component is huge and the other is tiny, scaling down the tiny component gave spurious underflow. When both components are denormal, not scaling them up gave inaccuracies of 34+ ulps on not very carefully selected args. Fixing this reduces the maximum error to 1.6 ulps on the same set of args (mosly not denormal ones). The scaling used multiplication of a complex variable by 2, but clang messes this on amd64 up by losing the sign of -0.0. Calculate the components separately, as is well known to be needed for operations on more exceptional values. Modified: head/lib/msun/src/s_csqrt.c head/lib/msun/src/s_csqrtl.c Modified: head/lib/msun/src/s_csqrt.c ============================================================================== --- head/lib/msun/src/s_csqrt.c Tue Jul 17 10:27:46 2018 (r336399) +++ head/lib/msun/src/s_csqrt.c Tue Jul 17 10:44:16 2018 (r336400) @@ -51,9 +51,7 @@ double complex csqrt(double complex z) { double complex result; - double a, b; - double t; - int scale; + double a, b, rx, ry, scale, t; a = creal(z); b = cimag(z); @@ -86,27 +84,39 @@ csqrt(double complex z) /* Scale to avoid overflow. */ if (fabs(a) >= THRESH || fabs(b) >= THRESH) { - a *= 0.25; - b *= 0.25; - scale = 1; + /* + * Don't scale a or b if this might give (spurious) + * underflow. Then the unscaled value is an equivalent + * infinitesmal (or 0). + */ + if (fabs(a) >= 0x1p-1020) + a *= 0.25; + if (fabs(b) >= 0x1p-1020) + b *= 0.25; + scale = 2; } else { - scale = 0; + scale = 1; } + /* Scale to reduce inaccuracies when both components are denormal. */ + if (fabs(a) < 0x1p-1022 && fabs(b) < 0x1p-1022) { + a *= 0x1p54; + b *= 0x1p54; + scale = 0x1p-27; + } + /* Algorithm 312, CACM vol 10, Oct 1967. */ if (a >= 0) { t = sqrt((a + hypot(a, b)) * 0.5); - result = CMPLX(t, b / (2 * t)); + rx = t; + ry = b / (2 * t); } else { t = sqrt((-a + hypot(a, b)) * 0.5); - result = CMPLX(fabs(b) / (2 * t), copysign(t, b)); + rx = fabs(b) / (2 * t); + ry = copysign(t, b); } - /* Rescale. */ - if (scale) - return (result * 2); - else - return (result); + return (CMPLX(rx * scale, ry * scale)); } #if LDBL_MANT_DIG == 53 Modified: head/lib/msun/src/s_csqrtl.c ============================================================================== --- head/lib/msun/src/s_csqrtl.c Tue Jul 17 10:27:46 2018 (r336399) +++ head/lib/msun/src/s_csqrtl.c Tue Jul 17 10:44:16 2018 (r336400) @@ -59,9 +59,7 @@ long double complex csqrtl(long double complex z) { long double complex result; - long double a, b; - long double t; - int scale; + long double a, b, rx, ry, scale, t; a = creall(z); b = cimagl(z); @@ -94,25 +92,37 @@ csqrtl(long double complex z) /* Scale to avoid overflow. */ if (fabsl(a) >= THRESH || fabsl(b) >= THRESH) { - a *= 0.25; - b *= 0.25; - scale = 1; + /* + * Don't scale a or b if this might give (spurious) + * underflow. Then the unscaled value is an equivalent + * infinitesmal (or 0). + */ + if (fabsl(a) >= 0x1p-16380L) + a *= 0.25; + if (fabsl(b) >= 0x1p-16380L) + b *= 0.25; + scale = 2; } else { - scale = 0; + scale = 1; } + /* Scale to reduce inaccuracies when both components are denormal. */ + if (fabsl(a) < 0x1p-16382L && fabsl(b) < 0x1p-16382L) { + a *= 0x1p64; + b *= 0x1p64; + scale = 0x1p-32; + } + /* Algorithm 312, CACM vol 10, Oct 1967. */ if (a >= 0) { t = sqrtl((a + hypotl(a, b)) * 0.5); - result = CMPLXL(t, b / (2 * t)); + rx = t; + ry = b / (2 * t); } else { t = sqrtl((-a + hypotl(a, b)) * 0.5); - result = CMPLXL(fabsl(b) / (2 * t), copysignl(t, b)); + rx = fabsl(b) / (2 * t); + ry = copysignl(t, b); } - /* Rescale. */ - if (scale) - return (result * 2); - else - return (result); + return (CMPLXL(rx * scale, ry * scale)); } From owner-svn-src-head@freebsd.org Tue Jul 17 11:08:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A1CF103A401; Tue, 17 Jul 2018 11:08: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.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 4A01783451; Tue, 17 Jul 2018 11:08: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 2716F27C7; Tue, 17 Jul 2018 11:08: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 w6HB8eEa070740; Tue, 17 Jul 2018 11:08:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HB8e8s070739; Tue, 17 Jul 2018 11:08:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171108.w6HB8e8s070739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336401 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 336401 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:08:41 -0000 Author: hselasky Date: Tue Jul 17 11:08:40 2018 New Revision: 336401 URL: https://svnweb.freebsd.org/changeset/base/336401 Log: Correctly write atomic variable in mlx5en(4). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 10:44:16 2018 (r336400) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 11:08:40 2018 (r336401) @@ -1337,7 +1337,7 @@ mlx5e_open_sq(struct mlx5e_channel *c, if (err) goto err_disable_sq; - atomic_store_rel_int(&sq->queue_state, MLX5E_SQ_READY); + WRITE_ONCE(sq->queue_state, MLX5E_SQ_READY); return (0); From owner-svn-src-head@freebsd.org Tue Jul 17 11:11:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BD4A103A71F; Tue, 17 Jul 2018 11:11: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.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 30FBE8371D; Tue, 17 Jul 2018 11:11: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 1202428FE; Tue, 17 Jul 2018 11:11: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 w6HBBUrw075797; Tue, 17 Jul 2018 11:11:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBBU11075771; Tue, 17 Jul 2018 11:11:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171111.w6HBBU11075771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336402 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 336402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:11:31 -0000 Author: hselasky Date: Tue Jul 17 11:11:30 2018 New Revision: 336402 URL: https://svnweb.freebsd.org/changeset/base/336402 Log: Do not hint about 'trust both' mode when the mlx5en(4) hardware does not support it. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Jul 17 11:08:40 2018 (r336401) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Jul 17 11:11:30 2018 (r336402) @@ -1123,9 +1123,14 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) priv, i, mlx5e_dscp_prio_handler, "CU", "Set DSCP to priority mapping, 0..7"); } +#define A "Set trust state, 1:PCP 2:DSCP" +#define B " 3:BOTH" SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), OID_AUTO, "trust_state", CTLTYPE_U8 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, priv, 0, mlx5e_trust_state_handler, "CU", - "Set trust state, 1:PCP 2:DSCP 3:BOTH"); + MLX5_CAP_QCAM_FEATURE(mdev, qpts_trust_both) ? + A B : A); +#undef B +#undef A } } From owner-svn-src-head@freebsd.org Tue Jul 17 11:18:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C28CA103AB61; Tue, 17 Jul 2018 11:18: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.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 65A4883B23; Tue, 17 Jul 2018 11:18:02 +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 39FCA2955; Tue, 17 Jul 2018 11:18:02 +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 w6HBI2xT076192; Tue, 17 Jul 2018 11:18:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBI1s3076190; Tue, 17 Jul 2018 11:18:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171118.w6HBI1s3076190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336403 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 336403 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:18:03 -0000 Author: hselasky Date: Tue Jul 17 11:18:01 2018 New Revision: 336403 URL: https://svnweb.freebsd.org/changeset/base/336403 Log: Add context numbers for HW elements in mlx5en(4). To access the data, set sysctl dev.mce.N.conf.debug_stats to 1. This enables the sysctl node dev.mce.N.hw_ctx_debug. Its content is the mapping of each channel' number to used receive queue and associated completion queue, set of the transmit queues numbers and corresponding completion queues. Trimmed example output: channel 30 rq 188 cq 1085 channel 30 tc 0 sq 187 cq 1084 channel 31 rq 191 cq 1087 channel 31 tc 0 sq 190 cq 1086 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Tue Jul 17 11:11:30 2018 (r336402) +++ head/sys/dev/mlx5/mlx5_en/en.h Tue Jul 17 11:18:01 2018 (r336403) @@ -774,6 +774,7 @@ 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: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Jul 17 11:11:30 2018 (r336402) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Jul 17 11:18:01 2018 (r336403) @@ -916,27 +916,75 @@ static const char *mlx5e_port_stats_debug_desc[] = { }; static int +mlx5e_ethtool_debug_channel_info(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv; + struct sbuf sb; + struct mlx5e_channel *c; + struct mlx5e_sq *sq; + struct mlx5e_rq *rq; + int error, i, tc; + + priv = arg1; + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) + return (error); + if (sbuf_new_for_sysctl(&sb, NULL, 128, req) == NULL) + return (ENOMEM); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); + + PRIV_LOCK(priv); + if (test_bit(MLX5E_STATE_OPENED, &priv->state) == 0) + goto out; + for (i = 0; i < priv->params.num_channels; 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); + for (tc = 0; tc < c->num_tc; tc++) { + sq = &c->sq[tc]; + sbuf_printf(&sb, "channel %d tc %d sq %d cq %d\n", + c->ix, tc, sq->sqn, sq->cq.mcq.cqn); + } + } +out: + PRIV_UNLOCK(priv); + error = sbuf_finish(&sb); + sbuf_delete(&sb); + return (error); +} + +static int mlx5e_ethtool_debug_stats(SYSCTL_HANDLER_ARGS) { struct mlx5e_priv *priv = arg1; - int error; - int sys_debug; + int error, sys_debug; sys_debug = priv->sysctl_debug; error = sysctl_handle_int(oidp, &priv->sysctl_debug, 0, req); - if (error || !req->newptr) + if (error != 0 || !req->newptr) return (error); - priv->sysctl_debug = !!priv->sysctl_debug; + priv->sysctl_debug = priv->sysctl_debug != 0; if (sys_debug == priv->sysctl_debug) - return (error); - if (priv->sysctl_debug) + return (0); + + PRIV_LOCK(priv); + if (priv->sysctl_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); - else + SYSCTL_ADD_PROC(&priv->sysctl_ctx_channel_debug, + 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); - return (error); + sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); + } + PRIV_UNLOCK(priv); + return (0); } static void Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 11:11:30 2018 (r336402) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 11:18:01 2018 (r336403) @@ -3529,6 +3529,8 @@ 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), @@ -3706,6 +3708,7 @@ err_free_wq: err_free_sysctl: sysctl_ctx_free(&priv->sysctl_ctx); + sysctl_ctx_free(&priv->sysctl_ctx_channel_debug); if_free(ifp); @@ -3770,8 +3773,10 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp mlx5e_rl_cleanup(priv); #endif /* destroy all remaining sysctl nodes */ - if (priv->sysctl_debug) + 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); From owner-svn-src-head@freebsd.org Tue Jul 17 11:21:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72DE5103ACCA; Tue, 17 Jul 2018 11:21:03 +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 2641083E28; Tue, 17 Jul 2018 11:21:03 +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 07A6D2978; Tue, 17 Jul 2018 11:21:03 +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 w6HBL29U076373; Tue, 17 Jul 2018 11:21:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBL2Q4076372; Tue, 17 Jul 2018 11:21:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171121.w6HBL2Q4076372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336404 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 336404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:21:03 -0000 Author: hselasky Date: Tue Jul 17 11:21:02 2018 New Revision: 336404 URL: https://svnweb.freebsd.org/changeset/base/336404 Log: Enable both receive and transmit pauseframes by default in mlx5en(4). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 11:18:01 2018 (r336403) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 11:21:02 2018 (r336404) @@ -3367,8 +3367,8 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) char path[96]; int error; - /* Only receiving pauseframes is enabled by default */ - priv->params.tx_pauseframe_control = 0; + /* enable pauseframes by default */ + priv->params.tx_pauseframe_control = 1; priv->params.rx_pauseframe_control = 1; /* disable ports flow control, PFC, by default */ From owner-svn-src-head@freebsd.org Tue Jul 17 11:33:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D30A103B36F; Tue, 17 Jul 2018 11:33:24 +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 213FF844CE; Tue, 17 Jul 2018 11:33:24 +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 DC6F72C77; Tue, 17 Jul 2018 11:33:23 +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 w6HBXN9K085993; Tue, 17 Jul 2018 11:33:23 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBXNr6085991; Tue, 17 Jul 2018 11:33:23 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201807171133.w6HBXNr6085991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 17 Jul 2018 11:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336405 - in head/sys: net netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head/sys: net netinet netinet6 X-SVN-Commit-Revision: 336405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:33:24 -0000 Author: ae Date: Tue Jul 17 11:33:23 2018 New Revision: 336405 URL: https://svnweb.freebsd.org/changeset/base/336405 Log: Move invoking of callout_stop(&lle->lle_timer) into llentry_free(). This deduplicates the code a bit, and also implicitly adds missing callout_stop() to in[6]_lltable_delete_entry() functions. PR: 209682, 225927 Submitted by: hselasky (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4605 Modified: head/sys/net/if_llatbl.c head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Tue Jul 17 11:21:02 2018 (r336404) +++ head/sys/net/if_llatbl.c Tue Jul 17 11:33:23 2018 (r336405) @@ -436,6 +436,9 @@ llentry_free(struct llentry *lle) pkts_dropped = lltable_drop_entry_queue(lle); + /* cancel timer */ + if (callout_stop(&lle->lle_timer) > 0) + LLE_REMREF(lle); LLE_FREE_LOCKED(lle); return (pkts_dropped); @@ -522,8 +525,6 @@ lltable_free(struct lltable *llt) IF_AFDATA_WUNLOCK(llt->llt_ifp); CK_LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) { - if (callout_stop(&lle->lle_timer) > 0) - LLE_REMREF(lle); llentry_free(lle); } Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Jul 17 11:21:02 2018 (r336404) +++ head/sys/netinet/in.c Tue Jul 17 11:33:23 2018 (r336405) @@ -1165,10 +1165,6 @@ in_lltable_free_entry(struct lltable *llt, struct llen lltable_unlink_entry(llt, lle); } - /* cancel timer */ - if (callout_stop(&lle->lle_timer) > 0) - LLE_REMREF(lle); - /* Drop hold queue */ pkts_dropped = llentry_free(lle); ARPSTAT_ADD(dropped, pkts_dropped); Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Tue Jul 17 11:21:02 2018 (r336404) +++ head/sys/netinet6/in6.c Tue Jul 17 11:33:23 2018 (r336405) @@ -2135,9 +2135,6 @@ in6_lltable_free_entry(struct lltable *llt, struct lle lltable_unlink_entry(llt, lle); } - if (callout_stop(&lle->lle_timer) > 0) - LLE_REMREF(lle); - llentry_free(lle); } From owner-svn-src-head@freebsd.org Tue Jul 17 11:35:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4150103B575; Tue, 17 Jul 2018 11:35:40 +0000 (UTC) (envelope-from peterj@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 B9639847EA; Tue, 17 Jul 2018 11:35:40 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B1832C8F; Tue, 17 Jul 2018 11:35:40 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HBZeTG086156; Tue, 17 Jul 2018 11:35:40 GMT (envelope-from peterj@FreeBSD.org) Received: (from peterj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBZemg086155; Tue, 17 Jul 2018 11:35:40 GMT (envelope-from peterj@FreeBSD.org) Message-Id: <201807171135.w6HBZemg086155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peterj set sender to peterj@FreeBSD.org using -f From: Peter Jeremy Date: Tue, 17 Jul 2018 11:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336406 - head X-SVN-Group: head X-SVN-Commit-Author: peterj X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:35:41 -0000 Author: peterj Date: Tue Jul 17 11:35:40 2018 New Revision: 336406 URL: https://svnweb.freebsd.org/changeset/base/336406 Log: Retrospectively document SVN branch point for stable-11 Approved by: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D16262 Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jul 17 11:33:23 2018 (r336405) +++ head/UPDATING Tue Jul 17 11:35:40 2018 (r336406) @@ -654,6 +654,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: Remove the openbsd_poll system call. __FreeBSD_version has been bumped because of this. +20160708: + The stable/11 branch has been created from head@r302406. + 20160622: The libc stub for the pipe(2) system call has been replaced with a wrapper that calls the pipe2(2) system call and the pipe(2) From owner-svn-src-head@freebsd.org Tue Jul 17 11:42:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00392103BB25; Tue, 17 Jul 2018 11:42:06 +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 A588084D32; Tue, 17 Jul 2018 11:42:06 +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 869372E13; Tue, 17 Jul 2018 11:42:06 +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 w6HBg6W2091170; Tue, 17 Jul 2018 11:42:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBg6wF091168; Tue, 17 Jul 2018 11:42:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171142.w6HBg6wF091168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336407 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 336407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:42:07 -0000 Author: hselasky Date: Tue Jul 17 11:42:05 2018 New Revision: 336407 URL: https://svnweb.freebsd.org/changeset/base/336407 Log: Handle jumbo frames without requiring big clusters in mlx5en(4). The scatter list is formed by the chunks of MCLBYTES each, and larger than default packets are returned to the stack as the mbuf chain. Submitted by: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Tue Jul 17 11:35:40 2018 (r336406) +++ head/sys/dev/mlx5/mlx5_en/en.h Tue Jul 17 11:42:05 2018 (r336407) @@ -81,8 +81,19 @@ #define MLX5E_PARAMS_DEFAULT_LOG_RQ_SIZE 0xa #define MLX5E_PARAMS_MAXIMUM_LOG_RQ_SIZE 0xe -/* freeBSD HW LRO is limited by 16KB - the size of max mbuf */ +#define MLX5E_MAX_RX_SEGS 7 + +#ifndef MLX5E_MAX_RX_BYTES +#define MLX5E_MAX_RX_BYTES MCLBYTES +#endif + +#if (MLX5E_MAX_RX_SEGS == 1) +/* FreeBSD HW LRO is limited by 16KB - the size of max mbuf */ #define MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ MJUM16BYTES +#else +#define MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ \ + MIN(65535, MLX5E_MAX_RX_SEGS * MLX5E_MAX_RX_BYTES) +#endif #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC 0x10 #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC_FROM_CQE 0x3 #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_PKTS 0x20 @@ -533,6 +544,7 @@ struct mlx5e_rq { struct mtx mtx; bus_dma_tag_t dma_tag; u32 wqe_sz; + u32 nsegs; struct mlx5e_rq_mbuf *mbuf; struct ifnet *ifp; struct mlx5e_rq_stats stats; @@ -806,8 +818,11 @@ struct mlx5e_tx_wqe { struct mlx5e_rx_wqe { struct mlx5_wqe_srq_next_seg next; - struct mlx5_wqe_data_seg data; + struct mlx5_wqe_data_seg data[]; }; + +/* the size of the structure above must be power of two */ +CTASSERT(powerof2(sizeof(struct mlx5e_rx_wqe))); struct mlx5e_eeprom { int lock_bit; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 11:35:40 2018 (r336406) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Jul 17 11:42:05 2018 (r336407) @@ -33,9 +33,12 @@ #ifndef ETH_DRIVER_VERSION #define ETH_DRIVER_VERSION "3.4.1" #endif + char mlx5e_version[] = "Mellanox Ethernet driver" " (" ETH_DRIVER_VERSION ")"; +static int mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs); + struct mlx5e_channel_param { struct mlx5e_rq_param rq; struct mlx5e_sq_param sq; @@ -810,7 +813,12 @@ mlx5e_create_rq(struct mlx5e_channel *c, int wq_sz; int err; int i; + u32 nsegs, wqe_sz; + err = mlx5e_get_wqe_sz(priv, &wqe_sz, &nsegs); + if (err != 0) + goto done; + /* Create DMA descriptor TAG */ if ((err = -bus_dma_tag_create( bus_get_dma_tag(mdev->pdev->dev.bsddev), @@ -819,9 +827,9 @@ mlx5e_create_rq(struct mlx5e_channel *c, BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MJUM16BYTES, /* maxsize */ - 1, /* nsegments */ - MJUM16BYTES, /* maxsegsize */ + nsegs * MLX5E_MAX_RX_BYTES, /* maxsize */ + nsegs, /* nsegments */ + nsegs * MLX5E_MAX_RX_BYTES, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockfuncarg */ &rq->dma_tag))) @@ -834,23 +842,9 @@ mlx5e_create_rq(struct mlx5e_channel *c, rq->wq.db = &rq->wq.db[MLX5_RCV_DBR]; - if (priv->params.hw_lro_en) { - rq->wqe_sz = priv->params.lro_wqe_sz; - } else { - rq->wqe_sz = MLX5E_SW2MB_MTU(priv->ifp->if_mtu); - } - if (rq->wqe_sz > MJUM16BYTES) { - err = -ENOMEM; + err = mlx5e_get_wqe_sz(priv, &rq->wqe_sz, &rq->nsegs); + if (err != 0) goto err_rq_wq_destroy; - } else if (rq->wqe_sz > MJUM9BYTES) { - rq->wqe_sz = MJUM16BYTES; - } else if (rq->wqe_sz > MJUMPAGESIZE) { - rq->wqe_sz = MJUM9BYTES; - } else if (rq->wqe_sz > MCLBYTES) { - rq->wqe_sz = MJUMPAGESIZE; - } else { - rq->wqe_sz = MCLBYTES; - } wq_sz = mlx5_wq_ll_get_size(&rq->wq); @@ -861,7 +855,11 @@ mlx5e_create_rq(struct mlx5e_channel *c, rq->mbuf = malloc(wq_sz * sizeof(rq->mbuf[0]), M_MLX5EN, M_WAITOK | M_ZERO); for (i = 0; i != wq_sz; i++) { struct mlx5e_rx_wqe *wqe = mlx5_wq_ll_get_wqe(&rq->wq, i); +#if (MLX5E_MAX_RX_SEGS == 1) uint32_t byte_count = rq->wqe_sz - MLX5E_NET_IP_ALIGN; +#else + int j; +#endif err = -bus_dmamap_create(rq->dma_tag, 0, &rq->mbuf[i].dma_map); if (err != 0) { @@ -869,8 +867,15 @@ mlx5e_create_rq(struct mlx5e_channel *c, bus_dmamap_destroy(rq->dma_tag, rq->mbuf[i].dma_map); goto err_rq_mbuf_free; } - wqe->data.lkey = c->mkey_be; - wqe->data.byte_count = cpu_to_be32(byte_count | MLX5_HW_START_PADDING); + + /* set value for constant fields */ +#if (MLX5E_MAX_RX_SEGS == 1) + wqe->data[0].lkey = c->mkey_be; + wqe->data[0].byte_count = cpu_to_be32(byte_count | MLX5_HW_START_PADDING); +#else + for (j = 0; j < rq->nsegs; j++) + wqe->data[j].lkey = c->mkey_be; +#endif } rq->ifp = c->ifp; @@ -1809,16 +1814,51 @@ mlx5e_close_channel_wait(struct mlx5e_channel *volatil free(c, M_MLX5EN); } +static int +mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs) +{ + u32 r, n; + + r = priv->params.hw_lro_en ? priv->params.lro_wqe_sz : + MLX5E_SW2MB_MTU(priv->ifp->if_mtu); + if (r > MJUM16BYTES) + return (-ENOMEM); + + if (r > MJUM9BYTES) + r = MJUM16BYTES; + else if (r > MJUMPAGESIZE) + r = MJUM9BYTES; + else if (r > MCLBYTES) + r = MJUMPAGESIZE; + else + r = MCLBYTES; + + /* + * n + 1 must be a power of two, because stride size must be. + * Stride size is 16 * (n + 1), as the first segment is + * control. + */ + for (n = howmany(r, MLX5E_MAX_RX_BYTES); !powerof2(n + 1); n++) + ; + + *wqe_sz = r; + *nsegs = n; + return (0); +} + static void mlx5e_build_rq_param(struct mlx5e_priv *priv, struct mlx5e_rq_param *param) { void *rqc = param->rqc; void *wq = MLX5_ADDR_OF(rqc, rqc, wq); + u32 wqe_sz, nsegs; + mlx5e_get_wqe_sz(priv, &wqe_sz, &nsegs); MLX5_SET(wq, wq, wq_type, MLX5_WQ_TYPE_LINKED_LIST); MLX5_SET(wq, wq, end_padding_mode, MLX5_WQ_END_PAD_MODE_ALIGN); - MLX5_SET(wq, wq, log_wq_stride, ilog2(sizeof(struct mlx5e_rx_wqe))); + MLX5_SET(wq, wq, log_wq_stride, ilog2(sizeof(struct mlx5e_rx_wqe) + + nsegs * sizeof(struct mlx5_wqe_data_seg))); MLX5_SET(wq, wq, log_wq_sz, priv->params.log_rq_size); MLX5_SET(wq, wq, pd, priv->pdn); Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Jul 17 11:35:40 2018 (r336406) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Jul 17 11:42:05 2018 (r336407) @@ -32,21 +32,47 @@ static inline int mlx5e_alloc_rx_wqe(struct mlx5e_rq *rq, struct mlx5e_rx_wqe *wqe, u16 ix) { - bus_dma_segment_t segs[1]; + bus_dma_segment_t segs[rq->nsegs]; struct mbuf *mb; int nsegs; int err; - +#if (MLX5E_MAX_RX_SEGS != 1) + struct mbuf *mb_head; + int i; +#endif if (rq->mbuf[ix].mbuf != NULL) return (0); +#if (MLX5E_MAX_RX_SEGS == 1) mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rq->wqe_sz); if (unlikely(!mb)) return (-ENOMEM); - /* set initial mbuf length */ mb->m_pkthdr.len = mb->m_len = rq->wqe_sz; +#else + mb_head = mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, + MLX5E_MAX_RX_BYTES); + if (unlikely(mb == NULL)) + return (-ENOMEM); + mb->m_len = MLX5E_MAX_RX_BYTES; + mb->m_pkthdr.len = MLX5E_MAX_RX_BYTES; + + for (i = 1; i < rq->nsegs; i++) { + if (mb_head->m_pkthdr.len >= rq->wqe_sz) + break; + mb = mb->m_next = m_getjcl(M_NOWAIT, MT_DATA, 0, + MLX5E_MAX_RX_BYTES); + if (unlikely(mb == NULL)) { + m_freem(mb_head); + return (-ENOMEM); + } + mb->m_len = MLX5E_MAX_RX_BYTES; + mb_head->m_pkthdr.len += MLX5E_MAX_RX_BYTES; + } + /* rewind to first mbuf in chain */ + mb = mb_head; +#endif /* get IP header aligned */ m_adj(mb, MLX5E_NET_IP_ALIGN); @@ -54,12 +80,26 @@ mlx5e_alloc_rx_wqe(struct mlx5e_rq *rq, mb, segs, &nsegs, BUS_DMA_NOWAIT); if (err != 0) goto err_free_mbuf; - if (unlikely(nsegs != 1)) { + if (unlikely(nsegs == 0)) { bus_dmamap_unload(rq->dma_tag, rq->mbuf[ix].dma_map); err = -ENOMEM; goto err_free_mbuf; } - wqe->data.addr = cpu_to_be64(segs[0].ds_addr); +#if (MLX5E_MAX_RX_SEGS == 1) + wqe->data[0].addr = cpu_to_be64(segs[0].ds_addr); +#else + wqe->data[0].addr = cpu_to_be64(segs[0].ds_addr); + wqe->data[0].byte_count = cpu_to_be32(segs[0].ds_len | + MLX5_HW_START_PADDING); + for (i = 1; i != nsegs; i++) { + wqe->data[i].addr = cpu_to_be64(segs[i].ds_addr); + wqe->data[i].byte_count = cpu_to_be32(segs[i].ds_len); + } + for (; i < rq->nsegs; i++) { + wqe->data[i].addr = 0; + wqe->data[i].byte_count = 0; + } +#endif rq->mbuf[ix].mbuf = mb; rq->mbuf[ix].data = mb->m_data; @@ -214,6 +254,9 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, { struct ifnet *ifp = rq->ifp; struct mlx5e_channel *c; +#if (MLX5E_MAX_RX_SEGS != 1) + struct mbuf *mb_head; +#endif int lro_num_seg; /* HW LRO session aggregated packets counter */ uint64_t tstmp; @@ -224,7 +267,26 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, rq->stats.lro_bytes += cqe_bcnt; } +#if (MLX5E_MAX_RX_SEGS == 1) mb->m_pkthdr.len = mb->m_len = cqe_bcnt; +#else + mb->m_pkthdr.len = cqe_bcnt; + for (mb_head = mb; mb != NULL; mb = mb->m_next) { + if (mb->m_len > cqe_bcnt) + mb->m_len = cqe_bcnt; + cqe_bcnt -= mb->m_len; + if (likely(cqe_bcnt == 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 /* check if a Toeplitz hash was computed */ if (cqe->rss_hash_type != 0) { mb->m_pkthdr.flowid = be32_to_cpu(cqe->rss_hash_result); @@ -402,6 +464,10 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) } if ((MHLEN - MLX5E_NET_IP_ALIGN) >= byte_cnt && (mb = m_gethdr(M_NOWAIT, MT_DATA)) != NULL) { +#if (MLX5E_MAX_RX_SEGS != 1) + /* set maximum mbuf length */ + mb->m_len = MHLEN - MLX5E_NET_IP_ALIGN; +#endif /* get IP header aligned */ mb->m_data += MLX5E_NET_IP_ALIGN; From owner-svn-src-head@freebsd.org Tue Jul 17 11:43:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56F1C103BC91; Tue, 17 Jul 2018 11:43: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.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 09B1A84F75; Tue, 17 Jul 2018 11:43: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 DF7BA2E3D; Tue, 17 Jul 2018 11:43: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 w6HBhhRr091276; Tue, 17 Jul 2018 11:43:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBhhEw091275; Tue, 17 Jul 2018 11:43:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171143.w6HBhhEw091275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336408 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 336408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:43:44 -0000 Author: hselasky Date: Tue Jul 17 11:43:43 2018 New Revision: 336408 URL: https://svnweb.freebsd.org/changeset/base/336408 Log: Add missing newline. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Tue Jul 17 11:42:05 2018 (r336407) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Tue Jul 17 11:43:43 2018 (r336408) @@ -29,6 +29,7 @@ #include #include + #define MLX5_SET_CFG(p, f, v) MLX5_SET(create_flow_group_in, p, f, v) enum { From owner-svn-src-head@freebsd.org Tue Jul 17 11:47:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82D83103BFC9; Tue, 17 Jul 2018 11:47: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.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 35465853A3; Tue, 17 Jul 2018 11:47: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 17C0E2E46; Tue, 17 Jul 2018 11:47: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 w6HBluTO091553; Tue, 17 Jul 2018 11:47:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBluFJ091552; Tue, 17 Jul 2018 11:47:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171147.w6HBluFJ091552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336410 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 336410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:47:57 -0000 Author: hselasky Date: Tue Jul 17 11:47:56 2018 New Revision: 336410 URL: https://svnweb.freebsd.org/changeset/base/336410 Log: Add module parameter to limit number of MSIX EQ vectors in mlx5en(4). For setups having a large amount of PCI devices, it makes sense to limit the number of MSIX vectors per PCI device, in order to avoid running out of IRQ vectors. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Tue Jul 17 11:44:04 2018 (r336409) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Tue Jul 17 11:47:56 2018 (r336410) @@ -61,6 +61,10 @@ 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"); +static int mlx5_core_msix_eqvec; +module_param_named(msix_eqvec, mlx5_core_msix_eqvec, int, 0644); +MODULE_PARM_DESC(msix_eqvec, "Maximum number of MSIX event queue vectors"); + #define NUMA_NO_NODE -1 static LIST_HEAD(intf_list); @@ -239,11 +243,15 @@ static int mlx5_enable_msix(struct mlx5_core_dev *dev) struct mlx5_priv *priv = &dev->priv; struct mlx5_eq_table *table = &priv->eq_table; int num_eqs = 1 << MLX5_CAP_GEN(dev, log_max_eq); - int nvec; + int limit = mlx5_core_msix_eqvec; + int nvec = MLX5_EQ_VEC_COMP_BASE; int i; - nvec = MLX5_CAP_GEN(dev, num_ports) * num_online_cpus() + - MLX5_EQ_VEC_COMP_BASE; + if (limit > 0) + nvec += limit; + else + nvec += MLX5_CAP_GEN(dev, num_ports) * num_online_cpus(); + nvec = min_t(int, nvec, num_eqs); if (nvec <= MLX5_EQ_VEC_COMP_BASE) return -ENOMEM; From owner-svn-src-head@freebsd.org Tue Jul 17 11:53:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D8F7103C391; Tue, 17 Jul 2018 11:53:38 +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 B79A185A11; Tue, 17 Jul 2018 11:53: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 94E8D2FDA; Tue, 17 Jul 2018 11:53: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 w6HBrbGI096690; Tue, 17 Jul 2018 11:53:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HBrbFk096689; Tue, 17 Jul 2018 11:53:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807171153.w6HBrbFk096689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Jul 2018 11:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336411 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 336411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 11:53:38 -0000 Author: hselasky Date: Tue Jul 17 11:53:37 2018 New Revision: 336411 URL: https://svnweb.freebsd.org/changeset/base/336411 Log: Use a mbuf header instead of a mbuf cluster for debugging interrupts in mlx5en(4). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Jul 17 11:47:56 2018 (r336410) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Jul 17 11:53:37 2018 (r336411) @@ -513,7 +513,10 @@ mlx5e_rx_cq_comp(struct mlx5_core_cq *mcq) int i = 0; #ifdef HAVE_PER_CQ_EVENT_PACKET - struct mbuf *mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rq->wqe_sz); +#if (MHLEN < 15) +#error "MHLEN is too small" +#endif + struct mbuf *mb = m_gethdr(M_NOWAIT, MT_DATA); if (mb != NULL) { /* this code is used for debugging purpose only */ From owner-svn-src-head@freebsd.org Tue Jul 17 12:02:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 530F8103CC6B; Tue, 17 Jul 2018 12:02:00 +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 073DC86127; Tue, 17 Jul 2018 12:02:00 +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 DDDDB3145; Tue, 17 Jul 2018 12:01:59 +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 w6HC1x1J098717; Tue, 17 Jul 2018 12:01:59 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HC1xf8098715; Tue, 17 Jul 2018 12:01:59 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807171201.w6HC1xf8098715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 17 Jul 2018 12:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336412 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 336412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 12:02:00 -0000 Author: bde Date: Tue Jul 17 12:01:59 2018 New Revision: 336412 URL: https://svnweb.freebsd.org/changeset/base/336412 Log: Minor cleanups to csqrt*(), mostly in comments. Remove the STDC CX_LIMITED_RANGE pragma and its verbose comment. We still don't have any C99 compilers (that support fenv pragmas), and if we did then there are thousands of other places in libm that would need to use them more than here. The other cleanups are smaller. Modified: head/lib/msun/src/s_csqrt.c head/lib/msun/src/s_csqrtf.c head/lib/msun/src/s_csqrtl.c Modified: head/lib/msun/src/s_csqrt.c ============================================================================== --- head/lib/msun/src/s_csqrt.c Tue Jul 17 11:53:37 2018 (r336411) +++ head/lib/msun/src/s_csqrt.c Tue Jul 17 12:01:59 2018 (r336412) @@ -35,16 +35,7 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" -/* - * gcc doesn't implement complex multiplication or division correctly, - * so we need to handle infinities specially. We turn on this pragma to - * notify conforming c99 compilers that the fast-but-incorrect code that - * gcc generates is acceptable, since the special cases have already been - * handled. - */ -#pragma STDC CX_LIMITED_RANGE ON - -/* We risk spurious overflow for components >= DBL_MAX / (1 + sqrt(2)). */ +/* For avoiding overflow for components >= DBL_MAX / (1 + sqrt(2)). */ #define THRESH 0x1.a827999fcef32p+1022 double complex Modified: head/lib/msun/src/s_csqrtf.c ============================================================================== --- head/lib/msun/src/s_csqrtf.c Tue Jul 17 11:53:37 2018 (r336411) +++ head/lib/msun/src/s_csqrtf.c Tue Jul 17 12:01:59 2018 (r336412) @@ -34,21 +34,15 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" -/* - * gcc doesn't implement complex multiplication or division correctly, - * so we need to handle infinities specially. We turn on this pragma to - * notify conforming c99 compilers that the fast-but-incorrect code that - * gcc generates is acceptable, since the special cases have already been - * handled. - */ -#pragma STDC CX_LIMITED_RANGE ON - float complex csqrtf(float complex z) { - float a = crealf(z), b = cimagf(z); double t; + float a, b; + a = creal(z); + b = cimag(z); + /* Handle special cases. */ if (z == 0) return (CMPLXF(0, b)); @@ -82,9 +76,9 @@ csqrtf(float complex z) */ if (a >= 0) { t = sqrt((a + hypot(a, b)) * 0.5); - return (CMPLXF(t, b / (2.0 * t))); + return (CMPLXF(t, b / (2 * t))); } else { t = sqrt((-a + hypot(a, b)) * 0.5); - return (CMPLXF(fabsf(b) / (2.0 * t), copysignf(t, b))); + return (CMPLXF(fabsf(b) / (2 * t), copysignf(t, b))); } } Modified: head/lib/msun/src/s_csqrtl.c ============================================================================== --- head/lib/msun/src/s_csqrtl.c Tue Jul 17 11:53:37 2018 (r336411) +++ head/lib/msun/src/s_csqrtl.c Tue Jul 17 12:01:59 2018 (r336412) @@ -36,24 +36,17 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" /* - * gcc doesn't implement complex multiplication or division correctly, - * so we need to handle infinities specially. We turn on this pragma to - * notify conforming c99 compilers that the fast-but-incorrect code that - * gcc generates is acceptable, since the special cases have already been - * handled. + * THRESH is now calculated portably (up to 113-bit precision). However, + * the denormal threshold is hard-coded for a 15-bit exponent with the usual + * bias. s_logl.c and e_hypotl have less hard-coding but end up requiring + * the same for the exponent and more for the mantissa. */ -#pragma STDC CX_LIMITED_RANGE ON - -/* - * We risk spurious overflow for components >= LDBL_MAX / (1 + sqrt(2)). - * Rather than determining the fully precise value at which we might - * overflow, just use a threshold of approximately LDBL_MAX / 4. - */ #if LDBL_MAX_EXP != 0x4000 #error "Unsupported long double format" -#else -#define THRESH 0x1p16382L #endif + +/* For avoiding overflow for components >= LDBL_MAX / (1 + sqrt(2)). */ +#define THRESH (LDBL_MAX / 2.414213562373095048801688724209698L) long double complex csqrtl(long double complex z) From owner-svn-src-head@freebsd.org Tue Jul 17 14:11:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1E9D1041394; Tue, 17 Jul 2018 14:11:32 +0000 (UTC) (envelope-from kevans@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 745708AD7E; Tue, 17 Jul 2018 14:11:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 556BE4A5B; Tue, 17 Jul 2018 14:11:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HEBWaA066626; Tue, 17 Jul 2018 14:11:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HEBU36066615; Tue, 17 Jul 2018 14:11:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807171411.w6HEBU36066615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 17 Jul 2018 14:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336414 - in head: sys/conf usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: sys/conf usr.sbin/config X-SVN-Commit-Revision: 336414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 14:11:33 -0000 Author: kevans Date: Tue Jul 17 14:11:30 2018 New Revision: 336414 URL: https://svnweb.freebsd.org/changeset/base/336414 Log: Revert r336353 completely based on protest; compatibility shims incoming Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.arm64 head/sys/conf/Makefile.i386 head/sys/conf/Makefile.mips head/sys/conf/Makefile.powerpc head/sys/conf/Makefile.riscv head/sys/conf/Makefile.sparc64 head/usr.sbin/config/configvers.h Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.amd64 Tue Jul 17 14:11:30 2018 (r336414) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.arm Tue Jul 17 14:11:30 2018 (r336414) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600013 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.arm64 ============================================================================== --- head/sys/conf/Makefile.arm64 Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.arm64 Tue Jul 17 14:11:30 2018 (r336414) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.i386 ============================================================================== --- head/sys/conf/Makefile.i386 Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.i386 Tue Jul 17 14:11:30 2018 (r336414) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.mips Tue Jul 17 14:11:30 2018 (r336414) @@ -15,7 +15,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.powerpc Tue Jul 17 14:11:30 2018 (r336414) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/sys/conf/Makefile.riscv ============================================================================== --- head/sys/conf/Makefile.riscv Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.riscv Tue Jul 17 14:11:30 2018 (r336414) @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 .if !defined(S) S= ../../.. Modified: head/sys/conf/Makefile.sparc64 ============================================================================== --- head/sys/conf/Makefile.sparc64 Tue Jul 17 12:13:38 2018 (r336413) +++ head/sys/conf/Makefile.sparc64 Tue Jul 17 14:11:30 2018 (r336414) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 700000 +%VERSREQ= 600012 STD8X16FONT?= iso Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Tue Jul 17 12:13:38 2018 (r336413) +++ head/usr.sbin/config/configvers.h Tue Jul 17 14:11:30 2018 (r336414) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 700000 +#define CONFIGVERS 600015 #define MAJOR_VERS(x) ((x) / 100000) From owner-svn-src-head@freebsd.org Tue Jul 17 14:14:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8223E104153D; Tue, 17 Jul 2018 14:14:55 +0000 (UTC) (envelope-from kevans@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 310368B229; Tue, 17 Jul 2018 14:14:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11E4F4AAB; Tue, 17 Jul 2018 14:14:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HEEsQh068483; Tue, 17 Jul 2018 14:14:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HEEsKj068479; Tue, 17 Jul 2018 14:14:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807171414.w6HEEsKj068479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 17 Jul 2018 14:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336415 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 336415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 14:14:55 -0000 Author: kevans Date: Tue Jul 17 14:14:53 2018 New Revision: 336415 URL: https://svnweb.freebsd.org/changeset/base/336415 Log: config(8): Add compatibility shims for r335998 Plumb the %VERSREQ from Makefile. through to the rest of config(8). We've recorded the config(8) version that we're calling "the end of envmode and hintmode," and we'll write them out for earlier versions. Later kernel version bumps will remove envmode/hintmode from the kernel as needed, which is OK since the current kernel does not use them at all. These compatibility shims really need to go away when the major version rolls over... Discussed with: imp Modified: head/usr.sbin/config/config.h head/usr.sbin/config/configvers.h head/usr.sbin/config/main.c head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Tue Jul 17 14:11:30 2018 (r336414) +++ head/usr.sbin/config/config.h Tue Jul 17 14:14:53 2018 (r336415) @@ -212,6 +212,7 @@ extern int debugging; extern int found_defaults; extern int maxusers; +extern int versreq; extern char *PREFIX; /* Config file name - for error messages */ extern char srcdir[]; /* root of the kernel source tree */ Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Tue Jul 17 14:11:30 2018 (r336414) +++ head/usr.sbin/config/configvers.h Tue Jul 17 14:14:53 2018 (r336415) @@ -49,5 +49,8 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600015 +#define CONFIGVERS 600016 #define MAJOR_VERS(x) ((x) / 100000) + +/* Last config(8) version to require envmode/hintmode */ +#define CONFIGVERS_ENVMODE_REQ 600015 Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Tue Jul 17 14:11:30 2018 (r336414) +++ head/usr.sbin/config/main.c Tue Jul 17 14:14:53 2018 (r336415) @@ -86,6 +86,7 @@ int incignore; * literally). */ int filebased = 0; +int versreq; static void configfile(void); static void get_srcdir(void); @@ -743,7 +744,7 @@ kernconfdump(const char *file) } static void -badversion(int versreq) +badversion() { fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); fprintf(stderr, "config version = %d, ", CONFIGVERS); @@ -763,7 +764,6 @@ checkversion(void) { FILE *ifp; char line[BUFSIZ]; - int versreq; ifp = open_makefile_template(); while (fgets(line, BUFSIZ, ifp) != 0) { @@ -775,7 +775,7 @@ checkversion(void) if (MAJOR_VERS(versreq) == MAJOR_VERS(CONFIGVERS) && versreq <= CONFIGVERS) continue; - badversion(versreq); + badversion(); } fclose(ifp); } Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Jul 17 14:11:30 2018 (r336414) +++ head/usr.sbin/config/mkmakefile.c Tue Jul 17 14:14:53 2018 (r336415) @@ -307,6 +307,13 @@ makehints(void) fprintf(ofp, "#include \n"); fprintf(ofp, "#include \n"); fprintf(ofp, "\n"); + /* + * Write out hintmode for older kernels. Remove when config(8) major + * version rolls over. + */ + if (versreq <= CONFIGVERS_ENVMODE_REQ) + fprintf(ofp, "int hintmode = %d;\n", + STAILQ_EMPTY(&hints) ? 1 : 0); fprintf(ofp, "char static_hints[] = {\n"); nvl = nvlist_create(0); STAILQ_FOREACH(hint, &hints, hint_next) { @@ -341,6 +348,13 @@ makeenv(void) fprintf(ofp, "#include \n"); fprintf(ofp, "#include \n"); fprintf(ofp, "\n"); + /* + * Write out envmode for older kernels. Remove when config(8) major + * version rolls over. + */ + if (versreq <= CONFIGVERS_ENVMODE_REQ) + fprintf(ofp, "int envmode = %d;\n", + STAILQ_EMPTY(&envvars) ? 1 : 0); fprintf(ofp, "char static_env[] = {\n"); nvl = nvlist_create(0); STAILQ_FOREACH(envvar, &envvars, envvar_next) { From owner-svn-src-head@freebsd.org Tue Jul 17 14:34:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8B791041D97; Tue, 17 Jul 2018 14:34:54 +0000 (UTC) (envelope-from kevans@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 960CE8BC50; Tue, 17 Jul 2018 14:34:54 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76E5D4DDC; Tue, 17 Jul 2018 14:34:54 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HEYsfx079258; Tue, 17 Jul 2018 14:34:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HEYs81079257; Tue, 17 Jul 2018 14:34:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807171434.w6HEYs81079257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 17 Jul 2018 14:34:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336416 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 336416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 14:34:55 -0000 Author: kevans Date: Tue Jul 17 14:34:54 2018 New Revision: 336416 URL: https://svnweb.freebsd.org/changeset/base/336416 Log: Fix GCC 4.2 build after r336415, proper declaration and prototype Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Tue Jul 17 14:14:53 2018 (r336415) +++ head/usr.sbin/config/main.c Tue Jul 17 14:34:54 2018 (r336416) @@ -93,6 +93,7 @@ static void get_srcdir(void); static void usage(void); static void cleanheaders(char *); static void kernconfdump(const char *); +static void badversion(void); static void checkversion(void); extern int yyparse(void); @@ -743,8 +744,8 @@ kernconfdump(const char *file) fclose(fp); } -static void -badversion() +static void +badversion(void) { fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); fprintf(stderr, "config version = %d, ", CONFIGVERS); From owner-svn-src-head@freebsd.org Tue Jul 17 14:56:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C9C31042A90; Tue, 17 Jul 2018 14:56:55 +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 4BE098C8CA; Tue, 17 Jul 2018 14:56:55 +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 283F05104; Tue, 17 Jul 2018 14:56:55 +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 w6HEusp6089790; Tue, 17 Jul 2018 14:56:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HEusWp089789; Tue, 17 Jul 2018 14:56:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807171456.w6HEusWp089789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 17 Jul 2018 14:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336417 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 336417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 14:56:55 -0000 Author: markj Date: Tue Jul 17 14:56:54 2018 New Revision: 336417 URL: https://svnweb.freebsd.org/changeset/base/336417 Log: Add a FALLTHROUGH comment to kvprintf(). Submitted by: Sebastian Huber MFC after: 3 days Modified: head/sys/kern/subr_prf.c Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Tue Jul 17 14:34:54 2018 (r336416) +++ head/sys/kern/subr_prf.c Tue Jul 17 14:56:54 2018 (r336417) @@ -716,6 +716,7 @@ reswitch: switch (ch = (u_char)*fmt++) { padc = '0'; goto reswitch; } + /* FALLTHROUGH */ case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': for (n = 0;; ++fmt) { From owner-svn-src-head@freebsd.org Tue Jul 17 15:12:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 304981043860; Tue, 17 Jul 2018 15:12:56 +0000 (UTC) (envelope-from asomers@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 D59688D88D; Tue, 17 Jul 2018 15:12:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B58675442; Tue, 17 Jul 2018 15:12:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HFCt4F000635; Tue, 17 Jul 2018 15:12:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HFCtZP000633; Tue, 17 Jul 2018 15:12:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807171512.w6HFCtZP000633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 17 Jul 2018 15:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336418 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 336418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 15:12:56 -0000 Author: asomers Date: Tue Jul 17 15:12:55 2018 New Revision: 336418 URL: https://svnweb.freebsd.org/changeset/base/336418 Log: audit(4): add tests for _exit(2), cap_enter(2), and cap_getmode(2) Also, fix a bug in common code that could cause other tests to fail: using ppoll(2) in combination with buffered I/O for /dev/auditpipe. Fix it by disabling buffering. Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16099 Modified: head/tests/sys/audit/process-control.c head/tests/sys/audit/utils.c Modified: head/tests/sys/audit/process-control.c ============================================================================== --- head/tests/sys/audit/process-control.c Tue Jul 17 14:56:54 2018 (r336417) +++ head/tests/sys/audit/process-control.c Tue Jul 17 15:12:55 2018 (r336418) @@ -26,6 +26,7 @@ */ #include +#include #include #include #include @@ -34,6 +35,7 @@ #include #include #include +#include #include #include @@ -85,6 +87,35 @@ ATF_TC_CLEANUP(fork_success, tc) */ +ATF_TC_WITH_CLEANUP(_exit_success); +ATF_TC_HEAD(_exit_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "_exit(2) call"); +} + +ATF_TC_BODY(_exit_success, tc) +{ + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE((pid = fork()) != -1); + if (pid) { + snprintf(pcregex, sizeof(pcregex), "exit.*%d.*success", pid); + check_audit(fds, pcregex, pipefd); + } + else + _exit(0); +} + +ATF_TC_CLEANUP(_exit_success, tc) +{ + cleanup(); +} + +/* + * _exit(2) never returns, hence the auditing by default is always successful + */ + + ATF_TC_WITH_CLEANUP(rfork_success); ATF_TC_HEAD(rfork_success, tc) { @@ -1472,9 +1503,104 @@ ATF_TC_CLEANUP(procctl_failure, tc) } +ATF_TC_WITH_CLEANUP(cap_enter_success); +ATF_TC_HEAD(cap_enter_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "cap_enter(2) call"); +} + +ATF_TC_BODY(cap_enter_success, tc) +{ + int capinfo; + size_t len = sizeof(capinfo); + const char *capname = "kern.features.security_capability_mode"; + ATF_REQUIRE_EQ(0, sysctlbyname(capname, &capinfo, &len, NULL, 0)); + + /* Without CAPABILITY_MODE enabled, cap_enter() returns ENOSYS */ + if (!capinfo) + atf_tc_skip("Capsicum is not enabled in the system"); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE((pid = fork()) != -1); + if (pid) { + snprintf(pcregex, sizeof(pcregex), + "cap_enter.*%d.*return,success", pid); + ATF_REQUIRE(wait(&status) != -1); + check_audit(fds, pcregex, pipefd); + } + else { + ATF_REQUIRE_EQ(0, cap_enter()); + _exit(0); + } +} + +ATF_TC_CLEANUP(cap_enter_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(cap_getmode_success); +ATF_TC_HEAD(cap_getmode_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "cap_getmode(2) call"); +} + +ATF_TC_BODY(cap_getmode_success, tc) +{ + int capinfo, modep; + size_t len = sizeof(capinfo); + const char *capname = "kern.features.security_capability_mode"; + ATF_REQUIRE_EQ(0, sysctlbyname(capname, &capinfo, &len, NULL, 0)); + + /* Without CAPABILITY_MODE enabled, cap_getmode() returns ENOSYS */ + if (!capinfo) + atf_tc_skip("Capsicum is not enabled in the system"); + + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "cap_getmode.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, cap_getmode(&modep)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(cap_getmode_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(cap_getmode_failure); +ATF_TC_HEAD(cap_getmode_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "cap_getmode(2) call"); +} + +ATF_TC_BODY(cap_getmode_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "cap_getmode.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* cap_getmode(2) can either fail with EFAULT or ENOSYS */ + ATF_REQUIRE_EQ(-1, cap_getmode(NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(cap_getmode_failure, tc) +{ + cleanup(); +} + + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, fork_success); + ATF_TP_ADD_TC(tp, _exit_success); ATF_TP_ADD_TC(tp, rfork_success); ATF_TP_ADD_TC(tp, rfork_failure); @@ -1539,6 +1665,10 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ktrace_failure); ATF_TP_ADD_TC(tp, procctl_success); ATF_TP_ADD_TC(tp, procctl_failure); + + ATF_TP_ADD_TC(tp, cap_enter_success); + ATF_TP_ADD_TC(tp, cap_getmode_success); + ATF_TP_ADD_TC(tp, cap_getmode_failure); return (atf_no_error()); } Modified: head/tests/sys/audit/utils.c ============================================================================== --- head/tests/sys/audit/utils.c Tue Jul 17 14:56:54 2018 (r336417) +++ head/tests/sys/audit/utils.c Tue Jul 17 15:12:55 2018 (r336418) @@ -211,6 +211,14 @@ FILE ATF_REQUIRE((pipestream = fdopen(fd[0].fd, "r")) != NULL); fd[0].events = POLLIN; + /* + * Disable stream buffering for read operations from /dev/auditpipe. + * Otherwise it is possible that fread(3), called via au_read_rec(3), + * can store buffered data in user-space unbeknown to ppoll(2), which + * as a result, reports that /dev/auditpipe is empty. + */ + ATF_REQUIRE_EQ(0, setvbuf(pipestream, NULL, _IONBF, 0)); + /* Set local preselection audit_class as "no" for audit startup */ set_preselect_mode(fd[0].fd, &nomask); ATF_REQUIRE_EQ(0, system("service auditd onestatus || \ From owner-svn-src-head@freebsd.org Tue Jul 17 15:16:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67F811043967; Tue, 17 Jul 2018 15:16:35 +0000 (UTC) (envelope-from kevans@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 0BCF18DA75; Tue, 17 Jul 2018 15:16:35 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDE785449; Tue, 17 Jul 2018 15:16:34 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HFGYrH000913; Tue, 17 Jul 2018 15:16:34 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HFGY9k000912; Tue, 17 Jul 2018 15:16:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807171516.w6HFGY9k000912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 17 Jul 2018 15:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336419 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 336419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 15:16:35 -0000 Author: kevans Date: Tue Jul 17 15:16:34 2018 New Revision: 336419 URL: https://svnweb.freebsd.org/changeset/base/336419 Log: config(8): Invert checks; envmode/hintmode reflect "env provided"1 Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Jul 17 15:12:55 2018 (r336418) +++ head/usr.sbin/config/mkmakefile.c Tue Jul 17 15:16:34 2018 (r336419) @@ -313,7 +313,7 @@ makehints(void) */ if (versreq <= CONFIGVERS_ENVMODE_REQ) fprintf(ofp, "int hintmode = %d;\n", - STAILQ_EMPTY(&hints) ? 1 : 0); + !STAILQ_EMPTY(&hints) ? 1 : 0); fprintf(ofp, "char static_hints[] = {\n"); nvl = nvlist_create(0); STAILQ_FOREACH(hint, &hints, hint_next) { @@ -354,7 +354,7 @@ makeenv(void) */ if (versreq <= CONFIGVERS_ENVMODE_REQ) fprintf(ofp, "int envmode = %d;\n", - STAILQ_EMPTY(&envvars) ? 1 : 0); + !STAILQ_EMPTY(&envvars) ? 1 : 0); fprintf(ofp, "char static_env[] = {\n"); nvl = nvlist_create(0); STAILQ_FOREACH(envvar, &envvars, envvar_next) { From owner-svn-src-head@freebsd.org Tue Jul 17 19:05:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B280104AB20; Tue, 17 Jul 2018 19:05:31 +0000 (UTC) (envelope-from cperciva@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 0BC237515D; Tue, 17 Jul 2018 19:05:31 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCD927958; Tue, 17 Jul 2018 19:05:30 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HJ5UrH022316; Tue, 17 Jul 2018 19:05:30 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HJ5U7j022315; Tue, 17 Jul 2018 19:05:30 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201807171905.w6HJ5U7j022315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 17 Jul 2018 19:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336420 - head/release X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 336420 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 19:05:31 -0000 Author: cperciva Date: Tue Jul 17 19:05:30 2018 New Revision: 336420 URL: https://svnweb.freebsd.org/changeset/base/336420 Log: Teach EC2 AMI release code to send an SNS notification after publishing new AMIs if EC2SNSTOPIC is defined. Reviewed by: gjb Requested by: Amazon Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Tue Jul 17 15:16:34 2018 (r336419) +++ head/release/Makefile.ec2 Tue Jul 17 19:05:30 2018 (r336420) @@ -11,6 +11,12 @@ AMINAMESUFFIX!= date +-%Y-%m-%d .if defined(EC2PUBLIC) PUBLISH= --public .endif +.if defined(EC2SNSTOPIC) +EC2SNSREL= ${REVISION}-${BRANCH} +EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' +EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} +EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} +.endif CLEANFILES+= ec2ami @@ -55,5 +61,6 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ - ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} + ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ + ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} From owner-svn-src-head@freebsd.org Tue Jul 17 20:11:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C19A104D124; Tue, 17 Jul 2018 20:11:53 +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 BCF0A77AD6; Tue, 17 Jul 2018 20:11:52 +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 9E352104AB; Tue, 17 Jul 2018 20:11:52 +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 w6HKBqNa055424; Tue, 17 Jul 2018 20:11:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HKBqj5055423; Tue, 17 Jul 2018 20:11:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172011.w6HKBqj5055423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 20:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336424 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 336424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 20:11:53 -0000 Author: imp Date: Tue Jul 17 20:11:52 2018 New Revision: 336424 URL: https://svnweb.freebsd.org/changeset/base/336424 Log: Fix typo in the command summary. Of course, I can't get the command to work, but it's a start... Modified: head/stand/efi/libefi/env.c Modified: head/stand/efi/libefi/env.c ============================================================================== --- head/stand/efi/libefi/env.c Tue Jul 17 19:46:52 2018 (r336423) +++ head/stand/efi/libefi/env.c Tue Jul 17 20:11:52 2018 (r336424) @@ -118,7 +118,7 @@ command_efi_show(int argc, char *argv[]) * print all the env vars tagged with UUID * efi-show -v var * search all the env vars and print the ones matching var - * eif-show -u UUID -v var + * eif-show -g UUID -v var * eif-show UUID var * print all the env vars that match UUID and var */ From owner-svn-src-head@freebsd.org Tue Jul 17 20:20:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4AC5104D5BF for ; Tue, 17 Jul 2018 20:20:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 3FD10780D3 for ; Tue, 17 Jul 2018 20:20:59 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: e56d4d47-89fe-11e8-8837-614b7c574d04 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 outbound1.ore.mailhop.org (Halon) with ESMTPSA id e56d4d47-89fe-11e8-8837-614b7c574d04; Tue, 17 Jul 2018 20:20:50 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6HKKna5054844; Tue, 17 Jul 2018 14:20:49 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1531858849.26036.32.camel@freebsd.org> Subject: Re: svn commit: r336424 - head/stand/efi/libefi From: Ian Lepore To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 17 Jul 2018 14:20:49 -0600 In-Reply-To: <201807172011.w6HKBqj5055423@repo.freebsd.org> References: <201807172011.w6HKBqj5055423@repo.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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 20:20:59 -0000 On Tue, 2018-07-17 at 20:11 +0000, Warner Losh wrote: > Author: imp > Date: Tue Jul 17 20:11:52 2018 > New Revision: 336424 > URL: https://svnweb.freebsd.org/changeset/base/336424 > > Log: >   Fix typo in the command summary. >    >   Of course, I can't get the command to work, but it's a start... > > Modified: >   head/stand/efi/libefi/env.c > > Modified: head/stand/efi/libefi/env.c > ============================================================================== > --- head/stand/efi/libefi/env.c Tue Jul 17 19:46:52 2018 (r336423) > +++ head/stand/efi/libefi/env.c Tue Jul 17 20:11:52 2018 (r336424) > @@ -118,7 +118,7 @@ command_efi_show(int argc, char *argv[]) >    * print all the env vars tagged with UUID >    * efi-show -v var >    * search all the env vars and print the ones matching var > -  * eif-show -u UUID -v var > +  * eif-show -g UUID -v var >    * eif-show UUID var >    * print all the env vars that match UUID and var >    */ > Speaking of typos, presumably all those eif should be efi. -- Ian From owner-svn-src-head@freebsd.org Tue Jul 17 20:21:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 796E4104D762 for ; Tue, 17 Jul 2018 20:21:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDEDF782D9 for ; Tue, 17 Jul 2018 20:21:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id v71-v6so993256itb.3 for ; Tue, 17 Jul 2018 13:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=i7P9/1AVJvLh5AhAMuFylo9xmJAHRBIKnmBl/9OnCuE=; b=VBDu9qvxSg2BKnNcCv8wetNsz029ruzK1xGAWtJMp+cB9/6y5dBpWjZGM69D3Z1QiK FnbfBP8xqFtqc+tN7n/d1IM9jGuCRwmyWUCpDTkmTB7ZGxPOHB9jI+VW0W5sLuHc2eaV YUZnPj9cmmZf8x0CprjLyEZDZvNeUbsRLQBgiV1v0hIbslxqxEzBWNLJReldYZYjYAM0 Di5KZhcFAKg4mzl3u9FsqlCEpmkwNlGFDoS3hQhNLuDyXUtfX1s07bQNoTX9XhBJF6cp qFED8RNAuRAMGtEbQtlEEv2RKuAPZkDc9QvVRO0mohyR52VQ+gVH/D/engK1CVrzT0s7 mbrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=i7P9/1AVJvLh5AhAMuFylo9xmJAHRBIKnmBl/9OnCuE=; b=iyiftizNvPyupSIheBFUskQHBuwTvPiB+NaPpj4fH1pw71/HAplxrQMlnIwWkbdnDR XWxVPnVFI+xklVxWX+asUrq2WRHntDVR1RyacRTR1xlrIng0lNFWeJTYDBcVhq55cH1O tGx5lFck3ouwzm/dDLGiv1ZrouRqJVhqHugWZoZEb120qRDrb6b3wCn554PUbRjphAR7 BPlXb6if+XNRV1qqMkrnFZ1GEnKsMkZr/AMdXJ0OKwIdS0kACNJ/fFn0K4ZU0Sx6vKJM WIx8kCk79s6uLMhcY4nlFFnUWaPc2QQlrg1d5XsucP1wCheyp0xA/+/e4k7xx0wI3bdB aWyQ== X-Gm-Message-State: AOUpUlF+15WYRRlgdr3N+DGNz6ZRaRNxOvV2629ko5F/dnUP535Aoaa/ LAVYFyjm8QVwoJ8hVWF3RQJopAVeGyS02ci4SZj5cA== X-Google-Smtp-Source: AAOMgpfietYQUHe64xAeT1WkEViVRh+ZiXUUVxIzV66/9oJarZNNSGUq+vZIq2d9mKUhMoJ6KXa3FmxJlFODVqYsy4U= X-Received: by 2002:a24:d0d7:: with SMTP id m206-v6mr2791939itg.1.1531858911986; Tue, 17 Jul 2018 13:21:51 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:1183:0:0:0:0:0 with HTTP; Tue, 17 Jul 2018 13:21:51 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <1531858849.26036.32.camel@freebsd.org> References: <201807172011.w6HKBqj5055423@repo.freebsd.org> <1531858849.26036.32.camel@freebsd.org> From: Warner Losh Date: Tue, 17 Jul 2018 14:21:51 -0600 X-Google-Sender-Auth: Y2BbY0EP8Z0JA4jeK1fxzoQ3hqQ Message-ID: Subject: Re: svn commit: r336424 - head/stand/efi/libefi To: Ian Lepore Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 20:21:53 -0000 Sure. Everything else is wrong with this function. :( On Tue, Jul 17, 2018 at 2:20 PM, Ian Lepore wrote: > On Tue, 2018-07-17 at 20:11 +0000, Warner Losh wrote: > > Author: imp > > Date: Tue Jul 17 20:11:52 2018 > > New Revision: 336424 > > URL: https://svnweb.freebsd.org/changeset/base/336424 > > > > Log: > > Fix typo in the command summary. > > > > Of course, I can't get the command to work, but it's a start... > > > > Modified: > > head/stand/efi/libefi/env.c > > > > Modified: head/stand/efi/libefi/env.c > > ============================================================ > ================== > > --- head/stand/efi/libefi/env.c Tue Jul 17 19:46:52 2018 > (r336423) > > +++ head/stand/efi/libefi/env.c Tue Jul 17 20:11:52 2018 > (r336424) > > @@ -118,7 +118,7 @@ command_efi_show(int argc, char *argv[]) > > * print all the env vars tagged with UUID > > * efi-show -v var > > * search all the env vars and print the ones matching var > > - * eif-show -u UUID -v var > > + * eif-show -g UUID -v var > > * eif-show UUID var > > * print all the env vars that match UUID and var > > */ > > > > Speaking of typos, presumably all those eif should be efi. > > -- Ian > From owner-svn-src-head@freebsd.org Tue Jul 17 20:26:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DEA7104D8F6; Tue, 17 Jul 2018 20:26:18 +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 0CC5B78529; Tue, 17 Jul 2018 20:26:18 +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 DDAE61069E; Tue, 17 Jul 2018 20:26:17 +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 w6HKQH4h063789; Tue, 17 Jul 2018 20:26:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HKQH6k063788; Tue, 17 Jul 2018 20:26:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172026.w6HKQH6k063788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 20:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336425 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 336425 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 20:26:18 -0000 Author: imp Date: Tue Jul 17 20:26:17 2018 New Revision: 336425 URL: https://svnweb.freebsd.org/changeset/base/336425 Log: More typos Noticed by: ian@ Modified: head/stand/efi/libefi/env.c Modified: head/stand/efi/libefi/env.c ============================================================================== --- head/stand/efi/libefi/env.c Tue Jul 17 20:11:52 2018 (r336424) +++ head/stand/efi/libefi/env.c Tue Jul 17 20:26:17 2018 (r336425) @@ -114,12 +114,12 @@ command_efi_show(int argc, char *argv[]) /* * efi-show [-a] * print all the env - * efi-show -u UUID + * efi-show -g UUID * print all the env vars tagged with UUID * efi-show -v var * search all the env vars and print the ones matching var - * eif-show -g UUID -v var - * eif-show UUID var + * efi-show -g UUID -v var + * efi-show UUID var * print all the env vars that match UUID and var */ /* NB: We assume EFI_GUID is the same as uuid_t */ From owner-svn-src-head@freebsd.org Tue Jul 17 21:05:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABFF7104EB36; Tue, 17 Jul 2018 21:05:09 +0000 (UTC) (envelope-from dexuan@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 5E32579C8B; Tue, 17 Jul 2018 21:05:09 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CC9D10CED; Tue, 17 Jul 2018 21:05:09 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HL59WG083863; Tue, 17 Jul 2018 21:05:09 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HL59F3083862; Tue, 17 Jul 2018 21:05:09 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201807172105.w6HL59F3083862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Tue, 17 Jul 2018 21:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336426 - head/sys/dev/hyperv/netvsc X-SVN-Group: head X-SVN-Commit-Author: dexuan X-SVN-Commit-Paths: head/sys/dev/hyperv/netvsc X-SVN-Commit-Revision: 336426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 21:05:09 -0000 Author: dexuan Date: Tue Jul 17 21:05:08 2018 New Revision: 336426 URL: https://svnweb.freebsd.org/changeset/base/336426 Log: hyperv/hn: Fix panic in hypervisor code upon device detach event Submitted by: hselasky Reviewed by: dexuan MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D16139 Modified: head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Tue Jul 17 20:26:17 2018 (r336425) +++ head/sys/dev/hyperv/netvsc/if_hn.c Tue Jul 17 21:05:08 2018 (r336426) @@ -1161,6 +1161,13 @@ hn_ismyvf(const struct hn_softc *sc, const struct ifne strcmp(ifp->if_dname, "vlan") == 0) return (false); + /* + * During detach events ifp->if_addr might be NULL. + * Make sure the bcmp() below doesn't panic on that: + */ + if (ifp->if_addr == NULL || hn_ifp->if_addr == NULL) + return (false); + if (bcmp(IF_LLADDR(ifp), IF_LLADDR(hn_ifp), ETHER_ADDR_LEN) != 0) return (false); From owner-svn-src-head@freebsd.org Tue Jul 17 21:07:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB20E104EC53; Tue, 17 Jul 2018 21:07:54 +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 A011A79E89; Tue, 17 Jul 2018 21:07:54 +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 7CA2210CF6; Tue, 17 Jul 2018 21:07:54 +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 w6HL7sBT084014; Tue, 17 Jul 2018 21:07:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HL7sDq084012; Tue, 17 Jul 2018 21:07:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172107.w6HL7sDq084012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 21:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336427 - in head/sys: arm64/include riscv/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm64/include riscv/include X-SVN-Commit-Revision: 336427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 21:07:55 -0000 Author: imp Date: Tue Jul 17 21:07:53 2018 New Revision: 336427 URL: https://svnweb.freebsd.org/changeset/base/336427 Log: Remove VM_FREELIST_ISADMA. It's not needed on these architectures. Differential Review: https://reviews.freebsd.org/D16290 Modified: head/sys/arm64/include/vmparam.h head/sys/riscv/include/vmparam.h Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Tue Jul 17 21:05:08 2018 (r336426) +++ head/sys/arm64/include/vmparam.h Tue Jul 17 21:07:53 2018 (r336427) @@ -67,10 +67,7 @@ #define VM_PHYSSEG_SPARSE /* - * The number of PHYSSEG entries must be one greater than the number - * of phys_avail entries because the phys_avail entry that spans the - * largest physical address that is accessible by ISA DMA is split - * into two PHYSSEG entries. + * The number of PHYSSEG entries. */ #define VM_PHYSSEG_MAX 64 @@ -85,14 +82,11 @@ #define VM_FREEPOOL_DIRECT 1 /* - * Create two free page lists: VM_FREELIST_DEFAULT is for physical - * pages that are above the largest physical address that is - * accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages - * that are below that address. + * Create one free page lists: VM_FREELIST_DEFAULT is for all physical + * pages. */ -#define VM_NFREELIST 2 +#define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 -#define VM_FREELIST_ISADMA 1 /* * An allocation size of 16MB is supported in order to optimize the Modified: head/sys/riscv/include/vmparam.h ============================================================================== --- head/sys/riscv/include/vmparam.h Tue Jul 17 21:05:08 2018 (r336426) +++ head/sys/riscv/include/vmparam.h Tue Jul 17 21:07:53 2018 (r336427) @@ -67,10 +67,7 @@ #define VM_PHYSSEG_SPARSE /* - * The number of PHYSSEG entries must be one greater than the number - * of phys_avail entries because the phys_avail entry that spans the - * largest physical address that is accessible by ISA DMA is split - * into two PHYSSEG entries. + * The number of PHYSSEG entries. */ #define VM_PHYSSEG_MAX 64 @@ -85,14 +82,11 @@ #define VM_FREEPOOL_DIRECT 1 /* - * Create two free page lists: VM_FREELIST_DEFAULT is for physical - * pages that are above the largest physical address that is - * accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages - * that are below that address. + * Create one free page list: VM_FREELIST_DEFAULT is for all physical + * pages. */ -#define VM_NFREELIST 2 +#define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 -#define VM_FREELIST_ISADMA 1 /* * An allocation size of 16MB is supported in order to optimize the From owner-svn-src-head@freebsd.org Tue Jul 17 21:08:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B9A8104EC8B; Tue, 17 Jul 2018 21:08:03 +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 B45DB79F61; Tue, 17 Jul 2018 21:08:02 +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 D12BB10CF7; Tue, 17 Jul 2018 21:08: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 w6HL81QK084074; Tue, 17 Jul 2018 21:08:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HL818k084073; Tue, 17 Jul 2018 21:08:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172108.w6HL818k084073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 21:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336428 - head/sys/sparc64/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sparc64/include X-SVN-Commit-Revision: 336428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 21:08:03 -0000 Author: imp Date: Tue Jul 17 21:08:01 2018 New Revision: 336428 URL: https://svnweb.freebsd.org/changeset/base/336428 Log: Remove VM_FREELIST_ISADMA Sparc64 doesn't have any devices that do DMA that are attached to isa or ebus, so we don't need a low-memory pool. Modified: head/sys/sparc64/include/vmparam.h Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Tue Jul 17 21:07:53 2018 (r336427) +++ head/sys/sparc64/include/vmparam.h Tue Jul 17 21:08:01 2018 (r336428) @@ -87,14 +87,11 @@ #define VM_FREEPOOL_DIRECT 1 /* - * Create two free page lists: VM_FREELIST_DEFAULT is for physical - * pages that are above the largest physical address that is - * accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages - * that are below that address. + * Create one free page lists: VM_FREELIST_DEFAULT is for all physical + * pages. */ -#define VM_NFREELIST 2 +#define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 -#define VM_FREELIST_ISADMA 1 /* * An allocation size of 16MB is supported in order to optimize the From owner-svn-src-head@freebsd.org Tue Jul 17 21:18:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00A1B104F255; Tue, 17 Jul 2018 21:18:50 +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 A53587A728; Tue, 17 Jul 2018 21:18:49 +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 824C210E9D; Tue, 17 Jul 2018 21:18:49 +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 w6HLIndf089246; Tue, 17 Jul 2018 21:18:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HLInBH089245; Tue, 17 Jul 2018 21:18:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172118.w6HLInBH089245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 21:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336430 - head/sys/sparc64/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sparc64/include X-SVN-Commit-Revision: 336430 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 21:18:50 -0000 Author: imp Date: Tue Jul 17 21:18:49 2018 New Revision: 336430 URL: https://svnweb.freebsd.org/changeset/base/336430 Log: Fix a typo: change lists to list to match rest of sentence. Also, I misspoke in r336428. Any devices on sparc64 machines on "isa" that can do DMA can do 32-bit address DMA and aren't limited to 24-bits of address. Modified: head/sys/sparc64/include/vmparam.h Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Tue Jul 17 21:10:31 2018 (r336429) +++ head/sys/sparc64/include/vmparam.h Tue Jul 17 21:18:49 2018 (r336430) @@ -87,7 +87,7 @@ #define VM_FREEPOOL_DIRECT 1 /* - * Create one free page lists: VM_FREELIST_DEFAULT is for all physical + * Create one free page list: VM_FREELIST_DEFAULT is for all physical * pages. */ #define VM_NFREELIST 1 From owner-svn-src-head@freebsd.org Tue Jul 17 21:45:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69E11104FED9; Tue, 17 Jul 2018 21:45:15 +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 1A1F57B3D1; Tue, 17 Jul 2018 21:45:15 +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 EB1B4113C0; Tue, 17 Jul 2018 21:45:14 +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 w6HLjEsk004494; Tue, 17 Jul 2018 21:45:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HLjEhl004493; Tue, 17 Jul 2018 21:45:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172145.w6HLjEhl004493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 21:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336431 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 336431 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 21:45:15 -0000 Author: imp Date: Tue Jul 17 21:45:14 2018 New Revision: 336431 URL: https://svnweb.freebsd.org/changeset/base/336431 Log: Remove bogus attempt to simulate scrolling. It's not needed and messes up serial output. Setting the cursor position after every character is inefficient, and causes all lines to be over-printed in the serial console for the boot loader. Allow the terminal to do the emulation. This isn't completely perfect when the size of the terminal attached to the serial port isn't the same as 80x25 to match the viedoe console (or whatever the video console is). While imperfect still, these changes make it much better. This makes the serial port useful with UEFI. Differential Revision: https://reviews.freebsd.org/D16309 Modified: head/stand/efi/libefi/efi_console.c Modified: head/stand/efi/libefi/efi_console.c ============================================================================== --- head/stand/efi/libefi/efi_console.c Tue Jul 17 21:18:49 2018 (r336430) +++ head/stand/efi/libefi/efi_console.c Tue Jul 17 21:45:14 2018 (r336431) @@ -147,20 +147,20 @@ efi_cons_rawputchar(int c) switch (c) { case '\r': curx = 0; - curs_move(&curx, &cury, curx, cury); + efi_cons_efiputchar('\r'); return; case '\n': + efi_cons_efiputchar('\n'); + efi_cons_efiputchar('\r'); cury++; - if (cury >= y) { - efi_cons_efiputchar('\n'); + if (cury >= y) cury--; - } else - curs_move(&curx, &cury, curx, cury); + curx = 0; return; case '\b': if (curx > 0) { + efi_cons_efiputchar('\b'); curx--; - curs_move(&curx, &cury, curx, cury); } return; default: @@ -175,7 +175,6 @@ efi_cons_rawputchar(int c) cury--; } } - curs_move(&curx, &cury, curx, cury); #endif } } From owner-svn-src-head@freebsd.org Tue Jul 17 23:00:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82C36102941D; Tue, 17 Jul 2018 23:00:53 +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 352E17D396; Tue, 17 Jul 2018 23:00:53 +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 165B311F21; Tue, 17 Jul 2018 23:00:53 +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 w6HN0qrV040084; Tue, 17 Jul 2018 23:00:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HN0qHk040083; Tue, 17 Jul 2018 23:00:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172300.w6HN0qHk040083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 23:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336432 - head/sys/mips/cavium X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/mips/cavium X-SVN-Commit-Revision: 336432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 23:00:53 -0000 Author: imp Date: Tue Jul 17 23:00:52 2018 New Revision: 336432 URL: https://svnweb.freebsd.org/changeset/base/336432 Log: Fix compile error introduced in r336245. Include sys/boot.h to pickup the prototypes for boot_parse_arg. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Tue Jul 17 21:45:14 2018 (r336431) +++ head/sys/mips/cavium/octeon_machdep.c Tue Jul 17 23:00:52 2018 (r336432) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include From owner-svn-src-head@freebsd.org Tue Jul 17 23:16:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E01201029AF5; Tue, 17 Jul 2018 23:16:05 +0000 (UTC) (envelope-from cperciva@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 92DD17DAD8; Tue, 17 Jul 2018 23:16:05 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7523312236; Tue, 17 Jul 2018 23:16:05 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HNG52x049862; Tue, 17 Jul 2018 23:16:05 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HNG5pk049861; Tue, 17 Jul 2018 23:16:05 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201807172316.w6HNG5pk049861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 17 Jul 2018 23:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336433 - head/release X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 336433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 23:16:06 -0000 Author: cperciva Date: Tue Jul 17 23:16:05 2018 New Revision: 336433 URL: https://svnweb.freebsd.org/changeset/base/336433 Log: Check that EC2SNSTOPIC and EC2PUBLIC are non-empty, along with being defined, in order to avoid problems with thermite.sh. Reported by: gjb Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Tue Jul 17 23:00:52 2018 (r336432) +++ head/release/Makefile.ec2 Tue Jul 17 23:16:05 2018 (r336433) @@ -8,10 +8,10 @@ .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" AMINAMESUFFIX!= date +-%Y-%m-%d .endif -.if defined(EC2PUBLIC) +.if defined(EC2PUBLIC) && !empty(EC2PUBLIC) PUBLISH= --public .endif -.if defined(EC2SNSTOPIC) +.if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) EC2SNSREL= ${REVISION}-${BRANCH} EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} From owner-svn-src-head@freebsd.org Tue Jul 17 23:23:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 202161029F5C; Tue, 17 Jul 2018 23:23:36 +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 B6BC47DF29; Tue, 17 Jul 2018 23:23: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 9378F123C9; Tue, 17 Jul 2018 23:23: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 w6HNNZuK054626; Tue, 17 Jul 2018 23:23:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HNNZ96054624; Tue, 17 Jul 2018 23:23:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172323.w6HNNZ96054624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 23:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336434 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 23:23:36 -0000 Author: imp Date: Tue Jul 17 23:23:34 2018 New Revision: 336434 URL: https://svnweb.freebsd.org/changeset/base/336434 Log: As discussed several times on freebsd-arch, start to decommission armeb. Remove armeb/arm from KNOWN_ARCHS. Remove armeb from arm universe targets. Differential Revision: https://reviews.freebsd.org/D16257 Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jul 17 23:16:05 2018 (r336433) +++ head/Makefile Tue Jul 17 23:23:34 2018 (r336434) @@ -484,7 +484,7 @@ worlds: .PHONY make(targets) || make(universe-toolchain) TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 _UNIVERSE_TARGETS= ${TARGETS} -TARGET_ARCHES_arm?= arm armeb armv6 armv7 +TARGET_ARCHES_arm?= arm armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jul 17 23:16:05 2018 (r336433) +++ head/Makefile.inc1 Tue Jul 17 23:23:34 2018 (r336434) @@ -132,7 +132,6 @@ TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//: KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ arm \ - armeb/arm \ armv6/arm \ armv7/arm \ i386 \ From owner-svn-src-head@freebsd.org Tue Jul 17 23:23:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB2CE1029F89; Tue, 17 Jul 2018 23:23: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.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 B231B7DFC6; Tue, 17 Jul 2018 23:23:41 +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 5B905123CA; Tue, 17 Jul 2018 23:23:40 +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 w6HNNe8p054680; Tue, 17 Jul 2018 23:23:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HNNecb054679; Tue, 17 Jul 2018 23:23:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172323.w6HNNecb054679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 23:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336435 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 336435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 23:23:44 -0000 Author: imp Date: Tue Jul 17 23:23:39 2018 New Revision: 336435 URL: https://svnweb.freebsd.org/changeset/base/336435 Log: Remove armeb from arch.7 Remove all the details about armeb from arch(7), except for its release start and end, like alpha, ia64 and pc98. Differential Revision: https://reviews.freebsd.org/D16257 Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Tue Jul 17 23:23:34 2018 (r336434) +++ head/share/man/man7/arch.7 Tue Jul 17 23:23:39 2018 (r336435) @@ -93,7 +93,7 @@ architectures, the final release. .It alpha Ta 3.2 Ta 6.4 .It amd64 Ta 5.1 .It arm Ta 6.0 -.It armeb Ta 8.0 +.It armeb Ta 8.0 Ta 11.x .It armv6 Ta 10.0 .It armv7 Ta 12.0 .It arm64 Ta 11.0 @@ -193,7 +193,6 @@ Machine-dependent type sizes: .It Sy Architecture Ta Sy void * Ta Sy long double Ta Sy time_t .It amd64 Ta 8 Ta 16 Ta 8 .It arm Ta 4 Ta 8 Ta 8 -.It armeb Ta 4 Ta 8 Ta 8 .It armv6 Ta 4 Ta 8 Ta 8 .It arm64 Ta 8 Ta 16 Ta 8 .It i386 Ta 4 Ta 12 Ta 4 @@ -221,7 +220,6 @@ is 8 bytes on all supported architectures except i386. .It Sy Architecture Ta Sy Endianness Ta Sy char Signedness .It amd64 Ta little Ta signed .It arm Ta little Ta unsigned -.It armeb Ta big Ta unsigned .It armv6 Ta little Ta unsigned .It armv7 Ta little Ta unsigned .It arm64 Ta little Ta unsigned @@ -247,7 +245,6 @@ is 8 bytes on all supported architectures except i386. .It Sy Architecture Ta Sy Page Sizes .It amd64 Ta 4K, 2M, 1G .It arm Ta 4K -.It armeb Ta 4K .It armv6 Ta 4K, 1M .It armv7 Ta 4K, 1M .It arm64 Ta 4K, 2M, 1G @@ -273,7 +270,6 @@ is 8 bytes on all supported architectures except i386. .It Sy Architecture Ta Sy float, double Ta Sy long double .It amd64 Ta hard Ta hard, 80 bit .It arm Ta soft Ta soft, double precision -.It armeb Ta soft Ta soft, double precision .It armv6 Ta hard(1) Ta hard, double precision .It armv7 Ta hard(1) Ta hard, double precision .It arm64 Ta hard Ta soft, quad precision @@ -326,7 +322,6 @@ Architecture-specific macros: .It Sy Architecture Ta Sy Predefined macros .It amd64 Ta Dv __amd64__, Dv __x86_64__ .It arm Ta Dv __arm__ -.It armeb Ta Dv __arm__ .It armv6 Ta Dv __arm__, Dv __ARM_ARCH >= 6 .It armv7 Ta Dv __arm__, Dv __ARM_ARCH >= 7 .It arm64 Ta Dv __aarch64__ From owner-svn-src-head@freebsd.org Tue Jul 17 23:23:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E45641029FB6; Tue, 17 Jul 2018 23:23:51 +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 03F217E0C7; Tue, 17 Jul 2018 23:23:49 +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 C2FE4123CB; Tue, 17 Jul 2018 23:23:48 +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 w6HNNmvQ054746; Tue, 17 Jul 2018 23:23:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HNNkmN054734; Tue, 17 Jul 2018 23:23:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172323.w6HNNkmN054734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 23:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336436 - in head/sys: arm/arm arm/conf arm/include arm/xscale arm/xscale/ixp425 conf dev/cfi dev/hwpmc dev/usb/controller modules/cfi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/arm arm/conf arm/include arm/xscale arm/xscale/ixp425 conf dev/cfi dev/hwpmc dev/usb/controller modules/cfi X-SVN-Commit-Revision: 336436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 23:23:52 -0000 Author: imp Date: Tue Jul 17 23:23:45 2018 New Revision: 336436 URL: https://svnweb.freebsd.org/changeset/base/336436 Log: Remove kernel support for armeb Remove all the big-endian arm architectures (ixp425 and ixp435) support in the kernel and associated drivers. Differential Revision: https://reviews.freebsd.org/D16257 Deleted: head/sys/arm/conf/AVILA head/sys/arm/conf/AVILA.hints head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CAMBRIA.hints head/sys/arm/conf/NSLU head/sys/arm/conf/NSLU.hints head/sys/arm/xscale/ixp425/avila_ata.c head/sys/arm/xscale/ixp425/avila_gpio.c head/sys/arm/xscale/ixp425/avila_led.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/ixp425/cambria_exp_space.c head/sys/arm/xscale/ixp425/cambria_fled.c head/sys/arm/xscale/ixp425/cambria_gpio.c head/sys/arm/xscale/ixp425/cambria_led.c head/sys/arm/xscale/ixp425/files.avila head/sys/arm/xscale/ixp425/files.ixp425 head/sys/arm/xscale/ixp425/if_npe.c head/sys/arm/xscale/ixp425/if_npereg.h head/sys/arm/xscale/ixp425/ixdp425_pci.c head/sys/arm/xscale/ixp425/ixdp425reg.h head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425_a4x_io.S head/sys/arm/xscale/ixp425/ixp425_a4x_space.c head/sys/arm/xscale/ixp425/ixp425_iic.c head/sys/arm/xscale/ixp425/ixp425_intr.h head/sys/arm/xscale/ixp425/ixp425_mem.c head/sys/arm/xscale/ixp425/ixp425_npe.c head/sys/arm/xscale/ixp425/ixp425_npereg.h head/sys/arm/xscale/ixp425/ixp425_npevar.h head/sys/arm/xscale/ixp425/ixp425_pci.c head/sys/arm/xscale/ixp425/ixp425_pci_asm.S head/sys/arm/xscale/ixp425/ixp425_pci_space.c head/sys/arm/xscale/ixp425/ixp425_qmgr.c head/sys/arm/xscale/ixp425/ixp425_qmgr.h head/sys/arm/xscale/ixp425/ixp425_space.c head/sys/arm/xscale/ixp425/ixp425_timer.c head/sys/arm/xscale/ixp425/ixp425_wdog.c head/sys/arm/xscale/ixp425/ixp425reg.h head/sys/arm/xscale/ixp425/ixp425var.h head/sys/arm/xscale/ixp425/std.avila head/sys/arm/xscale/ixp425/std.ixp425 head/sys/arm/xscale/ixp425/std.ixp435 head/sys/arm/xscale/ixp425/uart_bus_ixp425.c head/sys/arm/xscale/ixp425/uart_cpu_ixp425.c head/sys/arm/xscale/std.xscale-be head/sys/dev/cfi/cfi_bus_ixp4xx.c head/sys/dev/usb/controller/ehci_ixp4xx.c Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/identcpu-v4.c head/sys/arm/conf/NOTES head/sys/arm/include/cpufunc.h head/sys/arm/include/intr.h head/sys/arm/include/pmap-v4.h head/sys/conf/files.arm head/sys/conf/kern.mk head/sys/conf/options.arm head/sys/dev/hwpmc/hwpmc_xscale.h head/sys/modules/cfi/Makefile Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/arm/arm/cpufunc.c Tue Jul 17 23:23:45 2018 (r336436) @@ -65,11 +65,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifdef CPU_XSCALE_IXP425 -#include -#include -#endif - /* PRIMARY CACHE VARIABLES */ int arm_picache_size; int arm_picache_line_size; @@ -259,7 +254,7 @@ struct cpu_functions pj4bv7_cpufuncs = { }; #endif /* CPU_MV_PJ4B */ -#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) +#if defined(CPU_XSCALE_PXA2X0) struct cpu_functions xscale_cpufuncs = { /* CPU functions */ @@ -309,7 +304,7 @@ struct cpu_functions xscale_cpufuncs = { xscale_setup /* cpu setup */ }; #endif -/* CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 */ +/* CPU_XSCALE_PXA2X0 */ #ifdef CPU_XSCALE_81342 struct cpu_functions xscalec3_cpufuncs = { @@ -467,7 +462,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* flag used in #if defined(CPU_ARM9) || \ defined (CPU_ARM9E) || \ defined(CPU_ARM1176) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_XSCALE_PXA2X0) || \ defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ defined(CPU_XSCALE_81342) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) @@ -725,18 +720,6 @@ set_cpufuncs(void) goto out; } #endif /* CPU_XSCALE_PXA2X0 */ -#ifdef CPU_XSCALE_IXP425 - if (cputype == CPU_ID_IXP425_533 || cputype == CPU_ID_IXP425_400 || - cputype == CPU_ID_IXP425_266 || cputype == CPU_ID_IXP435) { - - cpufuncs = xscale_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* XScale needs it */ - get_cachetype_cp15(); - pmap_pte_init_xscale(); - - goto out; - } -#endif /* CPU_XSCALE_IXP425 */ /* * Bzzzz. And the answer was ... */ @@ -950,8 +933,7 @@ fa526_setup(void) } #endif /* CPU_FA526 */ -#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_81342) +#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342) void xscale_setup(void) { @@ -1017,4 +999,4 @@ xscale_setup(void) __asm __volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); } -#endif /* CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 */ +#endif /* CPU_XSCALE_PXA2X0 */ Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/arm/arm/elf_trampoline.c Tue Jul 17 23:23:45 2018 (r336436) @@ -70,7 +70,7 @@ extern void fa526_idcache_wbinv_all(void); #elif defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all extern void armv5_ec_idcache_wbinv_all(void); -#elif defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) +#elif defined(CPU_XSCALE_PXA2X0) #define cpu_idcache_wbinv_all xscale_cache_purgeID extern void xscale_cache_purgeID(void); #elif defined(CPU_XSCALE_81342) Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/arm/arm/identcpu-v4.c Tue Jul 17 23:23:45 2018 (r336436) @@ -119,13 +119,6 @@ static const char * const pxa27x_steppings[16] = { "rev 12", "rev 13", "rev 14", "rev 15", }; -static const char * const ixp425_steppings[16] = { - "step 0 (A0)", "rev 1 (ARMv5TE)", "rev 2", "rev 3", - "rev 4", "rev 5", "rev 6", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - struct cpuidtab { u_int32_t cpuid; enum cpu_class cpu_class; @@ -199,17 +192,6 @@ const struct cpuidtab cpuids[] = { pxa255_steppings }, { CPU_ID_PXA210C, CPU_CLASS_XSCALE, "PXA210", pxa2x0_steppings }, - - { CPU_ID_IXP425_533, CPU_CLASS_XSCALE, "IXP425 533MHz", - ixp425_steppings }, - { CPU_ID_IXP425_400, CPU_CLASS_XSCALE, "IXP425 400MHz", - ixp425_steppings }, - { CPU_ID_IXP425_266, CPU_CLASS_XSCALE, "IXP425 266MHz", - ixp425_steppings }, - - /* XXX ixp435 steppings? */ - { CPU_ID_IXP435, CPU_CLASS_XSCALE, "IXP435", - ixp425_steppings }, { CPU_ID_MV88FR131, CPU_CLASS_MARVELL, "Feroceon 88FR131", generic_steppings }, Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/arm/conf/NOTES Tue Jul 17 23:23:45 2018 (r336436) @@ -6,8 +6,6 @@ cpu CPU_ARM9 cpu CPU_ARM9E cpu CPU_FA526 cpu CPU_XSCALE_81342 -cpu CPU_XSCALE_IXP425 -cpu CPU_XSCALE_IXP435 cpu CPU_XSCALE_PXA2X0 files "../at91/files.at91" @@ -19,8 +17,6 @@ files "../mv/orion/files.db88f5xxx" files "../mv/orion/files.ts7800" files "../xscale/i8134x/files.crb" files "../xscale/i8134x/files.i81342" -files "../xscale/ixp425/files.avila" -files "../xscale/ixp425/files.ixp425" files "../xscale/pxa/files.pxa" options PHYSADDR=0x00000000 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/arm/include/cpufunc.h Tue Jul 17 23:23:45 2018 (r336436) @@ -314,8 +314,7 @@ void armv5_ec_idcache_wbinv_range(vm_offset_t, vm_size #if defined(CPU_ARM9) || defined(CPU_ARM9E) || \ defined(CPU_FA526) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_81342) + defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342) void armv4_tlb_flushID (void); void armv4_tlb_flushD (void); @@ -325,8 +324,7 @@ void armv4_drain_writebuf (void); void armv4_idcache_inv_all (void); #endif -#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_81342) +#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342) void xscale_cpwait (void); void xscale_cpu_sleep (int mode); @@ -364,7 +362,7 @@ void xscale_cache_flushD_rng (vm_offset_t start, vm_si void xscale_context_switch (void); void xscale_setup (void); -#endif /* CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 */ +#endif /* CPU_XSCALE_PXA2X0 */ #ifdef CPU_XSCALE_81342 Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/arm/include/intr.h Tue Jul 17 23:23:45 2018 (r336436) @@ -75,8 +75,7 @@ int intr_pic_ipi_setup(u_int, const char *, intr_ipi_h #define NIRQ IRQ_GPIO_MAX #elif defined(SOC_MV_DISCOVERY) #define NIRQ 96 -#elif defined(CPU_ARM9) || defined(SOC_MV_KIRKWOOD) || \ - defined(CPU_XSCALE_IXP435) +#elif defined(CPU_ARM9) || defined(SOC_MV_KIRKWOOD) #define NIRQ 64 #elif defined(CPU_CORTEXA) #define NIRQ 1020 Modified: head/sys/arm/include/pmap-v4.h ============================================================================== --- head/sys/arm/include/pmap-v4.h Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/arm/include/pmap-v4.h Tue Jul 17 23:23:45 2018 (r336436) @@ -63,8 +63,7 @@ #define ARM_MMU_GENERIC 0 #endif -#if (defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_81342)) +#if (defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342)) #define ARM_MMU_XSCALE 1 #else #define ARM_MMU_XSCALE 0 Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/conf/files.arm Tue Jul 17 23:23:45 2018 (r336436) @@ -33,14 +33,14 @@ arm/arm/cpufunc_asm.S standard arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 | cpu_arm9e arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 -arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 +arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e -arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 +arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_pxa2x0 | cpu_xscale_81342 arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342 arm/arm/cpuinfo.c standard arm/arm/cpu_asm-v6.S optional armv7 | armv6 Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/conf/kern.mk Tue Jul 17 23:23:45 2018 (r336436) @@ -279,7 +279,6 @@ CFLAGS+= -std=${CSTD} LD_EMULATION_aarch64=aarch64elf LD_EMULATION_amd64=elf_x86_64_fbsd LD_EMULATION_arm=armelf_fbsd -LD_EMULATION_armeb=armelfb_fbsd LD_EMULATION_armv6=armelf_fbsd LD_EMULATION_armv7=armelf_fbsd LD_EMULATION_i386=elf_i386_fbsd Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/conf/options.arm Tue Jul 17 23:23:45 2018 (r336436) @@ -17,8 +17,6 @@ CPU_KRAIT opt_global.h CPU_FA526 opt_global.h CPU_MV_PJ4B opt_global.h CPU_XSCALE_81342 opt_global.h -CPU_XSCALE_IXP425 opt_global.h -CPU_XSCALE_IXP435 opt_global.h CPU_XSCALE_PXA2X0 opt_global.h SMP_ON_UP opt_global.h # Runtime detection of MP extensions DEV_GIC opt_global.h @@ -30,7 +28,6 @@ INTRNG opt_global.h IPI_IRQ_START opt_smp.h IPI_IRQ_END opt_smp.h FREEBSD_BOOT_LOADER opt_global.h -IXP4XX_FLASH_SIZE opt_global.h KERNBASE opt_global.h KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h Modified: head/sys/dev/hwpmc/hwpmc_xscale.h ============================================================================== --- head/sys/dev/hwpmc/hwpmc_xscale.h Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/dev/hwpmc/hwpmc_xscale.h Tue Jul 17 23:23:45 2018 (r336436) @@ -42,9 +42,6 @@ #define XSCALE_PMNC_PMNRESET 0x02 /* Performance Counter Reset */ #define XSCALE_PMNC_CCNTRESET 0x04 /* Clock Counter Reset */ #define XSCALE_PMNC_CCNTDIV 0x08 /* Clock Counter Divider */ -/* IXP425 only -- first generation */ -#define XSCALE_PMNC_EVT0_MASK 0x00ff000 -#define XSCALE_PMNC_EVT1_MASK 0xff00000 #define XSCALE_INTEN_CCNT 0x01 /* Enable Clock Counter Int. */ #define XSCALE_INTEN_PMN0 0x02 /* Enable PMN0 Interrupts */ Modified: head/sys/modules/cfi/Makefile ============================================================================== --- head/sys/modules/cfi/Makefile Tue Jul 17 23:23:39 2018 (r336435) +++ head/sys/modules/cfi/Makefile Tue Jul 17 23:23:45 2018 (r336436) @@ -3,15 +3,8 @@ .PATH: ${SRCTOP}/sys/dev/cfi KMOD= cfi -SRCS= ${_cfi_bus} cfi_core.c cfi_dev.c +SRCS= cfi_bus_fdt.c ofw_bus_if.h cfi_core.c cfi_dev.c SRCS+= bus_if.h device_if.h opt_cfi.h - -.if ${MACHINE} == "arm" -_cfi_bus= cfi_bus_fdt.c cfi_bus_ixp4xx.c ofw_bus_if.h -.endif -.if ${MACHINE} == "powerpc" -_cfi_bus= cfi_bus_fdt.c ofw_bus_if.h -.endif opt_cfi.h: echo "#define CFI_SUPPORT_STRATAFLASH 1" > ${.TARGET} From owner-svn-src-head@freebsd.org Tue Jul 17 23:23:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B8A31029FE2; Tue, 17 Jul 2018 23:23:58 +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 B6FD67E1A0; Tue, 17 Jul 2018 23:23:56 +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 40A0D123D0; Tue, 17 Jul 2018 23:23:56 +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 w6HNNukt054806; Tue, 17 Jul 2018 23:23:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HNNs61054798; Tue, 17 Jul 2018 23:23:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807172323.w6HNNs61054798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Jul 2018 23:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336437 - in head: lib lib/libclang_rt share/mk targets/pseudo/clang targets/pseudo/userland/lib X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib lib/libclang_rt share/mk targets/pseudo/clang targets/pseudo/userland/lib X-SVN-Commit-Revision: 336437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 23:23:58 -0000 Author: imp Date: Tue Jul 17 23:23:54 2018 New Revision: 336437 URL: https://svnweb.freebsd.org/changeset/base/336437 Log: Remove special cases for armeb in the build. Differential Revision: https://reviews.freebsd.org/D16257 Modified: head/lib/Makefile head/lib/libclang_rt/Makefile head/share/mk/bsd.cpu.mk head/share/mk/local.meta.sys.mk head/share/mk/src.opts.mk head/targets/pseudo/clang/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue Jul 17 23:23:45 2018 (r336436) +++ head/lib/Makefile Tue Jul 17 23:23:54 2018 (r336437) @@ -157,8 +157,7 @@ SUBDIR.${MK_LDNS}+= libldns # built for certain architectures. .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \ - (${MACHINE_CPUARCH} == "i386")) + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386") _libclang_rt= libclang_rt .endif Modified: head/lib/libclang_rt/Makefile ============================================================================== --- head/lib/libclang_rt/Makefile Tue Jul 17 23:23:45 2018 (r336436) +++ head/lib/libclang_rt/Makefile Tue Jul 17 23:23:54 2018 (r336437) @@ -19,7 +19,7 @@ SUBDIR+= ubsan_standalone_cxx .endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ - (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") + ${MACHINE_CPUARCH} == "arm" SUBDIR+= profile .endif Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Tue Jul 17 23:23:45 2018 (r336436) +++ head/share/mk/bsd.cpu.mk Tue Jul 17 23:23:54 2018 (r336437) @@ -346,7 +346,7 @@ MACHINE_CPU += armv7 . endif # armv6 and armv7 are a hybrid. It can use the softfp ABI, but doesn't emulate # floating point in the general case, so don't define softfp for it at this -# time. arm and armeb are pure softfp, so define it for them. +# time. arm is pure softfp, so define it for them. . if ${MACHINE_ARCH:Marmv[67]*} == "" MACHINE_CPU += softfp . endif Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Tue Jul 17 23:23:45 2018 (r336436) +++ head/share/mk/local.meta.sys.mk Tue Jul 17 23:23:54 2018 (r336437) @@ -14,7 +14,7 @@ MK_INSTALL_AS_USER= yes .endif # from src/Makefile (for universe) -TARGET_ARCHES_arm?= arm armeb armv6 armv7 +TARGET_ARCHES_arm?= arm armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Jul 17 23:23:45 2018 (r336436) +++ head/share/mk/src.opts.mk Tue Jul 17 23:23:54 2018 (r336437) @@ -321,7 +321,7 @@ __DEFAULT_YES_OPTIONS+=LLDB __DEFAULT_NO_OPTIONS+=LLDB .endif # LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 -.if ${__T} == "arm" || ${__T} == "armeb" +.if ${__T} == "arm" BROKEN_OPTIONS+=LLDB .endif # GDB in base is generally less functional than GDB in ports. Ports GDB Modified: head/targets/pseudo/clang/Makefile.depend ============================================================================== --- head/targets/pseudo/clang/Makefile.depend Tue Jul 17 23:23:45 2018 (r336436) +++ head/targets/pseudo/clang/Makefile.depend Tue Jul 17 23:23:54 2018 (r336437) @@ -28,7 +28,7 @@ DIRDEPS+= \ .endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ - (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") + ${MACHINE_CPUARCH} == "arm" DIRDEPS+= \ lib/libclang_rt/profile \ Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Tue Jul 17 23:23:45 2018 (r336436) +++ head/targets/pseudo/userland/lib/Makefile.depend Tue Jul 17 23:23:54 2018 (r336437) @@ -193,8 +193,7 @@ DIRDEPS = \ .if ${MK_CLANG} != "no" && \ (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \ - (${MACHINE_CPUARCH} == "i386")) + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386") DIRDEPS+= \ lib/libclang_rt/asan-preinit \ lib/libclang_rt/asan \ From owner-svn-src-head@freebsd.org Tue Jul 17 23:56:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F153102AED3; Tue, 17 Jul 2018 23:56:14 +0000 (UTC) (envelope-from davidcs@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 426767F3A2; Tue, 17 Jul 2018 23:56:14 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 157601289F; Tue, 17 Jul 2018 23:56:14 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HNuDU3070196; Tue, 17 Jul 2018 23:56:13 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HNuDAp070195; Tue, 17 Jul 2018 23:56:13 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201807172356.w6HNuDAp070195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 17 Jul 2018 23:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336438 - head/sys/dev/bxe X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/sys/dev/bxe X-SVN-Commit-Revision: 336438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 23:56:14 -0000 Author: davidcs Date: Tue Jul 17 23:56:13 2018 New Revision: 336438 URL: https://svnweb.freebsd.org/changeset/base/336438 Log: Fixes for the following issues: 1. Fix taskqueues drain/free to fix panic seen when interface is being bought down and in parallel asynchronous link events happening. 2. Fix bxe_ifmedia_status() Submitted by:Vaishali.Kulkarni@cavium.com and Anand.Khoje@cavium.com MFC after:5 days Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Tue Jul 17 23:23:54 2018 (r336437) +++ head/sys/dev/bxe/bxe.c Tue Jul 17 23:56:13 2018 (r336438) @@ -4396,6 +4396,8 @@ bxe_nic_unload(struct bxe_softc *sc, BLOGD(sc, DBG_LOAD, "Ended NIC unload\n"); + bxe_link_report(sc); + return (0); } @@ -4441,30 +4443,39 @@ bxe_ifmedia_status(struct ifnet *ifp, struct ifmediare { struct bxe_softc *sc = if_getsoftc(ifp); + /* Bug 165447: the 'ifconfig' tool skips printing of the "status: ..." + line if the IFM_AVALID flag is *NOT* set. So we need to set this + flag unconditionally (irrespective of the admininistrative + 'up/down' state of the interface) to ensure that that line is always + displayed. + */ + ifmr->ifm_status = IFM_AVALID; + + /* Setup the default interface info. */ + ifmr->ifm_active = IFM_ETHER; + /* Report link down if the driver isn't running. */ - if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { ifmr->ifm_active |= IFM_NONE; + BLOGD(sc, DBG_PHY, "in %s : nic still not loaded fully\n", __func__); + BLOGD(sc, DBG_PHY, "in %s : link_up (1) : %d\n", + __func__, sc->link_vars.link_up); return; } - /* Setup the default interface info. */ - ifmr->ifm_status = IFM_AVALID; - ifmr->ifm_active = IFM_ETHER; if (sc->link_vars.link_up) { ifmr->ifm_status |= IFM_ACTIVE; + ifmr->ifm_active |= IFM_FDX; } else { ifmr->ifm_active |= IFM_NONE; + BLOGD(sc, DBG_PHY, "in %s : setting IFM_NONE\n", + __func__); return; } ifmr->ifm_active |= sc->media; - - if (sc->link_vars.duplex == DUPLEX_FULL) { - ifmr->ifm_active |= IFM_FDX; - } else { - ifmr->ifm_active |= IFM_HDX; - } + return; } static void @@ -7038,7 +7049,7 @@ bxe_link_attn(struct bxe_softc *sc) /* Make sure that we are synced with the current statistics */ bxe_stats_handle(sc, STATS_EVENT_STOP); - BLOGI(sc, "link_vars phy_flags : %x\n", sc->link_vars.phy_flags); + BLOGD(sc, DBG_LOAD, "link_vars phy_flags : %x\n", sc->link_vars.phy_flags); elink_link_update(&sc->link_params, &sc->link_vars); if (sc->link_vars.link_up) { @@ -9127,11 +9138,16 @@ bxe_interrupt_detach(struct bxe_softc *sc) while (taskqueue_cancel_timeout(fp->tq, &fp->tx_timeout_task, NULL)) taskqueue_drain_timeout(fp->tq, &fp->tx_timeout_task); - taskqueue_free(fp->tq); - fp->tq = NULL; } - } + for (i = 0; i < sc->num_queues; i++) { + fp = &sc->fp[i]; + if (fp->tq != NULL) { + taskqueue_free(fp->tq); + fp->tq = NULL; + } + } + } if (sc->sp_tq) { taskqueue_drain(sc->sp_tq, &sc->sp_tq_task); From owner-svn-src-head@freebsd.org Wed Jul 18 00:56:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E157102D160; Wed, 18 Jul 2018 00:56:27 +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 B0C1A81020; Wed, 18 Jul 2018 00:56:26 +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 91F7813233; Wed, 18 Jul 2018 00:56:26 +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 w6I0uQfO000713; Wed, 18 Jul 2018 00:56:26 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I0uPb6000705; Wed, 18 Jul 2018 00:56:25 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807180056.w6I0uPb6000705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 18 Jul 2018 00:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336439 - in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/hifn sys/dev/safe sys/dev/s... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/hifn sys/dev/safe sys/dev/sec sys/dev/ubsec sys/geom... X-SVN-Commit-Revision: 336439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 00:56:27 -0000 Author: cem Date: Wed Jul 18 00:56:25 2018 New Revision: 336439 URL: https://svnweb.freebsd.org/changeset/base/336439 Log: OpenCrypto: Convert sessions to opaque handles instead of integers Track session objects in the framework, and pass handles between the framework (OCF), consumers, and drivers. Avoid redundancy and complexity in individual drivers by allocating session memory in the framework and providing it to drivers in ::newsession(). Session handles are no longer integers with information encoded in various high bits. Use of the CRYPTO_SESID2FOO() macros should be replaced with the appropriate crypto_ses2foo() function on the opaque session handle. Convert OCF drivers (in particular, cryptosoft, as well as myriad others) to the opaque handle interface. Discard existing session tracking as much as possible (quick pass). There may be additional code ripe for deletion. Convert OCF consumers (ipsec, geom_eli, krb5, cryptodev) to handle-style interface. The conversion is largely mechnical. The change is documented in crypto.9. Inspired by https://lists.freebsd.org/pipermail/freebsd-arch/2018-January/018835.html . No objection from: ae (ipsec portion) Reported by: jhb Modified: head/share/man/man9/crypto.9 head/sys/crypto/aesni/aesni.c head/sys/crypto/aesni/aesni.h head/sys/crypto/armv8/armv8_crypto.c head/sys/crypto/armv8/armv8_crypto.h head/sys/crypto/blake2/blake2_cryptodev.c head/sys/crypto/ccp/ccp.c head/sys/crypto/ccp/ccp.h head/sys/crypto/via/padlock.c head/sys/crypto/via/padlock.h head/sys/dev/cesa/cesa.c head/sys/dev/cesa/cesa.h head/sys/dev/cxgbe/crypto/t4_crypto.c head/sys/dev/hifn/hifn7751.c head/sys/dev/hifn/hifn7751var.h head/sys/dev/safe/safe.c head/sys/dev/safe/safevar.h head/sys/dev/sec/sec.c head/sys/dev/sec/sec.h head/sys/dev/ubsec/ubsec.c head/sys/dev/ubsec/ubsecvar.h head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli_crypto.c head/sys/geom/eli/g_eli_integrity.c head/sys/geom/eli/g_eli_privacy.c head/sys/kgssapi/krb5/kcrypto_aes.c head/sys/kgssapi/krb5/kcrypto_des.c head/sys/kgssapi/krb5/kcrypto_des3.c head/sys/mips/cavium/cryptocteon/cryptocteon.c head/sys/mips/nlm/dev/sec/nlmrsa.c head/sys/mips/nlm/dev/sec/nlmrsalib.h head/sys/mips/nlm/dev/sec/nlmsec.c head/sys/mips/nlm/dev/sec/nlmseclib.h head/sys/netipsec/ipsec.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/opencrypto/_cryptodev.h head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/cryptodev_if.m head/sys/opencrypto/cryptosoft.c Modified: head/share/man/man9/crypto.9 ============================================================================== --- head/share/man/man9/crypto.9 Tue Jul 17 23:56:13 2018 (r336438) +++ head/share/man/man9/crypto.9 Wed Jul 18 00:56:25 2018 (r336439) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2017 +.Dd July 17, 2018 .Dt CRYPTO 9 .Os .Sh NAME @@ -26,7 +26,7 @@ .Sh SYNOPSIS .In opencrypto/cryptodev.h .Ft int32_t -.Fn crypto_get_driverid device_t int +.Fn crypto_get_driverid device_t size_t int .Ft int .Fn crypto_register uint32_t int uint16_t uint32_t "int \*[lp]*\*[rp]\*[lp]void *, uint32_t *, struct cryptoini *\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, uint64_t\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, struct cryptop *\*[rp]" "void *" .Ft int @@ -42,9 +42,9 @@ .Ft int .Fn crypto_find_driver "const char *" .Ft int -.Fn crypto_newsession "uint64_t *" "struct cryptoini *" int +.Fn crypto_newsession "crypto_session_t *" "struct cryptoini *" int .Ft int -.Fn crypto_freesession uint64_t +.Fn crypto_freesession crypto_session_t .Ft int .Fn crypto_dispatch "struct cryptop *" .Ft int @@ -85,7 +85,7 @@ struct cryptodesc { struct cryptop { TAILQ_ENTRY(cryptop) crp_next; - uint64_t crp_sid; + crypto_session_t crp_session; int crp_ilen; int crp_olen; int crp_etype; @@ -151,12 +151,12 @@ successfully completed or not. An error indication is provided in the latter case. A specific error code, .Er EAGAIN , -is used to indicate that a session number has changed and that the -request may be re-submitted immediately with the new session number. +is used to indicate that a session handle has changed and that the +request may be re-submitted immediately with the new session. Errors are only returned to the invoking function if not enough information to call the callback is available (meaning, there was a fatal error in verifying the arguments). -For session initialization and teardown there is no callback mechanism used. +For session initialization and teardown no callback mechanism is used. .Pp The .Fn crypto_find_driver @@ -179,8 +179,8 @@ or to select software devices. If both are specified, a hardware device will be returned before a software device will be. -On success, the value pointed to by the first argument will be the -Session IDentifier (SID). +On success, the value pointed to by the first argument will be the opaque +session handle. The various fields in the .Vt cryptoini structure are: @@ -247,14 +247,11 @@ The .Vt cryptoini structure and its contents will not be modified by the framework (or the drivers used). -Subsequent requests for processing that use the -SID returned will avoid the cost of re-initializing the hardware (in -essence, SID acts as an index in the session cache of the driver). .Pp .Fn crypto_freesession -is called with the SID returned by +is called with the session handle returned by .Fn crypto_newsession -to disestablish the session. +to free the session. .Pp .Fn crypto_dispatch is called to process a request. @@ -262,8 +259,8 @@ The various fields in the .Vt cryptop structure are: .Bl -tag -width ".Va crp_callback" -.It Va crp_sid -Contains the SID. +.It Va crp_session +Contains the session handle. .It Va crp_ilen Indicates the total length in bytes of the buffer to be processed. .It Va crp_olen @@ -288,10 +285,12 @@ Contains the error type, if any errors were encountere the request was successfully processed. If the .Er EAGAIN -error code is returned, the SID has changed (and has been recorded in the -.Va crp_sid +error code is returned, the session handle has changed (and has been recorded +in the +.Va crp_session field). -The consumer should record the new SID and use it in all subsequent requests. +The consumer should record the new session handle and use it in all subsequent +requests. In this case, the request may be re-submitted immediately. This mechanism is used by the framework to perform session migration (move a session from one driver to another, because @@ -516,6 +515,7 @@ Callback called on completion of a keying operation. .Sh DRIVER-SIDE API The .Fn crypto_get_driverid , +.Fn crypto_get_driver_session , .Fn crypto_register , .Fn crypto_kregister , .Fn crypto_unregister , @@ -540,6 +540,11 @@ The .Dv CRYPTOCAP_F_SYNC may also be specified, and should be specified if the driver does all of it's operations synchronously. +Drivers must pass the size of their session struct as the second argument. +An appropriately sized memory will be allocated by the framework, zeroed, and +passed to the driver's +.Fn newsession +method. .Pp For each algorithm the driver supports, it must then call .Fn crypto_register . @@ -574,15 +579,15 @@ After a call to there will be no threads in either the newsession or freesession function of the driver. .Pp -The calling convention for the three driver-supplied routines are: +The calling convention for the driver-supplied routines are: .Pp .Bl -item -compact .It .Ft int -.Fn \*[lp]*newsession\*[rp] "device_t" "uint32_t *" "struct cryptoini *" ; +.Fn \*[lp]*newsession\*[rp] "device_t" "crypto_session_t" "struct cryptoini *" ; .It -.Ft int -.Fn \*[lp]*freesession\*[rp] "device_t" "uint64_t" ; +.Ft void +.Fn \*[lp]*freesession\*[rp] "device_t" "crypto_session_t" ; .It .Ft int .Fn \*[lp]*process\*[rp] "device_t" "struct cryptop *" "int" ; @@ -598,20 +603,28 @@ that was provided to .Fn crypto_get_driverid . The second argument to .Fn newsession -contains the driver identifier obtained via -.Fn crypto_get_driverid . -On successful return, it should contain a driver-specific session -identifier. +is the opaque session handle for the new session. The third argument is identical to that of .Fn crypto_newsession . .Pp +Drivers obtain a pointer to their session memory by invoking +.Fn crypto_get_driver_session +on the opaque +.Vt crypto_session_t +handle. +.Pp The .Fn freesession -routine takes as arguments the opaque data value and the SID -(which is the concatenation of the -driver identifier and the driver-specific session identifier). +routine takes as arguments the opaque data value and the session handle. It should clear any context associated with the session (clear hardware registers, memory, etc.). +If no resources need to be released other than the contents of session memory, +the method is optional. +The +.Nm +framework will zero and release the allocated session memory (after running the +.Fn freesession +method, if one exists). .Pp The .Fn process @@ -717,6 +730,3 @@ Some type of benchmarking is in order here. .Pp Multiple instances of the same algorithm in the same session are not supported. -Note that 3DES is considered one algorithm (and not three -instances of DES). -Thus, 3DES and DES could be mixed in the same request. Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Tue Jul 17 23:56:13 2018 (r336438) +++ head/sys/crypto/aesni/aesni.c Wed Jul 18 00:56:25 2018 (r336439) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -69,13 +68,9 @@ static struct mtx_padalign *ctx_mtx; static struct fpu_kern_ctx **ctx_fpu; struct aesni_softc { - int dieing; int32_t cid; - uint32_t sid; bool has_aes; bool has_sha; - TAILQ_HEAD(aesni_sessions_head, aesni_session) sessions; - struct rwlock lock; }; #define ACQUIRE_CTX(i, ctx) \ @@ -91,10 +86,8 @@ struct aesni_softc { (ctx) = NULL; \ } while (0) -static int aesni_newsession(device_t, uint32_t *sidp, struct cryptoini *cri); -static int aesni_freesession(device_t, uint64_t tid); -static void aesni_freesession_locked(struct aesni_softc *sc, - struct aesni_session *ses); +static int aesni_newsession(device_t, crypto_session_t cses, + struct cryptoini *cri); static int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini, struct cryptoini *authini); static int aesni_cipher_process(struct aesni_session *ses, @@ -172,12 +165,9 @@ aesni_attach(device_t dev) int i; sc = device_get_softc(dev); - sc->dieing = 0; - TAILQ_INIT(&sc->sessions); - sc->sid = 1; - sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | - CRYPTOCAP_F_SYNC); + sc->cid = crypto_get_driverid(dev, sizeof(struct aesni_session), + CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SYNC); if (sc->cid < 0) { device_printf(dev, "Could not get crypto driver id.\n"); return (ENOMEM); @@ -193,8 +183,6 @@ aesni_attach(device_t dev) mtx_init(&ctx_mtx[i], "anifpumtx", NULL, MTX_DEF|MTX_NEW); } - rw_init(&sc->lock, "aesni_lock"); - detect_cpu_features(&sc->has_aes, &sc->has_sha); if (sc->has_aes) { crypto_register(sc->cid, CRYPTO_AES_CBC, 0, 0); @@ -217,36 +205,18 @@ static int aesni_detach(device_t dev) { struct aesni_softc *sc; - struct aesni_session *ses; sc = device_get_softc(dev); - rw_wlock(&sc->lock); - TAILQ_FOREACH(ses, &sc->sessions, next) { - if (ses->used) { - rw_wunlock(&sc->lock); - device_printf(dev, - "Cannot detach, sessions still active.\n"); - return (EBUSY); - } - } - sc->dieing = 1; - while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) { - TAILQ_REMOVE(&sc->sessions, ses, next); - free(ses, M_AESNI); - } - rw_wunlock(&sc->lock); crypto_unregister_all(sc->cid); - rw_destroy(&sc->lock); - aesni_cleanctx(); return (0); } static int -aesni_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri) +aesni_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) { struct aesni_softc *sc; struct aesni_session *ses; @@ -254,16 +224,16 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct bool gcm_hash, gcm; int error; - if (sidp == NULL || cri == NULL) { - CRYPTDEB("no sidp or cri"); + KASSERT(cses != NULL, ("EDOOFUS")); + if (cri == NULL) { + CRYPTDEB("no cri"); return (EINVAL); } sc = device_get_softc(dev); - if (sc->dieing) - return (EINVAL); - ses = NULL; + ses = crypto_get_driver_session(cses); + authini = NULL; encini = NULL; gcm = false; @@ -321,30 +291,6 @@ unhandled: if (gcm_hash != gcm) return (EINVAL); - rw_wlock(&sc->lock); - if (sc->dieing) { - rw_wunlock(&sc->lock); - return (EINVAL); - } - /* - * Free sessions are inserted at the head of the list. So if the first - * session is used, none are free and we must allocate a new one. - */ - ses = TAILQ_FIRST(&sc->sessions); - if (ses == NULL || ses->used) { - ses = malloc(sizeof(*ses), M_AESNI, M_NOWAIT | M_ZERO); - if (ses == NULL) { - rw_wunlock(&sc->lock); - return (ENOMEM); - } - ses->id = sc->sid++; - } else { - TAILQ_REMOVE(&sc->sessions, ses, next); - } - ses->used = 1; - TAILQ_INSERT_TAIL(&sc->sessions, ses, next); - rw_wunlock(&sc->lock); - if (encini != NULL) ses->algo = encini->cri_alg; if (authini != NULL) @@ -353,54 +299,13 @@ unhandled: error = aesni_cipher_setup(ses, encini, authini); if (error != 0) { CRYPTDEB("setup failed"); - rw_wlock(&sc->lock); - aesni_freesession_locked(sc, ses); - rw_wunlock(&sc->lock); return (error); } - *sidp = ses->id; return (0); } -static void -aesni_freesession_locked(struct aesni_softc *sc, struct aesni_session *ses) -{ - uint32_t sid; - - rw_assert(&sc->lock, RA_WLOCKED); - - sid = ses->id; - TAILQ_REMOVE(&sc->sessions, ses, next); - explicit_bzero(ses, sizeof(*ses)); - ses->id = sid; - TAILQ_INSERT_HEAD(&sc->sessions, ses, next); -} - static int -aesni_freesession(device_t dev, uint64_t tid) -{ - struct aesni_softc *sc; - struct aesni_session *ses; - uint32_t sid; - - sc = device_get_softc(dev); - sid = ((uint32_t)tid) & 0xffffffff; - rw_wlock(&sc->lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sessions, aesni_sessions_head, next) { - if (ses->id == sid) - break; - } - if (ses == NULL) { - rw_wunlock(&sc->lock); - return (EINVAL); - } - aesni_freesession_locked(sc, ses); - rw_wunlock(&sc->lock); - return (0); -} - -static int aesni_process(device_t dev, struct cryptop *crp, int hint __unused) { struct aesni_softc *sc; @@ -419,7 +324,8 @@ aesni_process(device_t dev, struct cryptop *crp, int h if (crp == NULL) return (EINVAL); - if (crp->crp_callback == NULL || crp->crp_desc == NULL) { + if (crp->crp_callback == NULL || crp->crp_desc == NULL || + crp->crp_session == NULL) { error = EINVAL; goto out; } @@ -472,16 +378,8 @@ aesni_process(device_t dev, struct cryptop *crp, int h goto out; } - rw_rlock(&sc->lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sessions, aesni_sessions_head, next) { - if (ses->id == (crp->crp_sid & 0xffffffff)) - break; - } - rw_runlock(&sc->lock); - if (ses == NULL) { - error = EINVAL; - goto out; - } + ses = crypto_get_driver_session(crp->crp_session); + KASSERT(ses != NULL, ("EDOOFUS")); error = aesni_cipher_process(ses, enccrd, authcrd, crp); if (error != 0) @@ -537,7 +435,6 @@ static device_method_t aesni_methods[] = { DEVMETHOD(device_detach, aesni_detach), DEVMETHOD(cryptodev_newsession, aesni_newsession), - DEVMETHOD(cryptodev_freesession, aesni_freesession), DEVMETHOD(cryptodev_process, aesni_process), DEVMETHOD_END Modified: head/sys/crypto/aesni/aesni.h ============================================================================== --- head/sys/crypto/aesni/aesni.h Tue Jul 17 23:56:13 2018 (r336438) +++ head/sys/crypto/aesni/aesni.h Wed Jul 18 00:56:25 2018 (r336439) @@ -66,8 +66,6 @@ struct aesni_session { int used; int auth_algo; int mlen; - uint32_t id; - TAILQ_ENTRY(aesni_session) next; }; /* Modified: head/sys/crypto/armv8/armv8_crypto.c ============================================================================== --- head/sys/crypto/armv8/armv8_crypto.c Tue Jul 17 23:56:13 2018 (r336438) +++ head/sys/crypto/armv8/armv8_crypto.c Wed Jul 18 00:56:25 2018 (r336439) @@ -63,8 +63,6 @@ __FBSDID("$FreeBSD$"); struct armv8_crypto_softc { int dieing; int32_t cid; - uint32_t sid; - TAILQ_HEAD(armv8_crypto_sessions_head, armv8_crypto_session) sessions; struct rwlock lock; }; @@ -84,8 +82,6 @@ static struct fpu_kern_ctx **ctx_vfp; (ctx) = NULL; \ } while (0) -static void armv8_crypto_freesession_locked(struct armv8_crypto_softc *, - struct armv8_crypto_session *); static int armv8_crypto_cipher_process(struct armv8_crypto_session *, struct cryptodesc *, struct cryptop *); @@ -130,12 +126,10 @@ armv8_crypto_attach(device_t dev) int i; sc = device_get_softc(dev); - TAILQ_INIT(&sc->sessions); sc->dieing = 0; - sc->sid = 1; - sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | - CRYPTOCAP_F_SYNC); + sc->cid = crypto_get_driverid(dev, sizeof(struct armv8_crypto_session), + CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SYNC); if (sc->cid < 0) { device_printf(dev, "Could not get crypto driver id.\n"); return (ENOMEM); @@ -162,25 +156,12 @@ static int armv8_crypto_detach(device_t dev) { struct armv8_crypto_softc *sc; - struct armv8_crypto_session *ses; int i; sc = device_get_softc(dev); rw_wlock(&sc->lock); - TAILQ_FOREACH(ses, &sc->sessions, next) { - if (ses->used) { - rw_wunlock(&sc->lock); - device_printf(dev, - "Cannot detach, sessions still active.\n"); - return (EBUSY); - } - } sc->dieing = 1; - while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) { - TAILQ_REMOVE(&sc->sessions, ses, next); - free(ses, M_ARMV8_CRYPTO); - } rw_wunlock(&sc->lock); crypto_unregister_all(sc->cid); @@ -241,15 +222,16 @@ armv8_crypto_cipher_setup(struct armv8_crypto_session } static int -armv8_crypto_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri) +armv8_crypto_newsession(device_t dev, crypto_session_t cses, + struct cryptoini *cri) { struct armv8_crypto_softc *sc; struct armv8_crypto_session *ses; struct cryptoini *encini; int error; - if (sidp == NULL || cri == NULL) { - CRYPTDEB("no sidp or cri"); + if (cri == NULL) { + CRYPTDEB("no cri"); return (EINVAL); } @@ -284,83 +266,21 @@ armv8_crypto_newsession(device_t dev, uint32_t *sidp, return (EINVAL); } - /* - * Free sessions goes first, so if first session is used, we need to - * allocate one. - */ - ses = TAILQ_FIRST(&sc->sessions); - if (ses == NULL || ses->used) { - ses = malloc(sizeof(*ses), M_ARMV8_CRYPTO, M_NOWAIT | M_ZERO); - if (ses == NULL) { - rw_wunlock(&sc->lock); - return (ENOMEM); - } - ses->id = sc->sid++; - } else { - TAILQ_REMOVE(&sc->sessions, ses, next); - } - ses->used = 1; - TAILQ_INSERT_TAIL(&sc->sessions, ses, next); - rw_wunlock(&sc->lock); + ses = crypto_get_driver_session(cses); ses->algo = encini->cri_alg; error = armv8_crypto_cipher_setup(ses, encini); if (error != 0) { CRYPTDEB("setup failed"); - rw_wlock(&sc->lock); - armv8_crypto_freesession_locked(sc, ses); - rw_wunlock(&sc->lock); return (error); } - *sidp = ses->id; return (0); } -static void -armv8_crypto_freesession_locked(struct armv8_crypto_softc *sc, - struct armv8_crypto_session *ses) -{ - uint32_t sid; - - rw_assert(&sc->lock, RA_WLOCKED); - - sid = ses->id; - TAILQ_REMOVE(&sc->sessions, ses, next); - *ses = (struct armv8_crypto_session){}; - ses->id = sid; - TAILQ_INSERT_HEAD(&sc->sessions, ses, next); -} - static int -armv8_crypto_freesession(device_t dev, uint64_t tid) -{ - struct armv8_crypto_softc *sc; - struct armv8_crypto_session *ses; - uint32_t sid; - - sc = device_get_softc(dev); - sid = ((uint32_t)tid) & 0xffffffff; - rw_wlock(&sc->lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sessions, armv8_crypto_sessions_head, - next) { - if (ses->id == sid) - break; - } - if (ses == NULL) { - rw_wunlock(&sc->lock); - return (EINVAL); - } - armv8_crypto_freesession_locked(sc, ses); - rw_wunlock(&sc->lock); - - return (0); -} - -static int armv8_crypto_process(device_t dev, struct cryptop *crp, int hint __unused) { - struct armv8_crypto_softc *sc = device_get_softc(dev); struct cryptodesc *crd, *enccrd; struct armv8_crypto_session *ses; int error; @@ -403,18 +323,7 @@ armv8_crypto_process(device_t dev, struct cryptop *crp goto out; } - rw_rlock(&sc->lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sessions, armv8_crypto_sessions_head, - next) { - if (ses->id == (crp->crp_sid & 0xffffffff)) - break; - } - rw_runlock(&sc->lock); - if (ses == NULL) { - error = EINVAL; - goto out; - } - + ses = crypto_get_driver_session(crp->crp_session); error = armv8_crypto_cipher_process(ses, enccrd, crp); out: @@ -546,7 +455,6 @@ static device_method_t armv8_crypto_methods[] = { DEVMETHOD(device_detach, armv8_crypto_detach), DEVMETHOD(cryptodev_newsession, armv8_crypto_newsession), - DEVMETHOD(cryptodev_freesession, armv8_crypto_freesession), DEVMETHOD(cryptodev_process, armv8_crypto_process), DEVMETHOD_END, Modified: head/sys/crypto/armv8/armv8_crypto.h ============================================================================== --- head/sys/crypto/armv8/armv8_crypto.h Tue Jul 17 23:56:13 2018 (r336438) +++ head/sys/crypto/armv8/armv8_crypto.h Wed Jul 18 00:56:25 2018 (r336439) @@ -42,9 +42,6 @@ struct armv8_crypto_session { uint32_t dec_schedule[AES_SCHED_LEN/4]; int algo; int rounds; - int used; - uint32_t id; - TAILQ_ENTRY(armv8_crypto_session) next; }; void armv8_aes_encrypt_cbc(int, const void *, size_t, const uint8_t *, Modified: head/sys/crypto/blake2/blake2_cryptodev.c ============================================================================== --- head/sys/crypto/blake2/blake2_cryptodev.c Tue Jul 17 23:56:13 2018 (r336438) +++ head/sys/crypto/blake2/blake2_cryptodev.c Wed Jul 18 00:56:25 2018 (r336439) @@ -53,17 +53,12 @@ struct blake2_session { size_t klen; size_t mlen; uint8_t key[BLAKE2B_KEYBYTES]; - bool used; - uint32_t id; - TAILQ_ENTRY(blake2_session) next; }; CTASSERT((size_t)BLAKE2B_KEYBYTES > (size_t)BLAKE2S_KEYBYTES); struct blake2_softc { bool dying; int32_t cid; - uint32_t sid; - TAILQ_HEAD(blake2_sessions_head, blake2_session) sessions; struct rwlock lock; }; @@ -83,10 +78,8 @@ static struct fpu_kern_ctx **ctx_fpu; (ctx) = NULL; \ } while (0) -static int blake2_newsession(device_t, uint32_t *sidp, struct cryptoini *cri); -static int blake2_freesession(device_t, uint64_t tid); -static void blake2_freesession_locked(struct blake2_softc *sc, - struct blake2_session *ses); +static int blake2_newsession(device_t, crypto_session_t cses, + struct cryptoini *cri); static int blake2_cipher_setup(struct blake2_session *ses, struct cryptoini *authini); static int blake2_cipher_process(struct blake2_session *ses, @@ -138,11 +131,9 @@ blake2_attach(device_t dev) sc = device_get_softc(dev); sc->dying = false; - TAILQ_INIT(&sc->sessions); - sc->sid = 1; - sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | - CRYPTOCAP_F_SYNC); + sc->cid = crypto_get_driverid(dev, sizeof(struct blake2_session), + CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SYNC); if (sc->cid < 0) { device_printf(dev, "Could not get crypto driver id.\n"); return (ENOMEM); @@ -169,24 +160,11 @@ static int blake2_detach(device_t dev) { struct blake2_softc *sc; - struct blake2_session *ses; sc = device_get_softc(dev); rw_wlock(&sc->lock); - TAILQ_FOREACH(ses, &sc->sessions, next) { - if (ses->used) { - rw_wunlock(&sc->lock); - device_printf(dev, - "Cannot detach, sessions still active.\n"); - return (EBUSY); - } - } sc->dying = true; - while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) { - TAILQ_REMOVE(&sc->sessions, ses, next); - free(ses, M_BLAKE2); - } rw_wunlock(&sc->lock); crypto_unregister_all(sc->cid); @@ -198,21 +176,20 @@ blake2_detach(device_t dev) } static int -blake2_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri) +blake2_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) { struct blake2_softc *sc; struct blake2_session *ses; struct cryptoini *authini; int error; - if (sidp == NULL || cri == NULL) { - CRYPTDEB("no sidp or cri"); + if (cri == NULL) { + CRYPTDEB("no cri"); return (EINVAL); } sc = device_get_softc(dev); - ses = NULL; authini = NULL; for (; cri != NULL; cri = cri->cri_next) { switch (cri->cri_alg) { @@ -239,85 +216,27 @@ blake2_newsession(device_t dev, uint32_t *sidp, struct rw_wunlock(&sc->lock); return (EINVAL); } - /* - * Free sessions are inserted at the head of the list. So if the first - * session is used, none are free and we must allocate a new one. - */ - ses = TAILQ_FIRST(&sc->sessions); - if (ses == NULL || ses->used) { - ses = malloc(sizeof(*ses), M_BLAKE2, M_NOWAIT | M_ZERO); - if (ses == NULL) { - rw_wunlock(&sc->lock); - return (ENOMEM); - } - ses->id = sc->sid++; - } else { - TAILQ_REMOVE(&sc->sessions, ses, next); - } - ses->used = true; - TAILQ_INSERT_TAIL(&sc->sessions, ses, next); rw_wunlock(&sc->lock); + ses = crypto_get_driver_session(cses); + ses->algo = authini->cri_alg; error = blake2_cipher_setup(ses, authini); if (error != 0) { CRYPTDEB("setup failed"); - rw_wlock(&sc->lock); - blake2_freesession_locked(sc, ses); - rw_wunlock(&sc->lock); return (error); } - *sidp = ses->id; return (0); } -static void -blake2_freesession_locked(struct blake2_softc *sc, struct blake2_session *ses) -{ - uint32_t sid; - - rw_assert(&sc->lock, RA_WLOCKED); - - sid = ses->id; - TAILQ_REMOVE(&sc->sessions, ses, next); - explicit_bzero(ses, sizeof(*ses)); - ses->id = sid; - TAILQ_INSERT_HEAD(&sc->sessions, ses, next); -} - static int -blake2_freesession(device_t dev, uint64_t tid) -{ - struct blake2_softc *sc; - struct blake2_session *ses; - uint32_t sid; - - sc = device_get_softc(dev); - sid = ((uint32_t)tid) & 0xffffffff; - rw_wlock(&sc->lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sessions, blake2_sessions_head, next) { - if (ses->id == sid) - break; - } - if (ses == NULL) { - rw_wunlock(&sc->lock); - return (EINVAL); - } - blake2_freesession_locked(sc, ses); - rw_wunlock(&sc->lock); - return (0); -} - -static int blake2_process(device_t dev, struct cryptop *crp, int hint __unused) { - struct blake2_softc *sc; struct blake2_session *ses; struct cryptodesc *crd, *authcrd; int error; - sc = device_get_softc(dev); ses = NULL; error = 0; authcrd = NULL; @@ -348,17 +267,7 @@ blake2_process(device_t dev, struct cryptop *crp, int } } - rw_rlock(&sc->lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sessions, blake2_sessions_head, next) { - if (ses->id == (crp->crp_sid & 0xffffffff)) - break; - } - rw_runlock(&sc->lock); - if (ses == NULL) { - error = EINVAL; - goto out; - } - + ses = crypto_get_driver_session(crp->crp_session); error = blake2_cipher_process(ses, crp); if (error != 0) goto out; @@ -376,7 +285,6 @@ static device_method_t blake2_methods[] = { DEVMETHOD(device_detach, blake2_detach), DEVMETHOD(cryptodev_newsession, blake2_newsession), - DEVMETHOD(cryptodev_freesession, blake2_freesession), DEVMETHOD(cryptodev_process, blake2_process), DEVMETHOD_END Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Tue Jul 17 23:56:13 2018 (r336438) +++ head/sys/crypto/ccp/ccp.c Wed Jul 18 00:56:25 2018 (r336439) @@ -238,7 +238,8 @@ ccp_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE); + sc->cid = crypto_get_driverid(dev, sizeof(struct ccp_session), + CRYPTOCAP_F_HARDWARE); if (sc->cid < 0) { device_printf(dev, "could not get crypto driver id\n"); return (ENXIO); @@ -281,17 +282,10 @@ static int ccp_detach(device_t dev) { struct ccp_softc *sc; - int i; sc = device_get_softc(dev); mtx_lock(&sc->lock); - for (i = 0; i < sc->nsessions; i++) { - if (sc->sessions[i].active || sc->sessions[i].pending != 0) { - mtx_unlock(&sc->lock); - return (EBUSY); - } - } sc->detaching = true; mtx_unlock(&sc->lock); @@ -305,7 +299,6 @@ ccp_detach(device_t dev) if (g_ccp_softc == sc) g_ccp_softc = NULL; - free(sc->sessions, M_CCP); mtx_destroy(&sc->lock); return (0); } @@ -393,7 +386,7 @@ ccp_aes_setkey(struct ccp_session *s, int alg, const v } static int -ccp_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri) +ccp_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) { struct ccp_softc *sc; struct ccp_session *s; @@ -403,12 +396,14 @@ ccp_newsession(device_t dev, uint32_t *sidp, struct cr unsigned auth_mode, iv_len; unsigned partial_digest_len; unsigned q; - int error, i, sess; + int error; bool gcm_hash; - if (sidp == NULL || cri == NULL) + if (cri == NULL) return (EINVAL); + s = crypto_get_driver_session(cses); + gcm_hash = false; cipher = NULL; hash = NULL; @@ -510,30 +505,7 @@ ccp_newsession(device_t dev, uint32_t *sidp, struct cr mtx_unlock(&sc->lock); return (ENXIO); } - sess = -1; - for (i = 0; i < sc->nsessions; i++) { - if (!sc->sessions[i].active && sc->sessions[i].pending == 0) { - sess = i; - break; - } - } - if (sess == -1) { - s = malloc(sizeof(*s) * (sc->nsessions + 1), M_CCP, - M_NOWAIT | M_ZERO); - if (s == NULL) { - mtx_unlock(&sc->lock); - return (ENOMEM); - } - if (sc->sessions != NULL) - memcpy(s, sc->sessions, sizeof(*s) * sc->nsessions); - sess = sc->nsessions; - free(sc->sessions, M_CCP); - sc->sessions = s; - sc->nsessions++; - } - s = &sc->sessions[sess]; - /* Just grab the first usable queue for now. */ for (q = 0; q < nitems(sc->queues); q++) if ((sc->valid_queues & (1 << q)) != 0) @@ -581,32 +553,21 @@ ccp_newsession(device_t dev, uint32_t *sidp, struct cr s->active = true; mtx_unlock(&sc->lock); - *sidp = sess; return (0); } -static int -ccp_freesession(device_t dev, uint64_t tid) +static void +ccp_freesession(device_t dev, crypto_session_t cses) { - struct ccp_softc *sc; - uint32_t sid; - int error; + struct ccp_session *s; - sc = device_get_softc(dev); - sid = CRYPTO_SESID2LID(tid); - mtx_lock(&sc->lock); - if (sid >= sc->nsessions || !sc->sessions[sid].active) - error = EINVAL; - else { - if (sc->sessions[sid].pending != 0) - device_printf(dev, - "session %d freed with %d pending requests\n", sid, - sc->sessions[sid].pending); - sc->sessions[sid].active = false; - error = 0; - } - mtx_unlock(&sc->lock); - return (error); + s = crypto_get_driver_session(cses); + + if (s->pending != 0) + device_printf(dev, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jul 18 03:32:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59208103216A; Wed, 18 Jul 2018 03:32:29 +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 0632E85D07; Wed, 18 Jul 2018 03:32:29 +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 DB67214CB7; Wed, 18 Jul 2018 03:32: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 w6I3WSKi082731; Wed, 18 Jul 2018 03:32:28 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I3WSUU082729; Wed, 18 Jul 2018 03:32:28 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807180332.w6I3WSUU082729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 18 Jul 2018 03:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336441 - head/sys/dev/glxsb X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/glxsb X-SVN-Commit-Revision: 336441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 03:32:29 -0000 Author: cem Date: Wed Jul 18 03:32:28 2018 New Revision: 336441 URL: https://svnweb.freebsd.org/changeset/base/336441 Log: glxsb: Convert remaining OCF driver to new interface glxsb, an i386 AMD Geode specific driver, was missed in r336439. Correct that mistake and adapt it to the new interface as well. X-MFC-with: 336439 Modified: head/sys/dev/glxsb/glxsb.c head/sys/dev/glxsb/glxsb.h Modified: head/sys/dev/glxsb/glxsb.c ============================================================================== --- head/sys/dev/glxsb/glxsb.c Wed Jul 18 01:57:13 2018 (r336440) +++ head/sys/dev/glxsb/glxsb.c Wed Jul 18 03:32:28 2018 (r336441) @@ -185,10 +185,6 @@ struct glxsb_softc { bus_dma_tag_t sc_dmat; /* DMA tag */ struct glxsb_dma_map sc_dma; /* DMA map */ int32_t sc_cid; /* crypto tag */ - uint32_t sc_sid; /* session id */ - TAILQ_HEAD(ses_head, glxsb_session) - sc_sessions; /* crypto sessions */ - struct rwlock sc_sessions_lock;/* sessions lock */ struct mtx sc_task_mtx; /* task mutex */ struct taskqueue *sc_tq; /* task queue */ struct task sc_cryptotask; /* task */ @@ -208,8 +204,8 @@ static void glxsb_dma_free(struct glxsb_softc *, struc static void glxsb_rnd(void *); static int glxsb_crypto_setup(struct glxsb_softc *); -static int glxsb_crypto_newsession(device_t, uint32_t *, struct cryptoini *); -static int glxsb_crypto_freesession(device_t, uint64_t); +static int glxsb_crypto_newsession(device_t, crypto_session_t, struct cryptoini *); +static void glxsb_crypto_freesession(device_t, crypto_session_t); static int glxsb_aes(struct glxsb_softc *, uint32_t, uint32_t, uint32_t, void *, int, void *); @@ -347,31 +343,15 @@ static int glxsb_detach(device_t dev) { struct glxsb_softc *sc = device_get_softc(dev); - struct glxsb_session *ses; - rw_wlock(&sc->sc_sessions_lock); - TAILQ_FOREACH(ses, &sc->sc_sessions, ses_next) { - if (ses->ses_used) { - rw_wunlock(&sc->sc_sessions_lock); - device_printf(dev, - "cannot detach, sessions still active.\n"); - return (EBUSY); - } - } - while (!TAILQ_EMPTY(&sc->sc_sessions)) { - ses = TAILQ_FIRST(&sc->sc_sessions); - TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next); - free(ses, M_GLXSB); - } - rw_wunlock(&sc->sc_sessions_lock); crypto_unregister_all(sc->sc_cid); + callout_drain(&sc->sc_rngco); taskqueue_drain(sc->sc_tq, &sc->sc_cryptotask); bus_generic_detach(dev); glxsb_dma_free(sc, &sc->sc_dma); bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_sr); taskqueue_free(sc->sc_tq); - rw_destroy(&sc->sc_sessions_lock); mtx_destroy(&sc->sc_task_mtx); return (0); } @@ -487,16 +467,14 @@ static int glxsb_crypto_setup(struct glxsb_softc *sc) { - sc->sc_cid = crypto_get_driverid(sc->sc_dev, CRYPTOCAP_F_HARDWARE); + sc->sc_cid = crypto_get_driverid(sc->sc_dev, + sizeof(struct glxsb_session), CRYPTOCAP_F_HARDWARE); if (sc->sc_cid < 0) { device_printf(sc->sc_dev, "cannot get crypto driver id\n"); return (ENOMEM); } - TAILQ_INIT(&sc->sc_sessions); - sc->sc_sid = 1; - rw_init(&sc->sc_sessions_lock, "glxsb_sessions_lock"); mtx_init(&sc->sc_task_mtx, "glxsb_crypto_mtx", NULL, MTX_DEF); if (crypto_register(sc->sc_cid, CRYPTO_AES_CBC, 0, 0) != 0) @@ -521,20 +499,20 @@ glxsb_crypto_setup(struct glxsb_softc *sc) crypto_fail: device_printf(sc->sc_dev, "cannot register crypto\n"); crypto_unregister_all(sc->sc_cid); - rw_destroy(&sc->sc_sessions_lock); mtx_destroy(&sc->sc_task_mtx); return (ENOMEM); } static int -glxsb_crypto_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri) +glxsb_crypto_newsession(device_t dev, crypto_session_t cses, + struct cryptoini *cri) { struct glxsb_softc *sc = device_get_softc(dev); - struct glxsb_session *ses = NULL; + struct glxsb_session *ses; struct cryptoini *encini, *macini; int error; - if (sc == NULL || sidp == NULL || cri == NULL) + if (sc == NULL || cri == NULL) return (EINVAL); encini = macini = NULL; @@ -569,32 +547,10 @@ glxsb_crypto_newsession(device_t dev, uint32_t *sidp, if (encini == NULL) return (EINVAL); - /* - * Look for a free session - * - * Free sessions goes first, so if first session is used, we need to - * allocate one. - */ - - rw_wlock(&sc->sc_sessions_lock); - ses = TAILQ_FIRST(&sc->sc_sessions); - if (ses == NULL || ses->ses_used) { - ses = malloc(sizeof(*ses), M_GLXSB, M_NOWAIT | M_ZERO); - if (ses == NULL) { - rw_wunlock(&sc->sc_sessions_lock); - return (ENOMEM); - } - ses->ses_id = sc->sc_sid++; - } else { - TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next); - } - ses->ses_used = 1; - TAILQ_INSERT_TAIL(&sc->sc_sessions, ses, ses_next); - rw_wunlock(&sc->sc_sessions_lock); - + ses = crypto_get_driver_session(cses); if (encini->cri_alg == CRYPTO_AES_CBC) { if (encini->cri_klen != 128) { - glxsb_crypto_freesession(sc->sc_dev, ses->ses_id); + glxsb_crypto_freesession(sc->sc_dev, cses); return (EINVAL); } arc4rand(ses->ses_iv, sizeof(ses->ses_iv), 0); @@ -607,43 +563,25 @@ glxsb_crypto_newsession(device_t dev, uint32_t *sidp, if (macini != NULL) { error = glxsb_hash_setup(ses, macini); if (error != 0) { - glxsb_crypto_freesession(sc->sc_dev, ses->ses_id); + glxsb_crypto_freesession(sc->sc_dev, cses); return (error); } } - *sidp = ses->ses_id; return (0); } -static int -glxsb_crypto_freesession(device_t dev, uint64_t tid) +static void +glxsb_crypto_freesession(device_t dev, crypto_session_t cses) { struct glxsb_softc *sc = device_get_softc(dev); - struct glxsb_session *ses = NULL; - uint32_t sid = ((uint32_t)tid) & 0xffffffff; + struct glxsb_session *ses; if (sc == NULL) - return (EINVAL); + return; - rw_wlock(&sc->sc_sessions_lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sc_sessions, ses_head, ses_next) { - if (ses->ses_id == sid) - break; - } - if (ses == NULL) { - rw_wunlock(&sc->sc_sessions_lock); - return (EINVAL); - } - TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next); + ses = crypto_get_driver_session(cses); glxsb_hash_free(ses); - bzero(ses, sizeof(*ses)); - ses->ses_used = 0; - ses->ses_id = sid; - TAILQ_INSERT_HEAD(&sc->sc_sessions, ses, ses_next); - rw_wunlock(&sc->sc_sessions_lock); - - return (0); } static int @@ -864,7 +802,6 @@ glxsb_crypto_process(device_t dev, struct cryptop *crp struct glxsb_softc *sc = device_get_softc(dev); struct glxsb_session *ses; struct cryptodesc *crd, *enccrd, *maccrd; - uint32_t sid; int error = 0; enccrd = maccrd = NULL; @@ -911,17 +848,7 @@ glxsb_crypto_process(device_t dev, struct cryptop *crp goto fail; } - sid = crp->crp_sid & 0xffffffff; - rw_rlock(&sc->sc_sessions_lock); - TAILQ_FOREACH_REVERSE(ses, &sc->sc_sessions, ses_head, ses_next) { - if (ses->ses_id == sid) - break; - } - rw_runlock(&sc->sc_sessions_lock); - if (ses == NULL || !ses->ses_used) { - error = EINVAL; - goto fail; - } + ses = crypto_get_driver_session(crp->crp_session); mtx_lock(&sc->sc_task_mtx); if (sc->sc_task_count != 0) { Modified: head/sys/dev/glxsb/glxsb.h ============================================================================== --- head/sys/dev/glxsb/glxsb.h Wed Jul 18 01:57:13 2018 (r336440) +++ head/sys/dev/glxsb/glxsb.h Wed Jul 18 03:32:28 2018 (r336441) @@ -39,13 +39,10 @@ struct glxsb_session { uint32_t ses_key[4]; /* key */ uint8_t ses_iv[SB_AES_BLOCK_SIZE]; /* initialization vector */ int ses_klen; /* key len */ - int ses_used; /* session is used */ - uint32_t ses_id; /* session id*/ struct auth_hash *ses_axf; uint8_t *ses_ictx; uint8_t *ses_octx; int ses_mlen; - TAILQ_ENTRY(glxsb_session) ses_next; }; int glxsb_hash_setup(struct glxsb_session *ses, From owner-svn-src-head@freebsd.org Wed Jul 18 04:29:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F9E51033E40; Wed, 18 Jul 2018 04:29:45 +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 12F6687265; Wed, 18 Jul 2018 04:29:45 +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 DACE8154E2; Wed, 18 Jul 2018 04:29:44 +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 w6I4TiwY008799; Wed, 18 Jul 2018 04:29:44 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I4TimA008798; Wed, 18 Jul 2018 04:29:44 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807180429.w6I4TimA008798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 18 Jul 2018 04:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336442 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 336442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 04:29:45 -0000 Author: cem Date: Wed Jul 18 04:29:44 2018 New Revision: 336442 URL: https://svnweb.freebsd.org/changeset/base/336442 Log: aesni(4): Abstract out hash/HMAC support No functional change. Verified with cryptocheck. Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Jul 18 03:32:28 2018 (r336441) +++ head/sys/crypto/aesni/aesni.c Wed Jul 18 04:29:44 2018 (r336442) @@ -541,6 +541,12 @@ intel_sha1_update(void *vctx, const void *vdata, u_int } static void +SHA1_Init_fn(void *ctx) +{ + sha1_init(ctx); +} + +static void SHA1_Finalize_fn(void *digest, void *ctx) { sha1_result(ctx, digest); @@ -590,6 +596,12 @@ intel_sha256_update(void *vctx, const void *vdata, u_i } static void +SHA256_Init_fn(void *ctx) +{ + SHA256_Init(ctx); +} + +static void SHA256_Finalize_fn(void *digest, void *ctx) { SHA256_Final(digest, ctx); @@ -813,7 +825,13 @@ aesni_cipher_mac(struct aesni_session *ses, struct cry } sctx; uint32_t res[SHA2_256_HASH_LEN / sizeof(uint32_t)]; int hashlen, error; + void *ctx; + void (*InitFn)(void *); + int (*UpdateFn)(void *, const void *, unsigned); + void (*FinalizeFn)(void *, void *); + bool hmac; + if ((crd->crd_flags & ~CRD_F_KEY_EXPLICIT) != 0) { CRYPTDEB("%s: Unsupported MAC flags: 0x%x", __func__, (crd->crd_flags & ~CRD_F_KEY_EXPLICIT)); @@ -825,39 +843,26 @@ aesni_cipher_mac(struct aesni_session *ses, struct cry return (error); } + hmac = false; switch (ses->auth_algo) { case CRYPTO_SHA1_HMAC: - hashlen = SHA1_HASH_LEN; - /* Inner hash: (K ^ IPAD) || data */ - sha1_init(&sctx.sha1); - hmac_internal(&sctx.sha1, res, intel_sha1_update, - SHA1_Finalize_fn, ses->hmac_key, 0x36, crp->crp_buf, - crd->crd_skip, crd->crd_len, crp->crp_flags); - /* Outer hash: (K ^ OPAD) || inner hash */ - sha1_init(&sctx.sha1); - hmac_internal(&sctx.sha1, res, intel_sha1_update, - SHA1_Finalize_fn, ses->hmac_key, 0x5C, res, 0, hashlen, 0); - break; + hmac = true; + /* FALLTHROUGH */ case CRYPTO_SHA1: hashlen = SHA1_HASH_LEN; - sha1_init(&sctx.sha1); - crypto_apply(crp->crp_flags, crp->crp_buf, crd->crd_skip, - crd->crd_len, __DECONST(int (*)(void *, void *, u_int), - intel_sha1_update), &sctx.sha1); - sha1_result(&sctx.sha1, (void *)res); + InitFn = SHA1_Init_fn; + UpdateFn = intel_sha1_update; + FinalizeFn = SHA1_Finalize_fn; + ctx = &sctx.sha1; break; + case CRYPTO_SHA2_256_HMAC: + hmac = true; hashlen = SHA2_256_HASH_LEN; - /* Inner hash: (K ^ IPAD) || data */ - SHA256_Init(&sctx.sha2); - hmac_internal(&sctx.sha2, res, intel_sha256_update, - SHA256_Finalize_fn, ses->hmac_key, 0x36, crp->crp_buf, - crd->crd_skip, crd->crd_len, crp->crp_flags); - /* Outer hash: (K ^ OPAD) || inner hash */ - SHA256_Init(&sctx.sha2); - hmac_internal(&sctx.sha2, res, intel_sha256_update, - SHA256_Finalize_fn, ses->hmac_key, 0x5C, res, 0, hashlen, - 0); + InitFn = SHA256_Init_fn; + UpdateFn = intel_sha256_update; + FinalizeFn = SHA256_Finalize_fn; + ctx = &sctx.sha2; break; default: /* @@ -865,6 +870,24 @@ aesni_cipher_mac(struct aesni_session *ses, struct cry * enccrd */ return (0); + } + + if (hmac) { + /* Inner hash: (K ^ IPAD) || data */ + InitFn(ctx); + hmac_internal(ctx, res, UpdateFn, FinalizeFn, ses->hmac_key, + 0x36, crp->crp_buf, crd->crd_skip, crd->crd_len, + crp->crp_flags); + /* Outer hash: (K ^ OPAD) || inner hash */ + InitFn(ctx); + hmac_internal(ctx, res, UpdateFn, FinalizeFn, ses->hmac_key, + 0x5C, res, 0, hashlen, 0); + } else { + InitFn(ctx); + crypto_apply(crp->crp_flags, crp->crp_buf, crd->crd_skip, + crd->crd_len, __DECONST(int (*)(void *, void *, u_int), + UpdateFn), ctx); + FinalizeFn(res, ctx); } if (ses->mlen != 0 && ses->mlen < hashlen) From owner-svn-src-head@freebsd.org Wed Jul 18 04:37:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 700621034252; Wed, 18 Jul 2018 04:37:15 +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 210DA88017; Wed, 18 Jul 2018 04:37:15 +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 EF0AC15699; Wed, 18 Jul 2018 04:37:14 +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 w6I4bEdE013780; Wed, 18 Jul 2018 04:37:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I4bECU013779; Wed, 18 Jul 2018 04:37:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807180437.w6I4bECU013779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 18 Jul 2018 04:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336443 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 336443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 04:37:15 -0000 Author: cem Date: Wed Jul 18 04:37:14 2018 New Revision: 336443 URL: https://svnweb.freebsd.org/changeset/base/336443 Log: aesni(4): Add sha256 plain hash support Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Jul 18 04:29:44 2018 (r336442) +++ head/sys/crypto/aesni/aesni.c Wed Jul 18 04:37:14 2018 (r336443) @@ -196,6 +196,7 @@ aesni_attach(device_t dev) if (sc->has_sha) { crypto_register(sc->cid, CRYPTO_SHA1, 0, 0); crypto_register(sc->cid, CRYPTO_SHA1_HMAC, 0, 0); + crypto_register(sc->cid, CRYPTO_SHA2_256, 0, 0); crypto_register(sc->cid, CRYPTO_SHA2_256_HMAC, 0, 0); } return (0); @@ -265,6 +266,7 @@ aesni_newsession(device_t dev, crypto_session_t cses, break; case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: if (!sc->has_sha) goto unhandled; @@ -350,6 +352,7 @@ aesni_process(device_t dev, struct cryptop *crp, int h case CRYPTO_AES_256_NIST_GMAC: case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: if (authcrd != NULL) { error = EINVAL; @@ -477,6 +480,7 @@ aesni_cipher_setup(struct aesni_session *ses, struct c switch (ses->auth_algo) { case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: error = aesni_authprepare(ses, authini->cri_klen, authini->cri_key); @@ -858,6 +862,8 @@ aesni_cipher_mac(struct aesni_session *ses, struct cry case CRYPTO_SHA2_256_HMAC: hmac = true; + /* FALLTHROUGH */ + case CRYPTO_SHA2_256: hashlen = SHA2_256_HASH_LEN; InitFn = SHA256_Init_fn; UpdateFn = intel_sha256_update; From owner-svn-src-head@freebsd.org Wed Jul 18 04:43:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE7110346CC; Wed, 18 Jul 2018 04:43:19 +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 BDB3A884AB; Wed, 18 Jul 2018 04:43:18 +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 9F04715845; Wed, 18 Jul 2018 04:43:18 +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 w6I4hILd018453; Wed, 18 Jul 2018 04:43:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I4hIrs018452; Wed, 18 Jul 2018 04:43:18 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807180443.w6I4hIrs018452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 18 Jul 2018 04:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336444 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 336444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 04:43:19 -0000 Author: cem Date: Wed Jul 18 04:43:18 2018 New Revision: 336444 URL: https://svnweb.freebsd.org/changeset/base/336444 Log: aesni(4): Add SHA2-224(-HMAC) support as well Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Jul 18 04:37:14 2018 (r336443) +++ head/sys/crypto/aesni/aesni.c Wed Jul 18 04:43:18 2018 (r336444) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -196,6 +197,8 @@ aesni_attach(device_t dev) if (sc->has_sha) { crypto_register(sc->cid, CRYPTO_SHA1, 0, 0); crypto_register(sc->cid, CRYPTO_SHA1_HMAC, 0, 0); + crypto_register(sc->cid, CRYPTO_SHA2_224, 0, 0); + crypto_register(sc->cid, CRYPTO_SHA2_224_HMAC, 0, 0); crypto_register(sc->cid, CRYPTO_SHA2_256, 0, 0); crypto_register(sc->cid, CRYPTO_SHA2_256_HMAC, 0, 0); } @@ -266,6 +269,8 @@ aesni_newsession(device_t dev, crypto_session_t cses, break; case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_224: + case CRYPTO_SHA2_224_HMAC: case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: if (!sc->has_sha) @@ -352,6 +357,8 @@ aesni_process(device_t dev, struct cryptop *crp, int h case CRYPTO_AES_256_NIST_GMAC: case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_224: + case CRYPTO_SHA2_224_HMAC: case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: if (authcrd != NULL) { @@ -480,6 +487,8 @@ aesni_cipher_setup(struct aesni_session *ses, struct c switch (ses->auth_algo) { case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_224: + case CRYPTO_SHA2_224_HMAC: case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: error = aesni_authprepare(ses, authini->cri_klen, @@ -600,6 +609,18 @@ intel_sha256_update(void *vctx, const void *vdata, u_i } static void +SHA224_Init_fn(void *ctx) +{ + SHA224_Init(ctx); +} + +static void +SHA224_Finalize_fn(void *digest, void *ctx) +{ + SHA224_Final(digest, ctx); +} + +static void SHA256_Init_fn(void *ctx) { SHA256_Init(ctx); @@ -868,6 +889,17 @@ aesni_cipher_mac(struct aesni_session *ses, struct cry InitFn = SHA256_Init_fn; UpdateFn = intel_sha256_update; FinalizeFn = SHA256_Finalize_fn; + ctx = &sctx.sha2; + break; + + case CRYPTO_SHA2_224_HMAC: + hmac = true; + /* FALLTHROUGH */ + case CRYPTO_SHA2_224: + hashlen = SHA2_224_HASH_LEN; + InitFn = SHA224_Init_fn; + UpdateFn = intel_sha256_update; + FinalizeFn = SHA224_Finalize_fn; ctx = &sctx.sha2; break; default: From owner-svn-src-head@freebsd.org Wed Jul 18 04:44:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24B81034764; Wed, 18 Jul 2018 04:44:12 +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 563D8885FB; Wed, 18 Jul 2018 04:44:12 +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 3743615846; Wed, 18 Jul 2018 04:44:12 +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 w6I4iCEw018549; Wed, 18 Jul 2018 04:44:12 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I4iCxI018548; Wed, 18 Jul 2018 04:44:12 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807180444.w6I4iCxI018548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 18 Jul 2018 04:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336445 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 336445 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 04:44:12 -0000 Author: cem Date: Wed Jul 18 04:44:11 2018 New Revision: 336445 URL: https://svnweb.freebsd.org/changeset/base/336445 Log: Remove unused variable Reported by: gcc Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Jul 18 04:43:18 2018 (r336444) +++ head/sys/crypto/aesni/aesni.c Wed Jul 18 04:44:11 2018 (r336445) @@ -315,12 +315,10 @@ unhandled: static int aesni_process(device_t dev, struct cryptop *crp, int hint __unused) { - struct aesni_softc *sc; struct aesni_session *ses; struct cryptodesc *crd, *enccrd, *authcrd; int error, needauth; - sc = device_get_softc(dev); ses = NULL; error = 0; enccrd = NULL; From owner-svn-src-head@freebsd.org Wed Jul 18 07:01:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B399103B110; Wed, 18 Jul 2018 07:01:36 +0000 (UTC) (envelope-from ram@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 C17568BEFF; Wed, 18 Jul 2018 07:01:35 +0000 (UTC) (envelope-from ram@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A25F616E53; Wed, 18 Jul 2018 07:01:35 +0000 (UTC) (envelope-from ram@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6I71Zac086284; Wed, 18 Jul 2018 07:01:35 GMT (envelope-from ram@FreeBSD.org) Received: (from ram@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I71ZcM086281; Wed, 18 Jul 2018 07:01:35 GMT (envelope-from ram@FreeBSD.org) Message-Id: <201807180701.w6I71ZcM086281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ram set sender to ram@FreeBSD.org using -f From: Ram Kishore Vegesna Date: Wed, 18 Jul 2018 07:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336446 - head/sys/dev/ocs_fc X-SVN-Group: head X-SVN-Commit-Author: ram X-SVN-Commit-Paths: head/sys/dev/ocs_fc X-SVN-Commit-Revision: 336446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 07:01:36 -0000 Author: ram Date: Wed Jul 18 07:01:34 2018 New Revision: 336446 URL: https://svnweb.freebsd.org/changeset/base/336446 Log: Implemented Device Lost Timer, which is used to give target device the time to recover before marking dead. Issue: IO fails immediately after doing port-toggle. Fix: Added LDT(Device Lost Timer)- we wait a specific period of time prior to telling the OS about lost device. Approved by: ken, mav MFC after: 3 days Differential Revision: D16196 Modified: head/sys/dev/ocs_fc/ocs.h head/sys/dev/ocs_fc/ocs_cam.c head/sys/dev/ocs_fc/ocs_pci.c head/sys/dev/ocs_fc/ocs_xport.c Modified: head/sys/dev/ocs_fc/ocs.h ============================================================================== --- head/sys/dev/ocs_fc/ocs.h Wed Jul 18 04:44:11 2018 (r336445) +++ head/sys/dev/ocs_fc/ocs.h Wed Jul 18 07:01:34 2018 (r336446) @@ -62,13 +62,36 @@ typedef struct ocs_intr_ctx_s { char name[64]; /** label for this context */ } ocs_intr_ctx_t; +typedef struct ocs_fc_rport_db_s { + uint32_t node_id; + uint32_t state; + uint8_t is_target; + uint8_t is_initiator; + + uint32_t port_id; + uint64_t wwnn; + uint64_t wwpn; + uint32_t gone_timer; + +} ocs_fc_target_t; + +#define OCS_TGT_STATE_NONE 0 /* Empty DB slot */ +#define OCS_TGT_STATE_VALID 1 /* Valid*/ +#define OCS_TGT_STATE_LOST 2 /* LOST*/ + typedef struct ocs_fcport_s { - struct cam_sim *sim; - struct cam_path *path; - uint32_t role; + ocs_t *ocs; + struct cam_sim *sim; + struct cam_path *path; + uint32_t role; - ocs_tgt_resource_t targ_rsrc_wildcard; - ocs_tgt_resource_t targ_rsrc[OCS_MAX_LUN]; + ocs_fc_target_t tgt[OCS_MAX_TARGETS]; + int lost_device_time; + struct callout ldt; /* device lost timer */ + struct task ltask; + + ocs_tgt_resource_t targ_rsrc_wildcard; + ocs_tgt_resource_t targ_rsrc[OCS_MAX_LUN]; ocs_vport_spec_t *vport; } ocs_fcport; @@ -169,7 +192,7 @@ struct ocs_softc { uint32_t enable_task_set_full; uint32_t io_in_use; uint32_t io_high_watermark; /**< used to send task set full */ - struct mtx sim_lock; + struct mtx sim_lock; uint32_t config_tgt:1, /**< Configured to support target mode */ config_ini:1; /**< Configured to support initiator mode */ Modified: head/sys/dev/ocs_fc/ocs_cam.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_cam.c Wed Jul 18 04:44:11 2018 (r336445) +++ head/sys/dev/ocs_fc/ocs_cam.c Wed Jul 18 07:01:34 2018 (r336446) @@ -74,6 +74,14 @@ static int32_t ocs_initiator_tmf_cb(ocs_io_t *, ocs_sc static uint32_t ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport *fcp, uint32_t new_role); +static void ocs_ldt(void *arg); +static void ocs_ldt_task(void *arg, int pending); +static void ocs_delete_target(ocs_t *ocs, ocs_fcport *fcp, int tgt); +uint32_t ocs_add_new_tgt(ocs_node_t *node, ocs_fcport *fcp); +uint32_t ocs_update_tgt(ocs_node_t *node, ocs_fcport *fcp, uint32_t tgt_id); + +int32_t ocs_tgt_find(ocs_fcport *fcp, ocs_node_t *node); + static inline ocs_io_t *ocs_scsi_find_io(struct ocs_softc *ocs, uint32_t tag) { @@ -124,12 +132,15 @@ ocs_attach_port(ocs_t *ocs, int chan) cam_sim_free(sim, FALSE); return 1; } - + + fcp->ocs = ocs; fcp->sim = sim; fcp->path = path; - return 0; + callout_init_mtx(&fcp->ldt, &ocs->sim_lock, 0); + TASK_INIT(&fcp->ltask, 1, ocs_ldt_task, fcp); + return 0; } static int32_t @@ -143,6 +154,9 @@ ocs_detach_port(ocs_t *ocs, int32_t chan) sim = fcp->sim; path = fcp->path; + callout_drain(&fcp->ldt); + ocs_ldt_task(fcp, 0); + if (fcp->sim) { mtx_lock(&ocs->sim_lock); ocs_tgt_resource_abort(ocs, &fcp->targ_rsrc_wildcard); @@ -672,7 +686,7 @@ int32_t ocs_scsi_recv_tmf(ocs_io_t *tmfio, uint64_t lu inot = (struct ccb_immediate_notify *)STAILQ_FIRST(&trsrc->inot); } - if (!inot) { + if (!inot) { device_printf( ocs->dev, "%s: no INOT for LUN %llx (en=%s) OX_ID %#x\n", __func__, (unsigned long long)lun, trsrc ? (trsrc->enabled ? "T" : "F") : "X", @@ -932,6 +946,26 @@ ocs_scsi_sport_deleted(ocs_sport_t *sport) } +int32_t +ocs_tgt_find(ocs_fcport *fcp, ocs_node_t *node) +{ + ocs_fc_target_t *tgt = NULL; + uint32_t i; + + for (i = 0; i < OCS_MAX_TARGETS; i++) { + tgt = &fcp->tgt[i]; + + if (tgt->state == OCS_TGT_STATE_NONE) + continue; + + if (ocs_node_get_wwpn(node) == tgt->wwpn) { + return i; + } + } + + return -1; +} + /** * @ingroup scsi_api_initiator * @brief receive notification of a new SCSI target node @@ -949,38 +983,150 @@ ocs_scsi_sport_deleted(ocs_sport_t *sport) * * @note */ -int32_t -ocs_scsi_new_target(ocs_node_t *node) + +uint32_t +ocs_update_tgt(ocs_node_t *node, ocs_fcport *fcp, uint32_t tgt_id) { + ocs_fc_target_t *tgt = NULL; + + tgt = &fcp->tgt[tgt_id]; + + tgt->node_id = node->instance_index; + tgt->state = OCS_TGT_STATE_VALID; + + tgt->port_id = node->rnode.fc_id; + tgt->wwpn = ocs_node_get_wwpn(node); + tgt->wwnn = ocs_node_get_wwnn(node); + return 0; +} + +uint32_t +ocs_add_new_tgt(ocs_node_t *node, ocs_fcport *fcp) +{ + uint32_t i; + struct ocs_softc *ocs = node->ocs; union ccb *ccb = NULL; - ocs_fcport *fcp = NULL; - - fcp = node->sport->tgt_data; - if (fcp == NULL) { - printf("%s:FCP is NULL \n", __func__); - return 0; + for (i = 0; i < OCS_MAX_TARGETS; i++) { + if (fcp->tgt[i].state == OCS_TGT_STATE_NONE) + break; } if (NULL == (ccb = xpt_alloc_ccb_nowait())) { device_printf(ocs->dev, "%s: ccb allocation failed\n", __func__); return -1; } - + if (CAM_REQ_CMP != xpt_create_path(&ccb->ccb_h.path, xpt_periph, cam_sim_path(fcp->sim), - node->instance_index, CAM_LUN_WILDCARD)) { + i, CAM_LUN_WILDCARD)) { device_printf( ocs->dev, "%s: target path creation failed\n", __func__); xpt_free_ccb(ccb); return -1; } + ocs_update_tgt(node, fcp, i); xpt_rescan(ccb); + return 0; +} +int32_t +ocs_scsi_new_target(ocs_node_t *node) +{ + ocs_fcport *fcp = NULL; + int32_t i; + + fcp = node->sport->tgt_data; + if (fcp == NULL) { + printf("%s:FCP is NULL \n", __func__); + return 0; + } + + i = ocs_tgt_find(fcp, node); + + if (i < 0) { + ocs_add_new_tgt(node, fcp); + return 0; + } + + ocs_update_tgt(node, fcp, i); return 0; } +static void +ocs_delete_target(ocs_t *ocs, ocs_fcport *fcp, int tgt) +{ + struct cam_path *cpath = NULL; + + if (!fcp->sim) { + device_printf(ocs->dev, "%s: calling with NULL sim\n", __func__); + return; + } + + if (CAM_REQ_CMP == xpt_create_path(&cpath, NULL, cam_sim_path(fcp->sim), + tgt, CAM_LUN_WILDCARD)) { + xpt_async(AC_LOST_DEVICE, cpath, NULL); + + xpt_free_path(cpath); + } +} + +/* + * Device Lost Timer Function- when we have decided that a device was lost, + * we wait a specific period of time prior to telling the OS about lost device. + * + * This timer function gets activated when the device was lost. + * This function fires once a second and then scans the port database + * for devices that are marked dead but still have a virtual target assigned. + * We decrement a counter for that port database entry, and when it hits zero, + * we tell the OS the device was lost. Timer will be stopped when the device + * comes back active or removed from the OS. + */ +static void +ocs_ldt(void *arg) +{ + ocs_fcport *fcp = arg; + taskqueue_enqueue(taskqueue_thread, &fcp->ltask); +} + +static void +ocs_ldt_task(void *arg, int pending) +{ + ocs_fcport *fcp = arg; + ocs_t *ocs = fcp->ocs; + int i, more_to_do = 0; + ocs_fc_target_t *tgt = NULL; + + for (i = 0; i < OCS_MAX_TARGETS; i++) { + tgt = &fcp->tgt[i]; + + if (tgt->state != OCS_TGT_STATE_LOST) { + continue; + } + + if ((tgt->gone_timer != 0) && (ocs->attached)){ + tgt->gone_timer -= 1; + more_to_do++; + continue; + } + + if (tgt->is_target) { + tgt->is_target = 0; + ocs_delete_target(ocs, fcp, i); + } + + tgt->state = OCS_TGT_STATE_NONE; + } + + if (more_to_do) { + callout_reset(&fcp->ldt, hz, ocs_ldt, fcp); + } else { + callout_deactivate(&fcp->ldt); + } + +} + /** * @ingroup scsi_api_initiator * @brief Delete a SCSI target node @@ -1008,8 +1154,9 @@ int32_t ocs_scsi_del_target(ocs_node_t *node, ocs_scsi_del_target_reason_e reason) { struct ocs_softc *ocs = node->ocs; - struct cam_path *cpath = NULL; ocs_fcport *fcp = NULL; + ocs_fc_target_t *tgt = NULL; + uint32_t tgt_id; fcp = node->sport->tgt_data; if (fcp == NULL) { @@ -1017,18 +1164,23 @@ ocs_scsi_del_target(ocs_node_t *node, ocs_scsi_del_tar return 0; } - if (!fcp->sim) { - device_printf(ocs->dev, "%s: calling with NULL sim\n", __func__); - return OCS_SCSI_CALL_COMPLETE; - } + tgt_id = ocs_tgt_find(fcp, node); + + tgt = &fcp->tgt[tgt_id]; + + // IF in shutdown delete target. + if(!ocs->attached) { + ocs_delete_target(ocs, fcp, tgt_id); + } else { - if (CAM_REQ_CMP == xpt_create_path(&cpath, NULL, cam_sim_path(fcp->sim), - node->instance_index, CAM_LUN_WILDCARD)) { - xpt_async(AC_LOST_DEVICE, cpath, NULL); - - xpt_free_path(cpath); + tgt->state = OCS_TGT_STATE_LOST; + tgt->gone_timer = 30; + if (!callout_active(&fcp->ldt)) { + callout_reset(&fcp->ldt, hz, ocs_ldt, fcp); + } } - return OCS_SCSI_CALL_COMPLETE; + + return 0; } /** @@ -1356,6 +1508,10 @@ static int32_t ocs_scsi_initiator_io_cb(ocs_io_t *io, } } else if (scsi_status != OCS_SCSI_STATUS_GOOD) { ccb_status = CAM_REQ_CMP_ERR; + ocs_set_ccb_status(ccb, ccb_status); + csio->ccb_h.status |= CAM_DEV_QFRZN; + xpt_freeze_devq(csio->ccb_h.path, 1); + } else { ccb_status = CAM_REQ_CMP; } @@ -1618,18 +1774,37 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb ocs_scsi_sgl_t sgl[OCS_FC_MAX_SGL]; int32_t sgl_count; - node = ocs_node_get_instance(ocs, ccb_h->target_id); + ocs_fcport *fcp = NULL; + fcp = FCPORT(ocs, cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path))); + if (fcp == NULL) { + device_printf(ocs->dev, "%s: fcp is NULL\n", __func__); + return -1; + } + + if (fcp->tgt[ccb_h->target_id].state == OCS_TGT_STATE_LOST) { + device_printf(ocs->dev, "%s: device LOST %d\n", __func__, + ccb_h->target_id); + return CAM_REQUEUE_REQ; + } + + if (fcp->tgt[ccb_h->target_id].state == OCS_TGT_STATE_NONE) { + device_printf(ocs->dev, "%s: device not ready %d\n", __func__, + ccb_h->target_id); + return CAM_SEL_TIMEOUT; + } + + node = ocs_node_get_instance(ocs, fcp->tgt[ccb_h->target_id].node_id); if (node == NULL) { device_printf(ocs->dev, "%s: no device %d\n", __func__, ccb_h->target_id); - return CAM_DEV_NOT_THERE; + return CAM_SEL_TIMEOUT; } if (!node->targ) { - device_printf(ocs->dev, "%s: not target device %d\n", __func__, + device_printf(ocs->dev, "%s: not target device %d\n", __func__, ccb_h->target_id); - return CAM_DEV_NOT_THERE; - } + return CAM_SEL_TIMEOUT; + } io = ocs_scsi_io_alloc(node, OCS_SCSI_IO_ROLE_ORIGINATOR); if (io == NULL) { @@ -1666,7 +1841,7 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb csio->cdb_io.cdb_ptr: csio->cdb_io.cdb_bytes, csio->cdb_len, ocs_scsi_initiator_io_cb, ccb); - break; + break; case CAM_DIR_IN: rc = ocs_scsi_send_rd_io(node, io, ccb_h->target_lun, ccb->ccb_h.flags & CAM_CDB_POINTER ? @@ -1702,9 +1877,9 @@ ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport ocs_vport_spec_t *vport = fcp->vport; for (was = 0, i = 0; i < (ocs->num_vports + 1); i++) { - if (FCPORT(ocs, i)->role != KNOB_ROLE_NONE) - was++; - } + if (FCPORT(ocs, i)->role != KNOB_ROLE_NONE) + was++; + } // Physical port if ((was == 0) || (vport == NULL)) { @@ -1743,7 +1918,7 @@ ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport vport->enable_ini = (new_role & KNOB_ROLE_INITIATOR)? 1:0; vport->enable_tgt = (new_role & KNOB_ROLE_TARGET)? 1:0; - if (fcp->role != KNOB_ROLE_NONE) { + if (fcp->role != KNOB_ROLE_NONE) { return ocs_sport_vport_alloc(ocs->domain, vport); } @@ -1774,20 +1949,28 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) switch (ccb_h->func_code) { case XPT_SCSI_IO: - + if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) { - if ((ccb->ccb_h.flags & CAM_CDB_PHYS) != 0) { - ccb->ccb_h.status = CAM_REQ_INVALID; + if ((ccb->ccb_h.flags & CAM_CDB_PHYS) != 0) { + ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); - break; - } - } + break; + } + } rc = ocs_initiator_io(ocs, ccb); if (0 == rc) { ocs_set_ccb_status(ccb, CAM_REQ_INPROG | CAM_SIM_QUEUED); break; } else { + if (rc == CAM_REQUEUE_REQ) { + cam_freeze_devq(ccb->ccb_h.path); + cam_release_devq(ccb->ccb_h.path, RELSIM_RELEASE_AFTER_TIMEOUT, 0, 100, 0); + ccb->ccb_h.status = CAM_REQUEUE_REQ; + xpt_done(ccb); + break; + } + ccb->ccb_h.status &= ~CAM_SIM_QUEUED; if (rc > 0) { ocs_set_ccb_status(ccb, rc); @@ -1838,7 +2021,7 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) } cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; - cpi->hba_misc |= PIM_EXTLUNS | PIM_NOSCAN; + cpi->hba_misc |= PIM_EXTLUNS | PIM_NOSCAN; cpi->hba_inquiry = PI_TAG_ABLE; cpi->max_target = OCS_MAX_TARGETS; @@ -1875,6 +2058,7 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_fc *fc = &cts->xport_specific.fc; ocs_xport_stats_t value; + ocs_fcport *fcp = FCPORT(ocs, bus); ocs_node_t *fnode = NULL; if (ocs->ocs_xport != OCS_XPORT_FC) { @@ -1883,7 +2067,7 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) break; } - fnode = ocs_node_get_instance(ocs, cts->ccb_h.target_id); + fnode = ocs_node_get_instance(ocs, fcp->tgt[cts->ccb_h.target_id].node_id); if (fnode == NULL) { ocs_set_ccb_status(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); @@ -2066,8 +2250,9 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) ocs_node_t *node = NULL; ocs_io_t *io = NULL; int32_t rc = 0; + ocs_fcport *fcp = FCPORT(ocs, bus); - node = ocs_node_get_instance(ocs, ccb_h->target_id); + node = ocs_node_get_instance(ocs, fcp->tgt[ccb_h->target_id].node_id); if (node == NULL) { device_printf(ocs->dev, "%s: no device %d\n", __func__, ccb_h->target_id); @@ -2096,7 +2281,7 @@ ocs_action(struct cam_sim *sim, union ccb *ccb) ocs_set_ccb_status(ccb, CAM_REQ_CMP); } - if (node->fcp2device) { + if (node->fcp2device) { ocs_reset_crn(node, ccb_h->target_lun); } @@ -2358,7 +2543,7 @@ static void ocs_abort_atio(struct ocs_softc *ocs, union ccb *ccb) { - ocs_io_t *aio = NULL; + ocs_io_t *aio = NULL; ocs_tgt_resource_t *trsrc = NULL; uint32_t status = CAM_REQ_INVALID; struct ccb_hdr *cur = NULL; @@ -2449,12 +2634,13 @@ static uint32_t ocs_abort_initiator_io(struct ocs_softc *ocs, union ccb *accb) { - ocs_node_t *node = NULL; - ocs_io_t *io = NULL; + ocs_node_t *node = NULL; + ocs_io_t *io = NULL; int32_t rc = 0; struct ccb_scsiio *csio = &accb->csio; - node = ocs_node_get_instance(ocs, accb->ccb_h.target_id); + ocs_fcport *fcp = FCPORT(ocs, cam_sim_bus(xpt_path_sim((accb)->ccb_h.path))); + node = ocs_node_get_instance(ocs, fcp->tgt[accb->ccb_h.target_id].node_id); if (node == NULL) { device_printf(ocs->dev, "%s: no device %d\n", __func__, accb->ccb_h.target_id); Modified: head/sys/dev/ocs_fc/ocs_pci.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_pci.c Wed Jul 18 04:44:11 2018 (r336445) +++ head/sys/dev/ocs_fc/ocs_pci.c Wed Jul 18 07:01:34 2018 (r336446) @@ -577,6 +577,8 @@ ocs_device_detach(ocs_t *ocs) return -1; } + ocs->attached = FALSE; + rc = ocs_xport_control(ocs->xport, OCS_XPORT_SHUTDOWN); if (rc) { ocs_log_err(ocs, "%s: Transport Shutdown timed out\n", __func__); @@ -599,8 +601,6 @@ ocs_device_detach(ocs_t *ocs) bus_dma_tag_destroy(ocs->dmat); ocs_xport_free(ocs->xport); ocs->xport = NULL; - - ocs->attached = FALSE; } Modified: head/sys/dev/ocs_fc/ocs_xport.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_xport.c Wed Jul 18 04:44:11 2018 (r336445) +++ head/sys/dev/ocs_fc/ocs_xport.c Wed Jul 18 07:01:34 2018 (r336446) @@ -251,8 +251,10 @@ ocs_xport_attach(ocs_xport_t *xport) ocs_hw_get(&ocs->hw, OCS_HW_MAX_NODES, &max_remote_nodes); - rc = ocs_node_create_pool(ocs, (ocs->max_remote_nodes) ? - ocs->max_remote_nodes : max_remote_nodes); + if (!ocs->max_remote_nodes) + ocs->max_remote_nodes = max_remote_nodes; + + rc = ocs_node_create_pool(ocs, ocs->max_remote_nodes); if (rc) { ocs_log_err(ocs, "Can't allocate node pool\n"); goto ocs_xport_attach_cleanup; From owner-svn-src-head@freebsd.org Wed Jul 18 09:17:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77ED6104051D; Wed, 18 Jul 2018 09:17:38 +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 29D4B70CD5; Wed, 18 Jul 2018 09:17:38 +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 0C348183B9; Wed, 18 Jul 2018 09:17:38 +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 w6I9Hbpi056350; Wed, 18 Jul 2018 09:17:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6I9HbGv056349; Wed, 18 Jul 2018 09:17:37 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807180917.w6I9HbGv056349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 18 Jul 2018 09:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336447 - head/sys/arm/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/include X-SVN-Commit-Revision: 336447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 09:17:38 -0000 Author: andrew Date: Wed Jul 18 09:17:37 2018 New Revision: 336447 URL: https://svnweb.freebsd.org/changeset/base/336447 Log: Also check if __ARM_ARCH_6KZ__ is defined when detecting when to use ARMv6 instructions. There is some code that still uses the _ARM_ARCH_* macros. Sponsored by: DARPA, AFRL Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Wed Jul 18 07:01:34 2018 (r336446) +++ head/sys/arm/include/asm.h Wed Jul 18 09:17:37 2018 (r336447) @@ -195,6 +195,7 @@ #if defined (_HAVE_ARMv7_INSTRUCTIONS) || defined (__ARM_ARCH_6__) || \ defined (__ARM_ARCH_6J__) || defined (__ARM_ARCH_6K__) || \ + defined (__ARM_ARCH_6KZ__) || \ defined (__ARM_ARCH_6Z__) || defined (__ARM_ARCH_6ZK__) #define _ARM_ARCH_6 #define _HAVE_ARMv6_INSTRUCTIONS 1 From owner-svn-src-head@freebsd.org Wed Jul 18 10:03:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E9DE104273D; Wed, 18 Jul 2018 10:03: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.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 1B9B272DF3; Wed, 18 Jul 2018 10:03: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 F162018BE8; Wed, 18 Jul 2018 10:03: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 w6IA3VxZ081375; Wed, 18 Jul 2018 10:03:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IA3U9B081367; Wed, 18 Jul 2018 10:03:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807181003.w6IA3U9B081367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Jul 2018 10:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336450 - in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 336450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 10:03:32 -0000 Author: hselasky Date: Wed Jul 18 10:03:30 2018 New Revision: 336450 URL: https://svnweb.freebsd.org/changeset/base/336450 Log: Do not inline transmit headers and use HW VLAN tagging if supported by mlx5en(4). Query the minimal inline mode supported by the card. When creating a send queue, cache the queried mode and optimize the transmit if no inlining is required. In this case, we can avoid touching the headers cache line and avoid dirtying several more lines by copying headers into the send WQEs. Also, if no inline headers are used, hardware assists in the VLAN tag framing. Submitted by: kib@, slavash@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/device.h head/sys/dev/mlx5/mlx5_core/mlx5_vport.c head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c head/sys/dev/mlx5/qp.h head/sys/dev/mlx5/vport.h Modified: head/sys/dev/mlx5/device.h ============================================================================== --- head/sys/dev/mlx5/device.h Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/device.h Wed Jul 18 10:03:30 2018 (r336450) @@ -1093,6 +1093,13 @@ enum { MLX5_CMD_HCA_CAP_MIN_WQE_INLINE_MODE_NOT_REQUIRED = 0x2 }; +enum mlx5_inline_modes { + MLX5_INLINE_MODE_NONE, + MLX5_INLINE_MODE_L2, + MLX5_INLINE_MODE_IP, + MLX5_INLINE_MODE_TCP_UDP, +}; + enum { MLX5_QUERY_VPORT_STATE_OUT_STATE_FOLLOW = 0x2, }; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_vport.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/mlx5_core/mlx5_vport.c Wed Jul 18 10:03:30 2018 (r336450) @@ -208,6 +208,58 @@ int mlx5_vport_query_out_of_rx_buffer(struct mlx5_core return err; } +int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev, + u16 vport, u8 *min_inline) +{ + u32 out[MLX5_ST_SZ_DW(query_nic_vport_context_out)] = {0}; + int err; + + err = mlx5_query_nic_vport_context(mdev, vport, out, sizeof(out)); + if (!err) + *min_inline = MLX5_GET(query_nic_vport_context_out, out, + nic_vport_context.min_wqe_inline_mode); + return err; +} +EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_min_inline); + +void mlx5_query_min_inline(struct mlx5_core_dev *mdev, + u8 *min_inline_mode) +{ + switch (MLX5_CAP_ETH(mdev, wqe_inline_mode)) { + case MLX5_CAP_INLINE_MODE_L2: + *min_inline_mode = MLX5_INLINE_MODE_L2; + break; + case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT: + 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; + break; + } +} +EXPORT_SYMBOL_GPL(mlx5_query_min_inline); + +int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev, + u16 vport, u8 min_inline) +{ + u32 in[MLX5_ST_SZ_DW(modify_nic_vport_context_in)] = {0}; + int inlen = MLX5_ST_SZ_BYTES(modify_nic_vport_context_in); + void *nic_vport_ctx; + + MLX5_SET(modify_nic_vport_context_in, in, + field_select.min_wqe_inline_mode, 1); + MLX5_SET(modify_nic_vport_context_in, in, vport_number, vport); + MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1); + + nic_vport_ctx = MLX5_ADDR_OF(modify_nic_vport_context_in, + in, nic_vport_context); + MLX5_SET(nic_vport_context, nic_vport_ctx, + min_wqe_inline_mode, min_inline); + + return mlx5_modify_nic_vport_context(mdev, in, inlen); +} +EXPORT_SYMBOL_GPL(mlx5_modify_nic_vport_min_inline); + int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev, u16 vport, u8 *addr) { Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/mlx5_en/en.h Wed Jul 18 10:03:30 2018 (r336450) @@ -451,6 +451,8 @@ struct mlx5e_params { u32 rx_pauseframe_control __aligned(4); u32 tx_priority_flow_control __aligned(4); u32 rx_priority_flow_control __aligned(4); + u16 tx_max_inline; + u8 tx_min_inline_mode; }; #define MLX5E_PARAMS(m) \ @@ -613,6 +615,9 @@ struct mlx5e_sq { u32 sqn; u32 bf_buf_size; u32 mkey_be; + u16 max_inline; + u8 min_inline_mode; + u8 vlan_inline_cap; /* control path */ struct mlx5_wq_ctrl wq_ctrl; @@ -933,5 +938,6 @@ 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); #endif /* _MLX5_EN_H_ */ Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Jul 18 10:03:30 2018 (r336450) @@ -1174,6 +1174,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); /* check if we should allocate a second packet buffer */ if (priv->params_ethtool.tx_bufring_disable == 0) { @@ -3021,6 +3024,16 @@ mlx5e_check_required_hca_cap(struct mlx5_core_dev *mde return (0); } +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; + + return bf_buf_size - + sizeof(struct mlx5e_tx_wqe) + + 2 /*sizeof(mlx5e_tx_wqe.inline_hdr_start)*/; +} + static void mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, struct mlx5e_priv *priv, @@ -3056,6 +3069,8 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, priv->params.num_tc = 1; 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); /* * hw lro is currently defaulted to off. when it won't anymore we @@ -3314,6 +3329,20 @@ mlx5e_modify_rx_dma(struct mlx5e_priv *priv, uint8_t v else mlx5e_enable_rx_dma(priv->channel[i]); } +} + +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 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Wed Jul 18 10:03:30 2018 (r336450) @@ -137,6 +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); return (0); Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Wed Jul 18 10:03:30 2018 (r336450) @@ -156,7 +156,43 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) static inline u16 mlx5e_get_inline_hdr_size(struct mlx5e_sq *sq, struct mbuf *mb) { - return (MIN(MLX5E_MAX_TX_INLINE, mb->m_len)); + + switch(sq->min_inline_mode) { + case MLX5_INLINE_MODE_NONE: + /* + * 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. + */ + 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)); + break; + } + return (MIN(sq->max_inline, mb->m_pkthdr.len)); } static int @@ -294,37 +330,47 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) sq->mbuf[pi].num_bytes = max_t (unsigned int, mb->m_pkthdr.len, ETHER_MIN_LEN - ETHER_CRC_LEN); } - if (mb->m_flags & M_VLANTAG) { - 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; + 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; } - 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 ((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); + } + wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); } - wqe->eth.inline_hdr_sz = cpu_to_be16(ihs); - ds_cnt = sizeof(*wqe) / MLX5_SEND_WQE_DS; - if (likely(ihs > sizeof(wqe->eth.inline_hdr_start))) { + if (ihs > sizeof(wqe->eth.inline_hdr_start)) { ds_cnt += DIV_ROUND_UP(ihs - sizeof(wqe->eth.inline_hdr_start), MLX5_SEND_WQE_DS); } Modified: head/sys/dev/mlx5/qp.h ============================================================================== --- head/sys/dev/mlx5/qp.h Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/qp.h Wed Jul 18 10:03:30 2018 (r336450) @@ -240,8 +240,16 @@ struct mlx5_wqe_eth_seg { u8 swp_flags; __be16 mss; __be32 rsvd2; - __be16 inline_hdr_sz; - u8 inline_hdr_start[2]; + union { + struct { + __be16 inline_hdr_sz; + u8 inline_hdr_start[2]; + }; + struct { + __be16 vlan_cmd; + __be16 vlan_hdr; + }; + }; }; struct mlx5_wqe_xrc_seg { Modified: head/sys/dev/mlx5/vport.h ============================================================================== --- head/sys/dev/mlx5/vport.h Wed Jul 18 09:54:32 2018 (r336449) +++ head/sys/dev/mlx5/vport.h Wed Jul 18 10:03:30 2018 (r336450) @@ -29,6 +29,13 @@ #define __MLX5_VPORT_H__ #include + +enum { + MLX5_CAP_INLINE_MODE_L2, + MLX5_CAP_INLINE_MODE_VPORT_CONTEXT, + MLX5_CAP_INLINE_MODE_NOT_REQUIRED, +}; + int mlx5_vport_alloc_q_counter(struct mlx5_core_dev *mdev, int client_id, u16 *counter_set_id); int mlx5_vport_dealloc_q_counter(struct mlx5_core_dev *mdev, int client_id, @@ -79,6 +86,11 @@ int mlx5_modify_nic_vport_mac_address(struct mlx5_core u16 vport, u8 mac[ETH_ALEN]); int mlx5_set_nic_vport_current_mac(struct mlx5_core_dev *mdev, int vport, 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_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, u32 vport, u64 port_guid); int mlx5_modify_nic_vport_node_guid(struct mlx5_core_dev *mdev, From owner-svn-src-head@freebsd.org Wed Jul 18 10:12:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F032E1042F5D; Wed, 18 Jul 2018 10:12: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.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 99F18734F3; Wed, 18 Jul 2018 10:12: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 7AE4B18D78; Wed, 18 Jul 2018 10:12: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 w6IACv2s086936; Wed, 18 Jul 2018 10:12:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IACrib086913; Wed, 18 Jul 2018 10:12:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807181012.w6IACrib086913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Jul 2018 10:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336451 - in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 336451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 10:12:58 -0000 Author: hselasky Date: Wed Jul 18 10:12:53 2018 New Revision: 336451 URL: https://svnweb.freebsd.org/changeset/base/336451 Log: Update version information for the mlx5 and mlx5en(4) modules. While at it bump some copyright dates. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/cq.h head/sys/dev/mlx5/doorbell.h head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_cq.c head/sys/dev/mlx5/mlx5_core/mlx5_fw.c head/sys/dev/mlx5/mlx5_core/mlx5_health.c head/sys/dev/mlx5/mlx5_core/mlx5_mad.c head/sys/dev/mlx5/mlx5_core/mlx5_mcg.c head/sys/dev/mlx5/mlx5_core/mlx5_mr.c head/sys/dev/mlx5/mlx5_core/mlx5_pd.c head/sys/dev/mlx5/mlx5_core/mlx5_port.c head/sys/dev/mlx5/mlx5_core/mlx5_qp.c head/sys/dev/mlx5/mlx5_core/mlx5_srq.c head/sys/dev/mlx5/mlx5_core/mlx5_uar.c head/sys/dev/mlx5/mlx5_core/mlx5_wq.c head/sys/dev/mlx5/mlx5_core/wq.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_rdma_if.h head/sys/dev/mlx5/qp.h head/sys/dev/mlx5/srq.h Modified: head/sys/dev/mlx5/cq.h ============================================================================== --- head/sys/dev/mlx5/cq.h Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/cq.h Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/doorbell.h ============================================================================== --- head/sys/dev/mlx5/doorbell.h Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/doorbell.h Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 @@ -34,9 +34,9 @@ #define DRIVER_NAME "mlx5_core" #ifndef DRIVER_VERSION -#define DRIVER_VERSION "3.4.1" +#define DRIVER_VERSION "3.4.2" #endif -#define DRIVER_RELDATE "February 2018" +#define DRIVER_RELDATE "July 2018" extern int mlx5_core_debug_mask; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cq.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cq.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fw.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_fw.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fw.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_mad.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_mad.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_mad.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_mcg.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_mcg.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_mcg.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_mr.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_mr.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_mr.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_pd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_pd.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_pd.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_qp.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_qp.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_qp.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_srq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_srq.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_srq.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_uar.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_uar.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_uar.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_wq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_wq.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/mlx5_wq.c Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_core/wq.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/wq.h Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_core/wq.h Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Jul 18 10:12:53 2018 (r336451) @@ -31,7 +31,7 @@ #include #ifndef ETH_DRIVER_VERSION -#define ETH_DRIVER_VERSION "3.4.1" +#define ETH_DRIVER_VERSION "3.4.2" #endif char mlx5e_version[] = "Mellanox Ethernet driver" Modified: head/sys/dev/mlx5/mlx5_rdma_if.h ============================================================================== --- head/sys/dev/mlx5/mlx5_rdma_if.h Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/mlx5_rdma_if.h Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/qp.h ============================================================================== --- head/sys/dev/mlx5/qp.h Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/qp.h Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 Modified: head/sys/dev/mlx5/srq.h ============================================================================== --- head/sys/dev/mlx5/srq.h Wed Jul 18 10:03:30 2018 (r336450) +++ head/sys/dev/mlx5/srq.h Wed Jul 18 10:12:53 2018 (r336451) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2017, 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 From owner-svn-src-head@freebsd.org Wed Jul 18 10:20:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 524A21043232; Wed, 18 Jul 2018 10:20: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.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 0024E73837; Wed, 18 Jul 2018 10:20: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 BB47718D89; Wed, 18 Jul 2018 10:20: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 w6IAKeWn087470; Wed, 18 Jul 2018 10:20:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IAKeXY087467; Wed, 18 Jul 2018 10:20:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807181020.w6IAKeXY087467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Jul 2018 10:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336452 - head/contrib/ofed/libibumad X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/contrib/ofed/libibumad X-SVN-Commit-Revision: 336452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 10:20:41 -0000 Author: hselasky Date: Wed Jul 18 10:20:39 2018 New Revision: 336452 URL: https://svnweb.freebsd.org/changeset/base/336452 Log: Add ability to parse sysfs paths under FreeBSD in libibumad. Add the ability to to parse sysfs paths to sysctl nodes by replacing '/' with '.' Submitted by: slavash@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/libibumad/sysfs.c head/contrib/ofed/libibumad/sysfs.h head/contrib/ofed/libibumad/umad.c Modified: head/contrib/ofed/libibumad/sysfs.c ============================================================================== --- head/contrib/ofed/libibumad/sysfs.c Wed Jul 18 10:12:53 2018 (r336451) +++ head/contrib/ofed/libibumad/sysfs.c Wed Jul 18 10:20:39 2018 (r336452) @@ -62,12 +62,8 @@ int sys_read_string(const char *dir_name, const char * snprintf(path, sizeof(path), "%s/%s", dir_name, file_name); - for (s = &path[0]; *s != '\0'; s++) - if (*s == '/') - *s = '.'; - len = max_len; - if (sysctlbyname(&path[1], str, &len, NULL, 0) == -1) + if (sysctlbyname(PATH_TO_SYS(path), str, &len, NULL, 0) == -1) return ret_code(); str[(len < max_len) ? len : max_len - 1] = 0; @@ -170,11 +166,8 @@ sys_scandir(const char *dirname, struct dirent ***name int i; *namelist = NULL; - /* Skip the leading / */ - strncpy(name, &dirname[1], sizeof(name)); - for (s = &name[0]; *s != '\0'; s++) - if (*s == '/') - *s = '.'; + if (strlcpy(name, PATH_TO_SYS(dirname), sizeof(name)) >= sizeof(name)) + return (-EINVAL); /* * Resolve the path. */ @@ -259,7 +252,7 @@ out: if (cnt && compar) qsort(names, cnt, sizeof(struct dirent *), (int (*)(const void *, const void *))compar); - + *namelist = names; return (cnt); Modified: head/contrib/ofed/libibumad/sysfs.h ============================================================================== --- head/contrib/ofed/libibumad/sysfs.h Wed Jul 18 10:12:53 2018 (r336451) +++ head/contrib/ofed/libibumad/sysfs.h Wed Jul 18 10:20:39 2018 (r336452) @@ -34,6 +34,8 @@ #define _UMAD_SYSFS_H #include +#include +#include #include #include @@ -48,5 +50,38 @@ extern int sys_read_uint(const char *dir_name, const c extern int sys_scandir(const char *dirname, struct dirent ***namelist, int (*select)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)); + +#ifdef __FreeBSD__ +static inline const char * +path_to_sysctl(const char *path, int out_len, char *out) +{ + const char *retval = out; + + /* Validate that out is at least as long as the original path */ + if (out_len < (strlen(path) + 1)) + return NULL; + + while (*path == '/') + path++; + + while (*path) { + if (*path == '/') { + if (*(path + 1) == '/') + *out = '.'; + else + *out++ = '.'; + } else + *out++ = *path; + path++; + } + *out = 0; + return (retval); +} + +#define PATH_TO_SYS(str) \ + path_to_sysctl(str, strlen(str) + 1, alloca(strlen(str) + 1)) +#else +#define PATH_TO_SYS(str) str +#endif #endif /* _UMAD_SYSFS_H */ Modified: head/contrib/ofed/libibumad/umad.c ============================================================================== --- head/contrib/ofed/libibumad/umad.c Wed Jul 18 10:12:53 2018 (r336451) +++ head/contrib/ofed/libibumad/umad.c Wed Jul 18 10:20:39 2018 (r336452) @@ -509,14 +509,14 @@ int umad_init(void) TRACE("umad_init"); if (sys_read_uint(IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE, &abi_version) < 0) { IBWARN - ("can't read ABI version from %s/%s (%m): is ib_umad module loaded?", - IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE); + ("can't read ABI version from %s (%m): is ibcore module loaded?", + PATH_TO_SYS(IB_UMAD_ABI_DIR "/" IB_UMAD_ABI_FILE)); return -1; } if (abi_version < IB_UMAD_ABI_VERSION) { IBWARN - ("wrong ABI version: %s/%s is %d but library minimal ABI is %d", - IB_UMAD_ABI_DIR, IB_UMAD_ABI_FILE, abi_version, + ("wrong ABI version: %s is %d but library minimal ABI is %d", + PATH_TO_SYS(IB_UMAD_ABI_DIR "/" IB_UMAD_ABI_FILE), abi_version, IB_UMAD_ABI_VERSION); return -1; } From owner-svn-src-head@freebsd.org Wed Jul 18 10:23:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CACE1043526; Wed, 18 Jul 2018 10:23: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.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 EE0DB73D24; Wed, 18 Jul 2018 10:23: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 CF9A518F20; Wed, 18 Jul 2018 10:23: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 w6IANVU8092158; Wed, 18 Jul 2018 10:23:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IANUfN092154; Wed, 18 Jul 2018 10:23:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807181023.w6IANUfN092154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Jul 2018 10:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336453 - head/contrib/ofed/libibverbs/examples X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/contrib/ofed/libibverbs/examples X-SVN-Commit-Revision: 336453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 10:23:32 -0000 Author: hselasky Date: Wed Jul 18 10:23:30 2018 New Revision: 336453 URL: https://svnweb.freebsd.org/changeset/base/336453 Log: Use unspecified address family when connecting as a client in libibverbs example utilities. This allows connecting to both IPv4 and IPv6 and reverts some FreeBSD only patches. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/libibverbs/examples/rc_pingpong.c head/contrib/ofed/libibverbs/examples/srq_pingpong.c head/contrib/ofed/libibverbs/examples/uc_pingpong.c head/contrib/ofed/libibverbs/examples/ud_pingpong.c head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Modified: head/contrib/ofed/libibverbs/examples/rc_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/rc_pingpong.c Wed Jul 18 10:20:39 2018 (r336452) +++ head/contrib/ofed/libibverbs/examples/rc_pingpong.c Wed Jul 18 10:23:30 2018 (r336453) @@ -154,7 +154,7 @@ static struct pingpong_dest *pp_client_exch_dest(const { struct addrinfo *res, *t; struct addrinfo hints = { - .ai_family = AF_INET, + .ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM }; char *service; Modified: head/contrib/ofed/libibverbs/examples/srq_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/srq_pingpong.c Wed Jul 18 10:20:39 2018 (r336452) +++ head/contrib/ofed/libibverbs/examples/srq_pingpong.c Wed Jul 18 10:23:30 2018 (r336453) @@ -147,7 +147,7 @@ static struct pingpong_dest *pp_client_exch_dest(const { struct addrinfo *res, *t; struct addrinfo hints = { - .ai_family = AF_INET, + .ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM }; char *service; Modified: head/contrib/ofed/libibverbs/examples/uc_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/uc_pingpong.c Wed Jul 18 10:20:39 2018 (r336452) +++ head/contrib/ofed/libibverbs/examples/uc_pingpong.c Wed Jul 18 10:23:30 2018 (r336453) @@ -127,7 +127,7 @@ static struct pingpong_dest *pp_client_exch_dest(const { struct addrinfo *res, *t; struct addrinfo hints = { - .ai_family = AF_INET, + .ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM }; char *service; Modified: head/contrib/ofed/libibverbs/examples/ud_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/ud_pingpong.c Wed Jul 18 10:20:39 2018 (r336452) +++ head/contrib/ofed/libibverbs/examples/ud_pingpong.c Wed Jul 18 10:23:30 2018 (r336453) @@ -127,7 +127,7 @@ static struct pingpong_dest *pp_client_exch_dest(const { struct addrinfo *res, *t; struct addrinfo hints = { - .ai_family = AF_INET, + .ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM }; char *service; Modified: head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c ============================================================================== --- head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Wed Jul 18 10:20:39 2018 (r336452) +++ head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c Wed Jul 18 10:23:30 2018 (r336453) @@ -544,7 +544,7 @@ static int pp_client_connect(const char *servername, i int ret; int sockfd = -1; struct addrinfo hints = { - .ai_family = AF_INET, + .ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM }; From owner-svn-src-head@freebsd.org Wed Jul 18 10:33:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E83C11043A2B; Wed, 18 Jul 2018 10:33:08 +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 900EF741DC; Wed, 18 Jul 2018 10:33:08 +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 70901190AF; Wed, 18 Jul 2018 10:33:08 +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 w6IAX8mD097225; Wed, 18 Jul 2018 10:33:08 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IAX7Ih097220; Wed, 18 Jul 2018 10:33:07 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201807181033.w6IAX7Ih097220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 18 Jul 2018 10:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336454 - in head/sys: arm/arm arm/include conf X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in head/sys: arm/arm arm/include conf X-SVN-Commit-Revision: 336454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 10:33:09 -0000 Author: mmel Date: Wed Jul 18 10:33:07 2018 New Revision: 336454 URL: https://svnweb.freebsd.org/changeset/base/336454 Log: Remove the dead code from ARM cpufunc_* files. The elf trampoline was never been supported for ARMv6 and ARMv7 and was disconnected from kernel build many months ago. MFC after: 2 weeks Deleted: head/sys/arm/arm/cpufunc_asm_arm11.S head/sys/arm/arm/cpufunc_asm_armv6.S Modified: head/sys/arm/arm/cpufunc_asm.S head/sys/arm/arm/cpufunc_asm_armv7.S head/sys/arm/include/cpufunc.h head/sys/conf/Makefile.arm head/sys/conf/files.arm Modified: head/sys/arm/arm/cpufunc_asm.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm.S Wed Jul 18 10:23:30 2018 (r336453) +++ head/sys/arm/arm/cpufunc_asm.S Wed Jul 18 10:33:07 2018 (r336454) @@ -134,26 +134,6 @@ END(cpufunc_control) /* Random odd functions */ -/* - * Function to get the offset of a stored program counter from the - * instruction doing the store. This offset is defined to be the same - * for all STRs and STMs on a given implementation. Code based on - * section 2.4.3 of the ARM ARM (2nd Ed.), with modifications to work - * in 26-bit modes as well. - */ -ENTRY(get_pc_str_offset) - mov ip, sp - stmfd sp!, {fp, ip, lr, pc} - sub fp, ip, #4 - sub sp, sp, #4 - mov r1, pc /* R1 = addr of following STR */ - mov r0, r0 - str pc, [sp] /* [SP] = . + offset */ - ldr r0, [sp] - sub r0, r0, r1 - ldmdb fp, {fp, sp, pc} -END(get_pc_str_offset) - /* Allocate and lock a cacheline for the specified address. */ #define CPWAIT_BRANCH \ Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Wed Jul 18 10:23:30 2018 (r336453) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Wed Jul 18 10:33:07 2018 (r336454) @@ -37,91 +37,8 @@ __FBSDID("$FreeBSD$"); .cpu cortex-a8 -#ifdef ELF_TRAMPOLINE -.Lcoherency_level: - .word _C_LABEL(arm_cache_loc) -.Lcache_type: - .word _C_LABEL(arm_cache_type) -.Lway_mask: - .word 0x3ff -.Lmax_index: - .word 0x7fff - -/* Based on algorithm from ARM Architecture Reference Manual */ -ENTRY(armv7_dcache_wbinv_all) - stmdb sp!, {r4, r5, r6, r7, r8, r9} - - /* Get cache level */ - ldr r0, .Lcoherency_level - ldr r3, [r0] - cmp r3, #0 - beq Finished - /* For each cache level */ - mov r8, #0 -Loop1: - /* Get cache type for given level */ - mov r2, r8, lsl #2 - add r2, r2, r2 - ldr r0, .Lcache_type - ldr r1, [r0, r2] - - /* Get line size */ - and r2, r1, #7 - add r2, r2, #4 - - /* Get number of ways */ - ldr r4, .Lway_mask - ands r4, r4, r1, lsr #3 - clz r5, r4 - - /* Get max index */ - ldr r7, .Lmax_index - ands r7, r7, r1, lsr #13 -Loop2: - mov r9, r4 -Loop3: - mov r6, r8, lsl #1 - orr r6, r6, r9, lsl r5 - orr r6, r6, r7, lsl r2 - - /* Clean and invalidate data cache by way/index */ - mcr CP15_DCCISW(r6) - subs r9, r9, #1 - bge Loop3 - subs r7, r7, #1 - bge Loop2 -Skip: - add r8, r8, #1 - cmp r3, r8 - bne Loop1 -Finished: - dsb - ldmia sp!, {r4, r5, r6, r7, r8, r9} - RET -END(armv7_dcache_wbinv_all) - -ENTRY(armv7_idcache_wbinv_all) - stmdb sp!, {lr} - bl armv7_dcache_wbinv_all -#ifdef SMP - mcr CP15_ICIALLUIS -#else - mcr CP15_ICIALLU -#endif - dsb - isb - ldmia sp!, {lr} - RET -END(armv7_idcache_wbinv_all) -#endif - ENTRY(armv7_cpu_sleep) dsb /* data synchronization barrier */ wfi /* wait for interrupt */ RET END(armv7_cpu_sleep) - -ENTRY(armv7_drain_writebuf) - dsb - RET -END(armv7_drain_writebuf) Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Wed Jul 18 10:23:30 2018 (r336453) +++ head/sys/arm/include/cpufunc.h Wed Jul 18 10:33:07 2018 (r336454) @@ -275,14 +275,9 @@ void sheeva_l2cache_wb_range (vm_offset_t, vm_size_t) void sheeva_l2cache_wbinv_all (void); #endif -#if defined(CPU_MV_PJ4B) -void armv6_idcache_wbinv_all (void); -#endif #if defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) -void armv7_idcache_wbinv_all (void); void armv7_cpu_sleep (int); void armv7_setup (void); -void armv7_drain_writebuf (void); void cortexa_setup (void); #endif @@ -292,8 +287,6 @@ void pj4bv7_setup (void); #endif #if defined(CPU_ARM1176) -void arm11_drain_writebuf (void); - void arm11x6_setup (void); void arm11x6_sleep (int); /* no ref. for errata */ #endif @@ -457,12 +450,6 @@ intr_restore(register_t s) void set_stackptr (u_int mode, u_int address); u_int get_stackptr (u_int mode); - -/* - * Miscellany - */ - -int get_pc_str_offset (void); /* * CPU functions from locore.S Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Wed Jul 18 10:23:30 2018 (r336453) +++ head/sys/conf/Makefile.arm Wed Jul 18 10:33:07 2018 (r336454) @@ -76,9 +76,7 @@ FILES_CPU_FUNC = \ $S/$M/$M/cpufunc_asm_arm9.S \ $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \ - $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S \ - $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \ - $S/$M/$M/cpufunc_asm_armv7.S + $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S .if ${MACHINE_ARCH:Marmv[67]*} == "" && defined(KERNPHYSADDR) KERNEL_EXTRA=trampoline Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Jul 18 10:23:30 2018 (r336453) +++ head/sys/conf/files.arm Wed Jul 18 10:33:07 2018 (r336454) @@ -31,11 +31,9 @@ arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 | cpu_arm9e -arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e -arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b From owner-svn-src-head@freebsd.org Wed Jul 18 11:31:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD5BD104592C; Wed, 18 Jul 2018 11:31:16 +0000 (UTC) (envelope-from br@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 7B57375B75; Wed, 18 Jul 2018 11:31:16 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D00919905; Wed, 18 Jul 2018 11:31:16 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6IBVGEY025078; Wed, 18 Jul 2018 11:31:16 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IBVGcp025077; Wed, 18 Jul 2018 11:31:16 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807181131.w6IBVGcp025077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 18 Jul 2018 11:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336455 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 11:31:17 -0000 Author: br Date: Wed Jul 18 11:31:15 2018 New Revision: 336455 URL: https://svnweb.freebsd.org/changeset/base/336455 Log: Add a GCC 8.1 warning flag. This is required to build ATF. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed Jul 18 10:33:07 2018 (r336454) +++ head/share/mk/bsd.sys.mk Wed Jul 18 11:31:15 2018 (r336455) @@ -158,6 +158,7 @@ CWARNFLAGS+= -Wno-error=bool-operation \ .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100 CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \ -Wno-error=cast-function-type \ + -Wno-error=catch-value \ -Wno-error=multistatement-macros \ -Wno-error=restrict \ -Wno-error=sizeof-pointer-memaccess \ From owner-svn-src-head@freebsd.org Wed Jul 18 13:04:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E436F10498BA; Wed, 18 Jul 2018 13:04:04 +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 8C539798E2; Wed, 18 Jul 2018 13:04:04 +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 6ACC51A9A5; Wed, 18 Jul 2018 13:04:04 +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 w6ID44ot074573; Wed, 18 Jul 2018 13:04:04 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6ID44eF074572; Wed, 18 Jul 2018 13:04:04 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201807181304.w6ID44eF074572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Wed, 18 Jul 2018 13:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336457 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 336457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 13:04:05 -0000 Author: dab Date: Wed Jul 18 13:04:03 2018 New Revision: 336457 URL: https://svnweb.freebsd.org/changeset/base/336457 Log: Make the definition of struct kevent in event.h match what the man page for kevent(2) says. This is a trivial comment-only fix. The man page for kevent(2) gives the definition of struct kevent, including a comment on each field. The actual definition in sys/event.h omitted the comments on some fields. Add the comments in. Not only does this make the man page and include file agree, but the comments are useful in and of themselves. Reviewed by: kib (D15778: commented that this should be a separate commit) MFC after: 3 days Sponsored by: Dell EMC Modified: head/sys/sys/event.h Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Wed Jul 18 12:29:06 2018 (r336456) +++ head/sys/sys/event.h Wed Jul 18 13:04:03 2018 (r336457) @@ -83,11 +83,11 @@ struct kevent { __uintptr_t ident; /* identifier for this event */ short filter; /* filter for event */ - unsigned short flags; - unsigned int fflags; - __int64_t data; + unsigned short flags; /* action flags for kqueue */ + unsigned int fflags; /* filter flag value */ + __int64_t data; /* filter data value */ void *udata; /* opaque user data identifier */ - __uint64_t ext[4]; + __uint64_t ext[4]; /* extensions */ }; #if defined(_WANT_FREEBSD11_KEVENT) From owner-svn-src-head@freebsd.org Wed Jul 18 14:49:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C77CF104CFF3; Wed, 18 Jul 2018 14:49:53 +0000 (UTC) (envelope-from ben@bwidawsk.net) Received: from mail.bwidawsk.net (zangief.bwidawsk.net [107.170.211.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "bwidawsk.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 601A47D5DE; Wed, 18 Jul 2018 14:49:53 +0000 (UTC) (envelope-from ben@bwidawsk.net) Received: by mail.bwidawsk.net (Postfix, from userid 5001) id B9364123337; Wed, 18 Jul 2018 07:49:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on zangief.bwidawsk.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-1.0 required=4.1 tests=ALL_TRUSTED=-1 shortcircuit=no autolearn=no autolearn_force=no version=3.4.1 Received: from mail.bwidawsk.net (c-73-25-164-31.hsd1.or.comcast.net [73.25.164.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.bwidawsk.net (Postfix) with ESMTPSA id 66280122549; Wed, 18 Jul 2018 07:49:39 -0700 (PDT) Date: Wed, 18 Jul 2018 07:49:38 -0700 From: Ben Widawsky To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336431 - head/stand/efi/libefi Message-ID: <20180718144938.t6tgplozi7mbl6p4@mail.bwidawsk.net> Mail-Followup-To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807172145.w6HLjEhl004493@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807172145.w6HLjEhl004493@repo.freebsd.org> User-Agent: NeoMutt/20180716 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 14:49:54 -0000 On 18-07-17 21:45:14, Warner Losh wrote: > Author: imp > Date: Tue Jul 17 21:45:14 2018 > New Revision: 336431 > URL: https://svnweb.freebsd.org/changeset/base/336431 > > Log: > Remove bogus attempt to simulate scrolling. It's not needed and messes > up serial output. Setting the cursor position after every character is > inefficient, and causes all lines to be over-printed in the serial > console for the boot loader. Allow the terminal to do the emulation. > > This isn't completely perfect when the size of the terminal attached > to the serial port isn't the same as 80x25 to match the viedoe console > (or whatever the video console is). While imperfect still, these > changes make it much better. > > This makes the serial port useful with UEFI. Unfortunately, I still can't use EFI and serial console together reliably, but when I have used both, this issue was incredibly annoying. Thanks for fixing. > > Differential Revision: https://reviews.freebsd.org/D16309 > > Modified: > head/stand/efi/libefi/efi_console.c > > Modified: head/stand/efi/libefi/efi_console.c > ============================================================================== > --- head/stand/efi/libefi/efi_console.c Tue Jul 17 21:18:49 2018 (r336430) > +++ head/stand/efi/libefi/efi_console.c Tue Jul 17 21:45:14 2018 (r336431) > @@ -147,20 +147,20 @@ efi_cons_rawputchar(int c) > switch (c) { > case '\r': > curx = 0; > - curs_move(&curx, &cury, curx, cury); > + efi_cons_efiputchar('\r'); > return; > case '\n': > + efi_cons_efiputchar('\n'); > + efi_cons_efiputchar('\r'); > cury++; > - if (cury >= y) { > - efi_cons_efiputchar('\n'); > + if (cury >= y) > cury--; > - } else > - curs_move(&curx, &cury, curx, cury); > + curx = 0; > return; > case '\b': > if (curx > 0) { > + efi_cons_efiputchar('\b'); > curx--; > - curs_move(&curx, &cury, curx, cury); > } > return; > default: > @@ -175,7 +175,6 @@ efi_cons_rawputchar(int c) > cury--; > } > } > - curs_move(&curx, &cury, curx, cury); > #endif > } > } > From owner-svn-src-head@freebsd.org Wed Jul 18 15:15:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0D57104DEFE; Wed, 18 Jul 2018 15:15:55 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 621EE7EA56; Wed, 18 Jul 2018 15:15:55 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id F3A801DCE7; Wed, 18 Jul 2018 15:15:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f47.google.com with SMTP id b22-v6so3739627lfa.3; Wed, 18 Jul 2018 08:15:54 -0700 (PDT) X-Gm-Message-State: AOUpUlEFsyOansxvvv3rLdq9BA9JT7QOCeeyqIjt526rH6eGxYt+K/5w RsJKgzw1mn5k7rI5mkX3wdKJKd3u8dAElY95yHc= X-Google-Smtp-Source: AAOMgpe48hL1LrGEC9oI5BCDoaIF3A4tcPByVZ1rWZv5t2v4861Uwz8MLw91S36WWBSxyj43/uXJvFec2sYAHeg8uFc= X-Received: by 2002:a19:9481:: with SMTP id o1-v6mr4479913lfk.38.1531926953548; Wed, 18 Jul 2018 08:15:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 08:15:33 -0700 (PDT) In-Reply-To: <201807111853.w6BIrI9B080714@repo.freebsd.org> References: <201807111853.w6BIrI9B080714@repo.freebsd.org> From: Kyle Evans Date: Wed, 18 Jul 2018 10:15:33 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 15:15:55 -0000 On Wed, Jul 11, 2018 at 1:53 PM, Cy Schubert wrote: > Author: cy > Date: Wed Jul 11 18:53:18 2018 > New Revision: 336203 > URL: https://svnweb.freebsd.org/changeset/base/336203 > > Log: > MFV r324714: > > Update wpa 2.5 --> 2.6. > > MFC after: 1 month > Hi, Thanks again for the update! For some reason with 2.6, I'm seeing hourly (+/- a minute or two) disconnects: Jul 18 08:16:47 shiva wpa_supplicant[63771]: wlan0: CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1 Jul 18 08:16:47 shiva kernel: wlan0: link state changed to DOWN Jul 18 08:16:47 shiva wpa_supplicant[63771]: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Can't assign requested address Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Trying to associate with ... (SSID='FBI Surveillance Cat' freq=2437 MHz) Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Associated with ... Jul 18 08:18:03 shiva kernel: wlan0: link state changed to UP Jul 18 08:18:03 shiva dhclient[40889]: send_packet: No buffer space available Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: WPA: Key negotiation completed with ... [PTK=CCMP GTK=CCMP] Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: CTRL-EVENT-CONNECTED - Connection to ... completed [id=0 id_str=] Jul 18 08:18:06 shiva dhclient[42269]: New IP Address (wlan0): 192.168.1.150 Jul 18 08:18:06 shiva dhclient[42841]: New Subnet Mask (wlan0): 255.255.255.0 Jul 18 08:18:06 shiva dhclient[43080]: New Broadcast Address (wlan0): 192.168.1.255 Jul 18 08:18:06 shiva dhclient[43248]: New Routers (wlan0): 192.168.1.1 Any idea what that might be about? My wpa_supplicant.conf is fairly minimal with exactly one network specified. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Wed Jul 18 16:03:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F2F6104F885; Wed, 18 Jul 2018 16:03:41 +0000 (UTC) (envelope-from sef@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 B055280F7A; Wed, 18 Jul 2018 16:03:40 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90F211C7A4; Wed, 18 Jul 2018 16:03:40 +0000 (UTC) (envelope-from sef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6IG3eIN068035; Wed, 18 Jul 2018 16:03:40 GMT (envelope-from sef@FreeBSD.org) Received: (from sef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IG3e9b068034; Wed, 18 Jul 2018 16:03:40 GMT (envelope-from sef@FreeBSD.org) Message-Id: <201807181603.w6IG3e9b068034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sef set sender to sef@FreeBSD.org using -f From: Sean Eric Fagan Date: Wed, 18 Jul 2018 16:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336458 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: sef X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 336458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 16:03:41 -0000 Author: sef Date: Wed Jul 18 16:03:40 2018 New Revision: 336458 URL: https://svnweb.freebsd.org/changeset/base/336458 Log: Fix a couple of typos in r334844 noticed by Richard Kojedzinszky. Submitted by: Richard Kojedzinszky Reviewed by: sef Approved by: mav Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 18 13:04:03 2018 (r336457) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 18 16:03:40 2018 (r336458) @@ -1398,10 +1398,10 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_esize, SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD, &ARC_l2c_only.arcs_size.rc_count, 0, "size of mru state"); -SYSCTL_UINT(_vfs_zfs, OID_AUTO, arc_min_prfetch_ms, CTLFLAG_RW, +SYSCTL_UINT(_vfs_zfs, OID_AUTO, arc_min_prefetch_ms, CTLFLAG_RW, &zfs_arc_min_prefetch_ms, 0, "Min life of prefetch block in ms"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, arc_min_prescient_prefetch_ms, CTLFLAG_RW, - &zfs_arc_min_prescient_prefetch_ms, 0, "Min life oof prescient prefetched block in ms"); + &zfs_arc_min_prescient_prefetch_ms, 0, "Min life of prescient prefetched block in ms"); /* * L2ARC Internals From owner-svn-src-head@freebsd.org Wed Jul 18 16:28:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C157E1050306; Wed, 18 Jul 2018 16:28:59 +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.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 A737C81C9C; Wed, 18 Jul 2018 16:28:58 +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 494A81CAF7; Wed, 18 Jul 2018 16:28:58 +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 w6IGSvlE078818; Wed, 18 Jul 2018 16:28:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IGSvZn078817; Wed, 18 Jul 2018 16:28:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201807181628.w6IGSvZn078817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 18 Jul 2018 16:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336459 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 336459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 16:29:00 -0000 Author: trasz Date: Wed Jul 18 16:28:57 2018 New Revision: 336459 URL: https://svnweb.freebsd.org/changeset/base/336459 Log: Consistently use full stops. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Wed Jul 18 16:03:40 2018 (r336458) +++ head/sbin/devd/devd.conf.5 Wed Jul 18 16:28:57 2018 (r336459) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd October 8, 2016 +.Dd July 18, 2018 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -242,11 +242,11 @@ Variables for other classes of events are dependent on .It Ic Variable .Ic Description .It Li * -The entire message from the current event +The entire message from the current event. .It Li _ -The entire message from the current event, after the initial type character +The entire message from the current event, after the initial type character. .It Li timestamp -The time this event was processed, in seconds since 1970 dot fraction +The time this event was processed, in seconds since 1970 dot fraction. .It Li bus Device name of parent bus. .It Li cdev @@ -262,47 +262,47 @@ Device class. .It Li device Device ID. .It Li devclass -Device Class (USB) +Device Class (USB). .It Li devsubclass -Device Sub-class (USB) +Device Sub-class (USB). .It Li device-name Name of attached/detached device. .It Li endpoints -Endpoint count (USB) +Endpoint count (USB). .It Li function Card functions. .It Li interface -Interface ID (USB) +Interface ID (USB). .It Li intclass -Interface Class (USB) +Interface Class (USB). .It Li intprotocol -Interface Protocol (USB) +Interface Protocol (USB). .It Li intsubclass -Interface Sub-class (USB) +Interface Sub-class (USB). .It Li jail -Jail name for the process triggering the rule (RCTL) +Jail name for the process triggering the rule (RCTL). .It Li manufacturer Manufacturer ID (pccard). .It Li mode -Peripheral mode (USB) +Peripheral mode (USB). .It Li notify Match the value of the .Dq Li notify variable. .It Li parent -Parent device +Parent device. .It Li pid -PID of the process triggering the rule (RCTL) +PID of the process triggering the rule (RCTL). .It Li port -Hub port number (USB) +Hub port number (USB). .It Li product Product ID (pccard/USB). .It Li release -Hardware revision (USB) +Hardware revision (USB). .It Li ruid -Real UID of the process triggering the rule (RCTL) +Real UID of the process triggering the rule (RCTL). .It Li rule -Rule (RCTL) +Rule (RCTL). .It Li sernum Serial Number (USB). .It Li slot From owner-svn-src-head@freebsd.org Wed Jul 18 17:56:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36563102B8C8; Wed, 18 Jul 2018 17:56:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFB2C852A1; Wed, 18 Jul 2018 17:56:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wr1-x441.google.com with SMTP id q10-v6so5541491wrd.4; Wed, 18 Jul 2018 10:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CXeJrlkRjY1zgg1r7vSRBbwJ6J9MP9nIv3jC55e5lXA=; b=E/SR9v0KH40RjGF1XsrBcqSgmvZfj1MmFH8JOzNEkJfAnY5WC5VQQsnWG+hpA0WQws z9GYuSCgetVplx3B4uTFf82IrO4UOf6VuJwfDem/Dk4znXuBwfAbWk/LZTy4CWgprxkZ 6juDt4K6/oJhsAzrhSVqZQ96MLmpsLza66ZByHo9Hj4+Q+FZWFbiZMuodihCoOVk1ooz oP2NKMXJawkl51z7yRF10Y28NY2QbwbTTmavqPLSmHrN3UsuWhXulWHEwLYpgoK5R/ap RFvIuKVR6XkfsSQpMCx3ggMZfgVGKkLclNJqIAIu7vNT7KWSYRlbzI31lzqwIi0iaq5Q OLzw== 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=CXeJrlkRjY1zgg1r7vSRBbwJ6J9MP9nIv3jC55e5lXA=; b=Rp0dCXhk0PQ8iKiNpr63Sfuyh5P3WD7vyNyoRO13x8Eu9xKA5lGRfFYzFtRsIhrmrV 89rfWmaXPfnvJEAwcRPbOSVkxizIMzAhgX7uZnvse1tbbB70/Sb44YBQT9I+XB7T2+Gg KYY2SuUiy4b051E6EC7A0Cy0xCojqzV8z9zi6JFvKP7tRVQp4Nk4hXV5Rqd7sg3tXwZe XqzU4Yj9hPMMqMyLO12z7CfYOfofebnL+QkWVKctIq+wUct27tTKiy3WG5hLEQ92RBZq GUhIynplTDZh9LN32mJxC2SOcBVKxVBHFv1eSu9ZgovaVRR7cefwF47cH9E8EMzU4kpS AbVA== X-Gm-Message-State: AOUpUlGhr2WAak8hndMSsAC7/R5apa5mN5JG0g6pYNUJNJbab2YmGKWL x4HUkq9VDGu3eEYwvZQC7A0PJEprRoKX0mFuZL3BKQ== X-Google-Smtp-Source: AAOMgpeK2Tl+Y7jEZNUBB0BOTqUMB3Wcu7cqm0nYxFRMCSIAM+AUhXwuF+Kozo86er0PegV+jNCGn0jnpJrDFxLSXqk= X-Received: by 2002:a5d:67c6:: with SMTP id n6-v6mr5072946wrw.39.1531936580142; Wed, 18 Jul 2018 10:56:20 -0700 (PDT) MIME-Version: 1.0 References: <201807111853.w6BIrI9B080714@repo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Wed, 18 Jul 2018 10:56:06 -0700 Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: kevans@freebsd.org Cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 17:56:22 -0000 Is it during a rekey event? -adrian On Wed, 18 Jul 2018 at 08:16, Kyle Evans wrote: > > On Wed, Jul 11, 2018 at 1:53 PM, Cy Schubert wrote: > > Author: cy > > Date: Wed Jul 11 18:53:18 2018 > > New Revision: 336203 > > URL: https://svnweb.freebsd.org/changeset/base/336203 > > > > Log: > > MFV r324714: > > > > Update wpa 2.5 --> 2.6. > > > > MFC after: 1 month > > > > Hi, > > Thanks again for the update! For some reason with 2.6, I'm seeing > hourly (+/- a minute or two) disconnects: > > Jul 18 08:16:47 shiva wpa_supplicant[63771]: wlan0: > CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1 > Jul 18 08:16:47 shiva kernel: wlan0: link state changed to DOWN > Jul 18 08:16:47 shiva wpa_supplicant[63771]: ioctl[SIOCS80211, op=20, > val=0, arg_len=7]: Can't assign requested address > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Trying to > associate with ... (SSID='FBI Surveillance Cat' freq=2437 MHz) > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Associated with ... > Jul 18 08:18:03 shiva kernel: wlan0: link state changed to UP > Jul 18 08:18:03 shiva dhclient[40889]: send_packet: No buffer space available > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: WPA: Key > negotiation completed with ... [PTK=CCMP GTK=CCMP] > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: > CTRL-EVENT-CONNECTED - Connection to ... completed [id=0 id_str=] > Jul 18 08:18:06 shiva dhclient[42269]: New IP Address (wlan0): 192.168.1.150 > Jul 18 08:18:06 shiva dhclient[42841]: New Subnet Mask (wlan0): 255.255.255.0 > Jul 18 08:18:06 shiva dhclient[43080]: New Broadcast Address (wlan0): > 192.168.1.255 > Jul 18 08:18:06 shiva dhclient[43248]: New Routers (wlan0): 192.168.1.1 > > Any idea what that might be about? My wpa_supplicant.conf is fairly > minimal with exactly one network specified. > > Thanks, > > Kyle Evans > From owner-svn-src-head@freebsd.org Wed Jul 18 17:58:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC19A102BA95; Wed, 18 Jul 2018 17:58:18 +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 546EB856B4; Wed, 18 Jul 2018 17:58:18 +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 355F31DA57; Wed, 18 Jul 2018 17:58:18 +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 w6IHwIVW025901; Wed, 18 Jul 2018 17:58:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IHwH8b025899; Wed, 18 Jul 2018 17:58:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807181758.w6IHwH8b025899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 18 Jul 2018 17:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336460 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 336460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 17:58:19 -0000 Author: markj Date: Wed Jul 18 17:58:17 2018 New Revision: 336460 URL: https://svnweb.freebsd.org/changeset/base/336460 Log: Port r324665 and r325285 to arm64. These changes ensure that reclaim_pv_chunk() can be safely be executed concurrently by multiple threads. Reviewed by: alc MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16304 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pmap.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Jul 18 16:28:57 2018 (r336459) +++ head/sys/arm64/arm64/pmap.c Wed Jul 18 17:58:17 2018 (r336460) @@ -1827,11 +1827,11 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp) { - struct pch new_tail; - struct pv_chunk *pc; + struct pv_chunk *pc, *pc_marker, *pc_marker_end; + struct pv_chunk_header pc_marker_b, pc_marker_end_b; struct md_page *pvh; pd_entry_t *pde; - pmap_t pmap; + pmap_t next_pmap, pmap; pt_entry_t *pte, tpte; pv_entry_t pv; vm_offset_t va; @@ -1839,31 +1839,65 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l struct spglist free; uint64_t inuse; int bit, field, freed, lvl; + static int active_reclaims = 0; PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); KASSERT(lockp != NULL, ("reclaim_pv_chunk: lockp is NULL")); + pmap = NULL; m_pc = NULL; SLIST_INIT(&free); - TAILQ_INIT(&new_tail); + bzero(&pc_marker_b, sizeof(pc_marker_b)); + bzero(&pc_marker_end_b, sizeof(pc_marker_end_b)); + pc_marker = (struct pv_chunk *)&pc_marker_b; + pc_marker_end = (struct pv_chunk *)&pc_marker_end_b; + mtx_lock(&pv_chunks_mutex); - while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && SLIST_EMPTY(&free)) { - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + active_reclaims++; + TAILQ_INSERT_HEAD(&pv_chunks, pc_marker, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc_marker_end, pc_lru); + while ((pc = TAILQ_NEXT(pc_marker, pc_lru)) != pc_marker_end && + SLIST_EMPTY(&free)) { + next_pmap = pc->pc_pmap; + if (next_pmap == NULL) { + /* + * The next chunk is a marker. However, it is + * not our marker, so active_reclaims must be + * > 1. Consequently, the next_chunk code + * will not rotate the pv_chunks list. + */ + goto next_chunk; + } mtx_unlock(&pv_chunks_mutex); - if (pmap != pc->pc_pmap) { + + /* + * A pv_chunk can only be removed from the pc_lru list + * when both pv_chunks_mutex is owned and the + * corresponding pmap is locked. + */ + if (pmap != next_pmap) { if (pmap != NULL && pmap != locked_pmap) PMAP_UNLOCK(pmap); - pmap = pc->pc_pmap; + pmap = next_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) { RELEASE_PV_LIST_LOCK(lockp); PMAP_LOCK(pmap); - } else if (pmap != locked_pmap && - !PMAP_TRYLOCK(pmap)) { - pmap = NULL; - TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); mtx_lock(&pv_chunks_mutex); continue; + } else if (pmap != locked_pmap) { + if (PMAP_TRYLOCK(pmap)) { + mtx_lock(&pv_chunks_mutex); + continue; + } else { + pmap = NULL; /* pmap is not locked */ + mtx_lock(&pv_chunks_mutex); + pc = TAILQ_NEXT(pc_marker, pc_lru); + if (pc == NULL || + pc->pc_pmap != next_pmap) + continue; + goto next_chunk; + } } } @@ -1908,9 +1942,8 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l } } if (freed == 0) { - TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); mtx_lock(&pv_chunks_mutex); - continue; + goto next_chunk; } /* Every freed mapping is for a 4 KB page. */ pmap_resident_count_dec(pmap, freed); @@ -1927,16 +1960,36 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m_pc->phys_addr); mtx_lock(&pv_chunks_mutex); + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); break; } TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); mtx_lock(&pv_chunks_mutex); /* One freed pv entry in locked_pmap is sufficient. */ if (pmap == locked_pmap) break; + +next_chunk: + TAILQ_REMOVE(&pv_chunks, pc_marker, pc_lru); + TAILQ_INSERT_AFTER(&pv_chunks, pc, pc_marker, pc_lru); + if (active_reclaims == 1 && pmap != NULL) { + /* + * Rotate the pv chunks list so that we do not + * scan the same pv chunks that could not be + * freed (because they contained a wired + * and/or superpage mapping) on every + * invocation of reclaim_pv_chunk(). + */ + while ((pc = TAILQ_FIRST(&pv_chunks)) != pc_marker) { + MPASS(pc->pc_pmap != NULL); + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } + } } - TAILQ_CONCAT(&pv_chunks, &new_tail, pc_lru); + TAILQ_REMOVE(&pv_chunks, pc_marker, pc_lru); + TAILQ_REMOVE(&pv_chunks, pc_marker_end, pc_lru); + active_reclaims--; mtx_unlock(&pv_chunks_mutex); if (pmap != NULL && pmap != locked_pmap) PMAP_UNLOCK(pmap); Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Wed Jul 18 16:28:57 2018 (r336459) +++ head/sys/arm64/include/pmap.h Wed Jul 18 17:58:17 2018 (r336460) @@ -84,6 +84,7 @@ struct pmap { TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ struct vm_radix pm_root; /* spare page table pages */ }; +typedef struct pmap *pmap_t; typedef struct pv_entry { vm_offset_t pv_va; /* virtual address for mapping */ @@ -96,15 +97,20 @@ typedef struct pv_entry { */ #define _NPCM 3 #define _NPCPV 168 -struct pv_chunk { - struct pmap * pc_pmap; - TAILQ_ENTRY(pv_chunk) pc_list; - uint64_t pc_map[_NPCM]; /* bitmap; 1 = free */ +#define PV_CHUNK_HEADER \ + pmap_t pc_pmap; \ + TAILQ_ENTRY(pv_chunk) pc_list; \ + uint64_t pc_map[_NPCM]; /* bitmap; 1 = free */ \ TAILQ_ENTRY(pv_chunk) pc_lru; - struct pv_entry pc_pventry[_NPCPV]; + +struct pv_chunk_header { + PV_CHUNK_HEADER }; -typedef struct pmap *pmap_t; +struct pv_chunk { + PV_CHUNK_HEADER + struct pv_entry pc_pventry[_NPCPV]; +}; struct thread; From owner-svn-src-head@freebsd.org Wed Jul 18 18:05:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61A5A102C19C; Wed, 18 Jul 2018 18:05:49 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FFB285EC7; Wed, 18 Jul 2018 18:05:49 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9FBD51EE1A; Wed, 18 Jul 2018 18:05:48 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f170.google.com with SMTP id l15-v6so4895714lji.6; Wed, 18 Jul 2018 11:05:48 -0700 (PDT) X-Gm-Message-State: AOUpUlEX4QAzao7hVbFOO74c+QQ0aWsN7TB9ynR1T/20BPeLcaeJWZ8O Vfg9uhyQm7JAou9EuYOK+eCOgLr8Nn9sXISDw0U= X-Google-Smtp-Source: AAOMgpfwsDURwoav3DxY5vFOLuBI8Rny57R+GrxU9RVQ/QEnA19bjZfSJU57MclZuBx9bbhN/gsNVdYJjCaPf7rIo90= X-Received: by 2002:a2e:4055:: with SMTP id n82-v6mr4776194lja.99.1531937147162; Wed, 18 Jul 2018 11:05:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 11:05:26 -0700 (PDT) In-Reply-To: References: <201807111853.w6BIrI9B080714@repo.freebsd.org> From: Kyle Evans Date: Wed, 18 Jul 2018 13:05:26 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Adrian Chadd Cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 18:05:49 -0000 Poking at the router indicates that it is indeed during a rekey event. On Wed, Jul 18, 2018 at 12:56 PM, Adrian Chadd wrote: > Is it during a rekey event? > > > > -adrian > > On Wed, 18 Jul 2018 at 08:16, Kyle Evans wrote: >> >> On Wed, Jul 11, 2018 at 1:53 PM, Cy Schubert wrote: >> > Author: cy >> > Date: Wed Jul 11 18:53:18 2018 >> > New Revision: 336203 >> > URL: https://svnweb.freebsd.org/changeset/base/336203 >> > >> > Log: >> > MFV r324714: >> > >> > Update wpa 2.5 --> 2.6. >> > >> > MFC after: 1 month >> > >> >> Hi, >> >> Thanks again for the update! For some reason with 2.6, I'm seeing >> hourly (+/- a minute or two) disconnects: >> >> Jul 18 08:16:47 shiva wpa_supplicant[63771]: wlan0: >> CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1 >> Jul 18 08:16:47 shiva kernel: wlan0: link state changed to DOWN >> Jul 18 08:16:47 shiva wpa_supplicant[63771]: ioctl[SIOCS80211, op=20, >> val=0, arg_len=7]: Can't assign requested address >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Trying to >> associate with ... (SSID='FBI Surveillance Cat' freq=2437 MHz) >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Associated with ... >> Jul 18 08:18:03 shiva kernel: wlan0: link state changed to UP >> Jul 18 08:18:03 shiva dhclient[40889]: send_packet: No buffer space available >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: WPA: Key >> negotiation completed with ... [PTK=CCMP GTK=CCMP] >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: >> CTRL-EVENT-CONNECTED - Connection to ... completed [id=0 id_str=] >> Jul 18 08:18:06 shiva dhclient[42269]: New IP Address (wlan0): 192.168.1.150 >> Jul 18 08:18:06 shiva dhclient[42841]: New Subnet Mask (wlan0): 255.255.255.0 >> Jul 18 08:18:06 shiva dhclient[43080]: New Broadcast Address (wlan0): >> 192.168.1.255 >> Jul 18 08:18:06 shiva dhclient[43248]: New Routers (wlan0): 192.168.1.1 >> >> Any idea what that might be about? My wpa_supplicant.conf is fairly >> minimal with exactly one network specified. >> >> Thanks, >> >> Kyle Evans >> From owner-svn-src-head@freebsd.org Wed Jul 18 18:28:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BECB102D079; Wed, 18 Jul 2018 18:28:18 +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 20BEE86BB5; Wed, 18 Jul 2018 18:28:18 +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 023521DF55; Wed, 18 Jul 2018 18:28:18 +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 w6IISH4o041502; Wed, 18 Jul 2018 18:28:17 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IISHOJ041501; Wed, 18 Jul 2018 18:28:17 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201807181828.w6IISHOJ041501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 18 Jul 2018 18:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336461 - head/sys/dev/bge X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/dev/bge X-SVN-Commit-Revision: 336461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 18:28:18 -0000 Author: eugen Date: Wed Jul 18 18:28:17 2018 New Revision: 336461 URL: https://svnweb.freebsd.org/changeset/base/336461 Log: bge(4): disable MSI for BGE_ASICREV_BCM5784/BGE_CHIPREV_5784_AX found in some MacBook Pro. PR: 229727 Reported by: Stephan Neuhaus and others Tested by: Stephan Neuhaus Approved by: mav (mentor) MFC after: 1 month Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Jul 18 17:58:17 2018 (r336460) +++ head/sys/dev/bge/if_bge.c Wed Jul 18 18:28:17 2018 (r336461) @@ -3212,6 +3212,14 @@ bge_can_use_msi(struct bge_softc *sc) sc->bge_chiprev != BGE_CHIPREV_5750_BX) can_use_msi = 1; break; + case BGE_ASICREV_BCM5784: + /* + * Prevent infinite "watchdog timeout" errors + * in some MacBook Pro and make it work out-of-the-box. + */ + if (sc->bge_chiprev == BGE_CHIPREV_5784_AX) + break; + /* FALLTHROUGH */ default: if (BGE_IS_575X_PLUS(sc)) can_use_msi = 1; From owner-svn-src-head@freebsd.org Wed Jul 18 19:50:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22E12103019A; Wed, 18 Jul 2018 19:50:53 +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 5E4D98A172; Wed, 18 Jul 2018 19:50:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id fsTCfHSOxWppDfsTDfpm2H; Wed, 18 Jul 2018 13:50:45 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=R9QF1RCXAYgA:10 a=XldT38RWNwACPDQzwzUA:9 a=LpQP-O61AAAA:8 a=xfDLHkLGAAAA:8 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=HcIk6lI_g2L5OQK4NXUA:9 a=9-KHCQ_UQ_Jb1lMe:21 a=FkekSh_sH2puxxXE:21 a=CjuIK1q_8ugA:10 a=MDe6oluTFS4T8Vulk8gA:9 a=hquHOILUSkIA:10 a=YxBL1-UpAAAA:8 a=ics_IjAVWSmO8OVX31YA:9 a=BOg4e644cxQA:10 a=pioyyrs4ZptJ924tMmac:22 a=IfaqVvZgccqrtc8gcwf2:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 1BFDD1008; Wed, 18 Jul 2018 12:50:41 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6IJoP8v005613; Wed, 18 Jul 2018 12:50:25 -0700 (PDT) (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 w6IJoPLu005610; Wed, 18 Jul 2018 12:50:25 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807181950.w6IJoPLu005610@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: Kyle Evans cc: Adrian Chadd , Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Kyle Evans of "Wed, 18 Jul 2018 13:05:26 -0500." Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1531943200_26820" Date: Wed, 18 Jul 2018 12:50:25 -0700 X-CMAE-Envelope: MS4wfJ37+G2wEr9o2wOGCNQzon8vHKn2dnzm+FQDPFl5+q9f9yBBAqVm0c4LU9kVXuOuEIMNMey1iObMINsEFGS7+tuSBXfFRvNgjAjig9GIleCeAYJHR99m aKRISL0mr6aU/kwt82IVrzVKfR69GyJK0a+q7Y8rP84h1gRN9KfJTuaxIomrABEgeJNffO/LZf18IPaiBKl2lGzkY2Gpp5yEIJ5Hs7/27oTCt/SdC3YKI+5f CYahQ0GLqvTUoFYOuiW5neLmCXY66BB6qUEHqJuOXD7eW4XpIf7M/dekNI+WfkIpNYHqmYl/DsUdivIxEGxiZkv2Me0uojCp2CPYa00AYlUtVNk51i1z204R 3pSriX3x X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 19:50:53 -0000 This is a multipart MIME message. --==_Exmh_1531943200_26820 Content-Type: text/plain; charset=us-ascii Hi Kyle, Can you try the attached patch please? The upline commit log entry says: commit e8d08cf37844f783b389e601ecedd13edd2b9196 Author: Jouni Malinen Date: Wed Jun 6 01:22:01 2018 +0300 SAE: Do not drop STA entry on reauthentication in infrastructure BSS A new SAE Commit message should not be allowed to drop an existing STA entry since the sender of that Commit message cannot be authenticated before receiving the Confirm message. This is important in particular when PMF is used since this would provide a potential new path for forcing a connection to be dropped. Fix this by allowing a new SAE Authentication instance to be started when the old instance is in Accepted state and the new Commit message does not use the same peer-scalar value (checked in sae_parse_commit_scalar()). When PMF is used, the AP will use SA Query procedure when receiving the (Re)Association Request frame. In theory, that step could be skipped in case of SAE Authentication since the non-AP STA is demonstrating knowledge of the password. Anyway, there is no allowance for that exception in the IEEE 802.11 standard, so at least for now, leave this using SA Query procedure just like any other PMF case. Signed-off-by: Jouni Malinen In message , Kyle Evans writes: > Poking at the router indicates that it is indeed during a rekey event. > > On Wed, Jul 18, 2018 at 12:56 PM, Adrian Chadd wrote > : > > Is it during a rekey event? > > > > > > > > -adrian > > > > On Wed, 18 Jul 2018 at 08:16, Kyle Evans wrote: > >> > >> On Wed, Jul 11, 2018 at 1:53 PM, Cy Schubert wrote: > >> > Author: cy > >> > Date: Wed Jul 11 18:53:18 2018 > >> > New Revision: 336203 > >> > URL: https://svnweb.freebsd.org/changeset/base/336203 > >> > > >> > Log: > >> > MFV r324714: > >> > > >> > Update wpa 2.5 --> 2.6. > >> > > >> > MFC after: 1 month > >> > > >> > >> Hi, > >> > >> Thanks again for the update! For some reason with 2.6, I'm seeing > >> hourly (+/- a minute or two) disconnects: > >> > >> Jul 18 08:16:47 shiva wpa_supplicant[63771]: wlan0: > >> CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1 > >> Jul 18 08:16:47 shiva kernel: wlan0: link state changed to DOWN > >> Jul 18 08:16:47 shiva wpa_supplicant[63771]: ioctl[SIOCS80211, op=20, > >> val=0, arg_len=7]: Can't assign requested address > >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Trying to > >> associate with ... (SSID='FBI Surveillance Cat' freq=2437 MHz) > >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Associated with ... > >> Jul 18 08:18:03 shiva kernel: wlan0: link state changed to UP > >> Jul 18 08:18:03 shiva dhclient[40889]: send_packet: No buffer space availa > ble > >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: WPA: Key > >> negotiation completed with ... [PTK=CCMP GTK=CCMP] > >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: > >> CTRL-EVENT-CONNECTED - Connection to ... completed [id=0 id_str=] > >> Jul 18 08:18:06 shiva dhclient[42269]: New IP Address (wlan0): 192.168.1.1 > 50 > >> Jul 18 08:18:06 shiva dhclient[42841]: New Subnet Mask (wlan0): 255.255.25 > 5.0 > >> Jul 18 08:18:06 shiva dhclient[43080]: New Broadcast Address (wlan0): > >> 192.168.1.255 > >> Jul 18 08:18:06 shiva dhclient[43248]: New Routers (wlan0): 192.168.1.1 > >> > >> Any idea what that might be about? My wpa_supplicant.conf is fairly > >> minimal with exactly one network specified. > >> > >> Thanks, > >> > >> Kyle Evans > >> --==_Exmh_1531943200_26820 Content-Type: text/plain ; name="rekey.diff"; charset=us-ascii Content-Description: rekey.diff Content-Disposition: attachment; filename="rekey.diff" diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 9027bbfc0..a1a037311 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -753,12 +753,24 @@ static int sae_sm_step(struct hostapd_data *hapd, struct sta_info *sta, } break; case SAE_ACCEPTED: - if (auth_transaction == 1) { + if (auth_transaction == 1 && + (hapd->conf->mesh & MESH_ENABLED)) { wpa_printf(MSG_DEBUG, "SAE: remove the STA (" MACSTR ") doing reauthentication", MAC2STR(sta->addr)); ap_free_sta(hapd, sta); wpa_auth_pmksa_remove(hapd->wpa_auth, sta->addr); + } else if (auth_transaction == 1) { + wpa_printf(MSG_DEBUG, "SAE: Start reauthentication"); + ret = auth_sae_send_commit(hapd, sta, bssid, 1); + if (ret) + return ret; + sae_set_state(sta, SAE_COMMITTED, "Sent Commit"); + + if (sae_process_commit(sta->sae) < 0) + return WLAN_STATUS_UNSPECIFIED_FAILURE; + sta->sae->sync = 0; + sae_set_retransmit_timer(hapd, sta); } else { if (sae_check_big_sync(hapd, sta)) return WLAN_STATUS_SUCCESS; --==_Exmh_1531943200_26820 Content-Type: text/plain; charset=us-ascii Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. --==_Exmh_1531943200_26820-- From owner-svn-src-head@freebsd.org Wed Jul 18 20:33:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 853E81032538; Wed, 18 Jul 2018 20:33:48 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EB668BF76; Wed, 18 Jul 2018 20:33:47 +0000 (UTC) (envelope-from Alexander@leidinger.net) Date: Wed, 18 Jul 2018 22:33:13 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=leidinger.net; s=outgoing-alex; t=1531946020; bh=EtuSlnELPDGhgor5e2VDZw2lebOdvMGBGu79G3WJnUk=; h=Date:From:To:Cc:Subject:In-Reply-To; b=PV8hjkubFA3h+TTKcxfS9gGHaZL/eddWozt6Xv2YWkidihMlgSdjQ1wyCJogEggMS 1vy/i3NR13x5v5p0qsvgDHV+3Rdfw88MlcONYIjb1fh2DLBpQ7Xsxe/k+WI1JdGsCj /r5n4MUKB8XS2cATGReAr31kt96y+R/E/oBuvNIWp1QlONbd5ig+ZJhNiOnHcDcAof jFkaqRAHZZE+tahvi5RxbCur6W8Zv+ybhANuzbBLNjvMjdIYixGXT3ErHsXB+bwEO8 UpNqGsIXrmzs3X449SOLFIt7ctSyd2fuGqvlPn7A8TYUp/cT7BfQ+ZcJPnGqxG/otP YCo2tu2voERwg== Message-ID: <20180718223313.Horde.lYE8PRYqLdkrN3QMTTHx3aV@webmail.leidinger.net> From: Alexander Leidinger To: Marius Strobl Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336313 - in head/sys: dev/bnxt dev/e1000 dev/ixgbe dev/ixl net sys In-Reply-To: <201807151904.w6FJ4NNg039896@repo.freebsd.org> User-Agent: Horde Application Framework 5 Content-Type: multipart/signed; boundary="=_squ2rs7hgvM55G-LHO-CB7r"; protocol="application/pgp-signature"; micalg=pgp-sha1 MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 20:33:48 -0000 This message is in MIME format and has been PGP signed. --=_squ2rs7hgvM55G-LHO-CB7r Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Marius Strobl (from Sun, 15 Jul 2018=20=20 19:04:23=20+0000 (UTC)): > Author: marius > Date: Sun Jul 15 19:04:23 2018 > New Revision: 336313 > URL: https://svnweb.freebsd.org/changeset/base/336313 > > Log: > Assorted TSO fixes for em(4)/iflib(9) and dead code removal: [...] > Okayed by: sbruno@ at 201806 DevSummit Transport Working Group [1] > Reviewed by: sbruno (earlier version), erj > PR: 219428 (part of; comment #10) [1], 220997 (part of; comment #3) Hi Marius, thanks a lot for this change, it improves the situation (PR 220997) a=20=20 lot.=20The system is running at r336329, as such I don't have your=20=20 change=20r336356 yet on the system. Maybe the 2 panics (more below) I've=20= =20 seen=20are fixed by this. Before I try your second change (surely not=20=20 before=20the WE), here at least the report in case it is related to your=20= =20 changes=20and not related to r336313: I got 2 panics, both within 6 minutes (based upon the timestamp of the=20= =20 coredumps=20in the filesystem): 1) panic: Assertion ifsd_m[next] =3D=3D NULL failed at /usr/src/sys/net/iflib.= c:3151 cpuid =3D 2 time =3D 1531944124 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe008af85= 850 vpanic() at vpanic+0x1a3/frame 0xfffffe008af858b0 doadump() at doadump/frame 0xfffffe008af85930 iflib_txq_drain() at iflib_txq_drain+0xe58/frame 0xfffffe008af85aa0 ifmp_ring_check_drainage() at ifmp_ring_check_drainage+0x16c/frame=20=20 0xfffffe008af85b00 _task_fn_tx()=20at _task_fn_tx+0x76/frame 0xfffffe008af85b30 gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame=20=20 0xfffffe008af85b80 gtaskqueue_thread_loop()=20at gtaskqueue_thread_loop+0x88/frame=20=20 0xfffffe008af85bb0 fork_exit()=20at fork_exit+0x84/frame 0xfffffe008af85bf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe008af85bf0 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- Uptime: 1d22h51m17s Dumping 2990 out of 8037 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..9= 1% __curthread () at ./machine/pcpu.h:230 230 __asm("movq %%gs:%1,%0" : "=3Dr" (td) (kgdb) #0 __curthread () at ./machine/pcpu.h:230 #1 doadump (textdump=3D1) at /usr/src/sys/kern/kern_shutdown.c:366 #2 0xffffffff80485ea1 in kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:446 #3 0xffffffff80486483 in vpanic (fmt=3D, ap=3D0xfffffe008af= 858f0) at /usr/src/sys/kern/kern_shutdown.c:863 #4 0xffffffff804861f0 in kassert_panic ( fmt=3D0xffffffff807e085f "Assertion %s failed at %s:%d") at /usr/src/sys/kern/kern_shutdown.c:749 #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=3D0, txq=3D, tag=3D, map=3D, m0=3D, segs=3D, nsegs=3D, max_segs=3D) at /usr/src/sys/net/iflib.c:3151 #6 iflib_encap (txq=3D0xfffff800028dc000, m_headp=3D0xfffffe00959bdd30) at /usr/src/sys/net/iflib.c:3321 #7 iflib_txq_drain (r=3D0xfffffe00959ba000, cidx=3D, pidx=3D41319936) at /usr/src/sys/net/iflib.c:3636 #8 0xffffffff805a0f4c in drain_ring_lockless (r=3D, os=3D..= ., prev=3D, budget=3D) at /usr/src/sys/net/mp_ring.c:199 #9 ifmp_ring_check_drainage (r=3D, budget=3D32) at /usr/src/sys/net/mp_ring.c:502 #10 0xffffffff80599c46 in _task_fn_tx (context=3D) at /usr/src/sys/net/iflib.c:3747 #11 0xffffffff804cd2c9 in gtaskqueue_run_locked (queue=3D0xfffff800025e0d00= ) at /usr/src/sys/kern/subr_gtaskqueue.c:332 #12 0xffffffff804cd048 in gtaskqueue_thread_loop (arg=3D) at /usr/src/sys/kern/subr_gtaskqueue.c:507 #13 0xffffffff8044cc34 in fork_exit ( callout=3D0xffffffff804ccfc0 , arg=3D0xfffffe0007ffd038, frame=3D0xfffffe008af85c00) at /usr/src/sys/kern/kern_fork.c:1057 (kgdb) up 5 #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=3D0,=20=20 txq=3D, tag=3D, map=3D, m0=3D, segs=3D,= =20=20 nsegs=3D, max_segs=3D) at /usr/src/sys/net/iflib.c:3151 3151 MPASS(ifsd_m[next] =3D=3D NULL); (kgdb) list 3146 /* 3147 * see if we can't be smarter about physica= lly 3148 * contiguous mappings 3149 */ 3150 next =3D (pidx + count) & (ntxd-1); 3151 MPASS(ifsd_m[next] =3D=3D NULL); 3152 #if MEMORY_LOGGING 3153 txq->ift_enqueued++; 3154 #endif 3155 ifsd_m[next] =3D m; (kgdb) print ifsd_m $1 =3D (struct mbuf **) 0xfffffe00959b8000 (kgdb) print next $2 =3D (kgdb) print pidx $3 =3D 277 (kgdb) print count $4 =3D 0 (kgdb) print ntxd $5 =3D 2) Unread portion of the kernel message buffer: panic: Assertion ifsd_m[next] =3D=3D NULL failed at /usr/src/sys/net/iflib.= c:3151 cpuid =3D 2 time =3D 1531944550 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe008af85= 850 vpanic() at vpanic+0x1a3/frame 0xfffffe008af858b0 doadump() at doadump/frame 0xfffffe008af85930 iflib_txq_drain() at iflib_txq_drain+0xe58/frame 0xfffffe008af85aa0 ifmp_ring_check_drainage() at ifmp_ring_check_drainage+0x16c/frame=20=20 0xfffffe008af85b00 _task_fn_tx()=20at _task_fn_tx+0x76/frame 0xfffffe008af85b30 gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame=20=20 0xfffffe008af85b80 gtaskqueue_thread_loop()=20at gtaskqueue_thread_loop+0x88/frame=20=20 0xfffffe008af85bb0 fork_exit()=20at fork_exit+0x84/frame 0xfffffe008af85bf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe008af85bf0 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- Uptime: 5m27s Dumping 1555 out of 8037 MB:..2%..11%..21%..31%..41%..51%..61%..71%..81%..9= 1% __curthread () at ./machine/pcpu.h:230 230 __asm("movq %%gs:%1,%0" : "=3Dr" (td) (kgdb) bt #0 __curthread () at ./machine/pcpu.h:230 #1 doadump (textdump=3D1) at /usr/src/sys/kern/kern_shutdown.c:366 #2 0xffffffff80485ea1 in kern_reboot (howto=3D260) at=20=20 /usr/src/sys/kern/kern_shutdown.c:446 #3=20 0xffffffff80486483 in vpanic (fmt=3D, ap=3D0xfffffe008= af858f0) at /usr/src/sys/kern/kern_shutdown.c:863 #4 0xffffffff804861f0 in kassert_panic (fmt=3D0xffffffff807e085f=20=20 "Assertion=20%s failed at %s:%d") at /usr/src/sys/kern/kern_shutdown.c:749 #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=3D0,=20=20 txq=3D, tag=3D, map=3D, m0=3D, segs=3D,= =20=20 nsegs=3D, max_segs=3D) at /usr/src/sys/net/iflib.c:3151 #6 iflib_encap (txq=3D0xfffff800028fe000, m_headp=3D0xfffffe00959bdde8)=20= =20 at=20/usr/src/sys/net/iflib.c:3321 #7 iflib_txq_drain (r=3D0xfffffe00959ba000, cidx=3D,=20=20 pidx=3D42948608) at /usr/src/sys/net/iflib.c:3636 #8 0xffffffff805a0f4c in drain_ring_lockless (r=3D,=20=20 os=3D..., prev=3D, budget=3D) at /usr/src/sys/net/mp_ring.c:199 #9 ifmp_ring_check_drainage (r=3D, budget=3D32) at=20=20 /usr/src/sys/net/mp_ring.c:502 #10=200xffffffff80599c46 in _task_fn_tx (context=3D) at=20= =20 /usr/src/sys/net/iflib.c:3747 #11=200xffffffff804cd2c9 in gtaskqueue_run_locked (queue=3D0xfffff800025a22= 00) at /usr/src/sys/kern/subr_gtaskqueue.c:332 #12 0xffffffff804cd048 in gtaskqueue_thread_loop (arg=3D)=20= =20 at=20/usr/src/sys/kern/subr_gtaskqueue.c:507 #13 0xffffffff8044cc34 in fork_exit (callout=3D0xffffffff804ccfc0=20=20 ,=20arg=3D0xfffffe0007ffd038, frame=3D0xfffffe008af85c00) at /usr/src/sys/kern/kern_fork.c:1057 #14 (kgdb) up 5 #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=3D0,=20=20 txq=3D, tag=3D, map=3D, m0=3D, segs=3D,= =20=20 nsegs=3D, max_segs=3D) at /usr/src/sys/net/iflib.c:3151 3151 MPASS(ifsd_m[next] =3D=3D NULL); (kgdb) print ifsd_m $1 =3D (struct mbuf **) 0xfffffe00959b8000 (kgdb) print pidx $2 =3D 707 (kgdb) print count $3 =3D 0 Bye, Alexander. --=20 http://www.Leidinger.net=20Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_squ2rs7hgvM55G-LHO-CB7r Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJbT6QJAAoJEKrxQhqFIICEL0sP/21ishTejRzesyfAKXAfCykd yCl3edMsWb+62aLIicM21qfLqYvSQ13N4PyuuGknTAkRYUuXgHp/qeXP/2I9amh1 MxEgVK+OZPvcEs9awHyQzMVXIrPpAA9TIpLVt+UkPVvrwz9wKTMHTd7UOd16ADhF SY2nVdoL8rhp9czTod5atQXL2RtHsnn3VgOpg63a7GUH9jkZfmlWB8DaqAwYaL8n skUrt5yTENhXSqSbXV6XWnnBMJOvlQ1Xe2/QTCq3mb4tU9qEPSM4vM2qR7P/wsld 7rsRciwlJ3PrDeLwtjzTVed2IuqLmDRDW7HJRqQlDrgs7xGU0cK0ocUqlhC8dpWS Vq5SG2xzDCRb2S1nL5JOVSncuPsbs8TGubqQ+QTG3aUP/mutTa9zjBTHnrGb+PcV WdHrbkOGiTkev7lpRf8tsf6Rzmwi/G63cXuNFGyMG9TlV/L5qMkmR8PYGo8bscxZ BqzCKxZ2lBrdX/YrLHoaHGEGV2LzwhNrdXXS1hUDUcMBfzWbebENTw+0zdJ2uMyK a21wIt8K2WDg/IGc2KEu9GDFo1dMkfcGqGFaRlRUdgPOeJil/Hywy9PM5Jztgepw oWQhUr5VUjeozcstuEdaCyy7crrdEdTv8LcvhY0vUsvU6EHdmkp6BzcwQJb+/7U4 DqYfsRHetkoZqy9Yhlww =SQsB -----END PGP SIGNATURE----- --=_squ2rs7hgvM55G-LHO-CB7r-- From owner-svn-src-head@freebsd.org Wed Jul 18 21:57:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 509381035734; Wed, 18 Jul 2018 21:57:05 +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.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 E22F18EEB6; Wed, 18 Jul 2018 21:57:04 +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 BDFB8201AD; Wed, 18 Jul 2018 21:57:04 +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 w6ILv4sQ049591; Wed, 18 Jul 2018 21:57:04 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6ILv4S3049590; Wed, 18 Jul 2018 21:57:04 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201807182157.w6ILv4S3049590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 18 Jul 2018 21:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336462 - head/lib/libcapsicum X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcapsicum X-SVN-Commit-Revision: 336462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 21:57:05 -0000 Author: oshogbo Date: Wed Jul 18 21:57:04 2018 New Revision: 336462 URL: https://svnweb.freebsd.org/changeset/base/336462 Log: Fix description. Modified: head/lib/libcapsicum/capsicum_helpers.3 Modified: head/lib/libcapsicum/capsicum_helpers.3 ============================================================================== --- head/lib/libcapsicum/capsicum_helpers.3 Wed Jul 18 18:28:17 2018 (r336461) +++ head/lib/libcapsicum/capsicum_helpers.3 Wed Jul 18 21:57:04 2018 (r336462) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2018 +.Dd July 18, 2018 .Dt CAPSICUM_HELPERS 3 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nm caph_limit_stdio , .Nm caph_cache_tzdata , .Nm caph_cache_catpages -.Nd "set of the functions , part of the libcapsicum" +.Nd "set of the capsicum helpers, part of the libcapsicum" .Sh LIBRARY .Lb libcapsicum .Sh SYNOPSIS From owner-svn-src-head@freebsd.org Wed Jul 18 22:45:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 848C61039EA3; Wed, 18 Jul 2018 22:45: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.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 38AE470925; Wed, 18 Jul 2018 22:45: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 1B356209F9; Wed, 18 Jul 2018 22:45:27 +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 w6IMjQAQ075964; Wed, 18 Jul 2018 22:45:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IMjQ8Z075963; Wed, 18 Jul 2018 22:45:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807182245.w6IMjQ8Z075963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 18 Jul 2018 22:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336463 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 22:45:27 -0000 Author: imp Date: Wed Jul 18 22:45:26 2018 New Revision: 336463 URL: https://svnweb.freebsd.org/changeset/base/336463 Log: If rootdev is set, use it as currdev. Setting rootdev in the enviornment should specify things completely. If it is set, then have it override everything else. PR: 229770 Differential Review: https://reviews.freebsd.org/D16322 Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Wed Jul 18 21:57:04 2018 (r336462) +++ head/stand/efi/loader/main.c Wed Jul 18 22:45:26 2018 (r336463) @@ -166,16 +166,21 @@ out: } static void +set_currdev(const char *devname) +{ + + env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, env_nounset); + env_setenv("loaddev", EV_VOLATILE, devname, env_noset, env_nounset); +} + +static void set_currdev_devdesc(struct devdesc *currdev) { const char *devname; devname = efi_fmtdev(currdev); - printf("Setting currdev to %s\n", devname); - - env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, env_noset, env_nounset); + set_currdev(devname); } static void @@ -279,7 +284,15 @@ find_currdev(EFI_LOADED_IMAGE *img) struct devsw *dev; int unit; uint64_t extra; + char *rootdev; + rootdev = getenv("rootdev"); + if (rootdev != NULL) { + printf("Setting currdev to configured rootdev %s\n", rootdev); + set_currdev(rootdev); + return (0); + } + #ifdef EFI_ZFS_BOOT /* * Did efi_zfs_probe() detect the boot pool? If so, use the zpool @@ -616,7 +629,7 @@ main(int argc, CHAR16 *argv[]) * set the env based on it. */ boot_howto_to_env(howto); - + if (efi_copy_init()) { printf("failed to allocate staging area\n"); return (EFI_BUFFER_TOO_SMALL); From owner-svn-src-head@freebsd.org Wed Jul 18 22:45:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D71B1039F17; Wed, 18 Jul 2018 22:45: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 0B5E070A4F; Wed, 18 Jul 2018 22:45:46 +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 E1A75209FB; Wed, 18 Jul 2018 22:45: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 w6IMjjZC076041; Wed, 18 Jul 2018 22:45:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IMjj6q076040; Wed, 18 Jul 2018 22:45:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807182245.w6IMjj6q076040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 18 Jul 2018 22:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336464 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 22:45:46 -0000 Author: imp Date: Wed Jul 18 22:45:45 2018 New Revision: 336464 URL: https://svnweb.freebsd.org/changeset/base/336464 Log: If the console is already set, don't override it. If console=X is specified on the command line, it's effectively overridden by the current code. It shouldn't do that. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Wed Jul 18 22:45:26 2018 (r336463) +++ head/stand/efi/loader/main.c Wed Jul 18 22:45:45 2018 (r336464) @@ -567,7 +567,6 @@ main(int argc, CHAR16 *argv[]) * eg. the boot device, which we can't do yet. We can use * printf() etc. once this is done. */ - setenv("console", "efi", 1); cons_probe(); /* @@ -579,49 +578,49 @@ main(int argc, CHAR16 *argv[]) if (!has_kbd && (howto & RB_PROBE)) howto |= RB_SERIAL | RB_MULTIPLE; howto &= ~RB_PROBE; - uhowto = parse_uefi_con_out(); /* * We now have two notions of console. howto should be viewed as - * overrides. + * overrides. If console is already set, don't set it again. */ #define VIDEO_ONLY 0 #define SERIAL_ONLY RB_SERIAL #define VID_SER_BOTH RB_MULTIPLE #define SER_VID_BOTH (RB_SERIAL | RB_MULTIPLE) #define CON_MASK (RB_SERIAL | RB_MULTIPLE) - - if ((howto & CON_MASK) == 0) { - /* No override, uhowto is controlling and efi cons is perfect */ - howto = howto | (uhowto & CON_MASK); - setenv("console", "efi", 1); - } else if ((howto & CON_MASK) == (uhowto & CON_MASK)) { - /* override matches what UEFI told us, efi console is perfect */ - setenv("console", "efi", 1); - } else if ((uhowto & (CON_MASK)) != 0) { - /* - * We detected a serial console on ConOut. All possible - * overrides include serial. We can't really override what efi - * gives us, so we use it knowing it's the best choice. - */ - setenv("console", "efi", 1); - } else { - /* - * We detected some kind of serial in the override, but ConOut - * has no serial, so we have to sort out which case it really is. - */ - switch (howto & CON_MASK) { - case SERIAL_ONLY: - setenv("console", "comconsole", 1); - break; - case VID_SER_BOTH: - setenv("console", "efi comconsole", 1); - break; - case SER_VID_BOTH: - setenv("console", "comconsole efi", 1); - break; - /* case VIDEO_ONLY can't happen -- it's the first if above */ + if (getenv("console") == NULL) { + if ((howto & CON_MASK) == 0) { + /* No override, uhowto is controlling and efi cons is perfect */ + howto = howto | (uhowto & CON_MASK); + setenv("console", "efi", 1); + } else if ((howto & CON_MASK) == (uhowto & CON_MASK)) { + /* override matches what UEFI told us, efi console is perfect */ + setenv("console", "efi", 1); + } else if ((uhowto & (CON_MASK)) != 0) { + /* + * We detected a serial console on ConOut. All possible + * overrides include serial. We can't really override what efi + * gives us, so we use it knowing it's the best choice. + */ + setenv("console", "efi", 1); + } else { + /* + * We detected some kind of serial in the override, but ConOut + * has no serial, so we have to sort out which case it really is. + */ + switch (howto & CON_MASK) { + case SERIAL_ONLY: + setenv("console", "comconsole", 1); + break; + case VID_SER_BOTH: + setenv("console", "efi comconsole", 1); + break; + case SER_VID_BOTH: + setenv("console", "comconsole efi", 1); + break; + /* case VIDEO_ONLY can't happen -- it's the first if above */ + } } } /* From owner-svn-src-head@freebsd.org Wed Jul 18 22:49:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 046BD103A30B; Wed, 18 Jul 2018 22:49:55 +0000 (UTC) (envelope-from rrs@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 AAC0B70EB2; Wed, 18 Jul 2018 22:49:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D56D20A27; Wed, 18 Jul 2018 22:49:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6IMnsYS076466; Wed, 18 Jul 2018 22:49:54 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IMns6D076446; Wed, 18 Jul 2018 22:49:54 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201807182249.w6IMns6D076446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 18 Jul 2018 22:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336465 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: in head/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 336465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 22:49:55 -0000 Author: rrs Date: Wed Jul 18 22:49:53 2018 New Revision: 336465 URL: https://svnweb.freebsd.org/changeset/base/336465 Log: Bump the ICMP echo limits to match the RFC Reviewed by: tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D16333 Modified: head/sys/netinet/ip_icmp.c head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Wed Jul 18 22:45:45 2018 (r336464) +++ head/sys/netinet/ip_icmp.c Wed Jul 18 22:49:53 2018 (r336465) @@ -139,8 +139,8 @@ static VNET_DEFINE(int, icmp_rfi) = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp_rfi), 0, "ICMP reply from incoming interface for non-local packets"); - -static VNET_DEFINE(int, icmp_quotelen) = 8; +/* Router requirements RFC 1812 section 4.3.2.3 requires 576 - 28. */ +static VNET_DEFINE(int, icmp_quotelen) = 548; #define V_icmp_quotelen VNET(icmp_quotelen) SYSCTL_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp_quotelen), 0, Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Wed Jul 18 22:45:45 2018 (r336464) +++ head/sys/netinet/tcp_stacks/rack.c Wed Jul 18 22:49:53 2018 (r336465) @@ -1627,7 +1627,6 @@ rack_process_rst(struct mbuf *m, struct tcphdr *th, st static void rack_challenge_ack(struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t * ret_val) { - INP_INFO_RLOCK_ASSERT(&V_tcbinfo); TCPSTAT_INC(tcps_badsyn); @@ -6103,7 +6102,6 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, str return (ret_val); } if (ourfinisacked) { - INP_INFO_RLOCK_ASSERT(&V_tcbinfo); tp = tcp_close(tp); rack_do_drop(m, tp); From owner-svn-src-head@freebsd.org Thu Jul 19 00:22:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 484A9103DA02; Thu, 19 Jul 2018 00:22:19 +0000 (UTC) (envelope-from asomers@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 EF37F74433; Thu, 19 Jul 2018 00:22:18 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D05C821A32; Thu, 19 Jul 2018 00:22:18 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J0MIPY028131; Thu, 19 Jul 2018 00:22:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J0MIFX028130; Thu, 19 Jul 2018 00:22:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807190022.w6J0MIFX028130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 19 Jul 2018 00:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336466 - head/tools/regression/sockets/unix_cmsg X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tools/regression/sockets/unix_cmsg X-SVN-Commit-Revision: 336466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 00:22:19 -0000 Author: asomers Date: Thu Jul 19 00:22:18 2018 New Revision: 336466 URL: https://svnweb.freebsd.org/changeset/base/336466 Log: Fix the build of tools/regression/sockets/unix_cmsg MFC after: 2 weeks Modified: head/tools/regression/sockets/unix_cmsg/Makefile Modified: head/tools/regression/sockets/unix_cmsg/Makefile ============================================================================== --- head/tools/regression/sockets/unix_cmsg/Makefile Wed Jul 18 22:49:53 2018 (r336465) +++ head/tools/regression/sockets/unix_cmsg/Makefile Thu Jul 19 00:22:18 2018 (r336466) @@ -8,6 +8,7 @@ SRCS= ${AUTOSRCS} unix_cmsg.c uc_common.h uc_common.c uc_check_time.h uc_check_time.c CLEANFILES+= ${AUTOSRCS} MAN= +CFLAGS+= -I${.CURDIR} -I${.OBJDIR} WARNS?= 3 REXP_bintime= 's|%%TTYPE%%|bintime|g ; s|%%DTYPE%%|bintime|g ; \ From owner-svn-src-head@freebsd.org Thu Jul 19 00:26:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB47C103DD3F; Thu, 19 Jul 2018 00:26:09 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56C6474655; Thu, 19 Jul 2018 00:26:09 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E64CD21487; Thu, 19 Jul 2018 00:26:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f53.google.com with SMTP id m12-v6so4726573lfc.10; Wed, 18 Jul 2018 17:26:08 -0700 (PDT) X-Gm-Message-State: AOUpUlGl+sJBm9C2QpHbiUGGzida3DRoyEvOICgBDDv5O2I/UpVVv9CO jymjkOk7xGsA2ZozDhTC3arW4yV06ULBjVlmH9U= X-Google-Smtp-Source: AAOMgpcXFxT6DyGrnNDRX7mrPVWhwaTwGJTLu07Jsv7a9XUQrgDDJeNwU95avB6umbdVlW/lRZZv6B6SXPqdnemyFc0= X-Received: by 2002:a19:138b:: with SMTP id 11-v6mr5398793lft.74.1531959967355; Wed, 18 Jul 2018 17:26:07 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 17:25:46 -0700 (PDT) In-Reply-To: <201807181950.w6IJoPLu005610@slippy.cwsent.com> References: <201807181950.w6IJoPLu005610@slippy.cwsent.com> From: Kyle Evans Date: Wed, 18 Jul 2018 19:25:46 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Cy Schubert Cc: Adrian Chadd , Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 00:26:09 -0000 Hi, Thanks! No effect, unfortunately. I have confirmed since that this is no longer an issue if I disable re-keying on my AP, so I guess that definitively isolates it to re-keying and gives me a pretty solid workaround. None of the other devices on my network seem affected, but I don't have much access to their logging to confirm that it's not an issue rather than just not as obvious. Thanks, Kyle Evans 2018 at 2:50 PM, Cy Schubert wrote: > Hi Kyle, > > Can you try the attached patch please? > > The upline commit log entry says: > > commit e8d08cf37844f783b389e601ecedd13edd2b9196 > Author: Jouni Malinen > Date: Wed Jun 6 01:22:01 2018 +0300 > > SAE: Do not drop STA entry on reauthentication in infrastructure BSS > > A new SAE Commit message should not be allowed to drop an existing > STA > entry since the sender of that Commit message cannot be > authenticated > before receiving the Confirm message. This is important in > particular > when PMF is used since this would provide a potential new path for > forcing a connection to be dropped. > > Fix this by allowing a new SAE Authentication instance to be started > when the old instance is in Accepted state and the new Commit > message > does not use the same peer-scalar value (checked in > sae_parse_commit_scalar()). When PMF is used, the AP will use SA > Query > procedure when receiving the (Re)Association Request frame. In > theory, > that step could be skipped in case of SAE Authentication since the > non-AP STA is demonstrating knowledge of the password. Anyway, > there is > no allowance for that exception in the IEEE 802.11 standard, so at > least > for now, leave this using SA Query procedure just like any other PMF > case. > > Signed-off-by: Jouni Malinen > > > > In message il.com> > , Kyle Evans writes: >> Poking at the router indicates that it is indeed during a rekey event. >> >> On Wed, Jul 18, 2018 at 12:56 PM, Adrian Chadd wrote >> : >> > Is it during a rekey event? >> > >> > >> > >> > -adrian >> > >> > On Wed, 18 Jul 2018 at 08:16, Kyle Evans wrote: >> >> >> >> On Wed, Jul 11, 2018 at 1:53 PM, Cy Schubert wrote: >> >> > Author: cy >> >> > Date: Wed Jul 11 18:53:18 2018 >> >> > New Revision: 336203 >> >> > URL: https://svnweb.freebsd.org/changeset/base/336203 >> >> > >> >> > Log: >> >> > MFV r324714: >> >> > >> >> > Update wpa 2.5 --> 2.6. >> >> > >> >> > MFC after: 1 month >> >> > >> >> >> >> Hi, >> >> >> >> Thanks again for the update! For some reason with 2.6, I'm seeing >> >> hourly (+/- a minute or two) disconnects: >> >> >> >> Jul 18 08:16:47 shiva wpa_supplicant[63771]: wlan0: >> >> CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1 >> >> Jul 18 08:16:47 shiva kernel: wlan0: link state changed to DOWN >> >> Jul 18 08:16:47 shiva wpa_supplicant[63771]: ioctl[SIOCS80211, op=20, >> >> val=0, arg_len=7]: Can't assign requested address >> >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Trying to >> >> associate with ... (SSID='FBI Surveillance Cat' freq=2437 MHz) >> >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Associated with ... >> >> Jul 18 08:18:03 shiva kernel: wlan0: link state changed to UP >> >> Jul 18 08:18:03 shiva dhclient[40889]: send_packet: No buffer space availa >> ble >> >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: WPA: Key >> >> negotiation completed with ... [PTK=CCMP GTK=CCMP] >> >> Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: >> >> CTRL-EVENT-CONNECTED - Connection to ... completed [id=0 id_str=] >> >> Jul 18 08:18:06 shiva dhclient[42269]: New IP Address (wlan0): 192.168.1.1 >> 50 >> >> Jul 18 08:18:06 shiva dhclient[42841]: New Subnet Mask (wlan0): 255.255.25 >> 5.0 >> >> Jul 18 08:18:06 shiva dhclient[43080]: New Broadcast Address (wlan0): >> >> 192.168.1.255 >> >> Jul 18 08:18:06 shiva dhclient[43248]: New Routers (wlan0): 192.168.1.1 >> >> >> >> Any idea what that might be about? My wpa_supplicant.conf is fairly >> >> minimal with exactly one network specified. >> >> >> >> Thanks, >> >> >> >> Kyle Evans >> >> > > > 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-head@freebsd.org Thu Jul 19 04:31:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 129E110484F0; Thu, 19 Jul 2018 04:31:42 +0000 (UTC) (envelope-from zleslie@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 B7ABF7C6E1; Thu, 19 Jul 2018 04:31:41 +0000 (UTC) (envelope-from zleslie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98E0D24389; Thu, 19 Jul 2018 04:31:41 +0000 (UTC) (envelope-from zleslie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J4Vfnt055238; Thu, 19 Jul 2018 04:31:41 GMT (envelope-from zleslie@FreeBSD.org) Received: (from zleslie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J4VfPr055237; Thu, 19 Jul 2018 04:31:41 GMT (envelope-from zleslie@FreeBSD.org) Message-Id: <201807190431.w6J4VfPr055237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zleslie set sender to zleslie@FreeBSD.org using -f From: Zach Leslie Date: Thu, 19 Jul 2018 04:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336467 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: zleslie X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 336467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 04:31:42 -0000 Author: zleslie (ports committer) Date: Thu Jul 19 04:31:41 2018 New Revision: 336467 URL: https://svnweb.freebsd.org/changeset/base/336467 Log: Add myself (zleslie) to calendar.freebsd PR: D15896 Approved by: swills(mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Jul 19 00:22:18 2018 (r336466) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Jul 19 04:31:41 2018 (r336467) @@ -10,6 +10,7 @@ 01/01 Dimitry Andric born in Utrecht, the Netherlands, 1969 01/01 Lev Serebryakov born in Leningrad, USSR, 1979 01/01 Alexander Langer born in Duesseldorf, Nordrhein-Westfalen, Germany, 1981 +01/01 Zach Leslie born in Grand Junction, Colorado, United States, 1985 01/02 Ion-Mihai "IOnut" Tetcu born in Bucharest, Romania, 1980 01/02 Patrick Li born in Beijing, People's Republic of China, 1985 01/03 Tetsurou Okazaki born in Mobara, Chiba, Japan, 1972 From owner-svn-src-head@freebsd.org Thu Jul 19 07:25:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58230104E09B; Thu, 19 Jul 2018 07:25:45 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) (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 A0E1D81CA2; Thu, 19 Jul 2018 07:25:44 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.15.2/8.15.2) with ESMTP id w6J7C0ca040834; Thu, 19 Jul 2018 10:12:01 +0300 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Thu, 19 Jul 2018 10:12:00 +0300 (MSK) From: Maxim Konovalov To: Randall Stewart cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336465 - in head/sys/netinet: . tcp_stacks In-Reply-To: <201807182249.w6IMns6D076446@repo.freebsd.org> Message-ID: References: <201807182249.w6IMns6D076446@repo.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 07:25:45 -0000 Hi Randall, On Wed, 18 Jul 2018, 22:49-0000, Randall Stewart wrote: > Author: rrs > Date: Wed Jul 18 22:49:53 2018 > New Revision: 336465 > URL: https://svnweb.freebsd.org/changeset/base/336465 > > Log: > Bump the ICMP echo limits to match the RFC > [...] Just wonder, are there any practical reasons to do that? While I don't see any meaningful vectors right now this could potentially make amplification DoS easier, no? -- Maxim Konovalov From owner-svn-src-head@freebsd.org Thu Jul 19 07:39:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D442D104E7E5; Thu, 19 Jul 2018 07:39:36 +0000 (UTC) (envelope-from royger@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 7CFC682418; Thu, 19 Jul 2018 07:39:36 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5ADFD2621F; Thu, 19 Jul 2018 07:39:36 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J7da8D047604; Thu, 19 Jul 2018 07:39:36 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J7da1x047603; Thu, 19 Jul 2018 07:39:36 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190739.w6J7da1x047603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 07:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336469 - in head/sys: amd64/amd64 xen/interface X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head/sys: amd64/amd64 xen/interface X-SVN-Commit-Revision: 336469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 07:39:37 -0000 Author: royger Date: Thu Jul 19 07:39:35 2018 New Revision: 336469 URL: https://svnweb.freebsd.org/changeset/base/336469 Log: xen: add PVHv2 entry point The PVHv2 entry point is fairly similar to the multiboot1 one. The kernel is started in protected mode with paging disabled. More information about the exact BSP state can be found in the pvh.markdown document on the Xen tree. This entry point is going to be joined with the native entry point at hammer_time, and in order to do so the BSP needs to be bootstrapped into long mode with the same set of page tables as used on bare metal. Sponsored by: Citrix Systems R&D Modified: head/sys/amd64/amd64/xen-locore.S head/sys/xen/interface/elfnote.h Modified: head/sys/amd64/amd64/xen-locore.S ============================================================================== --- head/sys/amd64/amd64/xen-locore.S Thu Jul 19 07:30:18 2018 (r336468) +++ head/sys/amd64/amd64/xen-locore.S Thu Jul 19 07:39:35 2018 (r336469) @@ -42,6 +42,12 @@ #include "assym.inc" +#define VTOP(x) ((x) - KERNBASE) +#define ENTRY_SIZE 8 /* sizeof(uint64_t) */ + +#define GDT_CODE 0x08 +#define GDT_DATA 0x10 + .section __xen_guest ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "FreeBSD") ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, __XSTRING(__FreeBSD_version)) @@ -57,6 +63,8 @@ ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic") ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long, 0) ELFNOTE(Xen, XEN_ELFNOTE_BSD_SYMTAB, .asciz, "yes") + /* For PVHv2 support. */ + ELFNOTE(Xen, XEN_ELFNOTE_PHYS32_ENTRY, .long, VTOP(xen_start32)) .text .p2align PAGE_SHIFT, 0x90 /* Hypercall_page needs to be PAGE aligned */ @@ -64,6 +72,7 @@ NON_GPROF_ENTRY(hypercall_page) .skip 0x1000, 0x90 /* Fill with "nop"s */ +/* Legacy PVH entry point, to be removed. */ NON_GPROF_ENTRY(xen_start) /* Don't trust what the loader gives for rflags. */ pushq $PSL_KERNEL @@ -85,3 +94,141 @@ NON_GPROF_ENTRY(xen_start) /* NOTREACHED */ 0: hlt jmp 0b + +/* PVH entry point. */ + .code32 +NON_GPROF_ENTRY(xen_start32) + + /* Load flat GDT */ + movl $VTOP(gdtdesc32), %eax + lgdt (%eax) + jmp $GDT_CODE, $VTOP(reload_cs) + +reload_cs: + movw $GDT_DATA, %ax + movw %ax, %ds + movw %ax, %es + movw %ax, %ss + + movl $VTOP(bootstack), %esp + + /* Don't trust what the loader gives for eflags. */ + pushl $PSL_KERNEL + popfl + + /* + * Create the page tables. + * The first 1GB is mapped using 2MB entries. + */ + movl $0, %eax +pgbuild: + cmp $(PAGE_SIZE/ENTRY_SIZE), %eax + jae pgbuild_done + + /* PT4[i] = VTOP(&PT3[0]) | PG_V | PG_RW | PG_U */ + movl $VTOP(PT4), %ecx + movl $VTOP(PT3), %edx + orl $(PG_V | PG_RW | PG_U), %edx + movl %edx, (%ecx,%eax,ENTRY_SIZE) + + /* PT3[i] = VTOP(&PT2[0]) | PG_V | PG_RW | PG_U */ + movl $VTOP(PT3), %ecx + movl $VTOP(PT2), %edx + orl $(PG_V | PG_RW | PG_U), %edx + movl %edx, (%ecx,%eax,ENTRY_SIZE) + + /* PT2[i] = i * 2MiB | PG_V | PG_RW | PG_PS | PG_U */ + movl $VTOP(PT2), %ecx + movl %eax, %edx + shll $PDRSHIFT, %edx + orl $(PG_V | PG_RW | PG_PS | PG_U), %edx + movl %edx, (%ecx,%eax,ENTRY_SIZE) + + inc %eax + jmp pgbuild + +pgbuild_done: + /* Turn on EFER.LME */ + movl $MSR_EFER, %ecx + rdmsr + orl $EFER_LME, %eax + wrmsr + + /* Turn on PAE */ + movl %cr4, %eax + orl $CR4_PAE, %eax + movl %eax, %cr4 + + /* Set %cr3 for PT4 */ + movl $VTOP(PT4), %eax + movl %eax, %cr3 + + /* Turn on paging (implicitly sets EFER.LMA) */ + movl %cr0, %eax + orl $CR0_PG, %eax + movl %eax, %cr0 + + /* Now we're in compatibility mode. Set %cs for long mode */ + movl $VTOP(gdtdesc), %eax + lgdt (%eax) + ljmp $GDT_CODE, $VTOP(longmode) + + .code64 +longmode: + /* We're still running V=P, jump to entry point */ + movq $bootstack, %rsp + movq $start_kernel, %rax + pushq %rax + ret + +start_kernel: + /* + * Pass %ebx as the argument to hammer_time_xen, it contains + * the startup info. + */ + movq %rbx, %rdi + call hammer_time_xen + movq %rax, %rsp + call mi_startup + + /* NOTREACHED */ +0: hlt + jmp 0b + +/* Space for initial page tables */ + .data + .p2align 12,0x40 +PT4: + .space 0x1000 +PT3: + .space 0x1000 +PT2: + .space 0x1000 + +/* 64bit GDT */ +gdtdesc: + .word gdtend - gdt + .long VTOP(gdt) # low + .long 0 # high +gdt: + .long 0 # null descriptor + .long 0 + .long 0x00000000 # %cs + .long 0x00209800 + .long 0x00000000 # %ds + .long 0x00008000 +gdtend: + +/* 32bit GDT */ +gdtdesc32: + .word gdt32end - gdt32 + .long VTOP(gdt32) + .long 0 +gdt32: + .long 0 # null descriptor + .long 0 + .long 0x0000ffff # %cs + .long 0x00cf9a00 + .long 0x0000ffff # %ds, %es, %ss + .long 0x00cf9200 +gdt32end: Modified: head/sys/xen/interface/elfnote.h ============================================================================== --- head/sys/xen/interface/elfnote.h Thu Jul 19 07:30:18 2018 (r336468) +++ head/sys/xen/interface/elfnote.h Thu Jul 19 07:39:35 2018 (r336469) @@ -200,9 +200,19 @@ #define XEN_ELFNOTE_SUPPORTED_FEATURES 17 /* + * Physical entry point into the kernel. + * + * 32bit entry point into the kernel. When requested to launch the + * guest kernel in a HVM container, Xen will use this entry point to + * launch the guest in 32bit protected mode with paging disabled. + * Ignored otherwise. + */ +#define XEN_ELFNOTE_PHYS32_ENTRY 18 + +/* * The number of the highest elfnote defined. */ -#define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUPPORTED_FEATURES +#define XEN_ELFNOTE_MAX XEN_ELFNOTE_PHYS32_ENTRY /* * System information exported through crash notes. From owner-svn-src-head@freebsd.org Thu Jul 19 07:54:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB9A9104F131; Thu, 19 Jul 2018 07:54:47 +0000 (UTC) (envelope-from royger@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 67CB682D93; Thu, 19 Jul 2018 07:54:47 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48C9726576; Thu, 19 Jul 2018 07:54:47 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J7sl5b057376; Thu, 19 Jul 2018 07:54:47 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J7sjJu057368; Thu, 19 Jul 2018 07:54:45 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190754.w6J7sjJu057368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 07:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336470 - in head/sys: dev/xen/balloon dev/xen/console dev/xen/xenstore x86/xen xen xen/xenstore X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head/sys: dev/xen/balloon dev/xen/console dev/xen/xenstore x86/xen xen xen/xenstore X-SVN-Commit-Revision: 336470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 07:54:48 -0000 Author: royger Date: Thu Jul 19 07:54:45 2018 New Revision: 336470 URL: https://svnweb.freebsd.org/changeset/base/336470 Log: xen: remove direct usage of HYPERVISOR_start_info HYPERVISOR_start_info is only available to PV and PVHv1 guests, HVM and PVHv2 guests get this data from HVM parameters that are fetched using a hypercall. Instead provide a set of helper functions that should be used to fetch this data. The helper functions have different implementations depending on whether FreeBSD is running as PVHv1 or HVM/PVHv2 guest type. This helps to cleanup generic Xen code by removing quite a lot of xen_pv_domain and xen_hvm_domain macro usages. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/balloon/balloon.c head/sys/dev/xen/console/xen_console.c head/sys/dev/xen/xenstore/xenstore.c head/sys/dev/xen/xenstore/xenstored_dev.c head/sys/x86/xen/hvm.c head/sys/x86/xen/pv.c head/sys/xen/xen-os.h head/sys/xen/xenstore/xenstorevar.h Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/dev/xen/balloon/balloon.c Thu Jul 19 07:54:45 2018 (r336470) @@ -382,8 +382,7 @@ xenballoon_attach(device_t dev) mtx_init(&balloon_mutex, "balloon_mutex", NULL, MTX_DEF); - bs.current_pages = xen_pv_domain() ? - HYPERVISOR_start_info->nr_pages : realmem; + bs.current_pages = realmem; bs.target_pages = bs.current_pages; bs.balloon_low = 0; bs.balloon_high = 0; Modified: head/sys/dev/xen/console/xen_console.c ============================================================================== --- head/sys/dev/xen/console/xen_console.c Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/dev/xen/console/xen_console.c Thu Jul 19 07:54:45 2018 (r336470) @@ -46,6 +46,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include #include @@ -129,12 +132,6 @@ static struct xencons_priv main_cons; #define XC_POLLTIME (hz/10) -/* - * Virtual address of the shared console page (only for PV guest) - * TODO: Introduce a function to set it - */ -char *console_page; - /*----------------------------- Debug function ------------------------------*/ struct putchar_arg { char *buf; @@ -273,9 +270,9 @@ static const struct xencons_ops xencons_hypervisor_ops static void xencons_early_init_ring(struct xencons_priv *cons) { - /* The shared page for PV is already mapped by the boot code */ - cons->intf = (struct xencons_interface *)console_page; - cons->evtchn = HYPERVISOR_start_info->console.domU.evtchn; + cons->intf = pmap_mapdev_attr(ptoa(xen_get_console_mfn()), PAGE_SIZE, + PAT_WRITE_BACK); + cons->evtchn = xen_get_console_evtchn(); } static int Modified: head/sys/dev/xen/xenstore/xenstore.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore.c Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/dev/xen/xenstore/xenstore.c Thu Jul 19 07:54:45 2018 (r336470) @@ -115,7 +115,7 @@ MALLOC_DEFINE(M_XENSTORE, "xenstore", "XenStore data a * to get the guest frame number for the shared page and then map it * into kva. See xs_init() for details. */ -struct xenstore_domain_interface *xen_store; +static struct xenstore_domain_interface *xen_store; /*-------------------------- Private Data Structures ------------------------*/ @@ -1103,38 +1103,30 @@ xs_attach(device_t dev) struct proc *p; xs.initialized = false; - if (xen_hvm_domain()) { - xs.evtchn = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN); - xs.gpfn = hvm_get_parameter(HVM_PARAM_STORE_PFN); - xen_store = pmap_mapdev(xs.gpfn * PAGE_SIZE, PAGE_SIZE); - xs.initialized = true; - } else if (xen_pv_domain()) { - if (HYPERVISOR_start_info->store_evtchn == 0) { - struct evtchn_alloc_unbound alloc_unbound; + xs.evtchn = xen_get_xenstore_evtchn(); + if (xs.evtchn == 0) { + struct evtchn_alloc_unbound alloc_unbound; - /* Allocate a local event channel for xenstore */ - alloc_unbound.dom = DOMID_SELF; - alloc_unbound.remote_dom = DOMID_SELF; - error = HYPERVISOR_event_channel_op( - EVTCHNOP_alloc_unbound, &alloc_unbound); - if (error != 0) - panic( - "unable to alloc event channel for Dom0: %d", - error); + /* Allocate a local event channel for xenstore */ + alloc_unbound.dom = DOMID_SELF; + alloc_unbound.remote_dom = DOMID_SELF; + error = HYPERVISOR_event_channel_op( + EVTCHNOP_alloc_unbound, &alloc_unbound); + if (error != 0) + panic( + "unable to alloc event channel for Dom0: %d", + error); - HYPERVISOR_start_info->store_evtchn = - alloc_unbound.port; - xs.evtchn = alloc_unbound.port; + xs.evtchn = alloc_unbound.port; - /* Allocate memory for the xs shared ring */ - xen_store = malloc(PAGE_SIZE, M_XENSTORE, - M_WAITOK | M_ZERO); - } else { - xs.evtchn = HYPERVISOR_start_info->store_evtchn; - xs.initialized = true; - } + /* Allocate memory for the xs shared ring */ + xen_store = malloc(PAGE_SIZE, M_XENSTORE, M_WAITOK | M_ZERO); + xs.gpfn = atop(pmap_kextract((vm_offset_t)xen_store)); } else { - panic("Unknown domain type, cannot initialize xenstore."); + xs.gpfn = xen_get_xenstore_mfn(); + xen_store = pmap_mapdev_attr(ptoa(xs.gpfn), PAGE_SIZE, + PAT_WRITE_BACK); + xs.initialized = true; } TAILQ_INIT(&xs.reply_list); @@ -1255,6 +1247,27 @@ SYSCTL_ULONG(_dev_xen, OID_AUTO, xsd_kva, CTLFLAG_RD, /*-------------------------------- Public API --------------------------------*/ /*------- API comments for these methods can be found in xenstorevar.h -------*/ +bool +xs_initialized(void) +{ + + return (xs.initialized); +} + +evtchn_port_t +xs_evtchn(void) +{ + + return (xs.evtchn); +} + +vm_paddr_t +xs_address(void) +{ + + return (ptoa(xs.gpfn)); +} + int xs_directory(struct xs_transaction t, const char *dir, const char *node, u_int *num, const char ***result) Modified: head/sys/dev/xen/xenstore/xenstored_dev.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstored_dev.c Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/dev/xen/xenstore/xenstored_dev.c Thu Jul 19 07:54:45 2018 (r336470) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -68,8 +67,7 @@ xsd_dev_read(struct cdev *dev, struct uio *uio, int io char evtchn[XSD_READ_SIZE]; int error, len; - len = snprintf(evtchn, sizeof(evtchn), "%u", - HYPERVISOR_start_info->store_evtchn); + len = snprintf(evtchn, sizeof(evtchn), "%u", xs_evtchn()); if (len < 0 || len > uio->uio_resid) return (EINVAL); @@ -88,7 +86,7 @@ xsd_dev_mmap(struct cdev *dev, vm_ooffset_t offset, vm if (offset != 0) return (EINVAL); - *paddr = pmap_kextract((vm_offset_t)xen_store); + *paddr = xs_address(); return (0); } @@ -104,9 +102,7 @@ static void xsd_dev_identify(driver_t *driver __unused, device_t parent) { - if (!xen_pv_domain()) - return; - if (HYPERVISOR_start_info->store_mfn != 0) + if (!xen_domain() || xs_initialized()) return; /* Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/x86/xen/hvm.c Thu Jul 19 07:54:45 2018 (r336470) @@ -94,9 +94,7 @@ DPCPU_DEFINE(struct vcpu_info *, vcpu_info); /*------------------ Hypervisor Access Shared Memory Regions -----------------*/ shared_info_t *HYPERVISOR_shared_info; -start_info_t *HYPERVISOR_start_info; - /*------------------------------ Sysctl tunables -----------------------------*/ int xen_disable_pv_disks = 0; int xen_disable_pv_nics = 0; @@ -425,3 +423,47 @@ xen_hvm_cpu_init(void) DPCPU_SET(vcpu_info, vcpu_info); } SYSINIT(xen_hvm_cpu_init, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_cpu_init, NULL); + +/* HVM/PVH start_info accessors */ +static vm_paddr_t +hvm_get_xenstore_mfn(void) +{ + + return (hvm_get_parameter(HVM_PARAM_STORE_PFN)); +} + +static evtchn_port_t +hvm_get_xenstore_evtchn(void) +{ + + return (hvm_get_parameter(HVM_PARAM_STORE_EVTCHN)); +} + +static vm_paddr_t +hvm_get_console_mfn(void) +{ + + return (hvm_get_parameter(HVM_PARAM_CONSOLE_PFN)); +} + +static evtchn_port_t +hvm_get_console_evtchn(void) +{ + + return (hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN)); +} + +static uint32_t +hvm_get_start_flags(void) +{ + + return (0); +} + +struct hypervisor_info hypervisor_info = { + .get_xenstore_mfn = hvm_get_xenstore_mfn, + .get_xenstore_evtchn = hvm_get_xenstore_evtchn, + .get_console_mfn = hvm_get_console_mfn, + .get_console_evtchn = hvm_get_console_evtchn, + .get_start_flags = hvm_get_start_flags, +}; Modified: head/sys/x86/xen/pv.c ============================================================================== --- head/sys/x86/xen/pv.c Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/x86/xen/pv.c Thu Jul 19 07:54:45 2018 (r336470) @@ -125,9 +125,55 @@ struct init_ops xen_init_ops = { static struct bios_smap xen_smap[MAX_E820_ENTRIES]; +static start_info_t *legacy_start_info; + +/*----------------------- Legacy PVH start_info accessors --------------------*/ +static vm_paddr_t +legacy_get_xenstore_mfn(void) +{ + + return (legacy_start_info->store_mfn); +} + +static evtchn_port_t +legacy_get_xenstore_evtchn(void) +{ + + return (legacy_start_info->store_evtchn); +} + +static vm_paddr_t +legacy_get_console_mfn(void) +{ + + return (legacy_start_info->console.domU.mfn); +} + +static evtchn_port_t +legacy_get_console_evtchn(void) +{ + + return (legacy_start_info->console.domU.evtchn); +} + +static uint32_t +legacy_get_start_flags(void) +{ + + return (legacy_start_info->flags); +} + +struct hypervisor_info legacy_info = { + .get_xenstore_mfn = legacy_get_xenstore_mfn, + .get_xenstore_evtchn = legacy_get_xenstore_evtchn, + .get_console_mfn = legacy_get_console_mfn, + .get_console_evtchn = legacy_get_console_evtchn, + .get_start_flags = legacy_get_start_flags, +}; + /*-------------------------------- Xen PV init -------------------------------*/ /* - * First function called by the Xen PVH boot sequence. + * First function called by the Xen legacy PVH boot sequence. * * Set some Xen global variables and prepare the environment so it is * as similar as possible to what native FreeBSD init function expects. @@ -155,22 +201,11 @@ hammer_time_xen(start_info_t *si, uint64_t xenstack) physfree = xenstack + 3 * PAGE_SIZE - KERNBASE; /* Setup Xen global variables */ - HYPERVISOR_start_info = si; + legacy_start_info = si; HYPERVISOR_shared_info = (shared_info_t *)(si->shared_info + KERNBASE); /* - * Setup some misc global variables for Xen devices - * - * XXX: Devices that need these specific variables should - * be rewritten to fetch this info by themselves from the - * start_info page. - */ - xen_store = (struct xenstore_domain_interface *) - (ptoa(si->store_mfn) + KERNBASE); - console_page = (char *)(ptoa(si->console.domU.mfn) + KERNBASE); - - /* * Use the stack Xen gives us to build the page tables * as native FreeBSD expects to find them (created * by the boot trampoline). @@ -202,6 +237,7 @@ hammer_time_xen(start_info_t *si, uint64_t xenstack) /* Set the hooks for early functions that diverge from bare metal */ init_ops = xen_init_ops; apic_ops = xen_apic_ops; + hypervisor_info = legacy_info; /* Now we can jump into the native init function */ return (hammer_time(0, physfree)); @@ -291,8 +327,8 @@ xen_pv_set_env(void) char *cmd_line_next, *cmd_line; size_t env_size; - cmd_line = HYPERVISOR_start_info->cmd_line; - env_size = sizeof(HYPERVISOR_start_info->cmd_line); + cmd_line = legacy_start_info->cmd_line; + env_size = sizeof(legacy_start_info->cmd_line); /* Skip leading spaces */ for (; isspace(*cmd_line) && (env_size != 0); cmd_line++) @@ -322,9 +358,8 @@ xen_pv_parse_symtab(void) int i, j; size = end; - sym_end = HYPERVISOR_start_info->mod_start != 0 ? - HYPERVISOR_start_info->mod_start : - HYPERVISOR_start_info->mfn_list; + sym_end = legacy_start_info->mod_start != 0 ? + legacy_start_info->mod_start : legacy_start_info->mfn_list; /* * Make sure the size is right headed, sym_end is just a @@ -375,8 +410,8 @@ xen_pv_parse_preload_data(u_int64_t modulep) vm_paddr_t metadata; char *envp; - if (HYPERVISOR_start_info->mod_start != 0) { - preload_metadata = (caddr_t)(HYPERVISOR_start_info->mod_start); + if (legacy_start_info->mod_start != 0) { + preload_metadata = (caddr_t)legacy_start_info->mod_start; kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) @@ -391,7 +426,7 @@ xen_pv_parse_preload_data(u_int64_t modulep) * which contains the relocated modulep address. */ metadata = MD_FETCH(kmdp, MODINFOMD_MODULEP, vm_paddr_t); - off = HYPERVISOR_start_info->mod_start - metadata; + off = legacy_start_info->mod_start - metadata; preload_bootstrap_relocate(off); Modified: head/sys/xen/xen-os.h ============================================================================== --- head/sys/xen/xen-os.h Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/xen/xen-os.h Thu Jul 19 07:54:45 2018 (r336470) @@ -40,19 +40,63 @@ #define __ASSEMBLY__ #endif -#include - #include +#ifndef __ASSEMBLY__ +#include + +struct hypervisor_info { + vm_paddr_t (*get_xenstore_mfn)(void); + evtchn_port_t (*get_xenstore_evtchn)(void); + vm_paddr_t (*get_console_mfn)(void); + evtchn_port_t (*get_console_evtchn)(void); + uint32_t (*get_start_flags)(void); +}; +extern struct hypervisor_info hypervisor_info; + +static inline vm_paddr_t +xen_get_xenstore_mfn(void) +{ + + return (hypervisor_info.get_xenstore_mfn()); +} + +static inline evtchn_port_t +xen_get_xenstore_evtchn(void) +{ + + return (hypervisor_info.get_xenstore_evtchn()); +} + +static inline vm_paddr_t +xen_get_console_mfn(void) +{ + + return (hypervisor_info.get_console_mfn()); +} + +static inline evtchn_port_t +xen_get_console_evtchn(void) +{ + + return (hypervisor_info.get_console_evtchn()); +} + +static inline uint32_t +xen_get_start_flags(void) +{ + + return (hypervisor_info.get_start_flags()); +} +#endif + +#include + /* Everything below this point is not included by assembler (.S) files. */ #ifndef __ASSEMBLY__ extern shared_info_t *HYPERVISOR_shared_info; -extern start_info_t *HYPERVISOR_start_info; -/* XXX: we need to get rid of this and use HYPERVISOR_start_info directly */ -extern char *console_page; - extern int xen_disable_pv_disks; extern int xen_disable_pv_nics; @@ -87,8 +131,8 @@ xen_hvm_domain(void) static inline bool xen_initial_domain(void) { - return (xen_domain() && HYPERVISOR_start_info != NULL && - (HYPERVISOR_start_info->flags & SIF_INITDOMAIN) != 0); + + return (xen_domain() && (xen_get_start_flags() & SIF_INITDOMAIN) != 0); } /* Modified: head/sys/xen/xenstore/xenstorevar.h ============================================================================== --- head/sys/xen/xenstore/xenstorevar.h Thu Jul 19 07:39:35 2018 (r336469) +++ head/sys/xen/xenstore/xenstorevar.h Thu Jul 19 07:54:45 2018 (r336470) @@ -52,9 +52,7 @@ /* XenStore allocations including XenStore data returned to clients. */ MALLOC_DECLARE(M_XENSTORE); -struct xenstore_domain_interface; struct xs_watch; -extern struct xenstore_domain_interface *xen_store; typedef void (xs_watch_cb_t)(struct xs_watch *, const char **vec, unsigned int len); @@ -83,6 +81,27 @@ struct xs_transaction }; #define XST_NIL ((struct xs_transaction) { 0 }) + +/** + * Check if Xenstore is initialized. + * + * \return True if initialized, false otherwise. + */ +bool xs_initialized(void); + +/** + * Return xenstore event channel port. + * + * \return event channel port. + */ +evtchn_port_t xs_evtchn(void); + +/** + * Return xenstore page physical memory address. + * + * \return xenstore page physical address. + */ +vm_paddr_t xs_address(void); /** * Fetch the contents of a directory in the XenStore. From owner-svn-src-head@freebsd.org Thu Jul 19 07:58:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDB7F104F3B7; Thu, 19 Jul 2018 07:58:25 +0000 (UTC) (envelope-from royger@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 6743B8312E; Thu, 19 Jul 2018 07:58:25 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45B002657E; Thu, 19 Jul 2018 07:58:25 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J7wPeE057823; Thu, 19 Jul 2018 07:58:25 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J7wPFL057822; Thu, 19 Jul 2018 07:58:25 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190758.w6J7wPFL057822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 07:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336471 - head/sys/dev/xen/console X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/console X-SVN-Commit-Revision: 336471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 07:58:25 -0000 Author: royger Date: Thu Jul 19 07:58:24 2018 New Revision: 336471 URL: https://svnweb.freebsd.org/changeset/base/336471 Log: xen: do not limit PV console usage to PV guests The Xen PV console is also available to HVM and PVHv2 guests, so don't limit the console usage to PV guests only. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/console/xen_console.c Modified: head/sys/dev/xen/console/xen_console.c ============================================================================== --- head/sys/dev/xen/console/xen_console.c Thu Jul 19 07:54:45 2018 (r336470) +++ head/sys/dev/xen/console/xen_console.c Thu Jul 19 07:58:24 2018 (r336471) @@ -397,7 +397,7 @@ xencons_early_init(void) mtx_init(&main_cons.mtx, "XCONS LOCK", NULL, MTX_SPIN); - if (xen_initial_domain()) + if (xen_get_console_evtchn() == 0) main_cons.ops = &xencons_hypervisor_ops; else main_cons.ops = &xencons_ring_ops; @@ -586,7 +586,7 @@ static void xencons_cnprobe(struct consdev *cp) { - if (!xen_pv_domain()) + if (!xen_domain()) return; cp->cn_pri = CN_REMOTE; @@ -701,13 +701,8 @@ xencons_identify(driver_t *driver, device_t parent) { device_t child; -#if defined(__arm__) || defined(__aarch64__) - if (!xen_domain()) + if (main_cons.ops == NULL) return; -#else - if (!xen_pv_domain()) - return; -#endif child = BUS_ADD_CHILD(parent, 0, driver_name, 0); } From owner-svn-src-head@freebsd.org Thu Jul 19 08:00:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 067FA104F6C5; Thu, 19 Jul 2018 08:00:53 +0000 (UTC) (envelope-from royger@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 AFCA18331B; Thu, 19 Jul 2018 08:00:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90F5626592; Thu, 19 Jul 2018 08:00:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J80qPT060912; Thu, 19 Jul 2018 08:00:52 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J80qT1060911; Thu, 19 Jul 2018 08:00:52 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190800.w6J80qT1060911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 08:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336472 - head/sys/dev/xen/pvcpu X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/pvcpu X-SVN-Commit-Revision: 336472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 08:00:53 -0000 Author: royger Date: Thu Jul 19 08:00:52 2018 New Revision: 336472 URL: https://svnweb.freebsd.org/changeset/base/336472 Log: xen: attach the PV CPU if no CPU device is present When booted as PVHv2, there's no ACPI CPU object, so attach the PV CPU device in order to take it's place. This is required in case some device or driver tries to poke at the PCPU device field. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/pvcpu/pvcpu.c Modified: head/sys/dev/xen/pvcpu/pvcpu.c ============================================================================== --- head/sys/dev/xen/pvcpu/pvcpu.c Thu Jul 19 07:58:24 2018 (r336471) +++ head/sys/dev/xen/pvcpu/pvcpu.c Thu Jul 19 08:00:52 2018 (r336472) @@ -49,8 +49,8 @@ xenpvcpu_identify(driver_t *driver, device_t parent) { int i; - /* Only attach to PV guests, HVM guests use the ACPI CPU devices */ - if (!xen_pv_domain()) + /* Only attach in case the per-CPU device is not set. */ + if (!xen_domain() || PCPU_GET(device) != NULL) return; CPU_FOREACH(i) { From owner-svn-src-head@freebsd.org Thu Jul 19 08:13:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4D75104FF92; Thu, 19 Jul 2018 08:13:42 +0000 (UTC) (envelope-from royger@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 9816C83DF4; Thu, 19 Jul 2018 08:13:42 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AC0B268C3; Thu, 19 Jul 2018 08:13:42 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J8Dgr8068184; Thu, 19 Jul 2018 08:13:42 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J8Dgib068182; Thu, 19 Jul 2018 08:13:42 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190813.w6J8Dgib068182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 08:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336473 - in head/sys: x86/xen xen X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head/sys: x86/xen xen X-SVN-Commit-Revision: 336473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 08:13:43 -0000 Author: royger Date: Thu Jul 19 08:13:41 2018 New Revision: 336473 URL: https://svnweb.freebsd.org/changeset/base/336473 Log: xen: allow very early initialization of the hypercall page Allow the hypercall page to be initialized very early, even before vtophys is functional. Also make the function global so it can be called by other files. This will be needed in order to perform the early bringup on PVHv2 guests. Sponsored by: Citrix Systems R&D Modified: head/sys/x86/xen/hvm.c head/sys/xen/hvm.h Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Thu Jul 19 08:00:52 2018 (r336472) +++ head/sys/x86/xen/hvm.c Thu Jul 19 08:13:41 2018 (r336473) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -63,13 +64,6 @@ __FBSDID("$FreeBSD$"); /*--------------------------- Forward Declarations ---------------------------*/ static void xen_hvm_cpu_init(void); -/*-------------------------------- Local Types -------------------------------*/ -enum xen_hvm_init_type { - XEN_HVM_INIT_COLD, - XEN_HVM_INIT_CANCELLED_SUSPEND, - XEN_HVM_INIT_RESUME -}; - /*-------------------------------- Global Data -------------------------------*/ enum xen_domain_type xen_domain_type = XEN_NATIVE; @@ -119,51 +113,67 @@ xen_hvm_cpuid_base(void) return (0); } +static void +hypervisor_quirks(unsigned int major, unsigned int minor) +{ +#ifdef SMP + if (((major < 4) || (major == 4 && minor <= 5)) && + msix_disable_migration == -1) { + /* + * Xen hypervisors prior to 4.6.0 do not properly + * handle updates to enabled MSI-X table entries, + * so disable MSI-X interrupt migration in that + * case. + */ + if (bootverbose) + printf( +"Disabling MSI-X interrupt migration due to Xen hypervisor bug.\n" +"Set machdep.msix_disable_migration=0 to forcefully enable it.\n"); + msix_disable_migration = 1; + } +#endif +} + +static void +hypervisor_version(void) +{ + uint32_t regs[4]; + int major, minor; + + do_cpuid(cpuid_base + 1, regs); + + major = regs[0] >> 16; + minor = regs[0] & 0xffff; + printf("XEN: Hypervisor version %d.%d detected.\n", major, minor); + + hypervisor_quirks(major, minor); +} + /* * Allocate and fill in the hypcall page. */ -static int +int xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type init_type) { uint32_t regs[4]; - if (xen_pv_domain()) { - /* hypercall page is already set in the PV case */ - return (0); + if (xen_domain() && init_type == XEN_HVM_INIT_LATE) { + /* + * If the domain type is already set we can assume that the + * hypercall page has been populated too, so just print the + * version (and apply any quirks) and exit. + */ + hypervisor_version(); + return 0; } cpuid_base = xen_hvm_cpuid_base(); if (cpuid_base == 0) return (ENXIO); - if (init_type == XEN_HVM_INIT_COLD) { - int major, minor; + if (init_type == XEN_HVM_INIT_LATE) + hypervisor_version(); - do_cpuid(cpuid_base + 1, regs); - - major = regs[0] >> 16; - minor = regs[0] & 0xffff; - printf("XEN: Hypervisor version %d.%d detected.\n", major, - minor); - -#ifdef SMP - if (((major < 4) || (major == 4 && minor <= 5)) && - msix_disable_migration == -1) { - /* - * Xen hypervisors prior to 4.6.0 do not properly - * handle updates to enabled MSI-X table entries, - * so disable MSI-X interrupt migration in that - * case. - */ - if (bootverbose) - printf( -"Disabling MSI-X interrupt migration due to Xen hypervisor bug.\n" -"Set machdep.msix_disable_migration=0 to forcefully enable it.\n"); - msix_disable_migration = 1; - } -#endif - } - /* * Find the hypercall pages. */ @@ -171,7 +181,9 @@ xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type in if (regs[0] != 1) return (EINVAL); - wrmsr(regs[1], vtophys(&hypercall_page)); + wrmsr(regs[1], (init_type == XEN_HVM_INIT_EARLY) + ? ((vm_paddr_t)&hypercall_page - KERNBASE) + : vtophys(&hypercall_page)); return (0); } @@ -307,7 +319,7 @@ xen_hvm_init(enum xen_hvm_init_type init_type) error = xen_hvm_init_hypercall_stubs(init_type); switch (init_type) { - case XEN_HVM_INIT_COLD: + case XEN_HVM_INIT_LATE: if (error != 0) return; @@ -371,7 +383,7 @@ xen_hvm_resume(bool suspend_cancelled) static void xen_hvm_sysinit(void *arg __unused) { - xen_hvm_init(XEN_HVM_INIT_COLD); + xen_hvm_init(XEN_HVM_INIT_LATE); } SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_sysinit, NULL); Modified: head/sys/xen/hvm.h ============================================================================== --- head/sys/xen/hvm.h Thu Jul 19 08:00:52 2018 (r336472) +++ head/sys/xen/hvm.h Thu Jul 19 08:13:41 2018 (r336473) @@ -91,6 +91,14 @@ enum { (((uint64_t)HVM_CB_TYPE_VECTOR << HVM_CB_TYPE_SHIFT) \ | (((vector) & HVM_CB_GSI_GSI_MASK) << HVM_CB_GSI_GSI_SHIFT)) +enum xen_hvm_init_type { + XEN_HVM_INIT_EARLY, + XEN_HVM_INIT_LATE, + XEN_HVM_INIT_CANCELLED_SUSPEND, + XEN_HVM_INIT_RESUME, +}; + +int xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type); void xen_hvm_set_callback(device_t); void xen_hvm_suspend(void); void xen_hvm_resume(bool suspend_cancelled); From owner-svn-src-head@freebsd.org Thu Jul 19 08:44:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA10410512DD; Thu, 19 Jul 2018 08:44:53 +0000 (UTC) (envelope-from royger@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 7B545857FE; Thu, 19 Jul 2018 08:44:53 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4225726E3F; Thu, 19 Jul 2018 08:44:53 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J8ir8U084027; Thu, 19 Jul 2018 08:44:53 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J8iqTh084024; Thu, 19 Jul 2018 08:44:52 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190844.w6J8iqTh084024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 08:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336474 - in head/sys: amd64/amd64 x86/xen xen X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head/sys: amd64/amd64 x86/xen xen X-SVN-Commit-Revision: 336474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 08:44:54 -0000 Author: royger Date: Thu Jul 19 08:44:52 2018 New Revision: 336474 URL: https://svnweb.freebsd.org/changeset/base/336474 Log: xen: implement early init helper for PVHv2 In order to setup an initial environment and jump into the generic hammer_time initialization function. Some of the code is shared with PVHv1, while other code is PVHv2 specific. This allows booting FreeBSD as a PVHv2 DomU and Dom0. Sponsored by: Citrix Systems R&D Modified: head/sys/amd64/amd64/xen-locore.S head/sys/x86/xen/hvm.c head/sys/x86/xen/pv.c head/sys/xen/hvm.h Modified: head/sys/amd64/amd64/xen-locore.S ============================================================================== --- head/sys/amd64/amd64/xen-locore.S Thu Jul 19 08:13:41 2018 (r336473) +++ head/sys/amd64/amd64/xen-locore.S Thu Jul 19 08:44:52 2018 (r336474) @@ -87,7 +87,7 @@ NON_GPROF_ENTRY(xen_start) xorl %ebp, %ebp /* u_int64_t hammer_time_xen(start_info_t *si, u_int64_t xenstack); */ - call hammer_time_xen + call hammer_time_xen_legacy movq %rax, %rsp /* set up kstack for mi_startup() */ call mi_startup /* autoconfiguration, mountroot etc */ Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Thu Jul 19 08:13:41 2018 (r336473) +++ head/sys/x86/xen/hvm.c Thu Jul 19 08:44:52 2018 (r336474) @@ -82,6 +82,12 @@ static MALLOC_DEFINE(M_XENHVM, "xen_hvm", "Xen HVM PV */ int xen_vector_callback_enabled; +/** + * Start info flags. ATM this only used to store the initial domain flag for + * PVHv2, and it's always empty for HVM guests. + */ +uint32_t hvm_start_flags; + /*------------------------------- Per-CPU Data -------------------------------*/ DPCPU_DEFINE(struct vcpu_info, vcpu_local_info); DPCPU_DEFINE(struct vcpu_info *, vcpu_info); @@ -469,7 +475,7 @@ static uint32_t hvm_get_start_flags(void) { - return (0); + return (hvm_start_flags); } struct hypervisor_info hypervisor_info = { Modified: head/sys/x86/xen/pv.c ============================================================================== --- head/sys/x86/xen/pv.c Thu Jul 19 08:13:41 2018 (r336473) +++ head/sys/x86/xen/pv.c Thu Jul 19 08:44:52 2018 (r336474) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -67,11 +68,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include +#include #include #include @@ -83,13 +86,15 @@ __FBSDID("$FreeBSD$"); /* Native initial function */ extern u_int64_t hammer_time(u_int64_t, u_int64_t); /* Xen initial function */ -uint64_t hammer_time_xen(start_info_t *, uint64_t); +uint64_t hammer_time_xen_legacy(start_info_t *, uint64_t); +uint64_t hammer_time_xen(vm_paddr_t); #define MAX_E820_ENTRIES 128 /*--------------------------- Forward Declarations ---------------------------*/ -static caddr_t xen_pv_parse_preload_data(u_int64_t); -static void xen_pv_parse_memmap(caddr_t, vm_paddr_t *, int *); +static caddr_t xen_legacy_pvh_parse_preload_data(uint64_t); +static caddr_t xen_pvh_parse_preload_data(uint64_t); +static void xen_pvh_parse_memmap(caddr_t, vm_paddr_t *, int *); #ifdef SMP static int xen_pv_start_all_aps(void); @@ -112,20 +117,33 @@ extern uint32_t end; /*-------------------------------- Global Data -------------------------------*/ /* Xen init_ops implementation. */ -struct init_ops xen_init_ops = { - .parse_preload_data = xen_pv_parse_preload_data, +struct init_ops xen_legacy_init_ops = { + .parse_preload_data = xen_legacy_pvh_parse_preload_data, .early_clock_source_init = xen_clock_init, .early_delay = xen_delay, - .parse_memmap = xen_pv_parse_memmap, + .parse_memmap = xen_pvh_parse_memmap, #ifdef SMP .start_all_aps = xen_pv_start_all_aps, #endif .msi_init = xen_msi_init, }; +struct init_ops xen_pvh_init_ops = { + .parse_preload_data = xen_pvh_parse_preload_data, + .early_clock_source_init = xen_clock_init, + .early_delay = xen_delay, + .parse_memmap = xen_pvh_parse_memmap, +#ifdef SMP + .mp_bootaddress = mp_bootaddress, + .start_all_aps = native_start_all_aps, +#endif + .msi_init = msi_init, +}; + static struct bios_smap xen_smap[MAX_E820_ENTRIES]; static start_info_t *legacy_start_info; +static struct hvm_start_info *start_info; /*----------------------- Legacy PVH start_info accessors --------------------*/ static vm_paddr_t @@ -179,7 +197,7 @@ struct hypervisor_info legacy_info = { * as similar as possible to what native FreeBSD init function expects. */ uint64_t -hammer_time_xen(start_info_t *si, uint64_t xenstack) +hammer_time_xen_legacy(start_info_t *si, uint64_t xenstack) { uint64_t physfree; uint64_t *PT4 = (u_int64_t *)xenstack; @@ -235,7 +253,7 @@ hammer_time_xen(start_info_t *si, uint64_t xenstack) load_cr3(((uint64_t)&PT4[0]) - KERNBASE); /* Set the hooks for early functions that diverge from bare metal */ - init_ops = xen_init_ops; + init_ops = xen_legacy_init_ops; apic_ops = xen_apic_ops; hypervisor_info = legacy_info; @@ -243,6 +261,85 @@ hammer_time_xen(start_info_t *si, uint64_t xenstack) return (hammer_time(0, physfree)); } +uint64_t +hammer_time_xen(vm_paddr_t start_info_paddr) +{ + struct hvm_modlist_entry *mod; + struct xen_add_to_physmap xatp; + uint64_t physfree; + char *kenv; + int rc; + + xen_domain_type = XEN_HVM_DOMAIN; + vm_guest = VM_GUEST_XEN; + + rc = xen_hvm_init_hypercall_stubs(XEN_HVM_INIT_EARLY); + if (rc) { + xc_printf("ERROR: failed to initialize hypercall page: %d\n", + rc); + HYPERVISOR_shutdown(SHUTDOWN_crash); + } + + start_info = (struct hvm_start_info *)(start_info_paddr + KERNBASE); + if (start_info->magic != XEN_HVM_START_MAGIC_VALUE) { + xc_printf("Unknown magic value in start_info struct: %#x\n", + start_info->magic); + HYPERVISOR_shutdown(SHUTDOWN_crash); + } + + /* + * The hvm_start_into structure is always appended after loading + * the kernel and modules. + */ + physfree = roundup2(start_info_paddr + PAGE_SIZE, PAGE_SIZE); + + xatp.domid = DOMID_SELF; + xatp.idx = 0; + xatp.space = XENMAPSPACE_shared_info; + xatp.gpfn = atop(physfree); + if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp)) { + xc_printf("ERROR: failed to setup shared_info page\n"); + HYPERVISOR_shutdown(SHUTDOWN_crash); + } + HYPERVISOR_shared_info = (shared_info_t *)(physfree + KERNBASE); + physfree += PAGE_SIZE; + + /* + * Init a static kenv using a free page. The contents will be filled + * from the parse_preload_data hook. + */ + kenv = (void *)(physfree + KERNBASE); + physfree += PAGE_SIZE; + bzero(kenv, PAGE_SIZE); + init_static_kenv(kenv, PAGE_SIZE); + + if (start_info->modlist_paddr != 0) { + if (start_info->modlist_paddr >= physfree) { + xc_printf( + "ERROR: unexpected module list memory address\n"); + HYPERVISOR_shutdown(SHUTDOWN_crash); + } + if (start_info->nr_modules == 0) { + xc_printf( + "ERROR: modlist_paddr != 0 but nr_modules == 0\n"); + HYPERVISOR_shutdown(SHUTDOWN_crash); + } + mod = (struct hvm_modlist_entry *) + (vm_paddr_t)start_info->modlist_paddr + KERNBASE; + if (mod[0].paddr >= physfree) { + xc_printf("ERROR: unexpected module memory address\n"); + HYPERVISOR_shutdown(SHUTDOWN_crash); + } + } + + /* Set the hooks for early functions that diverge from bare metal */ + init_ops = xen_pvh_init_ops; + hvm_start_flags = start_info->flags; + + /* Now we can jump into the native init function */ + return (hammer_time(0, physfree)); +} + /*-------------------------------- PV specific -------------------------------*/ #ifdef SMP static bool @@ -318,27 +415,49 @@ xen_pv_start_all_aps(void) #endif /* SMP */ /* - * Functions to convert the "extra" parameters passed by Xen - * into FreeBSD boot options. + * When booted as a PVH guest FreeBSD needs to avoid using the RSDP address + * hint provided by the loader because it points to the native set of ACPI + * tables instead of the ones crafted by Xen. The acpi.rsdp env variable is + * removed from kenv if present, and a new acpi.rsdp is added to kenv that + * points to the address of the Xen crafted RSDP. */ +static bool reject_option(const char *option) +{ + static const char *reject[] = { + "acpi.rsdp", + }; + unsigned int i; + + for (i = 0; i < nitems(reject); i++) + if (strncmp(option, reject[i], strlen(reject[i])) == 0) + return (true); + + return (false); +} + static void -xen_pv_set_env(void) +xen_pvh_set_env(char *env, bool (*filter)(const char *)) { - char *cmd_line_next, *cmd_line; - size_t env_size; + char *option; - cmd_line = legacy_start_info->cmd_line; - env_size = sizeof(legacy_start_info->cmd_line); + if (env == NULL) + return; - /* Skip leading spaces */ - for (; isspace(*cmd_line) && (env_size != 0); cmd_line++) - env_size--; + option = env; + while (*option != 0) { + char *value; - /* Replace ',' with '\0' */ - for (cmd_line_next = cmd_line; strsep(&cmd_line_next, ",") != NULL;) - ; + if (filter != NULL && filter(option)) { + option += strlen(option) + 1; + continue; + } - init_static_kenv(cmd_line, 0); + value = option; + option = strsep(&value, "="); + if (kern_setenv(option, value) != 0) + xc_printf("unable to add kenv %s=%s\n", option, value); + option = value + strlen(value) + 1; + } } #ifdef DDB @@ -349,27 +468,15 @@ xen_pv_set_env(void) * sys/kern/kern_ksyms.c CVS Revision 1.71. */ static void -xen_pv_parse_symtab(void) +xen_pvh_parse_symtab(void) { Elf_Ehdr *ehdr; Elf_Shdr *shdr; - vm_offset_t sym_end; uint32_t size; int i, j; size = end; - sym_end = legacy_start_info->mod_start != 0 ? - legacy_start_info->mod_start : legacy_start_info->mfn_list; - /* - * Make sure the size is right headed, sym_end is just a - * high boundary, but at least allows us to fail earlier. - */ - if ((vm_offset_t)&end + size > sym_end) { - xc_printf("Unable to load ELF symtab: size mismatch\n"); - return; - } - ehdr = (Elf_Ehdr *)(&end + 1); if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) || ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || @@ -394,16 +501,14 @@ xen_pv_parse_symtab(void) break; } - if (ksymtab == 0 || kstrtab == 0) { + if (ksymtab == 0 || kstrtab == 0) xc_printf( "Unable to load ELF symtab: could not find symtab or strtab\n"); - return; - } } #endif static caddr_t -xen_pv_parse_preload_data(u_int64_t modulep) +xen_legacy_pvh_parse_preload_data(uint64_t modulep) { caddr_t kmdp; vm_ooffset_t off; @@ -434,22 +539,82 @@ xen_pv_parse_preload_data(u_int64_t modulep) envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); if (envp != NULL) envp += off; - init_static_kenv(envp, 0); + xen_pvh_set_env(envp, NULL); } else { /* Parse the extra boot information given by Xen */ - xen_pv_set_env(); - boothowto |= boot_env_to_howto(); + boot_parse_cmdline_delim(legacy_start_info->cmd_line, ","); kmdp = NULL; } + boothowto |= boot_env_to_howto(); + #ifdef DDB - xen_pv_parse_symtab(); + xen_pvh_parse_symtab(); #endif return (kmdp); } +static caddr_t +xen_pvh_parse_preload_data(uint64_t modulep) +{ + caddr_t kmdp; + vm_ooffset_t off; + vm_paddr_t metadata; + char *envp; + char acpi_rsdp[19]; + + if (start_info->modlist_paddr != 0) { + struct hvm_modlist_entry *mod; + + mod = (struct hvm_modlist_entry *) + (start_info->modlist_paddr + KERNBASE); + preload_metadata = (caddr_t)(mod[0].paddr + KERNBASE); + + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + KASSERT(kmdp != NULL, ("unable to find kernel")); + + /* + * Xen has relocated the metadata and the modules, + * so we need to recalculate it's position. This is + * done by saving the original modulep address and + * then calculating the offset with mod_start, + * which contains the relocated modulep address. + */ + metadata = MD_FETCH(kmdp, MODINFOMD_MODULEP, vm_paddr_t); + off = mod[0].paddr + KERNBASE - metadata; + + preload_bootstrap_relocate(off); + + boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); + envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); + if (envp != NULL) + envp += off; + xen_pvh_set_env(envp, reject_option); + } else { + /* Parse the extra boot information given by Xen */ + if (start_info->cmdline_paddr != 0) + boot_parse_cmdline_delim( + (char *)(start_info->cmdline_paddr + KERNBASE), + ","); + kmdp = NULL; + } + + boothowto |= boot_env_to_howto(); + + snprintf(acpi_rsdp, sizeof(acpi_rsdp), "%#" PRIx64, + start_info->rsdp_paddr); + kern_setenv("acpi.rsdp", acpi_rsdp); + +#ifdef DDB + xen_pvh_parse_symtab(); +#endif + return (kmdp); +} + static void -xen_pv_parse_memmap(caddr_t kmdp, vm_paddr_t *physmap, int *physmap_idx) +xen_pvh_parse_memmap(caddr_t kmdp, vm_paddr_t *physmap, int *physmap_idx) { struct xen_memory_map memmap; u_int32_t size; @@ -459,8 +624,12 @@ xen_pv_parse_memmap(caddr_t kmdp, vm_paddr_t *physmap, memmap.nr_entries = MAX_E820_ENTRIES; set_xen_guest_handle(memmap.buffer, xen_smap); rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap); - if (rc) - panic("unable to fetch Xen E820 memory map"); + if (rc) { + xc_printf("ERROR: unable to fetch Xen E820 memory map: %d\n", + rc); + HYPERVISOR_shutdown(SHUTDOWN_crash); + } + size = memmap.nr_entries * sizeof(xen_smap[0]); bios_add_smap_entries(xen_smap, size, physmap, physmap_idx); Modified: head/sys/xen/hvm.h ============================================================================== --- head/sys/xen/hvm.h Thu Jul 19 08:13:41 2018 (r336473) +++ head/sys/xen/hvm.h Thu Jul 19 08:44:52 2018 (r336474) @@ -102,4 +102,7 @@ int xen_hvm_init_hypercall_stubs(enum xen_hvm_init_typ void xen_hvm_set_callback(device_t); void xen_hvm_suspend(void); void xen_hvm_resume(bool suspend_cancelled); + +extern uint32_t hvm_start_flags; + #endif /* __XEN_HVM_H__ */ From owner-svn-src-head@freebsd.org Thu Jul 19 08:48:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 791B110514C9; Thu, 19 Jul 2018 08:48:35 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D280185A4B; Thu, 19 Jul 2018 08:48:34 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward103j.mail.yandex.net (Yandex) with ESMTP id CE8E834CA762; Thu, 19 Jul 2018 11:48:20 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id aEqdpDV7PD-mKgC593Y; Thu, 19 Jul 2018 11:48:20 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1531990100; bh=ECG4wlbFD4in7Ywzy2Vqi39Y0IqxCrh8VrqiU1Grlvk=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=f/JzwKKQmr81XbgAdP/oMPg/aJ/emmzcYzThkgdCsgfp2BmyWmtH7OMHdZAFeGJY6 HwQaP79oQYLBtbZzS8J20uxEK4D0X/TT0ZRsd4X7DxVhXYsTP3kAOuT8fKDWYpoS0c e8nCIxBvQ4ZPvqQfuTbseOBkHtdi9OvQB04hpV0A= Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id apJoYPA2Sh-mJqqaR3d; Thu, 19 Jul 2018 11:48:20 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1531990100; bh=ECG4wlbFD4in7Ywzy2Vqi39Y0IqxCrh8VrqiU1Grlvk=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=f/JzwKKQmr81XbgAdP/oMPg/aJ/emmzcYzThkgdCsgfp2BmyWmtH7OMHdZAFeGJY6 HwQaP79oQYLBtbZzS8J20uxEK4D0X/TT0ZRsd4X7DxVhXYsTP3kAOuT8fKDWYpoS0c e8nCIxBvQ4ZPvqQfuTbseOBkHtdi9OvQB04hpV0A= Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Kyle Evans , Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807111853.w6BIrI9B080714@repo.freebsd.org> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= xsBNBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAHNIkFuZHJleSBWLiBFbHN1a292IDxhZUBmcmVlYnNkLm9yZz7CwHsEEwECACUCGwMGCwkI BwMCBhUIAgkKCwQWAgMBAh4BAheABQJMB/ruAhkBAAoJEAHF6gQQyKF6MLwH/3Ri/TZl9uo0 SepYWXOnxL6EaDVXDA+dLb1eLKC4PRBBjX29ttQ0KaWapiE6y5/AfzOPmRtHLrHYHjd/aiHX GMLHcYRXD+5GvdkK8iMALrZ28X0JXyuuZa8rAxWIWmCbYHNSBy2unqWgTI04Erodk90IALgM 9JeHN9sFqTM6zalrMnTzlcmel4kcjT3lyYw3vOKgoYLtsLhKZSbJoVVVlvRlGBpHFJI5AoYJ SyfXoN0rcX6k9X7Isp2K50YjqxV4v78xluh1puhwZyC0p8IShPrmrp9Oy9JkMX90o6UAXdGU KfdExJuGJfUZOFBTtNIMNIAKfMTjhpRhxONIr0emxxDOwE0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAcLAXwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: Date: Thu, 19 Jul 2018 11:48:03 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3MLaiEHdMK3ZgpYd5VLxjf7grYfjxWZQ1" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 08:48:35 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3MLaiEHdMK3ZgpYd5VLxjf7grYfjxWZQ1 Content-Type: multipart/mixed; boundary="Y6JDaFon9mIYOWt8TMCBMBG1ArTlrSJsy"; protected-headers="v1" From: "Andrey V. Elsukov" To: Kyle Evans , Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... References: <201807111853.w6BIrI9B080714@repo.freebsd.org> In-Reply-To: --Y6JDaFon9mIYOWt8TMCBMBG1ArTlrSJsy Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18.07.2018 18:15, Kyle Evans wrote: > Thanks again for the update! For some reason with 2.6, I'm seeing > hourly (+/- a minute or two) disconnects: >=20 > Jul 18 08:16:47 shiva wpa_supplicant[63771]: wlan0: > CTRL-EVENT-DISCONNECTED bssid=3D... reason=3D1 locally_generated=3D1 > Jul 18 08:16:47 shiva kernel: wlan0: link state changed to DOWN > Jul 18 08:16:47 shiva wpa_supplicant[63771]: ioctl[SIOCS80211, op=3D20,= > val=3D0, arg_len=3D7]: Can't assign requested address > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Trying to > associate with ... (SSID=3D'FBI Surveillance Cat' freq=3D2437 MHz) > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: Associated with ...= > Jul 18 08:18:03 shiva kernel: wlan0: link state changed to UP > Jul 18 08:18:03 shiva dhclient[40889]: send_packet: No buffer space ava= ilable > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: WPA: Key > negotiation completed with ... [PTK=3DCCMP GTK=3DCCMP] > Jul 18 08:18:03 shiva wpa_supplicant[63771]: wlan0: > CTRL-EVENT-CONNECTED - Connection to ... completed [id=3D0 id_str=3D] > Jul 18 08:18:06 shiva dhclient[42269]: New IP Address (wlan0): 192.168.= 1.150 > Jul 18 08:18:06 shiva dhclient[42841]: New Subnet Mask (wlan0): 255.255= =2E255.0 > Jul 18 08:18:06 shiva dhclient[43080]: New Broadcast Address (wlan0): > 192.168.1.255 > Jul 18 08:18:06 shiva dhclient[43248]: New Routers (wlan0): 192.168.1.1= >=20 > Any idea what that might be about? My wpa_supplicant.conf is fairly > minimal with exactly one network specified. Hi, Yesterday I updated my notebook (with iwm(4)) and also noticed that wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart wlan0 helps. After your message I reinstalled wpa_supplicant from old source and now it works stable already about 2 hours. --=20 WBR, Andrey V. Elsukov --Y6JDaFon9mIYOWt8TMCBMBG1ArTlrSJsy-- --3MLaiEHdMK3ZgpYd5VLxjf7grYfjxWZQ1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAltQUEcACgkQAcXqBBDI oXqthQf+JeSrou3pBhwVPzkz/s0kS2p65d4GKsiLNyO1w3FB9o7r+JkPcsqdsBqz p+Y8IJYt4K3VeUTWddQ1P5mu460P7At7IMyNoxGzegxTZeMMM3cDgquLQTaZk1qd Vk5188RlR0FqBcnZXPvKskhTYILuVNcpwRqTQ+08XgJ/US93YMyfiueWRoDdjcNI zh+6I9YKjpin00+YVDP+jG8bM6uuW0X/o2Ef+TD7fybz3UF7hoTIGWKuv7A04R/B hB5TgyrQLJBavDyB4In4yaLoME8ISjH6ssIPzMxbavzPm68CcTnecI68CPVrRSc1 Q5WxUj/3L60wgX+zLEoi0WCdMnowJw== =lifp -----END PGP SIGNATURE----- --3MLaiEHdMK3ZgpYd5VLxjf7grYfjxWZQ1-- From owner-svn-src-head@freebsd.org Thu Jul 19 09:51:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73A9E102B0A2; Thu, 19 Jul 2018 09:51:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28C208890A; Thu, 19 Jul 2018 09:51:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 206FE17A6F; Thu, 19 Jul 2018 09:51:34 +0000 (UTC) Date: Thu, 19 Jul 2018 09:51:34 +0000 From: Alexey Dokuchaev To: "Andrey V. Elsukov" Cc: Kyle Evans , Cy Schubert , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... Message-ID: <20180719095134.GB52375@FreeBSD.org> References: <201807111853.w6BIrI9B080714@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 09:51:34 -0000 On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > ... > Yesterday I updated my notebook (with iwm(4)) and also noticed that > wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart > wlan0 helps. After your message I reinstalled wpa_supplicant from old > source and now it works stable already about 2 hours. So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ ./danfe From owner-svn-src-head@freebsd.org Thu Jul 19 10:14:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 425C5102C390; Thu, 19 Jul 2018 10:14:53 +0000 (UTC) (envelope-from royger@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 E6DBB89C53; Thu, 19 Jul 2018 10:14:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C90F727D2C; Thu, 19 Jul 2018 10:14:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JAEq6l032334; Thu, 19 Jul 2018 10:14:52 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JAEq1r032333; Thu, 19 Jul 2018 10:14:52 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807191014.w6JAEq1r032333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 10:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336475 - head/sys/xen/interface/arch-x86/hvm X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/xen/interface/arch-x86/hvm X-SVN-Commit-Revision: 336475 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 10:14:53 -0000 Author: royger Date: Thu Jul 19 10:14:52 2018 New Revision: 336475 URL: https://svnweb.freebsd.org/changeset/base/336475 Log: xen: add missing file from r336474 Added: head/sys/xen/interface/arch-x86/hvm/start_info.h (contents, props changed) Added: head/sys/xen/interface/arch-x86/hvm/start_info.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/xen/interface/arch-x86/hvm/start_info.h Thu Jul 19 10:14:52 2018 (r336475) @@ -0,0 +1,159 @@ +/* + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright (c) 2016, Citrix Systems, Inc. + */ + +#ifndef __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__ +#define __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__ + +/* + * Start of day structure passed to PVH guests and to HVM guests in %ebx. + * + * NOTE: nothing will be loaded at physical address 0, so a 0 value in any + * of the address fields should be treated as not present. + * + * 0 +----------------+ + * | magic | Contains the magic value XEN_HVM_START_MAGIC_VALUE + * | | ("xEn3" with the 0x80 bit of the "E" set). + * 4 +----------------+ + * | version | Version of this structure. Current version is 1. New + * | | versions are guaranteed to be backwards-compatible. + * 8 +----------------+ + * | flags | SIF_xxx flags. + * 12 +----------------+ + * | nr_modules | Number of modules passed to the kernel. + * 16 +----------------+ + * | modlist_paddr | Physical address of an array of modules + * | | (layout of the structure below). + * 24 +----------------+ + * | cmdline_paddr | Physical address of the command line, + * | | a zero-terminated ASCII string. + * 32 +----------------+ + * | rsdp_paddr | Physical address of the RSDP ACPI data structure. + * 40 +----------------+ + * | memmap_paddr | Physical address of the (optional) memory map. Only + * | | present in version 1 and newer of the structure. + * 48 +----------------+ + * | memmap_entries | Number of entries in the memory map table. Zero + * | | if there is no memory map being provided. Only + * | | present in version 1 and newer of the structure. + * 52 +----------------+ + * | reserved | Version 1 and newer only. + * 56 +----------------+ + * + * The layout of each entry in the module structure is the following: + * + * 0 +----------------+ + * | paddr | Physical address of the module. + * 8 +----------------+ + * | size | Size of the module in bytes. + * 16 +----------------+ + * | cmdline_paddr | Physical address of the command line, + * | | a zero-terminated ASCII string. + * 24 +----------------+ + * | reserved | + * 32 +----------------+ + * + * The layout of each entry in the memory map table is as follows: + * + * 0 +----------------+ + * | addr | Base address + * 8 +----------------+ + * | size | Size of mapping in bytes + * 16 +----------------+ + * | type | Type of mapping as defined between the hypervisor + * | | and guest. See XEN_HVM_MEMMAP_TYPE_* values below. + * 20 +----------------| + * | reserved | + * 24 +----------------+ + * + * The address and sizes are always a 64bit little endian unsigned integer. + * + * NB: Xen on x86 will always try to place all the data below the 4GiB + * boundary. + * + * Version numbers of the hvm_start_info structure have evolved like this: + * + * Version 0: Initial implementation. + * + * Version 1: Added the memmap_paddr/memmap_entries fields (plus 4 bytes of + * padding) to the end of the hvm_start_info struct. These new + * fields can be used to pass a memory map to the guest. The + * memory map is optional and so guests that understand version 1 + * of the structure must check that memmap_entries is non-zero + * before trying to read the memory map. + */ +#define XEN_HVM_START_MAGIC_VALUE 0x336ec578 + +/* + * The values used in the type field of the memory map table entries are + * defined below and match the Address Range Types as defined in the "System + * Address Map Interfaces" section of the ACPI Specification. Please refer to + * section 15 in version 6.2 of the ACPI spec: http://uefi.org/specifications + */ +#define XEN_HVM_MEMMAP_TYPE_RAM 1 +#define XEN_HVM_MEMMAP_TYPE_RESERVED 2 +#define XEN_HVM_MEMMAP_TYPE_ACPI 3 +#define XEN_HVM_MEMMAP_TYPE_NVS 4 +#define XEN_HVM_MEMMAP_TYPE_UNUSABLE 5 +#define XEN_HVM_MEMMAP_TYPE_DISABLED 6 +#define XEN_HVM_MEMMAP_TYPE_PMEM 7 + +/* + * C representation of the x86/HVM start info layout. + * + * The canonical definition of this layout is above, this is just a way to + * represent the layout described there using C types. + */ +struct hvm_start_info { + uint32_t magic; /* Contains the magic value 0x336ec578 */ + /* ("xEn3" with the 0x80 bit of the "E" set).*/ + uint32_t version; /* Version of this structure. */ + uint32_t flags; /* SIF_xxx flags. */ + uint32_t nr_modules; /* Number of modules passed to the kernel. */ + uint64_t modlist_paddr; /* Physical address of an array of */ + /* hvm_modlist_entry. */ + uint64_t cmdline_paddr; /* Physical address of the command line. */ + uint64_t rsdp_paddr; /* Physical address of the RSDP ACPI data */ + /* structure. */ + /* All following fields only present in version 1 and newer */ + uint64_t memmap_paddr; /* Physical address of an array of */ + /* hvm_memmap_table_entry. */ + uint32_t memmap_entries; /* Number of entries in the memmap table. */ + /* Value will be zero if there is no memory */ + /* map being provided. */ + uint32_t reserved; /* Must be zero. */ +}; + +struct hvm_modlist_entry { + uint64_t paddr; /* Physical address of the module. */ + uint64_t size; /* Size of the module in bytes. */ + uint64_t cmdline_paddr; /* Physical address of the command line. */ + uint64_t reserved; +}; + +struct hvm_memmap_table_entry { + uint64_t addr; /* Base address of the memory region */ + uint64_t size; /* Size of the memory region in bytes */ + uint32_t type; /* Mapping type */ + uint32_t reserved; /* Must be zero for Version 1. */ +}; + +#endif /* __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__ */ From owner-svn-src-head@freebsd.org Thu Jul 19 11:27:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ED6F102F543; Thu, 19 Jul 2018 11:27: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.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 0121F8C069; Thu, 19 Jul 2018 11:27: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 D5EFB28899; Thu, 19 Jul 2018 11:27: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 w6JBRBjX067781; Thu, 19 Jul 2018 11:27:11 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JBRB60067780; Thu, 19 Jul 2018 11:27:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807191127.w6JBRB60067780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 19 Jul 2018 11:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336476 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 336476 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 11:27:12 -0000 Author: manu Date: Thu Jul 19 11:27:11 2018 New Revision: 336476 URL: https://svnweb.freebsd.org/changeset/base/336476 Log: arm: Implement cpu_est_clockrate for armv[67] Modified: head/sys/arm/arm/machdep.c head/sys/arm/include/pcpu.h Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Thu Jul 19 10:14:52 2018 (r336475) +++ head/sys/arm/arm/machdep.c Thu Jul 19 11:27:11 2018 (r336476) @@ -272,8 +272,22 @@ cpu_flush_dcache(void *ptr, size_t len) int cpu_est_clockrate(int cpu_id, uint64_t *rate) { +#if __ARM_ARCH >= 6 + struct pcpu *pc; + pc = pcpu_find(cpu_id); + if (pc == NULL || rate == NULL) + return (EINVAL); + + if (pc->pc_clock == 0) + return (EOPNOTSUPP); + + *rate = pc->pc_clock; + + return (0); +#else return (ENXIO); +#endif } void Modified: head/sys/arm/include/pcpu.h ============================================================================== --- head/sys/arm/include/pcpu.h Thu Jul 19 10:14:52 2018 (r336475) +++ head/sys/arm/include/pcpu.h Thu Jul 19 11:27:11 2018 (r336476) @@ -65,7 +65,8 @@ struct vmspace; int pc_dbreg_cmd; \ int pc_bp_harden_kind; \ uint32_t pc_original_actlr; \ - char __pad[147] + uint64_t pc_clock; \ + char __pad[139] #else #define PCPU_MD_FIELDS \ char __pad[93] From owner-svn-src-head@freebsd.org Thu Jul 19 11:28:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45046102F62E; Thu, 19 Jul 2018 11:28:15 +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.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 E78738C1CE; Thu, 19 Jul 2018 11:28:14 +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 C8B072889B; Thu, 19 Jul 2018 11:28:14 +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 w6JBSEri067863; Thu, 19 Jul 2018 11:28:14 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JBSElX067862; Thu, 19 Jul 2018 11:28:14 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807191128.w6JBSElX067862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 19 Jul 2018 11:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336477 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 336477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 11:28:15 -0000 Author: manu Date: Thu Jul 19 11:28:14 2018 New Revision: 336477 URL: https://svnweb.freebsd.org/changeset/base/336477 Log: kern_cpu: When adding abs frequency allow for unordered insertion Keep the list ordered as some code assume that it is but allow for unordered cf_settings sets. Modified: head/sys/kern/kern_cpu.c Modified: head/sys/kern/kern_cpu.c ============================================================================== --- head/sys/kern/kern_cpu.c Thu Jul 19 11:27:11 2018 (r336476) +++ head/sys/kern/kern_cpu.c Thu Jul 19 11:28:14 2018 (r336477) @@ -680,7 +680,7 @@ cpufreq_insert_abs(struct cpufreq_softc *sc, struct cf { struct cf_level_lst *list; struct cf_level *level, *search; - int i; + int i, inserted; CF_MTX_ASSERT(&sc->lock); @@ -693,6 +693,7 @@ cpufreq_insert_abs(struct cpufreq_softc *sc, struct cf level->total_set = sets[i]; level->total_set.dev = NULL; sc->all_count++; + inserted = 0; if (TAILQ_EMPTY(list)) { CF_DEBUG("adding abs setting %d at head\n", @@ -701,15 +702,26 @@ cpufreq_insert_abs(struct cpufreq_softc *sc, struct cf continue; } - TAILQ_FOREACH_REVERSE(search, list, cf_level_lst, link) { + TAILQ_FOREACH_REVERSE(search, list, cf_level_lst, link) if (sets[i].freq <= search->total_set.freq) { CF_DEBUG("adding abs setting %d after %d\n", sets[i].freq, search->total_set.freq); TAILQ_INSERT_AFTER(list, search, level, link); + inserted = 1; break; } + + if (inserted == 0) { + TAILQ_FOREACH(search, list, link) + if (sets[i].freq >= search->total_set.freq) { + CF_DEBUG("adding abs setting %d before %d\n", + sets[i].freq, search->total_set.freq); + TAILQ_INSERT_BEFORE(search, level, link); + break; + } } } + return (0); } From owner-svn-src-head@freebsd.org Thu Jul 19 11:31:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B453102F96D; Thu, 19 Jul 2018 11:31:50 +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.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 1B2B98C592; Thu, 19 Jul 2018 11:31:50 +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 F0913289FE; Thu, 19 Jul 2018 11:31:49 +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 w6JBVnoh071752; Thu, 19 Jul 2018 11:31:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JBVnKr071751; Thu, 19 Jul 2018 11:31:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807191131.w6JBVnKr071751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 19 Jul 2018 11:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336478 - head/sys/dev/cpufreq X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/cpufreq X-SVN-Commit-Revision: 336478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 11:31:50 -0000 Author: manu Date: Thu Jul 19 11:31:49 2018 New Revision: 336478 URL: https://svnweb.freebsd.org/changeset/base/336478 Log: cpufreq_dt: Add operating-points-v2 support Oppv2 add more flexibility on regulator value for the core voltage amongst other new thing. For now only shared opp table is supported as I don't have hardware with non-shared opp table. Tested-On: OrangePi One (with oppv1 and oppv2) Tested-On: Pine64-LTS Modified: head/sys/dev/cpufreq/cpufreq_dt.c Modified: head/sys/dev/cpufreq/cpufreq_dt.c ============================================================================== --- head/sys/dev/cpufreq/cpufreq_dt.c Thu Jul 19 11:28:14 2018 (r336477) +++ head/sys/dev/cpufreq/cpufreq_dt.c Thu Jul 19 11:31:49 2018 (r336478) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2018 Emmanuel Vadot * Copyright (c) 2016 Jared McNeill * All rights reserved. * @@ -51,18 +52,35 @@ __FBSDID("$FreeBSD$"); #include "cpufreq_if.h" +#if 0 +#define DEBUG(dev, msg...) device_printf(dev, "cpufreq_dt: " msg); +#else +#define DEBUG(dev, msg...) +#endif + +enum opp_version { + OPP_V1 = 1, + OPP_V2, +}; + struct cpufreq_dt_opp { - uint32_t freq_khz; - uint32_t voltage_uv; + uint64_t freq; + uint32_t uvolt_target; + uint32_t uvolt_min; + uint32_t uvolt_max; + uint32_t uamps; + uint32_t clk_latency; + bool turbo_mode; + bool opp_suspend; }; struct cpufreq_dt_softc { + device_t dev; clk_t clk; regulator_t reg; struct cpufreq_dt_opp *opp; ssize_t nopp; - int clk_latency; cpuset_t cpus; }; @@ -70,7 +88,6 @@ struct cpufreq_dt_softc { static void cpufreq_dt_notify(device_t dev, uint64_t freq) { -#ifdef __aarch64__ struct cpufreq_dt_softc *sc; struct pcpu *pc; int cpu; @@ -83,21 +100,22 @@ cpufreq_dt_notify(device_t dev, uint64_t freq) pc->pc_clock = freq; } } -#endif } static const struct cpufreq_dt_opp * -cpufreq_dt_find_opp(device_t dev, uint32_t freq_mhz) +cpufreq_dt_find_opp(device_t dev, uint64_t freq) { struct cpufreq_dt_softc *sc; ssize_t n; sc = device_get_softc(dev); + DEBUG(dev, "Looking for freq %ju\n", freq); for (n = 0; n < sc->nopp; n++) - if (CPUFREQ_CMP(sc->opp[n].freq_khz / 1000, freq_mhz)) + if (CPUFREQ_CMP(sc->opp[n].freq, freq)) return (&sc->opp[n]); + DEBUG(dev, "Couldn't find one\n"); return (NULL); } @@ -110,10 +128,10 @@ cpufreq_dt_opp_to_setting(device_t dev, const struct c sc = device_get_softc(dev); memset(set, 0, sizeof(*set)); - set->freq = opp->freq_khz / 1000; - set->volts = opp->voltage_uv / 1000; + set->freq = opp->freq / 1000000; + set->volts = opp->uvolt_target / 1000; set->power = CPUFREQ_VAL_UNKNOWN; - set->lat = sc->clk_latency; + set->lat = opp->clk_latency; set->dev = dev; } @@ -126,15 +144,19 @@ cpufreq_dt_get(device_t dev, struct cf_setting *set) sc = device_get_softc(dev); + DEBUG(dev, "cpufreq_dt_get\n"); if (clk_get_freq(sc->clk, &freq) != 0) return (ENXIO); - opp = cpufreq_dt_find_opp(dev, freq / 1000000); - if (opp == NULL) + opp = cpufreq_dt_find_opp(dev, freq); + if (opp == NULL) { + device_printf(dev, "Can't find the current freq in opp\n"); return (ENOENT); + } cpufreq_dt_opp_to_setting(dev, opp, set); + DEBUG(dev, "Current freq %dMhz\n", set->freq); return (0); } @@ -144,42 +166,61 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * struct cpufreq_dt_softc *sc; const struct cpufreq_dt_opp *opp, *copp; uint64_t freq; - int error; + int error = 0; sc = device_get_softc(dev); - if (clk_get_freq(sc->clk, &freq) != 0) + if (clk_get_freq(sc->clk, &freq) != 0) { + device_printf(dev, "Can't get current clk freq\n"); return (ENXIO); + } - copp = cpufreq_dt_find_opp(dev, freq / 1000000); - if (copp == NULL) + DEBUG(sc->dev, "Current freq %ju\n", freq); + DEBUG(sc->dev, "Target freq %ju\n", (uint64_t)set->freq * 1000000); + copp = cpufreq_dt_find_opp(sc->dev, freq); + if (copp == NULL) { + device_printf(dev, "Can't find the current freq in opp\n"); return (ENOENT); - opp = cpufreq_dt_find_opp(dev, set->freq); - if (opp == NULL) + } + opp = cpufreq_dt_find_opp(sc->dev, set->freq * 1000000); + if (opp == NULL) { + device_printf(dev, "Couldn't find an opp for this freq\n"); return (EINVAL); + } - if (copp->voltage_uv < opp->voltage_uv) { - error = regulator_set_voltage(sc->reg, opp->voltage_uv, - opp->voltage_uv); - if (error != 0) + if (copp->uvolt_target < opp->uvolt_target) { + DEBUG(dev, "Changing regulator from %u to %u\n", + copp->uvolt_target, opp->uvolt_target); + error = regulator_set_voltage(sc->reg, + opp->uvolt_min, + opp->uvolt_max); + if (error != 0) { + DEBUG(dev, "Failed, backout\n"); return (ENXIO); + } } - error = clk_set_freq(sc->clk, (uint64_t)opp->freq_khz * 1000, 0); + DEBUG(dev, "Setting clk to %ju\n", opp->freq); + error = clk_set_freq(sc->clk, opp->freq, 0); if (error != 0) { + DEBUG(dev, "Failed, backout\n"); /* Restore previous voltage (best effort) */ - (void)regulator_set_voltage(sc->reg, copp->voltage_uv, - copp->voltage_uv); + error = regulator_set_voltage(sc->reg, + copp->uvolt_min, + copp->uvolt_max); return (ENXIO); } - if (copp->voltage_uv > opp->voltage_uv) { - error = regulator_set_voltage(sc->reg, opp->voltage_uv, - opp->voltage_uv); + if (copp->uvolt_target > opp->uvolt_target) { + error = regulator_set_voltage(sc->reg, + opp->uvolt_min, + opp->uvolt_max); if (error != 0) { + DEBUG(dev, "Failed to switch regulator to %d\n", + opp->uvolt_target); /* Restore previous CPU frequency (best effort) */ (void)clk_set_freq(sc->clk, - (uint64_t)copp->freq_khz * 1000, 0); + copp->freq, 0); return (ENXIO); } } @@ -207,6 +248,7 @@ cpufreq_dt_settings(device_t dev, struct cf_setting *s struct cpufreq_dt_softc *sc; ssize_t n; + DEBUG(dev, "cpufreq_dt_settings\n"); if (sets == NULL || count == NULL) return (EINVAL); @@ -234,11 +276,14 @@ cpufreq_dt_identify(driver_t *driver, device_t parent) node = ofw_bus_get_node(parent); /* The cpu@0 node must have the following properties */ - if (!OF_hasprop(node, "operating-points") || - !OF_hasprop(node, "clocks") || + if (!OF_hasprop(node, "clocks") || !OF_hasprop(node, "cpu-supply")) return; + if (!OF_hasprop(node, "operating-points") && + !OF_hasprop(node, "operating-points-v2")) + return; + if (device_find_child(parent, "cpufreq_dt", -1) != NULL) return; @@ -253,26 +298,143 @@ cpufreq_dt_probe(device_t dev) node = ofw_bus_get_node(device_get_parent(dev)); - if (!OF_hasprop(node, "operating-points") || - !OF_hasprop(node, "clocks") || + if (!OF_hasprop(node, "clocks") || !OF_hasprop(node, "cpu-supply")) return (ENXIO); + if (!OF_hasprop(node, "operating-points") && + !OF_hasprop(node, "operating-points-v2")) + return (ENXIO); + device_set_desc(dev, "Generic cpufreq driver"); return (BUS_PROBE_GENERIC); } static int -cpufreq_dt_attach(device_t dev) +cpufreq_dt_oppv1_parse(struct cpufreq_dt_softc *sc, phandle_t node) { - struct cpufreq_dt_softc *sc; uint32_t *opp, lat; - phandle_t node, cnode; - uint64_t freq; ssize_t n; + + sc->nopp = OF_getencprop_alloc_multi(node, "operating-points", + sizeof(uint32_t) * 2, (void **)&opp); + if (sc->nopp == -1) + return (ENXIO); + + if (OF_getencprop(node, "clock-latency", &lat, sizeof(lat)) == -1) + lat = CPUFREQ_VAL_UNKNOWN; + + sc->opp = malloc(sizeof(*sc->opp) * sc->nopp, M_DEVBUF, M_WAITOK); + + for (n = 0; n < sc->nopp; n++) { + sc->opp[n].freq = opp[n * 2 + 0] * 1000; + sc->opp[n].uvolt_min = opp[n * 2 + 1]; + sc->opp[n].uvolt_max = sc->opp[n].uvolt_min; + sc->opp[n].uvolt_target = sc->opp[n].uvolt_min; + sc->opp[n].clk_latency = lat; + + if (bootverbose) + device_printf(sc->dev, "%ju.%03ju MHz, %u uV\n", + sc->opp[n].freq / 1000000, + sc->opp[n].freq % 1000000, + sc->opp[n].uvolt_target); + } + free(opp, M_OFWPROP); + + return (0); +} + +static int +cpufreq_dt_oppv2_parse(struct cpufreq_dt_softc *sc, phandle_t node) +{ + phandle_t opp, opp_table, opp_xref; + pcell_t cell[2]; + uint32_t *volts, lat; + int nvolt, i; + + if (OF_getencprop(node, "operating-points-v2", &opp_xref, + sizeof(opp_xref)) == -1) { + device_printf(sc->dev, "Cannot get xref to oppv2 table\n"); + return (ENXIO); + } + + opp_table = OF_node_from_xref(opp_xref); + if (opp_table == opp_xref) + return (ENXIO); + + if (!OF_hasprop(opp_table, "opp-shared")) { + device_printf(sc->dev, "Only opp-shared is supported\n"); + return (ENXIO); + } + + for (opp = OF_child(opp_table); opp > 0; opp = OF_peer(opp)) + sc->nopp += 1; + + sc->opp = malloc(sizeof(*sc->opp) * sc->nopp, M_DEVBUF, M_WAITOK); + + for (i = 0, opp_table = OF_child(opp_table); opp_table > 0; + opp_table = OF_peer(opp_table), i++) { + /* opp-hz is a required property */ + if (OF_getencprop(opp_table, "opp-hz", cell, + sizeof(cell)) == -1) + continue; + + sc->opp[i].freq = cell[0]; + sc->opp[i].freq <<= 32; + sc->opp[i].freq |= cell[1]; + + if (OF_getencprop(opp_table, "clock-latency", &lat, + sizeof(lat)) == -1) + sc->opp[i].clk_latency = CPUFREQ_VAL_UNKNOWN; + else + sc->opp[i].clk_latency = (int)lat; + + if (OF_hasprop(opp_table, "turbo-mode")) + sc->opp[i].turbo_mode = true; + if (OF_hasprop(opp_table, "opp-suspend")) + sc->opp[i].opp_suspend = true; + + nvolt = OF_getencprop_alloc_multi(opp_table, "opp-microvolt", + sizeof(*volts), (void **)&volts); + if (nvolt == 1) { + sc->opp[i].uvolt_target = volts[0]; + sc->opp[i].uvolt_min = volts[0]; + sc->opp[i].uvolt_max = volts[0]; + } else if (nvolt == 3) { + sc->opp[i].uvolt_target = volts[0]; + sc->opp[i].uvolt_min = volts[1]; + sc->opp[i].uvolt_max = volts[2]; + } else { + device_printf(sc->dev, + "Wrong count of opp-microvolt property\n"); + OF_prop_free(volts); + free(sc->opp, M_DEVBUF); + return (ENXIO); + } + OF_prop_free(volts); + + if (bootverbose) + device_printf(sc->dev, "%ju.%03ju Mhz (%u uV)\n", + sc->opp[i].freq / 1000000, + sc->opp[i].freq % 1000000, + sc->opp[i].uvolt_target); + } + return (0); +} + +static int +cpufreq_dt_attach(device_t dev) +{ + struct cpufreq_dt_softc *sc; + phandle_t node; + phandle_t cnode, opp, copp; int cpu; + uint64_t freq; + int rv = 0; + enum opp_version version; sc = device_get_softc(dev); + sc->dev = dev; node = ofw_bus_get_node(device_get_parent(dev)); if (regulator_get_by_ofw_property(dev, node, @@ -289,39 +451,41 @@ cpufreq_dt_attach(device_t dev) return (ENXIO); } - sc->nopp = OF_getencprop_alloc_multi(node, "operating-points", - sizeof(*sc->opp), (void **)&opp); - if (sc->nopp == -1) - return (ENXIO); - sc->opp = malloc(sizeof(*sc->opp) * sc->nopp, M_DEVBUF, M_WAITOK); - for (n = 0; n < sc->nopp; n++) { - sc->opp[n].freq_khz = opp[n * 2 + 0]; - sc->opp[n].voltage_uv = opp[n * 2 + 1]; - - if (bootverbose) - device_printf(dev, "%u.%03u MHz, %u uV\n", - sc->opp[n].freq_khz / 1000, - sc->opp[n].freq_khz % 1000, - sc->opp[n].voltage_uv); + if (OF_hasprop(node, "operating-points")) { + version = OPP_V1; + rv = cpufreq_dt_oppv1_parse(sc, node); + if (rv != 0) { + device_printf(dev, "Failed to parse opp-v1 table\n"); + return (rv); + } + OF_getencprop(node, "operating-points", &opp, + sizeof(opp)); + } else { + version = OPP_V2; + rv = cpufreq_dt_oppv2_parse(sc, node); + if (rv != 0) { + device_printf(dev, "Failed to parse opp-v2 table\n"); + return (rv); + } + OF_getencprop(node, "operating-points-v2", &opp, + sizeof(opp)); } - free(opp, M_OFWPROP); - if (OF_getencprop(node, "clock-latency", &lat, sizeof(lat)) == -1) - sc->clk_latency = CPUFREQ_VAL_UNKNOWN; - else - sc->clk_latency = (int)lat; - /* - * Find all CPUs that share the same voltage and CPU frequency - * controls. Start with the current node and move forward until - * the end is reached or a peer has an "operating-points" property. + * Find all CPUs that share the same opp table */ CPU_ZERO(&sc->cpus); cpu = device_get_unit(device_get_parent(dev)); for (cnode = node; cnode > 0; cnode = OF_peer(cnode), cpu++) { - if (cnode != node && OF_hasprop(cnode, "operating-points")) - break; - CPU_SET(cpu, &sc->cpus); + copp = -1; + if (version == OPP_V1) + OF_getencprop(cnode, "operating-points", &copp, + sizeof(copp)); + else if (version == OPP_V2) + OF_getencprop(cnode, "operating-points-v2", + &copp, sizeof(copp)); + if (opp == copp) + CPU_SET(cpu, &sc->cpus); } if (clk_get_freq(sc->clk, &freq) == 0) From owner-svn-src-head@freebsd.org Thu Jul 19 11:41:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACF461030099; Thu, 19 Jul 2018 11:41:54 +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.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 60FE98C9CE; Thu, 19 Jul 2018 11:41:54 +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 4239728B97; Thu, 19 Jul 2018 11:41:54 +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 w6JBfscW078080; Thu, 19 Jul 2018 11:41:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JBfrFp078079; Thu, 19 Jul 2018 11:41:53 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807191141.w6JBfrFp078079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 19 Jul 2018 11:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336479 - head/sys/dev/fdt X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/fdt X-SVN-Commit-Revision: 336479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 11:41:54 -0000 Author: manu Date: Thu Jul 19 11:41:53 2018 New Revision: 336479 URL: https://svnweb.freebsd.org/changeset/base/336479 Log: fdt_pinctrl: Add some TSLOG annotations While we see the time spent in the pin controller attach via the hooks in DEVICE_ATTACH, it is useful to see the time spent configuring the pins. Modified: head/sys/dev/fdt/fdt_pinctrl.c head/sys/dev/fdt/fdt_pinctrl_if.m Modified: head/sys/dev/fdt/fdt_pinctrl.c ============================================================================== --- head/sys/dev/fdt/fdt_pinctrl.c Thu Jul 19 11:31:49 2018 (r336478) +++ head/sys/dev/fdt/fdt_pinctrl.c Thu Jul 19 11:41:53 2018 (r336479) @@ -106,10 +106,15 @@ int fdt_pinctrl_register(device_t pinctrl, const char *pinprop) { phandle_t node; + int ret; + TSENTER(); node = ofw_bus_get_node(pinctrl); OF_device_register_xref(OF_xref_from_node(node), pinctrl); - return (pinctrl_register_children(pinctrl, node, pinprop)); + ret = pinctrl_register_children(pinctrl, node, pinprop); + TSEXIT(); + + return (ret); } static int @@ -118,6 +123,8 @@ pinctrl_configure_children(device_t pinctrl, phandle_t phandle_t node, *configs; int i, nconfigs; + TSENTER(); + for (node = OF_child(parent); node != 0; node = OF_peer(node)) { if (!ofw_bus_node_status_okay(node)) continue; @@ -138,6 +145,7 @@ pinctrl_configure_children(device_t pinctrl, phandle_t } OF_prop_free(configs); } + TSEXIT(); return (0); } Modified: head/sys/dev/fdt/fdt_pinctrl_if.m ============================================================================== --- head/sys/dev/fdt/fdt_pinctrl_if.m Thu Jul 19 11:31:49 2018 (r336478) +++ head/sys/dev/fdt/fdt_pinctrl_if.m Thu Jul 19 11:41:53 2018 (r336479) @@ -27,6 +27,7 @@ # #include +#include #include # @@ -35,11 +36,22 @@ INTERFACE fdt_pinctrl; +# Needed for timestamping device probe/attach calls +HEADER { + #include +} + # # Set pins to the specified configuration. The cfgxref arg is an xref phandle # to a descendent node (child, grandchild, ...) of the pinctrl device node. # Returns 0 on success or a standard errno value. # +PROLOG { + TSENTER2(device_get_name(pinctrl)); +} +EPILOG { + TSEXIT2(device_get_name(pinctrl)); +} METHOD int configure { device_t pinctrl; phandle_t cfgxref; From owner-svn-src-head@freebsd.org Thu Jul 19 11:58:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1C0F103091B; Thu, 19 Jul 2018 11:58:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79E468D1FB; Thu, 19 Jul 2018 11:58:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 1455425A83; Thu, 19 Jul 2018 11:58:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f179.google.com with SMTP id p6-v6so7034783ljc.5; Thu, 19 Jul 2018 04:58:17 -0700 (PDT) X-Gm-Message-State: AOUpUlFLlQtSBDIrBzf1w72Y7sO4E+nxdRWt2FIsSsQ6fmO9/O7oHtbd qEafayBmdujDPk5KYx+oVCl6lm51xxWjXmL7TA0= X-Google-Smtp-Source: AAOMgpdkVia5zpicznHlxglWXq6WndP/3zU1k6ci1dPwqdoP/+KvlDV4O1Fz3ioRdE3zCr/VbbAAi6C5VWCzb2+ub1E= X-Received: by 2002:a2e:2e02:: with SMTP id u2-v6mr7912715lju.77.1532001495785; Thu, 19 Jul 2018 04:58:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 04:57:55 -0700 (PDT) In-Reply-To: <20180719095134.GB52375@FreeBSD.org> References: <201807111853.w6BIrI9B080714@repo.freebsd.org> <20180719095134.GB52375@FreeBSD.org> From: Kyle Evans Date: Thu, 19 Jul 2018 06:57:55 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Alexey Dokuchaev Cc: "Andrey V. Elsukov" , Cy Schubert , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 11:58:18 -0000 On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev wrote: > On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >> ... >> Yesterday I updated my notebook (with iwm(4)) and also noticed that >> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart >> wlan0 helps. After your message I reinstalled wpa_supplicant from old >> source and now it works stable already about 2 hours. > > So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ Well, "broken". It's incredibly stable outside of rekeying events, and further testing shows that I don't actually notice these disconnects most of the time because it reassociates fast enough. I noticed it the first time because apparently I had both SSIDs from my AP uncommented in my wpa_supplicant.conf and it decided at that point to connect to the other one, which took a little longer. Contrary to Andrey's report, though, I don't have to kick wpa_supplicant at all. It will reassociate on its own every single time. From owner-svn-src-head@freebsd.org Thu Jul 19 12:09:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 727971031A68; Thu, 19 Jul 2018 12:09:55 +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 10E5D8DC66; Thu, 19 Jul 2018 12:09:54 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from [IPv6:2001:67c:1232:144:6041:44ed:1857:b362] (unknown [IPv6:2001:67c:1232:144:6041:44ed:1857:b362]) (Authenticated sender: macmic) by drew.franken.de (Postfix) with ESMTPSA id 82BC4721E280D; Thu, 19 Jul 2018 14:09:50 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336465 - in head/sys/netinet: . tcp_stacks From: Michael Tuexen In-Reply-To: Date: Thu, 19 Jul 2018 08:09:48 -0400 Cc: Randall Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7FC7DAA2-9B03-4D89-A878-7706EDE4294A@macmic.franken.de> References: <201807182249.w6IMns6D076446@repo.freebsd.org> To: Maxim Konovalov X-Mailer: Apple Mail (2.3445.9.1) 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-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 12:09:55 -0000 > On 19. Jul 2018, at 03:12, Maxim Konovalov = wrote: >=20 > Hi Randall, >=20 > On Wed, 18 Jul 2018, 22:49-0000, Randall Stewart wrote: >=20 >> Author: rrs >> Date: Wed Jul 18 22:49:53 2018 >> New Revision: 336465 >> URL: https://svnweb.freebsd.org/changeset/base/336465 >>=20 >> Log: >> Bump the ICMP echo limits to match the RFC >>=20 > [...] >=20 > Just wonder, are there any practical reasons to do that? In case you send encapsulated packets triggering an ICMP message you actually need more than the 8 bytes which are currently reflected. The number 8 comes from RFC 792, which was published 1981. The new number comes from RFC 1812, which was published 1995. >=20 > While I don't see any meaningful vectors right now this could > potentially make amplification DoS easier, no? I don't think so. When sending packets smaller than 576 - 20 - 8, you get a byte amplification of 8 bytes. Please note that IPv6 already reflects as much as fits in a single packet. So this is not something completely new... Best regards Michael >=20 > --=20 > Maxim Konovalov >=20 From owner-svn-src-head@freebsd.org Thu Jul 19 12:13:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0BD71031DC3; Thu, 19 Jul 2018 12:13:45 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::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 35E508E0D2; Thu, 19 Jul 2018 12:13:45 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 41WXww63KnzDhbF; Thu, 19 Jul 2018 12:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=daemonic.se; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=20151023; t=1532002416; bh=j5VL/wydM7TizA4cIQRozNn9 MCC8iYtdQTwDiZ6tJXg=; b=PIQOZU3iCCJPABYoDt9glPGodgXocawYDdfQ/0AM GFSEoPQmUdotozE5yP1TkAl5X65BySZ42I8uuFbvynYR3wBaxW0OPGb9szjEyXFf ZlcJBxqx7Z81sdmE5AEVfCgI4VAJPMdfAlCWYcXZ7rnz+R46yJTY7jdiTr6uBtOf PMg= X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([127.0.0.1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [127.0.0.1]) (amavisd-new, port 10587) with ESMTPS id BdTEcuqv9sSP; Thu, 19 Jul 2018 12:13:36 +0000 (UTC) Received: from garnet.daemonic.se (host-90-233-177-252.mobileonline.telia.com [90.233.177.252]) by mail.daemonic.se (Postfix) with ESMTPSA id 41WXwv6mjBzDhFd; Thu, 19 Jul 2018 12:13:35 +0000 (UTC) Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Kyle Evans , Alexey Dokuchaev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Andrey V. Elsukov" , src-committers , Cy Schubert References: <201807111853.w6BIrI9B080714@repo.freebsd.org> <20180719095134.GB52375@FreeBSD.org> From: Niclas Zeising Message-ID: <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se> Date: Thu, 19 Jul 2018 14:13:35 +0200 User-Agent: Mutt/1.5.21 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 12:13:45 -0000 [ sending this again since I missed the list the first time, apologies if anyone receives a duplicate ] On 07/19/18 13:57, Kyle Evans wrote: > On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev wrote: >> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >>> ... >>> Yesterday I updated my notebook (with iwm(4)) and also noticed that >>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart >>> wlan0 helps. After your message I reinstalled wpa_supplicant from old >>> source and now it works stable already about 2 hours. >> >> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ > > Well, "broken". It's incredibly stable outside of rekeying events, and > further testing shows that I don't actually notice these disconnects > most of the time because it reassociates fast enough. I noticed it the > first time because apparently I had both SSIDs from my AP uncommented > in my wpa_supplicant.conf and it decided at that point to connect to > the other one, which took a little longer. > > Contrary to Andrey's report, though, I don't have to kick > wpa_supplicant at all. It will reassociate on its own every single > time. Hi! I have the exact same problem as Andrey, with the same driver. I've not investigated very much, but when using the 2.8 wpa_supplicant the wifi network dies after a little while, and I have to restart it (usually with /etc/rc.d/netif restart). Then it works for a little while, before going down again. With the old wpa_supplicant I didn't have this problem. I don't have very much else to add except noting that I'm affected as well. I haven't had time to debug it properly (which is why I've never reported it) Regards -- Niclas From owner-svn-src-head@freebsd.org Thu Jul 19 12:56:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B1AB1033DF3; Thu, 19 Jul 2018 12:56:55 +0000 (UTC) (envelope-from br@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 296D58F8EE; Thu, 19 Jul 2018 12:56:55 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A2BF29790; Thu, 19 Jul 2018 12:56:55 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JCusxE014343; Thu, 19 Jul 2018 12:56:54 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JCusav014342; Thu, 19 Jul 2018 12:56:54 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807191256.w6JCusav014342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 19 Jul 2018 12:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336480 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 12:56:55 -0000 Author: br Date: Thu Jul 19 12:56:54 2018 New Revision: 336480 URL: https://svnweb.freebsd.org/changeset/base/336480 Log: Add a GCC 7.1.0 no-error warning flag. This is required to build libdevdctl. Note this flag is not required for GCC 8.1.0. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Thu Jul 19 11:41:53 2018 (r336479) +++ head/share/mk/bsd.sys.mk Thu Jul 19 12:56:54 2018 (r336480) @@ -149,6 +149,7 @@ CWARNFLAGS+= -Wno-error=bool-operation \ -Wno-error=implicit-fallthrough \ -Wno-error=int-in-bool-context \ -Wno-error=memset-elt-size \ + -Wno-error=noexcept-type \ -Wno-error=nonnull \ -Wno-error=pointer-compare \ -Wno-error=stringop-overflow From owner-svn-src-head@freebsd.org Thu Jul 19 12:58:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2B3B1033EB5; Thu, 19 Jul 2018 12:58:10 +0000 (UTC) (envelope-from 0mp@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 A48A08FA60; Thu, 19 Jul 2018 12:58:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85B0D29791; Thu, 19 Jul 2018 12:58:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JCwAPG014505; Thu, 19 Jul 2018 12:58:10 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JCwAHJ014504; Thu, 19 Jul 2018 12:58:10 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201807191258.w6JCwAHJ014504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 19 Jul 2018 12:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336481 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 336481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 12:58:11 -0000 Author: 0mp (ports committer) Date: Thu Jul 19 12:58:10 2018 New Revision: 336481 URL: https://svnweb.freebsd.org/changeset/base/336481 Log: Update mentor and mentee information. Reviewed by: mat (mentor) Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D16295 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Thu Jul 19 12:56:54 2018 (r336480) +++ head/share/misc/committers-ports.dot Thu Jul 19 12:58:10 2018 (r336481) @@ -40,6 +40,7 @@ node [color=lightblue2, style=filled, bgcolor=black]; # Current ports committers go here. Try to keep things sorted. +0mp [label="Mateusz Piotrowski\n0mp@FreeBSD.org\n2018/06/16"] ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] acm [label="Jose Alonso Cardenas Marquez\nacm@FreeBSD.org\n2006/07/18"] adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16"] @@ -480,6 +481,7 @@ koobs -> kami koobs -> woodsb02 koobs -> xmj +krion -> 0mp krion -> brooks krion -> miwi krion -> novel @@ -525,6 +527,7 @@ makc -> bf makc -> jhale makc -> rakuco +mat -> 0mp mat -> bmah mat -> dteske mat -> dvl From owner-svn-src-head@freebsd.org Thu Jul 19 13:02:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCF2910342D8; Thu, 19 Jul 2018 13:02:30 +0000 (UTC) (envelope-from br@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 7F2EE8FEDC; Thu, 19 Jul 2018 13:02:30 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6061129923; Thu, 19 Jul 2018 13:02:30 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JD2U62019145; Thu, 19 Jul 2018 13:02:30 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JD2UKJ019144; Thu, 19 Jul 2018 13:02:30 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807191302.w6JD2UKJ019144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 19 Jul 2018 13:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336482 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:02:31 -0000 Author: br Date: Thu Jul 19 13:02:29 2018 New Revision: 336482 URL: https://svnweb.freebsd.org/changeset/base/336482 Log: PROFILE, TESTS and CXX build options are no longer broken for RISC-V. Sponsored by: DARPA, AFRL Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Jul 19 12:58:10 2018 (r336481) +++ head/share/mk/src.opts.mk Thu Jul 19 13:02:29 2018 (r336482) @@ -299,11 +299,6 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_C .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB .endif -.if ${__T:Mriscv*} != "" -BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" -BROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" -BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" -.endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ ${__T:Mriscv*} != "" || ${__TT} == "mips" __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND From owner-svn-src-head@freebsd.org Thu Jul 19 13:09:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D4451034A4F; Thu, 19 Jul 2018 13:09:30 +0000 (UTC) (envelope-from 0mp@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 E4E4E903D7; Thu, 19 Jul 2018 13:09:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1A3729930; Thu, 19 Jul 2018 13:09:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JD9Toq019468; Thu, 19 Jul 2018 13:09:29 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JD9TeU019467; Thu, 19 Jul 2018 13:09:29 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201807191309.w6JD9TeU019467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 19 Jul 2018 13:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336483 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 336483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:09:30 -0000 Author: 0mp (ports committer) Date: Thu Jul 19 13:09:29 2018 New Revision: 336483 URL: https://svnweb.freebsd.org/changeset/base/336483 Log: Describe how to prevent *.core files from being created using ulimit. While here, pet mandoc. Reviewed by: eadler (previous revision), jilles (previous revision), mat (mentor) Approved by: manpages (jilles), mat (mentor) Differential Revision: https://reviews.freebsd.org/D15609 Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Thu Jul 19 13:02:29 2018 (r336482) +++ head/bin/sh/sh.1 Thu Jul 19 13:09:29 2018 (r336483) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd October 8, 2016 +.Dd July 19, 2018 .Dt SH 1 .Os .Sh NAME @@ -69,8 +69,7 @@ is close to the .St -p1003.1 specification for the shell. It only supports features -designated by -.Tn POSIX , +designated by POSIX, plus a few Berkeley extensions. This man page is not intended to be a tutorial nor a complete specification of the shell. @@ -248,9 +247,7 @@ particularly in larger scripts. .It Fl f Li noglob Disable pathname expansion. .It Fl h Li trackall -A do-nothing option for -.Tn POSIX -compliance. +A do-nothing option for POSIX compliance. .It Fl I Li ignoreeof Ignore .Dv EOF Ap s @@ -344,9 +341,7 @@ variable subjected to parameter expansion and arithmet to standard error before it is executed. Useful for debugging. .It Li nolog -Another do-nothing option for -.Tn POSIX -compliance. +Another do-nothing option for POSIX compliance. It only has a long name. .El .Pp @@ -409,7 +404,7 @@ The word starting with .Ql # and the rest of the line are ignored. .Pp -.Tn ASCII +ASCII .Dv NUL characters (character code 0) are not allowed in shell input. .Ss Quoting @@ -447,9 +442,7 @@ If .Ar c is a backslash, it must be doubled. .It \ee -The ESC character -.Tn ( ASCII -0x1b) +The ESC character (ASCII 0x1b) .It \ef Formfeed .It \en @@ -745,9 +738,7 @@ passing the arguments and the environment to the progr If the program is not a normal executable file (i.e., if it does not begin with the .Dq "magic number" -whose -.Tn ASCII -representation is +whose ASCII representation is .Dq Li #! , resulting in an .Er ENOEXEC @@ -1064,12 +1055,17 @@ command. .Ss Grouping Commands Together Commands may be grouped by writing either .Pp -.D1 Li \&( Ns Ar list Ns Li \%) +.Sm off +.Bd -literal -offset -ident +.Po Ar list Pc +.Ed +.Sm on .Pp or +.Bd -literal -offset -ident +.No { Ar list ; } +.Ed .Pp -.D1 Li { Ar list Ns Li \&; } -.Pp The first form executes the commands in a subshell environment. A subshell environment has its own copy of: .Bl -enum @@ -1750,11 +1746,11 @@ and contain integer constants. .It Unary operators .Li "! ~ + -" .It Binary operators -.Li "* / % + - << >> < <= > >= == != & ^ | && ||" +.Li "* / % + - << >> < <= > >= == != & ^ | && ||"\& .It Assignment operators .Li "= += -= *= /= %= <<= >>= &= ^= |=" .It Conditional operator -.Li "? :" +.Li "? :"\& .El .Pp The result of the expression is substituted in decimal. @@ -1862,7 +1858,7 @@ A locale-dependent range of characters may be specifie A named class of characters (see .Xr wctype 3 ) may be specified by surrounding the name with -.Ql \&[: +.Ql \&[:\& and .Ql :\&] . For example, @@ -2099,9 +2095,7 @@ Backspace Suppress the trailing newline (this has the side-effect of truncating the line if it is not the last character) .It \ee -The ESC character -.Tn ( ASCII -0x1b) +The ESC character (ASCII 0x1b) .It \ef Formfeed .It \en @@ -2301,8 +2295,7 @@ Move the specified .Ar job or the current job to the foreground. .It Ic getopts Ar optstring var -The -.Tn POSIX +The POSIX .Ic getopts command. The @@ -2415,7 +2408,7 @@ read from the standard input. The trailing newline is deleted from the line and the line is split as described in the section on -.Sx White Space Splitting (Field Splitting) +.Sx White Space Splitting (Field Splitting)\& above, and the pieces are assigned to the variables in order. If there are more pieces than variables, the remaining @@ -2663,6 +2656,9 @@ They are mutually exclusive. The maximum size of socket buffer usage, in bytes. .It Fl c Ar coredumpsize The maximal size of core dump files, in 512-byte blocks. +Setting +.Ar coredumpsize +to 0 prevents core dump files from being created. .It Fl d Ar datasize The maximal size of the data segment of a process, in kilobytes. .It Fl f Ar filesize From owner-svn-src-head@freebsd.org Thu Jul 19 13:18:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 659F310352E3; Thu, 19 Jul 2018 13:18:22 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) (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 D3FB390BBA; Thu, 19 Jul 2018 13:18:21 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.15.2/8.15.2) with ESMTP id w6JDIIxr082534; Thu, 19 Jul 2018 16:18:19 +0300 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Thu, 19 Jul 2018 16:18:18 +0300 (MSK) From: Maxim Konovalov To: Michael Tuexen cc: Randall Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336465 - in head/sys/netinet: . tcp_stacks In-Reply-To: <7FC7DAA2-9B03-4D89-A878-7706EDE4294A@macmic.franken.de> Message-ID: References: <201807182249.w6IMns6D076446@repo.freebsd.org> <7FC7DAA2-9B03-4D89-A878-7706EDE4294A@macmic.franken.de> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:18:22 -0000 On Thu, 19 Jul 2018, 08:09-0400, Michael Tuexen wrote: > > On 19. Jul 2018, at 03:12, Maxim Konovalov wrote: > > > > Hi Randall, > > > > On Wed, 18 Jul 2018, 22:49-0000, Randall Stewart wrote: > > > >> Author: rrs > >> Date: Wed Jul 18 22:49:53 2018 > >> New Revision: 336465 > >> URL: https://svnweb.freebsd.org/changeset/base/336465 > >> > >> Log: > >> Bump the ICMP echo limits to match the RFC > >> > > [...] > > > > Just wonder, are there any practical reasons to do that? > In case you send encapsulated packets triggering an ICMP message > you actually need more than the 8 bytes which are currently > reflected. OK, let me rephrase: why do you need more than 8 bytes? It looks like it has been working rather well for 20+ years. -- Maxim Konovalov From owner-svn-src-head@freebsd.org Thu Jul 19 13:20:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C85103546C; Thu, 19 Jul 2018 13:20:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 6EF3490E05; Thu, 19 Jul 2018 13:20:17 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id g8qkfLSbaWppDg8qmfrkKX; Thu, 19 Jul 2018 07:20:09 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=SPltrmjszIV7yBzQ0sIA: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 55034A0C; Thu, 19 Jul 2018 06:20:06 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6JDK6Kf033735; Thu, 19 Jul 2018 06:20:06 -0700 (PDT) (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 w6JDK2hD033732; Thu, 19 Jul 2018 06:20:05 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807191320.w6JDK2hD033732@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: Niclas Zeising cc: Kyle Evans , Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Andrey V. Elsukov" , src-committers , Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Niclas Zeising of "Thu, 19 Jul 2018 14:13:35 +0200." <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 06:20:02 -0700 X-CMAE-Envelope: MS4wfEbojZjntjYi8lni4QpFUetXNiuW90l3WSkFpyovfnC8JUOsSo0KUZFkDD7v1u++82shjAX1EUFSDufltEIw3xeUMhq5ibDn7KI0o04VUvpxsUTacLNJ fjd/l+/U9OKooM2FlQT+eGdTjhIIJRdFRurguP56ldieTk8ui3jt36fQrHnP2hk4fQiqQT6pQozV25R6qNKpyByLA8uVsesj9LsExhSWMDphhA6tvgWMvMBE tp8sSU6m/tuCw92ilr3nkUZr0nddMQqBF4eFKcb8lqjE83Z8zkkQyjiBw4Xv8H9FSq0A+fzLSc72lNVxKJdMbOXSSYzA7xlEVRp2gXUhOQQWhv4AZPHsPY/O TCPCAFZNi2722CZivkL6/l/r2k0D9w== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:20:18 -0000 In message <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se>, Niclas Zeising w rites: > [ sending this again since I missed the list the first time, apologies > if anyone receives a duplicate ] > > On 07/19/18 13:57, Kyle Evans wrote: > > On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev wrote > : > >> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > >>> ... > >>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > >>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart > >>> wlan0 helps. After your message I reinstalled wpa_supplicant from old > >>> source and now it works stable already about 2 hours. > >> > >> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ > > > > Well, "broken". It's incredibly stable outside of rekeying events, and > > further testing shows that I don't actually notice these disconnects > > most of the time because it reassociates fast enough. I noticed it the > > first time because apparently I had both SSIDs from my AP uncommented > > in my wpa_supplicant.conf and it decided at that point to connect to > > the other one, which took a little longer. > > > > Contrary to Andrey's report, though, I don't have to kick > > wpa_supplicant at all. It will reassociate on its own every single > > time. > > > Hi! > I have the exact same problem as Andrey, with the same driver. I've not > investigated very much, but when using the 2.8 wpa_supplicant the wifi > network dies after a little while, and I have to restart it (usually > with /etc/rc.d/netif restart). Then it works for a little while, before > going down again. With the old wpa_supplicant I didn't have this problem. > > I don't have very much else to add except noting that I'm affected as > well. I haven't had time to debug it properly (which is why I've never > reported it) Do these events happen at regular intervals as Kyle experienced or randomly? What sort of key_mgmt do you connect with to your AP? Could it be WPA-EAP? -- 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-head@freebsd.org Thu Jul 19 13:25:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BBEF10359BF; Thu, 19 Jul 2018 13:25:07 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from mail.daemonic.se (mail.daemonic.se [176.58.89.161]) (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 A845A91375; Thu, 19 Jul 2018 13:25:06 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 41WZWN5jS8zDhb5; Thu, 19 Jul 2018 13:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=daemonic.se; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=20151023; t=1532006704; bh=YHGypqYcKebRTYJfsLFUrzxX lgo/S5zdw6M6gbQ0rQs=; b=WjTT7HkZMKLOBu8Gg7n4ZcgzlmBrSyk6AFA+NalH Qg4w9uLVlsk1386aMlYgzV72tL8E8iJ3ErYwFEYrAnRo+herVcvfOnne4MMgJ4cI 3Sjkt8LmuuxAOo6osexf6+akLFN0+BNu+aB0dleKIidGaLYSbcpE0y62YuFJspLV KT4= X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([IPv6:::1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [IPv6:::1]) (amavisd-new, port 10587) with ESMTPS id iaRW9bDffdg1; Thu, 19 Jul 2018 13:25:04 +0000 (UTC) Received: from garnet.daemonic.se (host-90-233-177-252.mobileonline.telia.com [90.233.177.252]) by mail.daemonic.se (Postfix) with ESMTPSA id 41WZWM5NK8zDhFd; Thu, 19 Jul 2018 13:25:03 +0000 (UTC) Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Cy Schubert Cc: Kyle Evans , Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Andrey V. Elsukov" , src-committers , Cy Schubert References: <201807191320.w6JDK2hD033732@slippy.cwsent.com> From: Niclas Zeising Message-ID: Date: Thu, 19 Jul 2018 15:25:02 +0200 User-Agent: Mutt/1.5.21 MIME-Version: 1.0 In-Reply-To: <201807191320.w6JDK2hD033732@slippy.cwsent.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:25:07 -0000 On 07/19/18 15:20, Cy Schubert wrote: > In message <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se>, Niclas > Zeising w > rites: >> [ sending this again since I missed the list the first time, apologies >> if anyone receives a duplicate ] >> >> On 07/19/18 13:57, Kyle Evans wrote: >>> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev wrote >> : >>>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >>>>> ... >>>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that >>>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart >>>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old >>>>> source and now it works stable already about 2 hours. >>>> >>>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ >>> >>> Well, "broken". It's incredibly stable outside of rekeying events, and >>> further testing shows that I don't actually notice these disconnects >>> most of the time because it reassociates fast enough. I noticed it the >>> first time because apparently I had both SSIDs from my AP uncommented >>> in my wpa_supplicant.conf and it decided at that point to connect to >>> the other one, which took a little longer. >>> >>> Contrary to Andrey's report, though, I don't have to kick >>> wpa_supplicant at all. It will reassociate on its own every single >>> time. >> >> >> Hi! >> I have the exact same problem as Andrey, with the same driver. I've not >> investigated very much, but when using the 2.8 wpa_supplicant the wifi >> network dies after a little while, and I have to restart it (usually >> with /etc/rc.d/netif restart). Then it works for a little while, before >> going down again. With the old wpa_supplicant I didn't have this problem. >> >> I don't have very much else to add except noting that I'm affected as >> well. I haven't had time to debug it properly (which is why I've never >> reported it) > > Do these events happen at regular intervals as Kyle experienced or > randomly? > > What sort of key_mgmt do you connect with to your AP? Could it be > WPA-EAP? > > I do not know if it is random or not, I haven't timed it. It usually happens quite soon after a reboot. All nets I've tested have been WPA2 PSK. I've had the difference connecting to at least two different hotspots, once dual band 2.4/5GHz (although the NIC used 2.4GHz) and one with only 5 GHz. Regards -- Niclas From owner-svn-src-head@freebsd.org Thu Jul 19 13:26:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EDD11035A83; Thu, 19 Jul 2018 13:26:12 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33190914EB; Thu, 19 Jul 2018 13:26:12 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C79DB2639E; Thu, 19 Jul 2018 13:26:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f44.google.com with SMTP id m12-v6so815lfc.10; Thu, 19 Jul 2018 06:26:11 -0700 (PDT) X-Gm-Message-State: AOUpUlENqSXK1SI2MZvsqe/YJAg/vTWndjOHgis1etBRGqCv0s/ArLM/ LnXLWSOwpfC0LsRPMCH6rkXhO2OVToHsyiGL0GY= X-Google-Smtp-Source: AAOMgpeEpCsARnzyQ9buVyXy+lh4wIz8m9TRUUTi/RrCDLnHv1DLfvOLn3K31SDj/DXOI6TxnewDP0JJ8mMFZJMeMso= X-Received: by 2002:a19:9481:: with SMTP id o1-v6mr7004700lfk.38.1532006770356; Thu, 19 Jul 2018 06:26:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 06:25:49 -0700 (PDT) In-Reply-To: <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se> References: <201807111853.w6BIrI9B080714@repo.freebsd.org> <20180719095134.GB52375@FreeBSD.org> <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se> From: Kyle Evans Date: Thu, 19 Jul 2018 08:25:49 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Niclas Zeising Cc: Kyle Evans , Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Andrey V. Elsukov" , src-committers , Cy Schubert Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:26:12 -0000 On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising wrote: > [ sending this again since I missed the list the first time, apologies if > anyone receives a duplicate ] > > > On 07/19/18 13:57, Kyle Evans wrote: >> >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev >> wrote: >>> >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >>>> >>>> ... >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old >>>> source and now it works stable already about 2 hours. >>> >>> >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ >> >> >> Well, "broken". It's incredibly stable outside of rekeying events, and >> further testing shows that I don't actually notice these disconnects >> most of the time because it reassociates fast enough. I noticed it the >> first time because apparently I had both SSIDs from my AP uncommented >> in my wpa_supplicant.conf and it decided at that point to connect to >> the other one, which took a little longer. >> >> Contrary to Andrey's report, though, I don't have to kick >> wpa_supplicant at all. It will reassociate on its own every single >> time. > > > > Hi! > I have the exact same problem as Andrey, with the same driver. I've not > investigated very much, but when using the 2.8 wpa_supplicant the wifi > network dies after a little while, and I have to restart it (usually with > /etc/rc.d/netif restart). Then it works for a little while, before going > down again. With the old wpa_supplicant I didn't have this problem. > > I don't have very much else to add except noting that I'm affected as well. > I haven't had time to debug it properly (which is why I've never reported > it) I plan on trying out the latest from upstream beyond the patch Cy sent along earlier to see if it's perhaps been addressed elsewhere in the past two years since this release was made. From owner-svn-src-head@freebsd.org Thu Jul 19 13:37:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18A74103A215; Thu, 19 Jul 2018 13:37:22 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC9FB91C60; Thu, 19 Jul 2018 13:37:21 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id B1F281B9A6; Thu, 19 Jul 2018 13:37:21 +0000 (UTC) Date: Thu, 19 Jul 2018 15:37:21 +0200 From: "Piotr P. Stefaniak" To: Mateusz Piotrowski <0mp@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336481 - head/share/misc Message-ID: <20180719133721.GF53055@freefall.freebsd.org> References: <201807191258.w6JCwAHJ014504@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <201807191258.w6JCwAHJ014504@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:37:22 -0000 On 2018-07-19 12:58:10, Mateusz Piotrowski wrote: >Author: 0mp (ports committer) >Date: Thu Jul 19 12:58:10 2018 >New Revision: 336481 >URL: https://svnweb.freebsd.org/changeset/base/336481 > >Log: > Update mentor and mentee information. > > Reviewed by: mat (mentor) > Approved by: mat (mentor) > Differential Revision: https://reviews.freebsd.org/D16295 > >Modified: > head/share/misc/committers-ports.dot > >Modified: head/share/misc/committers-ports.dot >============================================================================== >--- head/share/misc/committers-ports.dot Thu Jul 19 12:56:54 2018 (r336480) >+++ head/share/misc/committers-ports.dot Thu Jul 19 12:58:10 2018 (r336481) >@@ -40,6 +40,7 @@ node [color=lightblue2, style=filled, bgcolor=black]; > > # Current ports committers go here. Try to keep things sorted. > >+0mp [label="Mateusz Piotrowski\n0mp@FreeBSD.org\n2018/06/16"] > ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] dot(1) doesn't like this. From owner-svn-src-head@freebsd.org Thu Jul 19 13:54:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A01E103ACC9; Thu, 19 Jul 2018 13:54:46 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 B6D3792816; Thu, 19 Jul 2018 13:54:45 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id g9OFfLZnXWppDg9OGfrodi; Thu, 19 Jul 2018 07:54:44 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=FIMBM9iY4BZSq5QqqwYA:9 a=CjuIK1q_8ugA:10 a=IfaqVvZgccqrtc8gcwf2: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 DE76DB00; Thu, 19 Jul 2018 06:54:42 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6JDsgHI034012; Thu, 19 Jul 2018 06:54:42 -0700 (PDT) (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 w6JDsgo7034009; Thu, 19 Jul 2018 06:54:42 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807191354.w6JDsgo7034009@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: Kyle Evans cc: Niclas Zeising , Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Andrey V. Elsukov" , src-committers , Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Kyle Evans of "Thu, 19 Jul 2018 08:25:49 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 06:54:42 -0700 X-CMAE-Envelope: MS4wfB+QS6T0SKAt5Ro2r2EqUtMR+aKE4p8yoiyc1FKSrgkn2jaJNxpt5x87erwShSNRQEW5CSlyc5afMnEAzWqQYPS/KVrfw8sZ2tKFl7us1h2bfU1rBLvF aLrlAbf6D0F/7iIWli8YWJ0wHTq2ubLsOZRi2AG4egzkL6IqPiGTevDchQRi2Z19ZASod7MZVCmkauE0NCCZk14S0enkC3e0NYL05bgWwTWhR7aMvnXFNEsu fnWZIZDhillBvVbM/Q1zMP9+sbEm/FWZTe7dpxd7TU8nV+zMvSHmWJRGY2uFMN3AnY2dkm134RajQsgSsZ5pKFUpC1nM+3Xt1wDXo5IfR58K89n3jy1pzCOb 3FOXJ2vz8g1+HCQ7gE0UUdI7zLf3fQ== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 13:54:46 -0000 In message , Kyle Evans writes: > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > wrote: > > [ sending this again since I missed the list the first time, apologies if > > anyone receives a duplicate ] > > > > > > On 07/19/18 13:57, Kyle Evans wrote: > >> > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > >> wrote: > >>> > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > >>>> > >>>> ... > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old > >>>> source and now it works stable already about 2 hours. > >>> > >>> > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ > >> > >> > >> Well, "broken". It's incredibly stable outside of rekeying events, and > >> further testing shows that I don't actually notice these disconnects > >> most of the time because it reassociates fast enough. I noticed it the > >> first time because apparently I had both SSIDs from my AP uncommented > >> in my wpa_supplicant.conf and it decided at that point to connect to > >> the other one, which took a little longer. > >> > >> Contrary to Andrey's report, though, I don't have to kick > >> wpa_supplicant at all. It will reassociate on its own every single > >> time. > > > > > > > > Hi! > > I have the exact same problem as Andrey, with the same driver. I've not > > investigated very much, but when using the 2.8 wpa_supplicant the wifi > > network dies after a little while, and I have to restart it (usually with > > /etc/rc.d/netif restart). Then it works for a little while, before going > > down again. With the old wpa_supplicant I didn't have this problem. > > > > I don't have very much else to add except noting that I'm affected as well. > > I haven't had time to debug it properly (which is why I've never reported > > it) > > I plan on trying out the latest from upstream beyond the patch Cy sent > along earlier to see if it's perhaps been addressed elsewhere in the > past two years since this release was made. A point of reference. I've had no issues here with any of the networks I use. All the networks I use are either WPA-PSK or open. The last WPA-EAP I used was at former $JOB a few years ago. However, at the Link Lounge just outside where $JOB is at my wifi would disconnect every 30 minutes using our old wpa 2.5, requiring a netif restart. 2.6 resolved that issue. Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also looks interesting. ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 Author: Jouni Malinen Date: Sun Oct 1 12:32:57 2017 +0300 Fix PTK rekeying to generate a new ANonce The Authenticator state machine path for PTK rekeying ended up bypassing the AUTHENTICATION2 state where a new ANonce is generated when going directly to the PTKSTART state since there is no need to try to determine the PMK again in such a case. This is far from ideal since the new PTK would depend on a new nonce only from the supplicant. Fix this by generating a new ANonce when moving to the PTKSTART state for the purpose of starting new 4-way handshake to rekey PTK. Signed-off-by: Jouni Malinen I suspect a timeout because reason=1 in Kyle's log. -- 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-head@freebsd.org Thu Jul 19 14:02:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EF82103B2AF; Thu, 19 Jul 2018 14:02:12 +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 539D392D31; Thu, 19 Jul 2018 14:02:11 +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 w6JE28m0012199; Thu, 19 Jul 2018 07:02:08 -0700 (PDT) (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 w6JE282k012198; Thu, 19 Jul 2018 07:02:08 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807191402.w6JE282k012198@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336475 - head/sys/xen/interface/arch-x86/hvm In-Reply-To: <201807191014.w6JAEq1r032333@repo.freebsd.org> To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Thu, 19 Jul 2018 07:02:08 -0700 (PDT) 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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 14:02:12 -0000 > Author: royger > Date: Thu Jul 19 10:14:52 2018 > New Revision: 336475 > URL: https://svnweb.freebsd.org/changeset/base/336475 > > Log: > xen: add missing file from r336474 > > Added: > head/sys/xen/interface/arch-x86/hvm/start_info.h (contents, props changed) > > Added: head/sys/xen/interface/arch-x86/hvm/start_info.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/xen/interface/arch-x86/hvm/start_info.h Thu Jul 19 10:14:52 2018 (r336475) > @@ -0,0 +1,159 @@ > +/* > + * Permission is hereby granted, free of charge, to any person obtaining a copy > + * of this software and associated documentation files (the "Software"), to > + * deal in the Software without restriction, including without limitation the > + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the Software is > + * furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice shall be included in There is no copyright above. > + * all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > + * DEALINGS IN THE SOFTWARE. > + * > + * Copyright (c) 2016, Citrix Systems, Inc. The copyright is below. > + */ > + > +#ifndef __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__ > +#define __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__ ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Jul 19 14:17:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3213103BB6C; Thu, 19 Jul 2018 14:17:28 +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 0AE6F933C4; Thu, 19 Jul 2018 14:17:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id g9k5ff8x1wyxUg9k6fHhzo; Thu, 19 Jul 2018 08:17:20 -0600 X-Authority-Analysis: v=2.3 cv=NPJhBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=iOoM88TavXz-VmH7acwA:9 a=CjuIK1q_8ugA:10 a=IfaqVvZgccqrtc8gcwf2: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 18889B75; Thu, 19 Jul 2018 07:17:17 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6JEHGS1034288; Thu, 19 Jul 2018 07:17:16 -0700 (PDT) (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 w6JEHGZW034285; Thu, 19 Jul 2018 07:17:16 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807191417.w6JEHGZW034285@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: Kyle Evans cc: Niclas Zeising , Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Andrey V. Elsukov" , src-committers , Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Kyle Evans of "Thu, 19 Jul 2018 08:25:49 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 07:17:16 -0700 X-CMAE-Envelope: MS4wfJFS7d6qnpIGOgXI28Vf9tHK3tDEjrTmnp7THwNbhqORBNgZrKc+j9UAcDVBABfIkmXn5XLnN6BKbkMmIwaal7wVAqEezF3TFE6uakDqihisNpHUTdxK stRcW5BpNbUo2R5wx+RXhkobvf4jtxeYDTcLxXb+Ku0vZmfzIwRpwQT0TasfBMgbQG0l1+IRrnqU+LrsOvYrzxtxvTRv0zP32ZAIjkw/fVKbY8S0/hgxZPma hzPJdrc6nsefKtoJ4nPIVeQVPpAkjCIkNcAQbMglh+t707g3ePn18i5axjBPwlb7+a5r0Qv91zBEkNXs2NY3GXebnuS/oOIFWqUrbah/w8ouMB4ziHIgrAXX uHT9hKXCrWG+HgbSrehAgU0JW/ZtzQ== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 14:17:29 -0000 In message , Kyle Evans writes: > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > wrote: > > [ sending this again since I missed the list the first time, apologies if > > anyone receives a duplicate ] > > > > > > On 07/19/18 13:57, Kyle Evans wrote: > >> > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > >> wrote: > >>> > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > >>>> > >>>> ... > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old > >>>> source and now it works stable already about 2 hours. > >>> > >>> > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ > >> > >> > >> Well, "broken". It's incredibly stable outside of rekeying events, and > >> further testing shows that I don't actually notice these disconnects > >> most of the time because it reassociates fast enough. I noticed it the > >> first time because apparently I had both SSIDs from my AP uncommented > >> in my wpa_supplicant.conf and it decided at that point to connect to > >> the other one, which took a little longer. > >> > >> Contrary to Andrey's report, though, I don't have to kick > >> wpa_supplicant at all. It will reassociate on its own every single > >> time. > > > > > > > > Hi! > > I have the exact same problem as Andrey, with the same driver. I've not > > investigated very much, but when using the 2.8 wpa_supplicant the wifi > > network dies after a little while, and I have to restart it (usually with > > /etc/rc.d/netif restart). Then it works for a little while, before going > > down again. With the old wpa_supplicant I didn't have this problem. > > > > I don't have very much else to add except noting that I'm affected as well. > > I haven't had time to debug it properly (which is why I've never reported > > it) > > I plan on trying out the latest from upstream beyond the patch Cy sent > along earlier to see if it's perhaps been addressed elsewhere in the > past two years since this release was made. I'll see if I can create a wpa_supplicant-devel port at noon today. Should be simple enough if I use the sysutils/mmc-utils approach. -- 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-head@freebsd.org Thu Jul 19 14:24:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14264103C15F; Thu, 19 Jul 2018 14:24:49 +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 B21089396F; Thu, 19 Jul 2018 14:24:48 +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 929712A688; Thu, 19 Jul 2018 14:24:48 +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 w6JEOm0K059428; Thu, 19 Jul 2018 14:24:48 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JEOmGQ059427; Thu, 19 Jul 2018 14:24:48 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807191424.w6JEOmGQ059427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 19 Jul 2018 14:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336484 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 336484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 14:24:49 -0000 Author: bde Date: Thu Jul 19 14:24:48 2018 New Revision: 336484 URL: https://svnweb.freebsd.org/changeset/base/336484 Log: Oops, r336412 undid the fix of the overflow threshold in r323003. Restore the previous overflow threshold and adjust comments. Modified: head/lib/msun/src/s_csqrtl.c Modified: head/lib/msun/src/s_csqrtl.c ============================================================================== --- head/lib/msun/src/s_csqrtl.c Thu Jul 19 13:09:29 2018 (r336483) +++ head/lib/msun/src/s_csqrtl.c Thu Jul 19 14:24:48 2018 (r336484) @@ -36,17 +36,22 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" /* - * THRESH is now calculated portably (up to 113-bit precision). However, - * the denormal threshold is hard-coded for a 15-bit exponent with the usual - * bias. s_logl.c and e_hypotl have less hard-coding but end up requiring - * the same for the exponent and more for the mantissa. + * Several thresholds require a 15-bit exponent and also the usual bias. + * s_logl.c and e_hypotl have less hard-coding but end up requiring the + * same for the exponent and more for the mantissa. */ #if LDBL_MAX_EXP != 0x4000 #error "Unsupported long double format" #endif -/* For avoiding overflow for components >= LDBL_MAX / (1 + sqrt(2)). */ -#define THRESH (LDBL_MAX / 2.414213562373095048801688724209698L) +/* + * Overflow must be avoided for components >= LDBL_MAX / (1 + sqrt(2)). + * The precise threshold is nontrivial to determine and spell, so use a + * lower threshold of approximaely LDBL_MAX / 4, and don't use LDBL_MAX + * to spell this since LDBL_MAX is broken on i386 (it overflows in 53-bit + * precision). + */ +#define THRESH 0x1p16382L long double complex csqrtl(long double complex z) From owner-svn-src-head@freebsd.org Thu Jul 19 14:29:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F683103C413 for ; Thu, 19 Jul 2018 14:29:21 +0000 (UTC) (envelope-from oleg@theweb.org.ua) Received: from ns.it.odessa.ua (ns.it.odessa.ua [195.128.182.40]) by mx1.freebsd.org (Postfix) with ESMTP id B10E893CB0; Thu, 19 Jul 2018 14:29:20 +0000 (UTC) (envelope-from oleg@theweb.org.ua) Received: from ns.it.odessa.ua (localhost [127.0.0.1]) by ns.it.odessa.ua (Sendmail) with ESMTP id 1C3107CB54C; Thu, 19 Jul 2018 17:29:20 +0300 (EEST) X-Virus-Scanned: amavisd-new at it.odessa.ua Received: from ns.it.odessa.ua ([127.0.0.1]) by ns.it.odessa.ua (ns.it.odessa.ua [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tUBTCIKwBOae; Thu, 19 Jul 2018 17:29:19 +0300 (EEST) Received: from asus.theweb.org.ua (unknown [10.133.23.176]) by ns.it.odessa.ua (Sendmail) with SMTP id 5B5087CB432; Thu, 19 Jul 2018 17:29:19 +0300 (EEST) Received: from asus.theweb.org.ua (localhost [127.0.0.1]) by asus.theweb.org.ua (8.15.2/8.15.2) with ESMTPS id w6JEQd8h021829 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Jul 2018 17:26:39 +0300 (EEST) (envelope-from oleg@theweb.org.ua) Received: (from oleg@localhost) by asus.theweb.org.ua (8.15.2/8.15.2/Submit) id w6JEQcUP021828; Thu, 19 Jul 2018 17:26:38 +0300 (EEST) (envelope-from oleg@theweb.org.ua) X-Authentication-Warning: asus.theweb.org.ua: oleg set sender to oleg@theweb.org.ua using -f From: "Oleg V. Nauman" To: svn-src-all@freebsd.org, Cy Schubert Cc: src-committers , svn-src-head@freebsd.org, Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... Date: Thu, 19 Jul 2018 17:26:38 +0300 Message-ID: <17042686.Mc0X0P6XHu@asus.theweb.org.ua> Organization: Private person In-Reply-To: <201807191354.w6JDsgo7034009@slippy.cwsent.com> References: <201807191354.w6JDsgo7034009@slippy.cwsent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 14:29:21 -0000 On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: > In message il.com> > > , Kyle Evans writes: > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > > > > wrote: > > > [ sending this again since I missed the list the first time, apologies > > > if > > > anyone receives a duplicate ] > > > > > > On 07/19/18 13:57, Kyle Evans wrote: > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > > >> > > >> wrote: > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > > >>>> ... > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant > > >>>> restart > > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old > > >>>> source and now it works stable already about 2 hours. > > >>> > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ > > >> > > >> Well, "broken". It's incredibly stable outside of rekeying events, and > > >> further testing shows that I don't actually notice these disconnects > > >> most of the time because it reassociates fast enough. I noticed it the > > >> first time because apparently I had both SSIDs from my AP uncommented > > >> in my wpa_supplicant.conf and it decided at that point to connect to > > >> the other one, which took a little longer. > > >> > > >> Contrary to Andrey's report, though, I don't have to kick > > >> wpa_supplicant at all. It will reassociate on its own every single > > >> time. > > > > > > Hi! > > > I have the exact same problem as Andrey, with the same driver. I've not > > > investigated very much, but when using the 2.8 wpa_supplicant the wifi > > > network dies after a little while, and I have to restart it (usually > > > with > > > /etc/rc.d/netif restart). Then it works for a little while, before > > > going > > > down again. With the old wpa_supplicant I didn't have this problem. > > > > > > I don't have very much else to add except noting that I'm affected as > > > well. > > > I haven't had time to debug it properly (which is why I've never > > > reported > > > it) > > > > I plan on trying out the latest from upstream beyond the patch Cy sent > > along earlier to see if it's perhaps been addressed elsewhere in the > > past two years since this release was made. > > A point of reference. I've had no issues here with any of the networks > I use. All the networks I use are either WPA-PSK or open. The last > WPA-EAP I used was at former $JOB a few years ago. However, at the Link > Lounge just outside where $JOB is at my wifi would disconnect every 30 > minutes using our old wpa 2.5, requiring a netif restart. 2.6 resolved > that issue. > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also looks > interesting. > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 > Author: Jouni Malinen > Date: Sun Oct 1 12:32:57 2017 +0300 > > Fix PTK rekeying to generate a new ANonce > > The Authenticator state machine path for PTK rekeying ended up > bypassing > the AUTHENTICATION2 state where a new ANonce is generated when going > directly to the PTKSTART state since there is no need to try to > determine the PMK again in such a case. This is far from ideal > since the > new PTK would depend on a new nonce only from the supplicant. > > Fix this by generating a new ANonce when moving to the PTKSTART > state > for the purpose of starting new 4-way handshake to rekey PTK. > > Signed-off-by: Jouni Malinen > > > I suspect a timeout because reason=1 in Kyle's log. I have two systems experienced wifi connection issues after recent HEAD update. Both of them experiencing frequent up/down wlan0 events on boot so wireless connection can not negotiate DHCP requests, possibly due to fact that both connecting to the same AP. AP capabilities list: ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH WPS Interesting enough that switching wpa_supplicant to version 2.6 from ports fixes that issue completely. Hopefully it helps. Thank you. From owner-svn-src-head@freebsd.org Thu Jul 19 15:04:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4793103D6DF; Thu, 19 Jul 2018 15:04:11 +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 6680395232; Thu, 19 Jul 2018 15:04:11 +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 472FE2AD11; Thu, 19 Jul 2018 15:04:11 +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 w6JF4B9I080235; Thu, 19 Jul 2018 15:04:11 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JF4AFD080232; Thu, 19 Jul 2018 15:04:10 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807191504.w6JF4AFD080232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 19 Jul 2018 15:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336488 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 336488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 15:04:11 -0000 Author: bde Date: Thu Jul 19 15:04:10 2018 New Revision: 336488 URL: https://svnweb.freebsd.org/changeset/base/336488 Log: Fix spurious and extra underflows and resulting inaccuracies for some cases with 1 huge component and 1 tiny (but nowhere near denormal) component. Rescale earlier so that a scale factor of 2 can be combined with a non- scale divisor of 2, so that the division doesn't shift out a bit. In the usual case where the scale factor is just 1, the division may shift out a bit, but then the underflow is not spurious and the inaccuracies are harder to fix. Modified: head/lib/msun/src/s_csqrt.c head/lib/msun/src/s_csqrtl.c Modified: head/lib/msun/src/s_csqrt.c ============================================================================== --- head/lib/msun/src/s_csqrt.c Thu Jul 19 14:41:46 2018 (r336487) +++ head/lib/msun/src/s_csqrt.c Thu Jul 19 15:04:10 2018 (r336488) @@ -99,15 +99,15 @@ csqrt(double complex z) /* Algorithm 312, CACM vol 10, Oct 1967. */ if (a >= 0) { t = sqrt((a + hypot(a, b)) * 0.5); - rx = t; - ry = b / (2 * t); + rx = scale * t; + ry = scale * b / (2 * t); } else { t = sqrt((-a + hypot(a, b)) * 0.5); - rx = fabs(b) / (2 * t); - ry = copysign(t, b); + rx = scale * fabs(b) / (2 * t); + ry = copysign(scale * t, b); } - return (CMPLX(rx * scale, ry * scale)); + return (CMPLX(rx, ry)); } #if LDBL_MANT_DIG == 53 Modified: head/lib/msun/src/s_csqrtl.c ============================================================================== --- head/lib/msun/src/s_csqrtl.c Thu Jul 19 14:41:46 2018 (r336487) +++ head/lib/msun/src/s_csqrtl.c Thu Jul 19 15:04:10 2018 (r336488) @@ -114,13 +114,13 @@ csqrtl(long double complex z) /* Algorithm 312, CACM vol 10, Oct 1967. */ if (a >= 0) { t = sqrtl((a + hypotl(a, b)) * 0.5); - rx = t; - ry = b / (2 * t); + rx = scale * t; + ry = scale * b / (2 * t); } else { t = sqrtl((-a + hypotl(a, b)) * 0.5); - rx = fabsl(b) / (2 * t); - ry = copysignl(t, b); + rx = scale * fabsl(b) / (2 * t); + ry = copysignl(scale * t, b); } - return (CMPLXL(rx * scale, ry * scale)); + return (CMPLXL(rx, ry)); } From owner-svn-src-head@freebsd.org Thu Jul 19 16:03:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23967103F63F; Thu, 19 Jul 2018 16:03:21 +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 C97AC96FAA; Thu, 19 Jul 2018 16:03:20 +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 AA9AB2B6F2; Thu, 19 Jul 2018 16:03:20 +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 w6JG3KFN011060; Thu, 19 Jul 2018 16:03:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JG3KCE011059; Thu, 19 Jul 2018 16:03:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807191603.w6JG3KCE011059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 19 Jul 2018 16:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336489 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 336489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 16:03:21 -0000 Author: cem Date: Thu Jul 19 16:03:20 2018 New Revision: 336489 URL: https://svnweb.freebsd.org/changeset/base/336489 Log: newsyslog.8: Remove cutesy nonsense Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/newsyslog/newsyslog.8 Modified: head/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.8 Thu Jul 19 15:04:10 2018 (r336488) +++ head/usr.sbin/newsyslog/newsyslog.8 Thu Jul 19 16:03:20 2018 (r336489) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 3, 2018 +.Dd July 19, 2018 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -306,5 +306,3 @@ and first appeared in MIT Project Athena .Pp Copyright 1987, Massachusetts Institute of Technology -.Sh BUGS -Does not yet automatically read the logs to find security breaches. From owner-svn-src-head@freebsd.org Thu Jul 19 16:29:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36253104090C; Thu, 19 Jul 2018 16:29:38 +0000 (UTC) (envelope-from royger@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC54A7017E; Thu, 19 Jul 2018 16:29:37 +0000 (UTC) (envelope-from royger@freebsd.org) Received: from localhost (unknown [80.30.172.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: royger) by smtp.freebsd.org (Postfix) with ESMTPSA id 02A78275CE; Thu, 19 Jul 2018 16:29:36 +0000 (UTC) (envelope-from royger@freebsd.org) Date: Thu, 19 Jul 2018 18:29:29 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336475 - head/sys/xen/interface/arch-x86/hvm Message-ID: <20180719162929.lxklf6pdb3vlmxof@mac> References: <201807191014.w6JAEq1r032333@repo.freebsd.org> <201807191402.w6JE282k012198@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807191402.w6JE282k012198@pdx.rh.CN85.dnsmgr.net> User-Agent: NeoMutt/20180512 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 16:29:38 -0000 On Thu, Jul 19, 2018 at 07:02:08AM -0700, Rodney W. Grimes wrote: > > Author: royger > > Date: Thu Jul 19 10:14:52 2018 > > New Revision: 336475 > > URL: https://svnweb.freebsd.org/changeset/base/336475 > > > > Log: > > xen: add missing file from r336474 > > > > Added: > > head/sys/xen/interface/arch-x86/hvm/start_info.h (contents, props changed) > > > > Added: head/sys/xen/interface/arch-x86/hvm/start_info.h > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/sys/xen/interface/arch-x86/hvm/start_info.h Thu Jul 19 10:14:52 2018 (r336475) > > @@ -0,0 +1,159 @@ > > +/* > > + * Permission is hereby granted, free of charge, to any person obtaining a copy > > + * of this software and associated documentation files (the "Software"), to > > + * deal in the Software without restriction, including without limitation the > > + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or > > + * sell copies of the Software, and to permit persons to whom the Software is > > + * furnished to do so, subject to the following conditions: > > + * > > + * The above copyright notice and this permission notice shall be included in > > There is no copyright above. > > > + * all copies or substantial portions of the Software. > > + * > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > > + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > > + * DEALINGS IN THE SOFTWARE. > > + * > > + * Copyright (c) 2016, Citrix Systems, Inc. > > The copyright is below. This is a verbatim copy of: http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/arch-x86/hvm/start_info.h And I'm not intending to modify it locally in the FreeBSD tree, but patches can be submitted upstream :). Roger. From owner-svn-src-head@freebsd.org Thu Jul 19 17:01:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F61B1041A8E; Thu, 19 Jul 2018 17:01: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 1104671214; Thu, 19 Jul 2018 17:01: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 E73A32BF5C; Thu, 19 Jul 2018 17:01: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 w6JH1Apc036954; Thu, 19 Jul 2018 17:01:10 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JH1AP7036953; Thu, 19 Jul 2018 17:01:10 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201807191701.w6JH1AP7036953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 19 Jul 2018 17:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336491 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 336491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 17:01:11 -0000 Author: alc Date: Thu Jul 19 17:01:10 2018 New Revision: 336491 URL: https://svnweb.freebsd.org/changeset/base/336491 Log: Revert r329254. The underlying cause for the copy-on-write problem in multithreaded programs that was addressed by r329254 was in the implementation of pmap_enter() on some architectures, notably, amd64. kib@, markj@ and I have audited all of the pmap_enter() implementations, and fixed the broken ones, specifically, amd64 (r335784, r335971), i386 (r336092), mips (r336248), and riscv (r336294). To be clear, the reason to address the problem within pmap_enter() and revert r329254 is not just a matter of principle. An effect of r329254 was that a copy-on-write fault actually entailed two page faults, not one, even for single-threaded programs. Now, in the expected case for either single- or multithreaded programs, we are back to a single page fault to complete a copy-on-write operation. (In extremely rare circumstances, a multithreaded program could suffer two page faults.) Reviewed by: kib, markj Tested by: truckman MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D16301 Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu Jul 19 16:58:20 2018 (r336490) +++ head/sys/vm/vm_fault.c Thu Jul 19 17:01:10 2018 (r336491) @@ -1152,10 +1152,6 @@ readrest: */ pmap_copy_page(fs.m, fs.first_m); fs.first_m->valid = VM_PAGE_BITS_ALL; - if ((fault_flags & VM_FAULT_WIRE) == 0) { - prot &= ~VM_PROT_WRITE; - fault_type &= ~VM_PROT_WRITE; - } if (wired && (fault_flags & VM_FAULT_WIRE) == 0) { vm_page_lock(fs.first_m); From owner-svn-src-head@freebsd.org Thu Jul 19 17:13:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 596E41042308; Thu, 19 Jul 2018 17:13:47 +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 0E5F571B82; Thu, 19 Jul 2018 17:13:47 +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 E39742C266; Thu, 19 Jul 2018 17:13:46 +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 w6JHDkj8046845; Thu, 19 Jul 2018 17:13:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JHDk9V046844; Thu, 19 Jul 2018 17:13:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807191713.w6JHDk9V046844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 19 Jul 2018 17:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336492 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/sys X-SVN-Commit-Revision: 336492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 17:13:47 -0000 Author: andrew Date: Thu Jul 19 17:13:46 2018 New Revision: 336492 URL: https://svnweb.freebsd.org/changeset/base/336492 Log: Stop writing past the end of the buffer in the msgget_limit test. The value in i is already correct to write to the last item in the buf array. Obtained from: CheriBSD Sponsored by: DARPA, AFRL Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c Thu Jul 19 17:01:10 2018 (r336491) +++ head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c Thu Jul 19 17:13:46 2018 (r336492) @@ -223,7 +223,6 @@ ATF_TC_BODY(msgget_limit, tc) goto out; } - i++; errno = 0; buf[i] = msgget(MSG_KEY + i, IPC_CREAT | IPC_EXCL | 0600); From owner-svn-src-head@freebsd.org Thu Jul 19 17:38:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E078C104315C for ; Thu, 19 Jul 2018 17:38:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-14.consmr.mail.bf2.yahoo.com (sonic309-14.consmr.mail.bf2.yahoo.com [74.6.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B64E7291D for ; Thu, 19 Jul 2018 17:38:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: sqoD5kEVM1mUvWLm7qZbkXTwO1iO6d4yqZaVhEakkGBV4UHM8nSDZV2pW9Ft2om MbprXbe9TxjMzXxS3G9cRWb3oZYl0oDRb7wxTHWmXEoXJ6RL4yCAwhmCdXQn3yQ24YdJobzwWjO8 C1r7JeQOWSZVM0QmrP0tXreZN4h3JI5gzZNJi0l9LCBaAUJ2tzVnkWvh8qvbyg0lxw_1wwPtZoH5 SxOWhRqMYN.fQfASGnehWLTGYz7TvCgh1blbmHSlYwBPlzCjaQ2uG6gYdsjfcu8lOm5tNN19VMyb y21oEMM..rtM9zf7F7t_lYjNYkwGudUeoRu.j8dM87M3vW9IAap5nmwXUTYbpihpy1yftU25NkRl YWtj6SVogDPS0DfJ3H84i63PECNYYcP2cDMpW1KcogCQ0ZgSC_wIhkkzbgWAUMU6ix4zDjXY2LOg 21Ku9VPUN3Owf0Sd7UFj7DoJoWr.HYyISdKXZjwlVHHjDZ9eHD0EIfyvo4wAkuYHz8ylJGCzee22 G.kLX9DqHDcYCIMZF22E_d6MzRO.A4S9nvXj3XVTfA3hClGgEUYCVh4yHcPjZYMoeHZI5TB.9Igk HCFiSXDTsCXolj7DranBKvK6W7gB4Nb_x20ZUmaRXuYliPJC6NT2Fmm8uYskL972etuw8bN3ri5t WtP13R.e.wxhJGOghHRu_0rEFZMArpKoXdI4HCBGUqzgNshtJzQCZY.6xHbXGcrRp.l_WIwpKFuj SRwr6fLyNgQpK6WLjsV0Qi8o0F.wvXmZuYxC60q0sTsmWPTyJtQL4S1TgO4PR5bhCeomx7t3qPYb 5O27Xi.4rosgNTeStPW7tLt8h1ItRNIiDobnxvC04PKBD4dDvkM6PtQYDoC2fBB.T3_k6FawgbPI cF04mIZTdHDkTF1EjzhdPXz..v4JVoPKe09j__HVZL.Q4KG01XSInSAkEY_o3JVfRnRHtLmPyVSA DCmcDKbRZdCwStDPBhOQASHNYhH6PYqnm1.pODqt0snWtkJW0FGQkixbHx_lZV_g- Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.bf2.yahoo.com with HTTP; Thu, 19 Jul 2018 17:38:06 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp413.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d85992010ad59ec516566f4ce70f54ce; Thu, 19 Jul 2018 17:38:02 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336482 - head/share/mk [ ci.freebsd.org's FreeBSD-head-riscv64-build fail after this change ] Message-Id: <5344B2CF-EAB3-4A40-9FF2-2F4285A80AE8@yahoo.com> Date: Thu, 19 Jul 2018 10:38:00 -0700 To: br@FreeBSD.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 17:38:13 -0000 > Author: br > Date: Thu Jul 19 13:02:29 2018 > New Revision: 336482 > URL:=20 > https://svnweb.freebsd.org/changeset/base/336482 >=20 >=20 > Log: > PROFILE, TESTS and CXX build options are no longer broken for = RISC-V. >=20 > . . . https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/9580/consoleText = (and later) shows the build failure: --- all_subdir_libexec --- atf-check.o: In function `.L0 ': = /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/include/c++/v1/string:8= 96: undefined reference to `_Unwind_Resume' atf-check.o: In function `.L0 ': /workspace/src/contrib/atf/atf-sh/atf-check.cpp:130: undefined reference = to `_Unwind_Resume' atf-check.o: In function `.L0 ': = /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/include/c++/v1/__string= :225: undefined reference to `_Unwind_Resume' atf-check.o: In function `compare_files': /workspace/src/contrib/atf/atf-sh/atf-check.cpp:407: undefined reference = to `_Unwind_Resume' /workspace/src/contrib/atf/atf-sh/atf-check.cpp:415: undefined reference = to `_Unwind_Resume' atf-check.o:/workspace/src/contrib/atf/atf-sh/atf-check.cpp:412: more = undefined references to `_Unwind_Resume' follow /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_Resume_or_Rethrow' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_RaiseException' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_Backtrace' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_GetLanguageSpecificData' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_GetTextRelBase' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_SetIP' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_GetDataRelBase' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_GetRegionStart' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_SetGR' /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/lib/libcxxrt.so: = undefined reference to `_Unwind_GetIP' --- all_subdir_lib --- --- lshrti3.po --- /usr/local/bin/riscv64-unknown-freebsd11.1-gcc = --sysroot=3D/workspace/obj/workspace/src/riscv.riscv64/tmp = -B/usr/local/riscv64-unknown-freebsd11.1/bin/ -pg -O2 -pipe = -march=3Drv64imafdc -mabi=3Dlp64d -fpic -fvisibility=3Dhidden = -DVISIBILITY_HIDDEN -I/workspace/src/contrib/libcxxrt -g -MD = -MF.depend.lshrti3.po -MTlshrti3.po -std=3Dgnu99 = -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k = -Wno-uninitialized -Wno-pointer-sign -Wno-error=3Daddress = -Wno-error=3Darray-bounds -Wno-error=3Dattributes = -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered = -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline = -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing = -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable = -Wno-error=3Dunused-function -Wno-error=3Dunused-value = -Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare = -Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare = -Wno-error=3Dunused-const-variable -Wno-error=3Dbool-operation = -Wno-error=3Ddeprecated -Wno-error=3Dexpansion-to-defined = -Wno-error=3Dformat-overflow -Wno-error=3Dformat-truncation = -Wno-error=3Dimplicit-fallthrough -Wno-error=3Dint-in-bool-context = -Wno-error=3Dmemset-elt-size -Wno-error=3Dnoexcept-type = -Wno-error=3Dnonnull -Wno-error=3Dpointer-compare = -Wno-error=3Dstringop-overflow -c = /workspace/src/contrib/compiler-rt/lib/builtins/lshrti3.c -o lshrti3.po --- all_subdir_libexec --- collect2: error: ld returned 1 exit status *** [atf-check.full] Error code 1 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Jul 19 18:07:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20B11104423A for ; Thu, 19 Jul 2018 18:07:54 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAA997397E; Thu, 19 Jul 2018 18:07:53 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1129) id AB1AD1FD2E; Thu, 19 Jul 2018 18:07:53 +0000 (UTC) Date: Thu, 19 Jul 2018 18:07:53 +0000 From: Li-Wen Hsu To: Mark Millard Cc: br@FreeBSD.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336482 - head/share/mk [ ci.freebsd.org's FreeBSD-head-riscv64-build fail after this change ] Message-ID: <20180719180753.GA48774@freefall.freebsd.org> References: <5344B2CF-EAB3-4A40-9FF2-2F4285A80AE8@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <5344B2CF-EAB3-4A40-9FF2-2F4285A80AE8@yahoo.com> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 18:07:54 -0000 On Thu, Jul 19, 2018 at 10:38:00 -0700, Mark Millard wrote: > > Author: br > > Date: Thu Jul 19 13:02:29 2018 > > New Revision: 336482 > > URL:=20 > > https://svnweb.freebsd.org/changeset/base/336482 > >=20 > >=20 > > Log: > > PROFILE, TESTS and CXX build options are no longer broken for RISC-V. > >=20 > > . . . >=20 > https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/9580/consoleText (a= nd later) > shows the build failure: You may want to check this one https://lists.freebsd.org/pipermail/freebsd-= riscv/2018-July/000006.html Thanks, Li-Wen --=20 Li-Wen Hsu https://lwhsu.org From owner-svn-src-head@freebsd.org Thu Jul 19 18:44:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F0911045334; Thu, 19 Jul 2018 18:44:12 +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 4E1E274893; Thu, 19 Jul 2018 18:44:12 +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 302382D12B; Thu, 19 Jul 2018 18:44: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 w6JIiCil092535; Thu, 19 Jul 2018 18:44:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JIiAQt092528; Thu, 19 Jul 2018 18:44:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201807191844.w6JIiAQt092528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 19 Jul 2018 18:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336497 - in head/lib/msun: . ld80 man src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/lib/msun: . ld80 man src X-SVN-Commit-Revision: 336497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 18:44:12 -0000 Author: dim Date: Thu Jul 19 18:44:10 2018 New Revision: 336497 URL: https://svnweb.freebsd.org/changeset/base/336497 Log: Fix powl, cpow, cpowf, and cpowl imports from OpenBSD This is a follow-up to r336299. * lib/msun/Makefile: . Remove polevll.c * lib/msun/ld80/e_powl.c: . Copy contents of polevll.c to here. This is the only consumer of these functions. Make functions 'static inline'. . Make reducl a 'static inline' function. * lib/msun/man/exp.3: . Remove BUGS section that no longer applies. * lib/msun/src/math_private.h: . Remove prototypes of __p1evll() and __polevll() * lib/msun/src/s_cpow.c: * lib/msun/src/s_cpowf.c: * lib/msun/src/s_cpowl.c . Use the CMPLX macro from either C99 or math_private.h (depends of compiler support) instead of the problematic use of complex I. Submitted by: Steve Kargl PR: 229876 MFC after: 1 week Deleted: head/lib/msun/src/polevll.c Modified: head/lib/msun/Makefile head/lib/msun/ld80/e_powl.c head/lib/msun/man/exp.3 head/lib/msun/src/math_private.h head/lib/msun/src/s_cpow.c head/lib/msun/src/s_cpowf.c head/lib/msun/src/s_cpowl.c Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Thu Jul 19 17:49:39 2018 (r336496) +++ head/lib/msun/Makefile Thu Jul 19 18:44:10 2018 (r336497) @@ -56,7 +56,6 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ imprecise.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ - polevll.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c s_clog.c s_clogf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ Modified: head/lib/msun/ld80/e_powl.c ============================================================================== --- head/lib/msun/ld80/e_powl.c Thu Jul 19 17:49:39 2018 (r336496) +++ head/lib/msun/ld80/e_powl.c Thu Jul 19 18:44:10 2018 (r336497) @@ -14,6 +14,52 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "math_private.h" + +/* + * Polynomial evaluator: + * P[0] x^n + P[1] x^(n-1) + ... + P[n] + */ +static inline long double +__polevll(long double x, long double *PP, int n) +{ + long double y; + long double *P; + + P = PP; + y = *P++; + do { + y = y * x + *P++; + } while (--n); + + return (y); +} + +/* + * Polynomial evaluator: + * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n] + */ +static inline long double +__p1evll(long double x, long double *PP, int n) +{ + long double y; + long double *P; + + P = PP; + n -= 1; + y = x + *P++; + do { + y = y * x + *P++; + } while (--n); + + return (y); +} + /* powl.c * * Power function, long double precision @@ -467,7 +513,7 @@ return( z ); /* Find a multiple of 1/NXT that is within 1/NXT of x. */ -static long double +static inline long double reducl(long double x) { long double t; Modified: head/lib/msun/man/exp.3 ============================================================================== --- head/lib/msun/man/exp.3 Thu Jul 19 17:49:39 2018 (r336496) +++ head/lib/msun/man/exp.3 Thu Jul 19 18:44:10 2018 (r336497) @@ -180,16 +180,9 @@ If 0**0 = 1, then then \*(Na**0 = 1 too because x**0 = 1 for all finite and infinite x, i.e., independently of x. .El -.Sh BUGS -To conform with newer C/C++ standards, a stub implementation for -.Nm powl -was committed to the math library, where -.Nm powl -is mapped to -.Nm pow . -Thus, the numerical accuracy is at most that of the 53-bit double -precision implementation. .Sh SEE ALSO +.Xr clog 3 +.Xr cpow 3 .Xr fenv 3 , .Xr ldexp 3 , .Xr log 3 , Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Thu Jul 19 17:49:39 2018 (r336496) +++ head/lib/msun/src/math_private.h Thu Jul 19 18:44:10 2018 (r336497) @@ -846,7 +846,4 @@ long double __kernel_sinl(long double, long double, in long double __kernel_cosl(long double, long double); long double __kernel_tanl(long double, long double, int); -long double __p1evll(long double, void *, int); -long double __polevll(long double, void *, int); - #endif /* !_MATH_PRIVATE_H_ */ Modified: head/lib/msun/src/s_cpow.c ============================================================================== --- head/lib/msun/src/s_cpow.c Thu Jul 19 17:49:39 2018 (r336496) +++ head/lib/msun/src/s_cpow.c Thu Jul 19 18:44:10 2018 (r336497) @@ -60,7 +60,7 @@ cpow(double complex a, double complex z) y = cimag (z); absa = cabs (a); if (absa == 0.0) { - return (0.0 + 0.0 * I); + return (CMPLX(0.0, 0.0)); } arga = carg (a); r = pow (absa, x); @@ -69,6 +69,6 @@ cpow(double complex a, double complex z) r = r * exp (-y * arga); theta = theta + y * log (absa); } - w = r * cos (theta) + (r * sin (theta)) * I; + w = CMPLX(r * cos (theta), r * sin (theta)); return (w); } Modified: head/lib/msun/src/s_cpowf.c ============================================================================== --- head/lib/msun/src/s_cpowf.c Thu Jul 19 17:49:39 2018 (r336496) +++ head/lib/msun/src/s_cpowf.c Thu Jul 19 18:44:10 2018 (r336497) @@ -59,7 +59,7 @@ cpowf(float complex a, float complex z) y = cimagf(z); absa = cabsf (a); if (absa == 0.0f) { - return (0.0f + 0.0f * I); + return (CMPLXF(0.0f, 0.0f)); } arga = cargf (a); r = powf (absa, x); @@ -68,6 +68,6 @@ cpowf(float complex a, float complex z) r = r * expf (-y * arga); theta = theta + y * logf (absa); } - w = r * cosf (theta) + (r * sinf (theta)) * I; + w = CMPLXF(r * cosf (theta), r * sinf (theta)); return (w); } Modified: head/lib/msun/src/s_cpowl.c ============================================================================== --- head/lib/msun/src/s_cpowl.c Thu Jul 19 17:49:39 2018 (r336496) +++ head/lib/msun/src/s_cpowl.c Thu Jul 19 18:44:10 2018 (r336497) @@ -59,7 +59,7 @@ cpowl(long double complex a, long double complex z) y = cimagl(z); absa = cabsl(a); if (absa == 0.0L) { - return (0.0L + 0.0L * I); + return (CMPLXL(0.0L, 0.0L)); } arga = cargl(a); r = powl(absa, x); @@ -68,6 +68,6 @@ cpowl(long double complex a, long double complex z) r = r * expl(-y * arga); theta = theta + y * logl(absa); } - w = r * cosl(theta) + (r * sinl(theta)) * I; + w = CMPLXL(r * cosl(theta), r * sinl(theta)); return (w); } From owner-svn-src-head@freebsd.org Thu Jul 19 19:03:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5DAA1045DCB; Thu, 19 Jul 2018 19:03: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 65E7875290; Thu, 19 Jul 2018 19:03: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 470B22D493; Thu, 19 Jul 2018 19:03:19 +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 w6JJ3JV9002536; Thu, 19 Jul 2018 19:03:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JJ3J5J002535; Thu, 19 Jul 2018 19:03:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807191903.w6JJ3J5J002535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Jul 2018 19:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336498 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 336498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:03:19 -0000 Author: kib Date: Thu Jul 19 19:03:18 2018 New Revision: 336498 URL: https://svnweb.freebsd.org/changeset/base/336498 Log: When reporting an error, print the errno value. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu Jul 19 18:44:10 2018 (r336497) +++ head/sys/kern/imgact_elf.c Thu Jul 19 19:03:18 2018 (r336498) @@ -861,7 +861,8 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, NOCRED, NULL, td); if (error != 0) { - uprintf("i/o error PT_INTERP\n"); + uprintf("i/o error PT_INTERP %d\n", + error); goto ret; } interp_buf[interp_name_len] = '\0'; From owner-svn-src-head@freebsd.org Thu Jul 19 19:04:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF2AD1045E92; Thu, 19 Jul 2018 19:04:31 +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 A141E7540B; Thu, 19 Jul 2018 19:04:31 +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 823752D495; Thu, 19 Jul 2018 19:04:31 +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 w6JJ4VsO002636; Thu, 19 Jul 2018 19:04:31 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JJ4Ukc002633; Thu, 19 Jul 2018 19:04:30 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807191904.w6JJ4Ukc002633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 19:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336499 - head/contrib/wpa/src/ap X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/src/ap X-SVN-Commit-Revision: 336499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:04:32 -0000 Author: cy Date: Thu Jul 19 19:04:30 2018 New Revision: 336499 URL: https://svnweb.freebsd.org/changeset/base/336499 Log: MFV: r336485 Address: hostapd: Avoid key reinstallation in FT handshake Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0001-hostapd-Avoid-key-\ reinstallation-in-FT-handshake.patch X-MFC-with: r336203 Modified: head/contrib/wpa/src/ap/ieee802_11.c head/contrib/wpa/src/ap/wpa_auth.c head/contrib/wpa/src/ap/wpa_auth.h Directory Properties: head/contrib/wpa/ (props changed) Modified: head/contrib/wpa/src/ap/ieee802_11.c ============================================================================== --- head/contrib/wpa/src/ap/ieee802_11.c Thu Jul 19 19:03:18 2018 (r336498) +++ head/contrib/wpa/src/ap/ieee802_11.c Thu Jul 19 19:04:30 2018 (r336499) @@ -1841,6 +1841,7 @@ static int add_associated_sta(struct hostapd_data *hap { struct ieee80211_ht_capabilities ht_cap; struct ieee80211_vht_capabilities vht_cap; + int set = 1; /* * Remove the STA entry to ensure the STA PS state gets cleared and @@ -1848,9 +1849,18 @@ static int add_associated_sta(struct hostapd_data *hap * FT-over-the-DS, where a station re-associates back to the same AP but * skips the authentication flow, or if working with a driver that * does not support full AP client state. + * + * Skip this if the STA has already completed FT reassociation and the + * TK has been configured since the TX/RX PN must not be reset to 0 for + * the same key. */ - if (!sta->added_unassoc) + if (!sta->added_unassoc && + (!(sta->flags & WLAN_STA_AUTHORIZED) || + !wpa_auth_sta_ft_tk_already_set(sta->wpa_sm))) { hostapd_drv_sta_remove(hapd, sta->addr); + wpa_auth_sm_event(sta->wpa_sm, WPA_DRV_STA_REMOVED); + set = 0; + } #ifdef CONFIG_IEEE80211N if (sta->flags & WLAN_STA_HT) @@ -1873,11 +1883,11 @@ static int add_associated_sta(struct hostapd_data *hap sta->flags & WLAN_STA_VHT ? &vht_cap : NULL, sta->flags | WLAN_STA_ASSOC, sta->qosinfo, sta->vht_opmode, sta->p2p_ie ? 1 : 0, - sta->added_unassoc)) { + set)) { hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE, "Could not %s STA to kernel driver", - sta->added_unassoc ? "set" : "add"); + set ? "set" : "add"); if (sta->added_unassoc) { hostapd_drv_sta_remove(hapd, sta->addr); Modified: head/contrib/wpa/src/ap/wpa_auth.c ============================================================================== --- head/contrib/wpa/src/ap/wpa_auth.c Thu Jul 19 19:03:18 2018 (r336498) +++ head/contrib/wpa/src/ap/wpa_auth.c Thu Jul 19 19:04:30 2018 (r336499) @@ -1745,6 +1745,9 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, en #else /* CONFIG_IEEE80211R */ break; #endif /* CONFIG_IEEE80211R */ + case WPA_DRV_STA_REMOVED: + sm->tk_already_set = FALSE; + return 0; } #ifdef CONFIG_IEEE80211R Modified: head/contrib/wpa/src/ap/wpa_auth.h ============================================================================== --- head/contrib/wpa/src/ap/wpa_auth.h Thu Jul 19 19:03:18 2018 (r336498) +++ head/contrib/wpa/src/ap/wpa_auth.h Thu Jul 19 19:04:30 2018 (r336499) @@ -267,7 +267,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth, u8 *data, size_t data_len); enum wpa_event { WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH, - WPA_REAUTH_EAPOL, WPA_ASSOC_FT + WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED }; void wpa_remove_ptk(struct wpa_state_machine *sm); int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event); From owner-svn-src-head@freebsd.org Thu Jul 19 19:07:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43D20104600A; Thu, 19 Jul 2018 19:07:28 +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 E793A755EF; Thu, 19 Jul 2018 19:07:27 +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 C877B2D4BA; Thu, 19 Jul 2018 19:07:27 +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 w6JJ7RP8002835; Thu, 19 Jul 2018 19:07:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JJ7QeL002827; Thu, 19 Jul 2018 19:07:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201807191907.w6JJ7QeL002827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 19 Jul 2018 19:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336500 - in head/lib/msun: . ld80 man src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/lib/msun: . ld80 man src X-SVN-Commit-Revision: 336500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:07:28 -0000 Author: dim Date: Thu Jul 19 19:07:25 2018 New Revision: 336500 URL: https://svnweb.freebsd.org/changeset/base/336500 Log: Revert r336497 for now, as it breaks on architectures using gcc, with: cc1: warnings being treated as errors /usr/src/lib/msun/src/s_cpow.c: In function 'cpow': /usr/src/lib/msun/src/s_cpow.c:63: warning: implicit declaration of function 'CMPLX' Added: head/lib/msun/src/polevll.c - copied unchanged from r336496, head/lib/msun/src/polevll.c Modified: head/lib/msun/Makefile head/lib/msun/ld80/e_powl.c head/lib/msun/man/exp.3 head/lib/msun/src/math_private.h head/lib/msun/src/s_cpow.c head/lib/msun/src/s_cpowf.c head/lib/msun/src/s_cpowl.c Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Thu Jul 19 19:04:30 2018 (r336499) +++ head/lib/msun/Makefile Thu Jul 19 19:07:25 2018 (r336500) @@ -56,6 +56,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ imprecise.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ + polevll.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c s_clog.c s_clogf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ Modified: head/lib/msun/ld80/e_powl.c ============================================================================== --- head/lib/msun/ld80/e_powl.c Thu Jul 19 19:04:30 2018 (r336499) +++ head/lib/msun/ld80/e_powl.c Thu Jul 19 19:07:25 2018 (r336500) @@ -14,52 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -__FBSDID("$FreeBSD$"); - -#include - -#include "math_private.h" - -/* - * Polynomial evaluator: - * P[0] x^n + P[1] x^(n-1) + ... + P[n] - */ -static inline long double -__polevll(long double x, long double *PP, int n) -{ - long double y; - long double *P; - - P = PP; - y = *P++; - do { - y = y * x + *P++; - } while (--n); - - return (y); -} - -/* - * Polynomial evaluator: - * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n] - */ -static inline long double -__p1evll(long double x, long double *PP, int n) -{ - long double y; - long double *P; - - P = PP; - n -= 1; - y = x + *P++; - do { - y = y * x + *P++; - } while (--n); - - return (y); -} - /* powl.c * * Power function, long double precision @@ -513,7 +467,7 @@ return( z ); /* Find a multiple of 1/NXT that is within 1/NXT of x. */ -static inline long double +static long double reducl(long double x) { long double t; Modified: head/lib/msun/man/exp.3 ============================================================================== --- head/lib/msun/man/exp.3 Thu Jul 19 19:04:30 2018 (r336499) +++ head/lib/msun/man/exp.3 Thu Jul 19 19:07:25 2018 (r336500) @@ -180,9 +180,16 @@ If 0**0 = 1, then then \*(Na**0 = 1 too because x**0 = 1 for all finite and infinite x, i.e., independently of x. .El +.Sh BUGS +To conform with newer C/C++ standards, a stub implementation for +.Nm powl +was committed to the math library, where +.Nm powl +is mapped to +.Nm pow . +Thus, the numerical accuracy is at most that of the 53-bit double +precision implementation. .Sh SEE ALSO -.Xr clog 3 -.Xr cpow 3 .Xr fenv 3 , .Xr ldexp 3 , .Xr log 3 , Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Thu Jul 19 19:04:30 2018 (r336499) +++ head/lib/msun/src/math_private.h Thu Jul 19 19:07:25 2018 (r336500) @@ -846,4 +846,7 @@ long double __kernel_sinl(long double, long double, in long double __kernel_cosl(long double, long double); long double __kernel_tanl(long double, long double, int); +long double __p1evll(long double, void *, int); +long double __polevll(long double, void *, int); + #endif /* !_MATH_PRIVATE_H_ */ Copied: head/lib/msun/src/polevll.c (from r336496, head/lib/msun/src/polevll.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/polevll.c Thu Jul 19 19:07:25 2018 (r336500, copy of r336496, head/lib/msun/src/polevll.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2008 Stephen L. Moshier + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* polevll.c + * p1evll.c + * + * Evaluate polynomial + * + * + * + * SYNOPSIS: + * + * int N; + * long double x, y, coef[N+1], polevl[]; + * + * y = polevll( x, coef, N ); + * + * + * + * DESCRIPTION: + * + * Evaluates polynomial of degree N: + * + * 2 N + * y = C + C x + C x +...+ C x + * 0 1 2 N + * + * Coefficients are stored in reverse order: + * + * coef[0] = C , ..., coef[N] = C . + * N 0 + * + * The function p1evll() assumes that coef[N] = 1.0 and is + * omitted from the array. Its calling arguments are + * otherwise the same as polevll(). + * + * + * SPEED: + * + * In the interest of speed, there are no checks for out + * of bounds arithmetic. This routine is used by most of + * the functions in the library. Depending on available + * equipment features, the user may wish to rewrite the + * program in microcode or assembly language. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "math_private.h" + +/* + * Polynomial evaluator: + * P[0] x^n + P[1] x^(n-1) + ... + P[n] + */ +long double +__polevll(long double x, void *PP, int n) +{ + long double y; + long double *P; + + P = (long double *)PP; + y = *P++; + do { + y = y * x + *P++; + } while (--n); + + return (y); +} + +/* + * Polynomial evaluator: + * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n] + */ +long double +__p1evll(long double x, void *PP, int n) +{ + long double y; + long double *P; + + P = (long double *)PP; + n -= 1; + y = x + *P++; + do { + y = y * x + *P++; + } while (--n); + + return (y); +} Modified: head/lib/msun/src/s_cpow.c ============================================================================== --- head/lib/msun/src/s_cpow.c Thu Jul 19 19:04:30 2018 (r336499) +++ head/lib/msun/src/s_cpow.c Thu Jul 19 19:07:25 2018 (r336500) @@ -60,7 +60,7 @@ cpow(double complex a, double complex z) y = cimag (z); absa = cabs (a); if (absa == 0.0) { - return (CMPLX(0.0, 0.0)); + return (0.0 + 0.0 * I); } arga = carg (a); r = pow (absa, x); @@ -69,6 +69,6 @@ cpow(double complex a, double complex z) r = r * exp (-y * arga); theta = theta + y * log (absa); } - w = CMPLX(r * cos (theta), r * sin (theta)); + w = r * cos (theta) + (r * sin (theta)) * I; return (w); } Modified: head/lib/msun/src/s_cpowf.c ============================================================================== --- head/lib/msun/src/s_cpowf.c Thu Jul 19 19:04:30 2018 (r336499) +++ head/lib/msun/src/s_cpowf.c Thu Jul 19 19:07:25 2018 (r336500) @@ -59,7 +59,7 @@ cpowf(float complex a, float complex z) y = cimagf(z); absa = cabsf (a); if (absa == 0.0f) { - return (CMPLXF(0.0f, 0.0f)); + return (0.0f + 0.0f * I); } arga = cargf (a); r = powf (absa, x); @@ -68,6 +68,6 @@ cpowf(float complex a, float complex z) r = r * expf (-y * arga); theta = theta + y * logf (absa); } - w = CMPLXF(r * cosf (theta), r * sinf (theta)); + w = r * cosf (theta) + (r * sinf (theta)) * I; return (w); } Modified: head/lib/msun/src/s_cpowl.c ============================================================================== --- head/lib/msun/src/s_cpowl.c Thu Jul 19 19:04:30 2018 (r336499) +++ head/lib/msun/src/s_cpowl.c Thu Jul 19 19:07:25 2018 (r336500) @@ -59,7 +59,7 @@ cpowl(long double complex a, long double complex z) y = cimagl(z); absa = cabsl(a); if (absa == 0.0L) { - return (CMPLXL(0.0L, 0.0L)); + return (0.0L + 0.0L * I); } arga = cargl(a); r = powl(absa, x); @@ -68,6 +68,6 @@ cpowl(long double complex a, long double complex z) r = r * expl(-y * arga); theta = theta + y * logl(absa); } - w = CMPLXL(r * cosl(theta), r * sinl(theta)); + w = r * cosl(theta) + (r * sinl(theta)) * I; return (w); } From owner-svn-src-head@freebsd.org Thu Jul 19 19:09:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0DB01046152; Thu, 19 Jul 2018 19:09:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D268757C4; Thu, 19 Jul 2018 19:09:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 0AE9A94F; Thu, 19 Jul 2018 19:09:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id BF62D717D; Thu, 19 Jul 2018 19:09:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 2rNJERhm52KL; Thu, 19 Jul 2018 19:09:28 +0000 (UTC) Subject: Re: svn commit: r334708 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com EAD3B7178 To: Konstantin Belousov , Mark Johnston , Ryan Libby , Mateusz Guzik , Justin Hibbits Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806061257.w56CvCwq089369@repo.freebsd.org> <20180606140311.GU2450@kib.kiev.ua> <20180608033242.GA54099@pesky> <20180608173755.GJ2450@kib.kiev.ua> <20180608183010.GC65388@pesky> <20180608183732.GK2450@kib.kiev.ua> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <0b128417-7107-5090-e65a-afa94fd1aed6@FreeBSD.org> Date: Thu, 19 Jul 2018 12:09:21 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180608183732.GK2450@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Ihlwrz2hwW8P4i4TIUbx990WlXF6P2iuy" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:09:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ihlwrz2hwW8P4i4TIUbx990WlXF6P2iuy Content-Type: multipart/mixed; boundary="gSEzCqGhF3w2oEwSXkvyFr5cqiusmgFTR"; protected-headers="v1" From: Bryan Drewery To: Konstantin Belousov , Mark Johnston , Ryan Libby , Mateusz Guzik , Justin Hibbits Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0b128417-7107-5090-e65a-afa94fd1aed6@FreeBSD.org> Subject: Re: svn commit: r334708 - head/sys/kern References: <201806061257.w56CvCwq089369@repo.freebsd.org> <20180606140311.GU2450@kib.kiev.ua> <20180608033242.GA54099@pesky> <20180608173755.GJ2450@kib.kiev.ua> <20180608183010.GC65388@pesky> <20180608183732.GK2450@kib.kiev.ua> In-Reply-To: <20180608183732.GK2450@kib.kiev.ua> --gSEzCqGhF3w2oEwSXkvyFr5cqiusmgFTR Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Did this issue get resolved? On 6/8/2018 11:37 AM, Konstantin Belousov wrote: > On Fri, Jun 08, 2018 at 02:30:10PM -0400, Mark Johnston wrote: >> On Fri, Jun 08, 2018 at 08:37:55PM +0300, Konstantin Belousov wrote: >>> On Thu, Jun 07, 2018 at 11:02:29PM -0700, Ryan Libby wrote: >>>> On Thu, Jun 7, 2018 at 10:03 PM, Mateusz Guzik w= rote: >>>>> Checking it without any locks is perfectly valid in this case. It i= s done >>>>> after v_holdcnt gets bumped from a non-zero value. So at that time = it >>>>> is at least two. Of course that result is stale as an arbitrary num= ber of >>>>> other threads could have bumped and dropped the ref past that point= =2E >>>>> The minimum value is 1 since we hold the ref. But this means the >>>>> vnode must not be on the free list and that's what the assertion is= >>>>> verifying. >>>>> >>>>> The problem is indeed lack of ordering against the code clearing th= e >>>>> flag for the case where 2 threads to vhold and one does the 0->1 >>>>> transition. >>>>> >>>>> That said, the fence is required for the assertion to work. >>>>> >>>> >>>> Yeah, I agree with this logic. What I mean is that reordering betwe= en >>>> v_holdcnt 0->1 and v_iflag is normally settled by the release and >>>> acquisition of the vnode interlock, which we are supposed to hold fo= r >>>> v_*i*flag. A quick scan seems to show all of the checks of VI_FREE = that >>>> are not asserts do hold the vnode interlock. So, I'm just saying th= at I >>>> don't think the possible reordering affects them. >>> But do we know that only VI_FREE checks are affected ? >>> >>> My concern is that users of _vhold() rely on seeing up to date state = of the >>> vnode, and VI_FREE is only an example of the problem. Most likely, t= he >>> code which fetched the vnode pointer before _vhold() call, should gua= rantee >>> visibility. >> >> Wouldn't this be a problem only if we permit lockless accesses of vnod= e >> state outside of _vhold() and other vnode subroutines? The current >> protocol requires that the interlock be held, and this synchronizes wi= th >> code which performs 0->1 and 1->0 transitions of the hold count. If th= is >> requirement is relaxed in the future, then fences would indeed be >> needed. >=20 > I do not claim that my concern is a real problem. I stated it as a > thing to look at when deciding whether the fences should be added > (unconditionally ?). >=20 > If you argument is that the only current lock-less protocol for the > struct vnode state is the v_holdcnt transitions for > 1, then I can > agree with it. >=20 --=20 Regards, Bryan Drewery --gSEzCqGhF3w2oEwSXkvyFr5cqiusmgFTR-- --Ihlwrz2hwW8P4i4TIUbx990WlXF6P2iuy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE+Rc8ssOq6npcih8JNddxu25Gl88FAltQ4eFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 MTczQ0IyQzNBQUVBN0E1QzhBMUYwOTM1RDc3MUJCNkU0Njk3Q0YACgkQNddxu25G l8/FSwgAiaerDXHKcN3mkQPl+OjXxVlRPv0CDTsCivMjkB7bF4VXA9+SOHxK0vWt WTF65/+ypXSc1yNe66/rTd3WChArt2wIXNHRWIUcuGgJVUmClAOeYxKEJcCsm7+8 Je7Lku9NjHPF+C+LUmqGQZp3UTIgtl98nSExG6NnYH7P33mnnXpe+7lNVgmPaHxR 4XhNeklecwwLNU3HrZ9xW40GHrsF42taRPHdnRFGGhC3R9cRVafKSRpmZH4BAiMh p8eNaWf+T7PS7oUrLNtnEashbECUWHhYttKWT27SrYtfvEUGFzRPuoWh0Cp68CMB gHoxu0eTF9DXPEm6+rXh5Ub7hQVtOA== =Q/A4 -----END PGP SIGNATURE----- --Ihlwrz2hwW8P4i4TIUbx990WlXF6P2iuy-- From owner-svn-src-head@freebsd.org Thu Jul 19 19:22:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 302C2104698D; Thu, 19 Jul 2018 19:22:27 +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 D5E43760D6; Thu, 19 Jul 2018 19:22:26 +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 B71CC2D70C; Thu, 19 Jul 2018 19:22:26 +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 w6JJMQsZ013335; Thu, 19 Jul 2018 19:22:26 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JJMQL4013334; Thu, 19 Jul 2018 19:22:26 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807191922.w6JJMQL4013334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 19:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336501 - head/contrib/wpa/src/rsn_supp X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/src/rsn_supp X-SVN-Commit-Revision: 336501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:22:27 -0000 Author: cy Date: Thu Jul 19 19:22:26 2018 New Revision: 336501 URL: https://svnweb.freebsd.org/changeset/base/336501 Log: MFV: r336486 Prevent reinstallation of an already in-use group key. Upline git commit cb5132bb35698cc0c743e34fe0e845dfc4c3e410. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0002-Prevent-reinstallation-\ of-an-already-in-use-group-ke.patch X-MFC-with: r336203 Modified: head/contrib/wpa/src/rsn_supp/wpa.c Directory Properties: head/contrib/wpa/ (props changed) Modified: head/contrib/wpa/src/rsn_supp/wpa.c ============================================================================== --- head/contrib/wpa/src/rsn_supp/wpa.c Thu Jul 19 19:07:25 2018 (r336500) +++ head/contrib/wpa/src/rsn_supp/wpa.c Thu Jul 19 19:22:26 2018 (r336501) @@ -943,6 +943,15 @@ static int ieee80211w_set_keys(struct wpa_sm *sm, return -1; igtk = (const struct wpa_igtk_kde *) ie->igtk; + keyidx = WPA_GET_LE16(igtk->keyid); + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d " + "pn %02x%02x%02x%02x%02x%02x", + keyidx, MAC2STR(igtk->pn)); + wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", + igtk->igtk, len); + if (keyidx > 4095) { + wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, + "WPA: Invalid IGTK KeyID %d", keyidx); if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0) return -1; } @@ -3023,6 +3032,23 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 sub } else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) { const struct wpa_igtk_kde *igtk; + os_memset(&igd, 0, sizeof(igd)); + keylen = wpa_cipher_key_len(sm->mgmt_group_cipher); + os_memcpy(igd.keyid, buf + 2, 2); + os_memcpy(igd.pn, buf + 4, 6); + + keyidx = WPA_GET_LE16(igd.keyid); + os_memcpy(igd.igtk, buf + 10, keylen); + + wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)", + igd.igtk, keylen); + if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), + broadcast_ether_addr, + keyidx, 0, igd.pn, sizeof(igd.pn), + igd.igtk, keylen) < 0) { + wpa_printf(MSG_DEBUG, "Failed to install the IGTK in " + "WNM mode"); + os_memset(&igd, 0, sizeof(igd)); igtk = (const struct wpa_igtk_kde *) (buf + 2); if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0) return -1; From owner-svn-src-head@freebsd.org Thu Jul 19 19:32:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A79F51046E50; Thu, 19 Jul 2018 19:32:09 +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 5A6AF765CB; Thu, 19 Jul 2018 19:32:09 +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 3B9F32D99B; Thu, 19 Jul 2018 19:32:09 +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 w6JJW9x1018256; Thu, 19 Jul 2018 19:32:09 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JJW9Q6018255; Thu, 19 Jul 2018 19:32:09 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807191932.w6JJW9Q6018255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 19:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336502 - head/contrib/wpa X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa X-SVN-Commit-Revision: 336502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:32:09 -0000 Author: cy Date: Thu Jul 19 19:32:08 2018 New Revision: 336502 URL: https://svnweb.freebsd.org/changeset/base/336502 Log: MFV r336487: Import upline security patch: Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases. This git commit 87e2db16bafcbc60b8d0016175814a73c1e8ed45. This commit is is simply a pops change as r324696 already plugged this vulnerability. To maintain consistency with the vendor branch props will be changed. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-\ reinstallation-of-WNM-.patch Modified: Directory Properties: head/contrib/wpa/ (props changed) From owner-svn-src-head@freebsd.org Thu Jul 19 19:33:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F00D1046F33; Thu, 19 Jul 2018 19:33:44 +0000 (UTC) (envelope-from tuexen@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 447BD768AF; Thu, 19 Jul 2018 19:33:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 061AE2D9C1; Thu, 19 Jul 2018 19:33:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JJXhhu018388; Thu, 19 Jul 2018 19:33:43 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JJXhof018383; Thu, 19 Jul 2018 19:33:43 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807191933.w6JJXhof018383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 19 Jul 2018 19:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336503 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 336503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:33:45 -0000 Author: tuexen Date: Thu Jul 19 19:33:42 2018 New Revision: 336503 URL: https://svnweb.freebsd.org/changeset/base/336503 Log: Whitespace changes due to change if ident. Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_asconf.h head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_bsd_addr.h head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_peeloff.c head/sys/netinet/sctp_ss_functions.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/sctp6_var.h Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Thu Jul 19 19:32:08 2018 (r336502) +++ head/sys/netinet/sctp.h Thu Jul 19 19:33:42 2018 (r336503) @@ -419,7 +419,7 @@ struct sctp_error_unresolv_addr { struct sctp_error_unrecognized_chunk { struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNRECOG_CHUNK */ - struct sctp_chunkhdr ch;/* header from chunk in error */ + struct sctp_chunkhdr ch; /* header from chunk in error */ } SCTP_PACKED; struct sctp_error_no_user_data { Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Thu Jul 19 19:32:08 2018 (r336502) +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 (r336503) @@ -99,7 +99,7 @@ sctp_asconf_success_response(uint32_t id) } static struct mbuf * -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv, uint16_t tlv_length) { struct mbuf *m_reply = NULL; @@ -134,7 +134,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause return (NULL); } if (error_tlv != NULL) { - tlv = (uint8_t *)(error + 1); + tlv = (uint8_t *) (error + 1); memcpy(tlv, error_tlv, tlv_length); } SCTP_BUF_LEN(m_reply) = aph->ph.param_length; @@ -224,7 +224,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, + SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, aparam_length); return (m_reply); } /* end switch */ @@ -239,7 +239,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc /* add the address */ if (bad_address) { m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, + SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, aparam_length); } else if (sctp_add_remote_addr(stcb, sa, &net, stcb->asoc.port, SCTP_DONOT_SETSCOPE, @@ -247,7 +247,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_add_ip: error adding address\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *)aph, + SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *) aph, aparam_length); } else { /* notify upper layer */ @@ -277,6 +277,7 @@ sctp_asconf_del_remote_addrs_except(struct sctp_tcb *s /* not found */ return (-1); } + /* delete all destination addresses except the source */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (net != src_net) { @@ -369,7 +370,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, aparam_length); return (m_reply); } @@ -379,10 +380,11 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, /* trying to delete the source address! */ SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete source addr\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *)aph, + SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *) aph, aparam_length); return (m_reply); } + /* if deleting 0.0.0.0/::0, delete all addresses except src addr */ if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { result = sctp_asconf_del_remote_addrs_except(stcb, src); @@ -393,7 +395,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, /* what error to reply with?? */ m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *)aph, + SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *) aph, aparam_length); } else if (response_required) { m_reply = @@ -401,6 +403,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, } return (m_reply); } + /* delete the address */ result = sctp_del_remote_addr(stcb, sa); /* @@ -412,7 +415,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, /* only one address in the asoc */ SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete last IP addr!\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *)aph, + SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *) aph, aparam_length); } else { if (response_required) { @@ -494,7 +497,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, aparam_length); return (m_reply); } @@ -565,7 +568,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, "process_asconf_set_primary: set primary failed!\n"); /* must have been an invalid address, so report */ m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, aparam_length); } @@ -616,6 +619,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset serial_num, asoc->asconf_seq_in + 1); return; } + /* it's the expected "next" sequence number, so process it */ asoc->asconf_seq_in = serial_num; /* update sequence */ /* get length of all the param's in the ASCONF */ @@ -640,6 +644,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_asconf_ack), ack); } } + m_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_ack_chunk), 0, M_NOWAIT, 1, MT_DATA); if (m_ack == NULL) { @@ -660,7 +665,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset /* skip the lookup address parameter */ offset += sizeof(struct sctp_asconf_chunk); - p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *)&aparam_buf); + p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *) & aparam_buf); if (p_addr == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: couldn't get lookup addr!\n"); @@ -670,7 +675,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset /* param_length is already validated in process_control... */ offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */ /* get pointer to first asconf param in ASCONF */ - aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf); + aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *) & aparam_buf); if (aph == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "Empty ASCONF received?\n"); goto send_reply; @@ -767,7 +772,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset /* get pointer to next asconf param */ aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), - (uint8_t *)&aparam_buf); + (uint8_t *) & aparam_buf); if (aph == NULL) { /* can't get an asconf paramhdr */ SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: can't get asconf param hdr!\n"); @@ -816,8 +821,7 @@ send_reply: * does the address match? returns 0 if not, 1 if so */ static uint32_t -sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa) -{ +sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa){ switch (sa->sa_family) { #ifdef INET6 case AF_INET6: @@ -856,8 +860,7 @@ sctp_asconf_addr_match(struct sctp_asconf_addr *aa, st * does the address match? returns 0 if not, 1 if so */ static uint32_t -sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa) -{ +sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa){ #if defined(INET) || defined(INET6) uint16_t param_type, param_length; @@ -974,6 +977,7 @@ sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, st if (stcb->asoc.deleted_primary == NULL) { return; } + if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) { SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: Deleted primary is "); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.deleted_primary->ro._l_addr.sa); @@ -1077,6 +1081,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc } return; } + /* Multiple local addresses exsist in the association. */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { /* clear any cached route and source address */ @@ -1096,7 +1101,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc * NOT corresponding to the current nexthop, the path will * not be changed. */ - SCTP_RTALLOC((sctp_route_t *)&net->ro, + SCTP_RTALLOC((sctp_route_t *) & net->ro, stcb->sctp_ep->def_vrf_id, stcb->sctp_ep->fibnum); if (net->ro.ro_rt == NULL) @@ -1106,7 +1111,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc switch (net->ro._l_addr.sa.sa_family) { #ifdef INET case AF_INET: - if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *)&net->ro)) { + if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *) & net->ro)) { changed = 1; } break; @@ -1114,7 +1119,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc #ifdef INET6 case AF_INET6: if (sctp_v6src_match_nexthop( - &newifa->address.sin6, (sctp_route_t *)&net->ro)) { + &newifa->address.sin6, (sctp_route_t *) & net->ro)) { changed = 1; } break; @@ -1323,6 +1328,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc if (stcb->asoc.asconf_supported == 0) { return (-1); } + /* * if this is deleting the last address from the assoc, mark it as * pending. @@ -1343,6 +1349,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc return (-1); } } + /* queue an asconf parameter */ status = sctp_asconf_queue_mgmt(stcb, ifa, type); @@ -1364,6 +1371,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc stcb->asoc.asconf_addr_del_pending = NULL; } } + if (pending_delete_queued) { struct sctp_nets *net; @@ -1388,6 +1396,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc SCTP_FROM_SCTP_ASCONF, __LINE__); } + /* queue in an advisory set primary too */ (void)sctp_asconf_queue_mgmt(stcb, ifa, SCTP_SET_PRIM_ADDR); /* let caller know we should send this out immediately */ @@ -1685,11 +1694,13 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, serial_num, asoc->asconf_seq_out_acked + 1); return; } + if (serial_num == asoc->asconf_seq_out - 1) { /* stop our timer */ sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); } + /* process the ASCONF-ACK contents */ ack_length = ntohs(cp->ch.chunk_length) - sizeof(struct sctp_asconf_ack_chunk); @@ -1778,7 +1789,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, * at any given time */ if (last_error_id == 0) - last_error_id--;/* set to "max" value */ + last_error_id--; /* set to "max" value */ TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { if (aa->sent == 1) { /* @@ -1818,8 +1829,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, #ifdef INET6 static uint32_t -sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa) -{ +sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa){ struct sockaddr_in6 *sin6, *net6; struct sctp_nets *net; @@ -2058,6 +2068,7 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, vo laddr->action = 0; break; } + } } else if (l->action == SCTP_DEL_IP_ADDRESS) { LIST_FOREACH_SAFE(laddr, &inp->sctp_addr_list, sctp_nxt_addr, nladdr) { @@ -2091,6 +2102,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru if (ifa->vrf_id != stcb->asoc.vrf_id) { continue; } + /* Same checks again for assoc */ switch (ifa->address.sa.sa_family) { #ifdef INET6 @@ -2269,8 +2281,7 @@ sctp_asconf_iterator_end(void *ptr, uint32_t val SCTP_ * returns: 0 = completed, -1 = error */ int32_t -sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa) -{ +sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa){ uint32_t vrf_id; struct sctp_ifa *ifa; @@ -2281,6 +2292,7 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, /* Invalid address */ return (-1); } + /* queue an ASCONF:SET_PRIM_ADDR to be sent */ if (!sctp_asconf_queue_add(stcb, ifa, SCTP_SET_PRIM_ADDR)) { /* set primary queuing succeeded */ @@ -2359,11 +2371,13 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: param length(%u) too short\n", param_length); break; } + aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(chk->data, offset, param_length, aparam_buf); if (aph == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: couldn't get entire param\n"); break; } + ph = (struct sctp_paramhdr *)(aph + 1); if (sctp_addr_match(ph, &sctp_ifa->address.sa) != 0) { switch (param_type) { @@ -2378,6 +2392,7 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct } last_param_type = param_type; } + offset += SCTP_SIZE32(param_length); if (offset >= asconf_limit) { /* no more data in the mbuf chain */ @@ -2461,6 +2476,7 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int a if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { continue; } + sin6 = &sctp_ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* @@ -2754,7 +2770,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, /* go through the addresses in the init-ack */ ph = (struct sctp_paramhdr *) sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), - (uint8_t *)&tmp_param); + (uint8_t *) & tmp_param); while (ph != NULL) { ptype = ntohs(ph->param_type); plen = ntohs(ph->param_length); @@ -2768,7 +2784,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, a6p = (struct sctp_ipv6addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv6addr_param), - (uint8_t *)&addr6_store); + (uint8_t *) & addr6_store); if (plen != sizeof(struct sctp_ipv6addr_param) || a6p == NULL) { return; @@ -2789,7 +2805,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, /* get the entire IPv4 address param */ a4p = (struct sctp_ipv4addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_ipv4addr_param), - (uint8_t *)&addr4_store); + (uint8_t *) & addr4_store); if (plen != sizeof(struct sctp_ipv4addr_param) || a4p == NULL) { return; @@ -2836,6 +2852,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, } } } + next_addr: /* * Sanity check: Make sure the length isn't 0, otherwise @@ -2851,7 +2868,7 @@ next_addr: if ((offset + sizeof(struct sctp_paramhdr)) > length) return; ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); } /* while */ } @@ -2861,8 +2878,7 @@ next_addr: * 1 if found, 0 if not */ static uint32_t -sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa) -{ +sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa){ struct sctp_paramhdr tmp_param, *ph; uint16_t plen, ptype; #ifdef INET @@ -2902,7 +2918,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, } /* go through the addresses in the init-ack */ ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); while (ph != NULL) { ptype = ntohs(ph->param_type); plen = ntohs(ph->param_length); @@ -2918,7 +2934,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, a6p = (struct sctp_ipv6addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv6addr_param), - (uint8_t *)&addr6_store); + (uint8_t *) & addr6_store); if (a6p == NULL) { return (0); } @@ -2948,7 +2964,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, a4p = (struct sctp_ipv4addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv4addr_param), - (uint8_t *)&addr4_store); + (uint8_t *) & addr4_store); if (a4p == NULL) { return (0); } @@ -2970,7 +2986,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, } ph = (struct sctp_paramhdr *) sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), - (uint8_t *)&tmp_param); + (uint8_t *) & tmp_param); } /* while */ /* not found! */ return (0); @@ -3141,8 +3157,7 @@ sctp_check_address_list(struct sctp_tcb *stcb, struct */ uint32_t sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct sockaddr *sa, - uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap) -{ + uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap){ struct sctp_ifa *ifa; struct sctp_laddr *laddr, *nladdr; @@ -3370,6 +3385,7 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc if (vrf == NULL) { goto skip_rest; } + SCTP_IPI_ADDR_RLOCK(); LIST_FOREACH(sctp_ifnp, &vrf->ifnlist, next_ifn) { LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { Modified: head/sys/netinet/sctp_asconf.h ============================================================================== --- head/sys/netinet/sctp_asconf.h Thu Jul 19 19:32:08 2018 (r336502) +++ head/sys/netinet/sctp_asconf.h Thu Jul 19 19:33:42 2018 (r336503) @@ -60,10 +60,10 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct socka uint32_t, uint32_t, struct sctp_ifa *); -extern int +extern int sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val); -extern void +extern void sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, uint32_t type); Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Thu Jul 19 19:32:08 2018 (r336502) +++ head/sys/netinet/sctp_auth.c Thu Jul 19 19:33:42 2018 (r336503) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); void -sctp_clear_chunklist(sctp_auth_chklist_t *chklist) +sctp_clear_chunklist(sctp_auth_chklist_t * chklist) { memset(chklist, 0, sizeof(*chklist)); /* chklist->num_chunks = 0; */ @@ -75,14 +75,14 @@ sctp_alloc_chunklist(void) } void -sctp_free_chunklist(sctp_auth_chklist_t *list) +sctp_free_chunklist(sctp_auth_chklist_t * list) { if (list != NULL) SCTP_FREE(list, SCTP_M_AUTH_CL); } sctp_auth_chklist_t * -sctp_copy_chunklist(sctp_auth_chklist_t *list) +sctp_copy_chunklist(sctp_auth_chklist_t * list) { sctp_auth_chklist_t *new_list; @@ -104,7 +104,7 @@ sctp_copy_chunklist(sctp_auth_chklist_t *list) * add a chunk to the required chunks list */ int -sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t *list) +sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t * list) { if (list == NULL) return (-1); @@ -130,7 +130,7 @@ sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t * delete a chunk from the required chunks list */ int -sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t *list) +sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t * list) { if (list == NULL) return (-1); @@ -146,7 +146,7 @@ sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklis } size_t -sctp_auth_get_chklist_size(const sctp_auth_chklist_t *list) +sctp_auth_get_chklist_size(const sctp_auth_chklist_t * list) { if (list == NULL) return (0); @@ -159,7 +159,7 @@ sctp_auth_get_chklist_size(const sctp_auth_chklist_t * * guarantee ptr has space for up to 256 bytes */ int -sctp_serialize_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) +sctp_serialize_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * ptr) { int i, count = 0; @@ -176,7 +176,7 @@ sctp_serialize_auth_chunks(const sctp_auth_chklist_t * } int -sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) +sctp_pack_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * ptr) { int i, size = 0; @@ -208,8 +208,8 @@ sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, } int -sctp_unpack_auth_chunks(const uint8_t *ptr, uint8_t num_chunks, - sctp_auth_chklist_t *list) +sctp_unpack_auth_chunks(const uint8_t * ptr, uint8_t num_chunks, + sctp_auth_chklist_t * list) { int i; int size; @@ -259,14 +259,14 @@ sctp_alloc_key(uint32_t keylen) } void -sctp_free_key(sctp_key_t *key) +sctp_free_key(sctp_key_t * key) { if (key != NULL) SCTP_FREE(key, SCTP_M_AUTH_KY); } void -sctp_print_key(sctp_key_t *key, const char *str) +sctp_print_key(sctp_key_t * key, const char *str) { uint32_t i; @@ -285,7 +285,7 @@ sctp_print_key(sctp_key_t *key, const char *str) } void -sctp_show_key(sctp_key_t *key, const char *str) +sctp_show_key(sctp_key_t * key, const char *str) { uint32_t i; @@ -304,8 +304,7 @@ sctp_show_key(sctp_key_t *key, const char *str) } static uint32_t -sctp_get_keylen(sctp_key_t *key) -{ +sctp_get_keylen(sctp_key_t * key) { if (key != NULL) return (key->keylen); else @@ -331,7 +330,7 @@ sctp_generate_random_key(uint32_t keylen) } sctp_key_t * -sctp_set_key(uint8_t *key, uint32_t keylen) +sctp_set_key(uint8_t * key, uint32_t keylen) { sctp_key_t *new_key; @@ -351,7 +350,7 @@ sctp_set_key(uint8_t *key, uint32_t keylen) * 0 if key1 = key2 */ static int -sctp_compare_key(sctp_key_t *key1, sctp_key_t *key2) +sctp_compare_key(sctp_key_t * key1, sctp_key_t * key2) { uint32_t maxlen; uint32_t i; @@ -402,7 +401,7 @@ sctp_compare_key(sctp_key_t *key1, sctp_key_t *key2) * order for concatenation */ sctp_key_t * -sctp_compute_hashkey(sctp_key_t *key1, sctp_key_t *key2, sctp_key_t *shared) +sctp_compute_hashkey(sctp_key_t * key1, sctp_key_t * key2, sctp_key_t * shared) { uint32_t keylen; sctp_key_t *new_key; @@ -476,7 +475,7 @@ sctp_alloc_sharedkey(void) } void -sctp_free_sharedkey(sctp_sharedkey_t *skey) +sctp_free_sharedkey(sctp_sharedkey_t * skey) { if (skey == NULL) return; @@ -502,7 +501,7 @@ sctp_find_sharedkey(struct sctp_keyhead *shared_keys, int sctp_insert_sharedkey(struct sctp_keyhead *shared_keys, - sctp_sharedkey_t *new_skey) + sctp_sharedkey_t * new_skey) { sctp_sharedkey_t *skey; @@ -596,8 +595,7 @@ sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t } static sctp_sharedkey_t * -sctp_copy_sharedkey(const sctp_sharedkey_t *skey) -{ +sctp_copy_sharedkey(const sctp_sharedkey_t * skey){ sctp_sharedkey_t *new_skey; if (skey == NULL) @@ -654,7 +652,7 @@ sctp_alloc_hmaclist(uint16_t num_hmacs) } void -sctp_free_hmaclist(sctp_hmaclist_t *list) +sctp_free_hmaclist(sctp_hmaclist_t * list) { if (list != NULL) { SCTP_FREE(list, SCTP_M_AUTH_HL); @@ -663,7 +661,7 @@ sctp_free_hmaclist(sctp_hmaclist_t *list) } int -sctp_auth_add_hmacid(sctp_hmaclist_t *list, uint16_t hmac_id) +sctp_auth_add_hmacid(sctp_hmaclist_t * list, uint16_t hmac_id) { int i; @@ -691,7 +689,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t *list, uint16_t h } sctp_hmaclist_t * -sctp_copy_hmaclist(sctp_hmaclist_t *list) +sctp_copy_hmaclist(sctp_hmaclist_t * list) { sctp_hmaclist_t *new_list; int i; @@ -729,8 +727,7 @@ sctp_default_supported_hmaclist(void) * find the best HMAC id to use for the peer based on local support */ uint16_t -sctp_negotiate_hmacid(sctp_hmaclist_t *peer, sctp_hmaclist_t *local) -{ +sctp_negotiate_hmacid(sctp_hmaclist_t * peer, sctp_hmaclist_t * local) { int i, j; if ((local == NULL) || (peer == NULL)) @@ -756,7 +753,7 @@ sctp_negotiate_hmacid(sctp_hmaclist_t *peer, sctp_hmac * caller must guarantee ptr has appropriate space */ int -sctp_serialize_hmaclist(sctp_hmaclist_t *list, uint8_t *ptr) +sctp_serialize_hmaclist(sctp_hmaclist_t * list, uint8_t * ptr) { int i; uint16_t hmac_id; @@ -802,7 +799,7 @@ sctp_alloc_authinfo(void) } void -sctp_free_authinfo(sctp_authinfo_t *authinfo) +sctp_free_authinfo(sctp_authinfo_t * authinfo) { if (authinfo == NULL) return; @@ -822,8 +819,7 @@ sctp_free_authinfo(sctp_authinfo_t *authinfo) uint32_t -sctp_get_auth_chunk_len(uint16_t hmac_algo) -{ +sctp_get_auth_chunk_len(uint16_t hmac_algo) { int size; size = sizeof(struct sctp_auth_chunk) + sctp_get_hmac_digest_len(hmac_algo); @@ -831,8 +827,7 @@ sctp_get_auth_chunk_len(uint16_t hmac_algo) } uint32_t -sctp_get_hmac_digest_len(uint16_t hmac_algo) -{ +sctp_get_hmac_digest_len(uint16_t hmac_algo) { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: return (SCTP_AUTH_DIGEST_LEN_SHA1); @@ -860,7 +855,7 @@ sctp_get_hmac_block_len(uint16_t hmac_algo) } static void -sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t *ctx) +sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t * ctx) { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: @@ -877,8 +872,8 @@ sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t } static void -sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t *ctx, - uint8_t *text, uint32_t textlen) +sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t * ctx, + uint8_t * text, uint32_t textlen) { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: @@ -895,8 +890,8 @@ sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context } static void -sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t *ctx, - uint8_t *digest) +sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t * ctx, + uint8_t * digest) { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: @@ -923,9 +918,8 @@ sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_ * resultant digest. */ uint32_t -sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, - uint8_t *text, uint32_t textlen, uint8_t *digest) -{ +sctp_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, + uint8_t * text, uint32_t textlen, uint8_t * digest) { uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -983,9 +977,8 @@ sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t k /* mbuf version */ uint32_t -sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, - struct mbuf *m, uint32_t m_offset, uint8_t *digest, uint32_t trailer) -{ +sctp_hmac_m(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, + struct mbuf *m, uint32_t m_offset, uint8_t * digest, uint32_t trailer){ uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -1031,17 +1024,17 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t sctp_hmac_update(hmac_algo, &ctx, ipad, blocklen); /* find the correct starting mbuf and offset (get start of text) */ m_tmp = m; - while ((m_tmp != NULL) && (m_offset >= (uint32_t)SCTP_BUF_LEN(m_tmp))) { + while ((m_tmp != NULL) && (m_offset >= (uint32_t) SCTP_BUF_LEN(m_tmp))) { m_offset -= SCTP_BUF_LEN(m_tmp); m_tmp = SCTP_BUF_NEXT(m_tmp); } /* now use the rest of the mbuf chain for the text */ while (m_tmp != NULL) { if ((SCTP_BUF_NEXT(m_tmp) == NULL) && trailer) { - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, SCTP_BUF_LEN(m_tmp) - (trailer + m_offset)); } else { - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, SCTP_BUF_LEN(m_tmp) - m_offset); } @@ -1066,9 +1059,9 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t * Returns -1 on error, 0 on success. */ int -sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, - uint8_t *text, uint32_t textlen, - uint8_t *digest, uint32_t digestlen) +sctp_verify_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, + uint8_t * text, uint32_t textlen, + uint8_t * digest, uint32_t digestlen) { uint32_t len; uint8_t temp[SCTP_AUTH_DIGEST_LEN_MAX]; @@ -1099,9 +1092,8 @@ sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uin * the keylen exceeds the HMAC block len). */ uint32_t -sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, uint8_t *text, - uint32_t textlen, uint8_t *digest) -{ +sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t * key, uint8_t * text, + uint32_t textlen, uint8_t * digest) { uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -1134,9 +1126,8 @@ sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, /* mbuf version */ uint32_t -sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t *key, struct mbuf *m, - uint32_t m_offset, uint8_t *digest) -{ +sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t * key, struct mbuf *m, + uint32_t m_offset, uint8_t * digest){ uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -1166,7 +1157,7 @@ sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t *ke } int -sctp_auth_is_supported_hmac(sctp_hmaclist_t *list, uint16_t id) +sctp_auth_is_supported_hmac(sctp_hmaclist_t * list, uint16_t id) { int i; @@ -1309,6 +1300,7 @@ sctp_auth_setactivekey(struct sctp_tcb *stcb, uint16_t /* can't reactivate a deactivated key with other refcounts */ return (-1); } + /* set the (new) active key */ stcb->asoc.authinfo.active_keyid = keyid; /* reset the deactivated flag */ @@ -1363,6 +1355,7 @@ sctp_deact_sharedkey(struct sctp_tcb *stcb, uint16_t k sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, keyid, 0, SCTP_SO_LOCKED); } + /* mark the key as deactivated */ skey->deactivated = 1; @@ -1424,7 +1417,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str length += offset; phdr = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); while (phdr != NULL) { ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); @@ -1491,7 +1484,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (offset + sizeof(struct sctp_paramhdr) > length) break; phdr = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), - (uint8_t *)&tmp_param); + (uint8_t *) & tmp_param); } /* concatenate the full random key */ keylen = sizeof(*p_random) + random_len + sizeof(*hmacs) + hmacs_len; @@ -1582,6 +1575,7 @@ sctp_fill_hmac_digest_m(struct mbuf *m, uint32_t auth_ "Assoc Key"); #endif } + /* set in the active key id */ auth->shared_key_id = htons(keyid); @@ -1603,14 +1597,14 @@ sctp_zero_m(struct mbuf *m, uint32_t m_offset, uint32_ /* find the correct starting mbuf and offset (get start position) */ m_tmp = m; - while ((m_tmp != NULL) && (m_offset >= (uint32_t)SCTP_BUF_LEN(m_tmp))) { + while ((m_tmp != NULL) && (m_offset >= (uint32_t) SCTP_BUF_LEN(m_tmp))) { m_offset -= SCTP_BUF_LEN(m_tmp); m_tmp = SCTP_BUF_NEXT(m_tmp); } /* now use the rest of the mbuf chain */ while ((m_tmp != NULL) && (size > 0)) { - data = mtod(m_tmp, uint8_t *)+m_offset; - if (size > (uint32_t)(SCTP_BUF_LEN(m_tmp) - m_offset)) { + data = mtod(m_tmp, uint8_t *) + m_offset; + if (size > (uint32_t) (SCTP_BUF_LEN(m_tmp) - m_offset)) { memset(data, 0, SCTP_BUF_LEN(m_tmp) - m_offset); size -= SCTP_BUF_LEN(m_tmp) - m_offset; } else { @@ -1769,6 +1763,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint /* If the socket is gone we are out of here */ return; } + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_AUTHEVNT)) /* event not enabled */ return; @@ -1929,6 +1924,7 @@ sctp_validate_init_auth_params(struct mbuf *m, int off if (num_chunks) got_chklist = 1; } + offset += SCTP_SIZE32(plen); if (offset >= limit) { break; @@ -2023,6 +2019,7 @@ sctp_initialize_auth_params(struct sctp_inpcb *inp, st new_key->key[keylen++] = i; } } + /* append in the HMACs */ ph = (struct sctp_paramhdr *)(new_key->key + keylen); ph->param_type = htons(SCTP_HMAC_LIST); Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Thu Jul 19 19:32:08 2018 (r336502) +++ head/sys/netinet/sctp_auth.h Thu Jul 19 19:33:42 2018 (r336503) @@ -53,12 +53,12 @@ __FBSDID("$FreeBSD$"); typedef union sctp_hash_context { SCTP_SHA1_CTX sha1; SCTP_SHA256_CTX sha256; -} sctp_hash_context_t; +} sctp_hash_context_t; typedef struct sctp_key { uint32_t keylen; uint8_t key[]; -} sctp_key_t; +} sctp_key_t; typedef struct sctp_shared_key { LIST_ENTRY(sctp_shared_key) next; @@ -66,7 +66,7 @@ typedef struct sctp_shared_key { uint32_t refcount; /* reference count */ uint16_t keyid; /* shared key ID */ uint8_t deactivated; /* key is deactivated */ -} sctp_sharedkey_t; +} sctp_sharedkey_t; LIST_HEAD(sctp_keyhead, sctp_shared_key); @@ -74,26 +74,26 @@ LIST_HEAD(sctp_keyhead, sctp_shared_key); typedef struct sctp_auth_chklist { uint8_t chunks[256]; uint8_t num_chunks; -} sctp_auth_chklist_t; +} sctp_auth_chklist_t; /* hmac algos supported list */ typedef struct sctp_hmaclist { uint16_t max_algo; /* max algorithms allocated */ uint16_t num_algo; /* num algorithms used */ uint16_t hmac[]; -} sctp_hmaclist_t; +} sctp_hmaclist_t; /* authentication info */ typedef struct sctp_authinformation { sctp_key_t *random; /* local random key (concatenated) */ uint32_t random_len; /* local random number length for param */ - sctp_key_t *peer_random;/* peer's random key (concatenated) */ + sctp_key_t *peer_random; /* peer's random key (concatenated) */ sctp_key_t *assoc_key; /* cached concatenated send key */ sctp_key_t *recv_key; /* cached concatenated recv key */ uint16_t active_keyid; /* active send keyid */ uint16_t assoc_keyid; /* current send keyid (cached) */ uint16_t recv_keyid; /* last recv keyid (cached) */ -} sctp_authinfo_t; +} sctp_authinfo_t; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Jul 19 19:41:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6BC61047349; Thu, 19 Jul 2018 19:41:39 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2050876CC8; Thu, 19 Jul 2018 19:41:39 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lj1-f174.google.com with SMTP id 203-v6so9068659ljj.13; Thu, 19 Jul 2018 12:41:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tzQ+xbQI4ObjJQwbYvJHcs3SJ7rX19/ECeyIrvxHRn8=; b=rcXu5Db4axaftS5PXMv8Y07Xx2wofdDMrDjYZsTNIk4/0Gk+yV6X8mgVOVVXl5n70J vUvNOCLYr2flN70/SRRypT5H5Uj3ZFNCWhtW5vxL9p4XiCemMgwPy/HJEYBlQt5aFQ55 rUFIL3ILPXQZi+QiwPr4fIHFBIbsW0vX8LCQposihlz/L2EG/Cx1az7InIfB4e/t2zzF 7qMfICxFcF6cPXU1I5oKUP9oX0uFiKjzt4iMg42VXlWITKB/9y4Ee8jP6F5W6DRRygmt 8HlV+ZMj8Kc2IkD4Gq/p7FuhgVjaNJb6WV2BXcXoEm2SBzm8mxYeG0TmExCyxl8JqI9h sYKA== X-Gm-Message-State: AOUpUlEoTMcbL3cZo9M5V1YPCml++awYnryc8CaIMQNhCVFCxdMpgdvx 4s6KjWVyFKZIsrLF/UjAyuEuSh4y8mM2F2zdX1/9pg== X-Google-Smtp-Source: AAOMgpftdvF5RW4rJZfVraOcQ09gnGYmN57QV8e9Tx6Km2460G08wKy5QaIcwEMU+7ALG2+pLkkiLQ6Ao2UxrhUOK/Q= X-Received: by 2002:a2e:944:: with SMTP id 65-v6mr8600895ljj.30.1532028922149; Thu, 19 Jul 2018 12:35:22 -0700 (PDT) MIME-Version: 1.0 References: <201806061257.w56CvCwq089369@repo.freebsd.org> <20180606140311.GU2450@kib.kiev.ua> <20180608033242.GA54099@pesky> <20180608173755.GJ2450@kib.kiev.ua> <20180608183010.GC65388@pesky> <20180608183732.GK2450@kib.kiev.ua> <0b128417-7107-5090-e65a-afa94fd1aed6@FreeBSD.org> In-Reply-To: <0b128417-7107-5090-e65a-afa94fd1aed6@FreeBSD.org> From: Justin Hibbits Date: Thu, 19 Jul 2018 14:35:08 -0500 Message-ID: Subject: Re: svn commit: r334708 - head/sys/kern To: Bryan Drewery Cc: Konstantin Belousov , Mark Johnston , Ryan Libby , mjguzik@gmail.com, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:41:39 -0000 To the best of my understanding, the underlying race condition within the assert has not been solved. I've worked around it for now by simply removing the assert, but that's just a workaround to keep my development going. - Justin On Thu, Jul 19, 2018 at 2:09 PM Bryan Drewery wrote: > > Did this issue get resolved? > > On 6/8/2018 11:37 AM, Konstantin Belousov wrote: > > On Fri, Jun 08, 2018 at 02:30:10PM -0400, Mark Johnston wrote: > >> On Fri, Jun 08, 2018 at 08:37:55PM +0300, Konstantin Belousov wrote: > >>> On Thu, Jun 07, 2018 at 11:02:29PM -0700, Ryan Libby wrote: > >>>> On Thu, Jun 7, 2018 at 10:03 PM, Mateusz Guzik wrote: > >>>>> Checking it without any locks is perfectly valid in this case. It is done > >>>>> after v_holdcnt gets bumped from a non-zero value. So at that time it > >>>>> is at least two. Of course that result is stale as an arbitrary number of > >>>>> other threads could have bumped and dropped the ref past that point. > >>>>> The minimum value is 1 since we hold the ref. But this means the > >>>>> vnode must not be on the free list and that's what the assertion is > >>>>> verifying. > >>>>> > >>>>> The problem is indeed lack of ordering against the code clearing the > >>>>> flag for the case where 2 threads to vhold and one does the 0->1 > >>>>> transition. > >>>>> > >>>>> That said, the fence is required for the assertion to work. > >>>>> > >>>> > >>>> Yeah, I agree with this logic. What I mean is that reordering between > >>>> v_holdcnt 0->1 and v_iflag is normally settled by the release and > >>>> acquisition of the vnode interlock, which we are supposed to hold for > >>>> v_*i*flag. A quick scan seems to show all of the checks of VI_FREE that > >>>> are not asserts do hold the vnode interlock. So, I'm just saying that I > >>>> don't think the possible reordering affects them. > >>> But do we know that only VI_FREE checks are affected ? > >>> > >>> My concern is that users of _vhold() rely on seeing up to date state of the > >>> vnode, and VI_FREE is only an example of the problem. Most likely, the > >>> code which fetched the vnode pointer before _vhold() call, should guarantee > >>> visibility. > >> > >> Wouldn't this be a problem only if we permit lockless accesses of vnode > >> state outside of _vhold() and other vnode subroutines? The current > >> protocol requires that the interlock be held, and this synchronizes with > >> code which performs 0->1 and 1->0 transitions of the hold count. If this > >> requirement is relaxed in the future, then fences would indeed be > >> needed. > > > > I do not claim that my concern is a real problem. I stated it as a > > thing to look at when deciding whether the fences should be added > > (unconditionally ?). > > > > If you argument is that the only current lock-less protocol for the > > struct vnode state is the v_holdcnt transitions for > 1, then I can > > agree with it. > > > > > -- > Regards, > Bryan Drewery > From owner-svn-src-head@freebsd.org Thu Jul 19 19:50:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 717E41047754; Thu, 19 Jul 2018 19:50:43 +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 23F0977155; Thu, 19 Jul 2018 19:50:43 +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 0519C2DB63; Thu, 19 Jul 2018 19:50:43 +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 w6JJog6Q023950; Thu, 19 Jul 2018 19:50:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JJogG3023948; Thu, 19 Jul 2018 19:50:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807191950.w6JJogG3023948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 19 Jul 2018 19:50:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336504 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 336504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:50:43 -0000 Author: markj Date: Thu Jul 19 19:50:42 2018 New Revision: 336504 URL: https://svnweb.freebsd.org/changeset/base/336504 Log: Provide the full module path to preload_delete_name(). The basename will never match against the preload metadata, so these calls previously had no effect. Reviewed by: kib, royger MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16330 Modified: head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Thu Jul 19 19:33:42 2018 (r336503) +++ head/sys/kern/link_elf.c Thu Jul 19 19:50:42 2018 (r336504) @@ -1168,8 +1168,8 @@ link_elf_unload_file(linker_file_t file) static void link_elf_unload_preload(linker_file_t file) { - if (file->filename != NULL) - preload_delete_name(file->filename); + if (file->pathname != NULL) + preload_delete_name(file->pathname); } static const char * Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Thu Jul 19 19:33:42 2018 (r336503) +++ head/sys/kern/link_elf_obj.c Thu Jul 19 19:50:42 2018 (r336504) @@ -1038,8 +1038,8 @@ link_elf_unload_file(linker_file_t file) free(ef->ctftab, M_LINKER); free(ef->ctfoff, M_LINKER); free(ef->typoff, M_LINKER); - if (file->filename != NULL) - preload_delete_name(file->filename); + if (file->pathname != NULL) + preload_delete_name(file->pathname); /* XXX reclaim module memory? */ return; } From owner-svn-src-head@freebsd.org Thu Jul 19 19:53:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E4331047A00; Thu, 19 Jul 2018 19:53:03 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C75A77756A; Thu, 19 Jul 2018 19:53:02 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id A6B29179D; Thu, 19 Jul 2018 19:53:02 +0000 (UTC) Date: Thu, 19 Jul 2018 19:53:02 +0000 From: Alexey Dokuchaev To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 Message-ID: <20180719195302.GA26853@FreeBSD.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807191933.w6JJXhof018383@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:53:03 -0000 On Thu, Jul 19, 2018 at 07:33:43PM +0000, Michael Tuexen wrote: > New Revision: 336503 > URL: https://svnweb.freebsd.org/changeset/base/336503 > > Log: > Whitespace changes due to change if ident. Was it reviewed? Commit log does not answer this not does it explain why these changes are good. > +++ head/sys/netinet/sctp.h Thu Jul 19 19:33:42 2018 (r336503) > @@ -419,7 +419,7 @@ struct sctp_error_unresolv_addr { > > struct sctp_error_unrecognized_chunk { > struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNRECOG_CHUNK */ > - struct sctp_chunkhdr ch;/* header from chunk in error */ > + struct sctp_chunkhdr ch; /* header from chunk in error */ This feems fine. > +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 (r336503) > static struct mbuf * > -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, > +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv, This looks strange now. In C, asterisk is usually placed by the variable. > - tlv = (uint8_t *)(error + 1); > + tlv = (uint8_t *) (error + 1); Are we doing this now? style(9) suggests otherwise. > - p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *)&aparam_buf); > + p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *) & aparam_buf); Ouch! This looks king of ugly now. :-/ > @@ -816,8 +821,7 @@ send_reply: > * does the address match? returns 0 if not, 1 if so > */ > static uint32_t > -sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa) > -{ > +sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa){ This and similar cases below are just plain wrong. :-( ./danfe From owner-svn-src-head@freebsd.org Thu Jul 19 19:59:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B6A21047C90 for ; Thu, 19 Jul 2018 19:59:58 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 13F71777CE for ; Thu, 19 Jul 2018 19:59:57 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 4b056150-8b8e-11e8-93fa-f3ebd9db2b94 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 outbound1.ore.mailhop.org (Halon) with ESMTPSA id 4b056150-8b8e-11e8-93fa-f3ebd9db2b94; Thu, 19 Jul 2018 19:59:50 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6JJxnIm003706; Thu, 19 Jul 2018 13:59:49 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532030389.1344.9.camel@freebsd.org> Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Ian Lepore To: Alexey Dokuchaev , Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 19 Jul 2018 13:59:49 -0600 In-Reply-To: <20180719195302.GA26853@FreeBSD.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 19:59:58 -0000 On Thu, 2018-07-19 at 19:53 +0000, Alexey Dokuchaev wrote: > > +++ head/sys/netinet/sctp_asconf.c    Thu Jul 19 19:33:42 2018        (r336503) > >  static struct mbuf * > > -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, > > +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv, > > This looks strange now.  In C, asterisk is usually placed by the variable. "usually" may be true of freebsd, but most places I've worked consider the * (and & in c++) to be more associated with the type being declared than with the variable name, thus they get snugged up against the type info, not the var name. Putting the * or & with the var name leads to particularly bad constructs such as   int a, *b; which, for maximal clarity, should be:   int  a;   int* b; -- Ian From owner-svn-src-head@freebsd.org Thu Jul 19 20:00:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B1E51047D0D; Thu, 19 Jul 2018 20:00:30 +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 B56377791B; Thu, 19 Jul 2018 20:00:29 +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 919E12DCFD; Thu, 19 Jul 2018 20:00:29 +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 w6JK0TpL029150; Thu, 19 Jul 2018 20:00:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JK0SBI029146; Thu, 19 Jul 2018 20:00:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807192000.w6JK0SBI029146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 19 Jul 2018 20:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336505 - in head/sys: amd64/amd64 i386/i386 kern vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 kern vm X-SVN-Commit-Revision: 336505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:00:30 -0000 Author: markj Date: Thu Jul 19 20:00:28 2018 New Revision: 336505 URL: https://svnweb.freebsd.org/changeset/base/336505 Log: Have preload_delete_name() free pages backing preloaded data. On i386 and amd64, add a vm_phys segment for physical memory used to store the kernel binary and other preloaded data. This makes it possible to free such memory back to the system once it is no longer needed, e.g., when a preloaded kernel module is unloaded. Previously, it would have remained unused. Reviewed by: kib, royger MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16330 Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c head/sys/kern/subr_module.c head/sys/vm/vm_extern.h head/sys/vm/vm_kern.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Jul 19 19:50:42 2018 (r336504) +++ head/sys/amd64/amd64/machdep.c Thu Jul 19 20:00:28 2018 (r336505) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef DDB #ifndef KDB @@ -1226,6 +1227,12 @@ getmemsize(caddr_t kmdp, u_int64_t first) pt_entry_t *pte; quad_t dcons_addr, dcons_size; int page_counter; + + /* + * Tell the physical memory allocator about pages used to store + * the kernel and preloaded data. See kmem_bootstrap_free(). + */ + vm_phys_add_seg((vm_paddr_t)kernphys, trunc_page(first)); bzero(physmap, sizeof(physmap)); physmap_idx = 0; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Jul 19 19:50:42 2018 (r336504) +++ head/sys/i386/i386/machdep.c Thu Jul 19 20:00:28 2018 (r336505) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef DDB #ifndef KDB @@ -1832,6 +1833,12 @@ getmemsize(int first) bzero(&vmf, sizeof(vmf)); bzero(physmap, sizeof(physmap)); basemem = 0; + + /* + * Tell the physical memory allocator about pages used to store + * the kernel and preloaded data. See kmem_bootstrap_free(). + */ + vm_phys_add_seg((vm_paddr_t)KERNLOAD, trunc_page(first)); /* * Check if the loader supplied an SMAP memory map. If so, Modified: head/sys/kern/subr_module.c ============================================================================== --- head/sys/kern/subr_module.c Thu Jul 19 19:50:42 2018 (r336504) +++ head/sys/kern/subr_module.c Thu Jul 19 20:00:28 2018 (r336505) @@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + /* * Preloaded module support */ @@ -204,29 +207,42 @@ preload_search_info(caddr_t mod, int inf) void preload_delete_name(const char *name) { - caddr_t curp; - uint32_t *hdr; + caddr_t addr, curp; + uint32_t *hdr, sz; int next; int clearing; + + addr = 0; + sz = 0; if (preload_metadata != NULL) { - + clearing = 0; curp = preload_metadata; for (;;) { hdr = (uint32_t *)curp; - if (hdr[0] == 0 && hdr[1] == 0) - break; + if (hdr[0] == MODINFO_NAME || (hdr[0] == 0 && hdr[1] == 0)) { + /* Free memory used to store the file. */ + if (addr != 0 && sz != 0) + kmem_bootstrap_free((vm_offset_t)addr, sz); + addr = 0; + sz = 0; - /* Search for a MODINFO_NAME field */ - if (hdr[0] == MODINFO_NAME) { + if (hdr[0] == 0) + break; if (!strcmp(name, curp + sizeof(uint32_t) * 2)) clearing = 1; /* got it, start clearing */ - else if (clearing) + else if (clearing) { clearing = 0; /* at next one now.. better stop */ + } } - if (clearing) + if (clearing) { + if (hdr[0] == MODINFO_ADDR) + addr = *(caddr_t *)(curp + sizeof(uint32_t) * 2); + else if (hdr[0] == MODINFO_SIZE) + sz = *(uint32_t *)(curp + sizeof(uint32_t) * 2); hdr[0] = MODINFO_EMPTY; + } /* skip to next field */ next = sizeof(uint32_t) * 2 + hdr[1]; Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Thu Jul 19 19:50:42 2018 (r336504) +++ head/sys/vm/vm_extern.h Thu Jul 19 20:00:28 2018 (r336505) @@ -75,6 +75,7 @@ int kmem_back_domain(int, vm_object_t, vm_offset_t, vm void kmem_unback(vm_object_t, vm_offset_t, vm_size_t); /* Bootstrapping. */ +void kmem_bootstrap_free(vm_offset_t, vm_size_t); vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t); void kmem_init(vm_offset_t, vm_offset_t); Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Thu Jul 19 19:50:42 2018 (r336504) +++ head/sys/vm/vm_kern.c Thu Jul 19 20:00:28 2018 (r336505) @@ -688,6 +688,38 @@ kmem_init(vm_offset_t start, vm_offset_t end) vm_map_unlock(m); } +/* + * kmem_bootstrap_free: + * + * Free pages backing preloaded data (e.g., kernel modules) to the + * system. Currently only supported on platforms that create a + * vm_phys segment for preloaded data. + */ +void +kmem_bootstrap_free(vm_offset_t start, vm_size_t size) +{ +#if defined(__i386__) || defined(__amd64__) + struct vm_domain *vmd; + vm_offset_t end; + vm_paddr_t pa; + vm_page_t m; + + end = trunc_page(start + size); + start = round_page(start); + + (void)vm_map_remove(kernel_map, start, end); + for (; start < end; start += PAGE_SIZE) { + pa = pmap_kextract(start); + m = PHYS_TO_VM_PAGE(pa); + + vmd = vm_pagequeue_domain(m); + vm_domain_free_lock(vmd); + vm_phys_free_pages(m, 0); + vm_domain_free_unlock(vmd); + } +#endif +} + #ifdef DIAGNOSTIC /* * Allow userspace to directly trigger the VM drain routine for testing From owner-svn-src-head@freebsd.org Thu Jul 19 20:10:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC620104820D; Thu, 19 Jul 2018 20:10:35 +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 8E70577E8C; Thu, 19 Jul 2018 20:10:35 +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 7076B2DEBB; Thu, 19 Jul 2018 20:10:35 +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 w6JKAZFt034256; Thu, 19 Jul 2018 20:10:35 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKAZlO034254; Thu, 19 Jul 2018 20:10:35 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807192010.w6JKAZlO034254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 20:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336506 - head/contrib/wpa/src/rsn_supp X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/src/rsn_supp X-SVN-Commit-Revision: 336506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:10:36 -0000 Author: cy Date: Thu Jul 19 20:10:34 2018 New Revision: 336506 URL: https://svnweb.freebsd.org/changeset/base/336506 Log: MFV r336490: Prevent installation of an all-zero TK. This is also upline git commit 53bb18cc8b7a4da72e47e4b3752d0d2135cffb23. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0004-Prevent-installation-\ of-an-all-zero-TK.patch X-MFC-with: r336203 Modified: head/contrib/wpa/src/rsn_supp/wpa.c head/contrib/wpa/src/rsn_supp/wpa_i.h Directory Properties: head/contrib/wpa/ (props changed) Modified: head/contrib/wpa/src/rsn_supp/wpa.c ============================================================================== --- head/contrib/wpa/src/rsn_supp/wpa.c Thu Jul 19 20:00:28 2018 (r336505) +++ head/contrib/wpa/src/rsn_supp/wpa.c Thu Jul 19 20:10:34 2018 (r336506) @@ -510,7 +510,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_s os_memset(buf, 0, sizeof(buf)); } sm->tptk_set = 1; - sm->tk_to_set = 1; kde = sm->assoc_wpa_ie; kde_len = sm->assoc_wpa_ie_len; Modified: head/contrib/wpa/src/rsn_supp/wpa_i.h ============================================================================== --- head/contrib/wpa/src/rsn_supp/wpa_i.h Thu Jul 19 20:00:28 2018 (r336505) +++ head/contrib/wpa/src/rsn_supp/wpa_i.h Thu Jul 19 20:10:34 2018 (r336506) @@ -24,7 +24,6 @@ struct wpa_sm { struct wpa_ptk ptk, tptk; int ptk_set, tptk_set; unsigned int msg_3_of_4_ok:1; - unsigned int tk_to_set:1; u8 snonce[WPA_NONCE_LEN]; u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */ int renew_snonce; From owner-svn-src-head@freebsd.org Thu Jul 19 20:11:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C7D11048276; Thu, 19 Jul 2018 20:11: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.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 1CCB378105; Thu, 19 Jul 2018 20:11: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 F22182DFD5; Thu, 19 Jul 2018 20:11:08 +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 w6JKB8fi035041; Thu, 19 Jul 2018 20:11:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKB8Pd035040; Thu, 19 Jul 2018 20:11:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807192011.w6JKB8Pd035040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 19 Jul 2018 20:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336507 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 336507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:11:09 -0000 Author: markj Date: Thu Jul 19 20:11:08 2018 New Revision: 336507 URL: https://svnweb.freebsd.org/changeset/base/336507 Log: Delete an XXX comment addressed by r336505. X-MFC with: r336505 Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/link_elf_obj.c Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Thu Jul 19 20:10:34 2018 (r336506) +++ head/sys/kern/link_elf_obj.c Thu Jul 19 20:11:08 2018 (r336507) @@ -1040,7 +1040,6 @@ link_elf_unload_file(linker_file_t file) free(ef->typoff, M_LINKER); if (file->pathname != NULL) preload_delete_name(file->pathname); - /* XXX reclaim module memory? */ return; } From owner-svn-src-head@freebsd.org Thu Jul 19 20:11:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF43710482BA; Thu, 19 Jul 2018 20:11:17 +0000 (UTC) (envelope-from tuexen@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 F12F378201; Thu, 19 Jul 2018 20:11:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F1EC2DFE0; Thu, 19 Jul 2018 20:11:15 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JKBF8q035098; Thu, 19 Jul 2018 20:11:15 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKBEkw035093; Thu, 19 Jul 2018 20:11:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807192011.w6JKBEkw035093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 19 Jul 2018 20:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336508 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 336508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:11:18 -0000 Author: tuexen Date: Thu Jul 19 20:11:14 2018 New Revision: 336508 URL: https://svnweb.freebsd.org/changeset/base/336508 Log: Revert https://svnweb.freebsd.org/changeset/base/336503 since I also ran the export script with different parameters. Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_asconf.h head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_bsd_addr.h head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_peeloff.c head/sys/netinet/sctp_ss_functions.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/sctp6_var.h Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Thu Jul 19 20:11:08 2018 (r336507) +++ head/sys/netinet/sctp.h Thu Jul 19 20:11:14 2018 (r336508) @@ -419,7 +419,7 @@ struct sctp_error_unresolv_addr { struct sctp_error_unrecognized_chunk { struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNRECOG_CHUNK */ - struct sctp_chunkhdr ch; /* header from chunk in error */ + struct sctp_chunkhdr ch;/* header from chunk in error */ } SCTP_PACKED; struct sctp_error_no_user_data { Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Thu Jul 19 20:11:08 2018 (r336507) +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 20:11:14 2018 (r336508) @@ -99,7 +99,7 @@ sctp_asconf_success_response(uint32_t id) } static struct mbuf * -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv, +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, uint16_t tlv_length) { struct mbuf *m_reply = NULL; @@ -134,7 +134,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause return (NULL); } if (error_tlv != NULL) { - tlv = (uint8_t *) (error + 1); + tlv = (uint8_t *)(error + 1); memcpy(tlv, error_tlv, tlv_length); } SCTP_BUF_LEN(m_reply) = aph->ph.param_length; @@ -224,7 +224,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, + SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, aparam_length); return (m_reply); } /* end switch */ @@ -239,7 +239,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc /* add the address */ if (bad_address) { m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, + SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, aparam_length); } else if (sctp_add_remote_addr(stcb, sa, &net, stcb->asoc.port, SCTP_DONOT_SETSCOPE, @@ -247,7 +247,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_add_ip: error adding address\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *) aph, + SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *)aph, aparam_length); } else { /* notify upper layer */ @@ -277,7 +277,6 @@ sctp_asconf_del_remote_addrs_except(struct sctp_tcb *s /* not found */ return (-1); } - /* delete all destination addresses except the source */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (net != src_net) { @@ -370,7 +369,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, aparam_length); return (m_reply); } @@ -380,11 +379,10 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, /* trying to delete the source address! */ SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete source addr\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *) aph, + SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *)aph, aparam_length); return (m_reply); } - /* if deleting 0.0.0.0/::0, delete all addresses except src addr */ if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { result = sctp_asconf_del_remote_addrs_except(stcb, src); @@ -395,7 +393,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, /* what error to reply with?? */ m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *) aph, + SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *)aph, aparam_length); } else if (response_required) { m_reply = @@ -403,7 +401,6 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, } return (m_reply); } - /* delete the address */ result = sctp_del_remote_addr(stcb, sa); /* @@ -415,7 +412,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, /* only one address in the asoc */ SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete last IP addr!\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *) aph, + SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *)aph, aparam_length); } else { if (response_required) { @@ -497,7 +494,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, aparam_length); return (m_reply); } @@ -568,7 +565,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, "process_asconf_set_primary: set primary failed!\n"); /* must have been an invalid address, so report */ m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, aparam_length); } @@ -619,7 +616,6 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset serial_num, asoc->asconf_seq_in + 1); return; } - /* it's the expected "next" sequence number, so process it */ asoc->asconf_seq_in = serial_num; /* update sequence */ /* get length of all the param's in the ASCONF */ @@ -644,7 +640,6 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_asconf_ack), ack); } } - m_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_ack_chunk), 0, M_NOWAIT, 1, MT_DATA); if (m_ack == NULL) { @@ -665,7 +660,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset /* skip the lookup address parameter */ offset += sizeof(struct sctp_asconf_chunk); - p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *) & aparam_buf); + p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *)&aparam_buf); if (p_addr == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: couldn't get lookup addr!\n"); @@ -675,7 +670,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset /* param_length is already validated in process_control... */ offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */ /* get pointer to first asconf param in ASCONF */ - aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *) & aparam_buf); + aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf); if (aph == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "Empty ASCONF received?\n"); goto send_reply; @@ -772,7 +767,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset /* get pointer to next asconf param */ aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), - (uint8_t *) & aparam_buf); + (uint8_t *)&aparam_buf); if (aph == NULL) { /* can't get an asconf paramhdr */ SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: can't get asconf param hdr!\n"); @@ -821,7 +816,8 @@ send_reply: * does the address match? returns 0 if not, 1 if so */ static uint32_t -sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa){ +sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa) +{ switch (sa->sa_family) { #ifdef INET6 case AF_INET6: @@ -860,7 +856,8 @@ sctp_asconf_addr_match(struct sctp_asconf_addr *aa, st * does the address match? returns 0 if not, 1 if so */ static uint32_t -sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa){ +sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa) +{ #if defined(INET) || defined(INET6) uint16_t param_type, param_length; @@ -977,7 +974,6 @@ sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, st if (stcb->asoc.deleted_primary == NULL) { return; } - if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) { SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: Deleted primary is "); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.deleted_primary->ro._l_addr.sa); @@ -1081,7 +1077,6 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc } return; } - /* Multiple local addresses exsist in the association. */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { /* clear any cached route and source address */ @@ -1101,7 +1096,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc * NOT corresponding to the current nexthop, the path will * not be changed. */ - SCTP_RTALLOC((sctp_route_t *) & net->ro, + SCTP_RTALLOC((sctp_route_t *)&net->ro, stcb->sctp_ep->def_vrf_id, stcb->sctp_ep->fibnum); if (net->ro.ro_rt == NULL) @@ -1111,7 +1106,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc switch (net->ro._l_addr.sa.sa_family) { #ifdef INET case AF_INET: - if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *) & net->ro)) { + if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *)&net->ro)) { changed = 1; } break; @@ -1119,7 +1114,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc #ifdef INET6 case AF_INET6: if (sctp_v6src_match_nexthop( - &newifa->address.sin6, (sctp_route_t *) & net->ro)) { + &newifa->address.sin6, (sctp_route_t *)&net->ro)) { changed = 1; } break; @@ -1328,7 +1323,6 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc if (stcb->asoc.asconf_supported == 0) { return (-1); } - /* * if this is deleting the last address from the assoc, mark it as * pending. @@ -1349,7 +1343,6 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc return (-1); } } - /* queue an asconf parameter */ status = sctp_asconf_queue_mgmt(stcb, ifa, type); @@ -1371,7 +1364,6 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc stcb->asoc.asconf_addr_del_pending = NULL; } } - if (pending_delete_queued) { struct sctp_nets *net; @@ -1396,7 +1388,6 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc SCTP_FROM_SCTP_ASCONF, __LINE__); } - /* queue in an advisory set primary too */ (void)sctp_asconf_queue_mgmt(stcb, ifa, SCTP_SET_PRIM_ADDR); /* let caller know we should send this out immediately */ @@ -1694,13 +1685,11 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, serial_num, asoc->asconf_seq_out_acked + 1); return; } - if (serial_num == asoc->asconf_seq_out - 1) { /* stop our timer */ sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); } - /* process the ASCONF-ACK contents */ ack_length = ntohs(cp->ch.chunk_length) - sizeof(struct sctp_asconf_ack_chunk); @@ -1789,7 +1778,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, * at any given time */ if (last_error_id == 0) - last_error_id--; /* set to "max" value */ + last_error_id--;/* set to "max" value */ TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { if (aa->sent == 1) { /* @@ -1829,7 +1818,8 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, #ifdef INET6 static uint32_t -sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa){ +sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa) +{ struct sockaddr_in6 *sin6, *net6; struct sctp_nets *net; @@ -2068,7 +2058,6 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, vo laddr->action = 0; break; } - } } else if (l->action == SCTP_DEL_IP_ADDRESS) { LIST_FOREACH_SAFE(laddr, &inp->sctp_addr_list, sctp_nxt_addr, nladdr) { @@ -2102,7 +2091,6 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru if (ifa->vrf_id != stcb->asoc.vrf_id) { continue; } - /* Same checks again for assoc */ switch (ifa->address.sa.sa_family) { #ifdef INET6 @@ -2281,7 +2269,8 @@ sctp_asconf_iterator_end(void *ptr, uint32_t val SCTP_ * returns: 0 = completed, -1 = error */ int32_t -sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa){ +sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa) +{ uint32_t vrf_id; struct sctp_ifa *ifa; @@ -2292,7 +2281,6 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, /* Invalid address */ return (-1); } - /* queue an ASCONF:SET_PRIM_ADDR to be sent */ if (!sctp_asconf_queue_add(stcb, ifa, SCTP_SET_PRIM_ADDR)) { /* set primary queuing succeeded */ @@ -2371,13 +2359,11 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: param length(%u) too short\n", param_length); break; } - aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(chk->data, offset, param_length, aparam_buf); if (aph == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: couldn't get entire param\n"); break; } - ph = (struct sctp_paramhdr *)(aph + 1); if (sctp_addr_match(ph, &sctp_ifa->address.sa) != 0) { switch (param_type) { @@ -2392,7 +2378,6 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct } last_param_type = param_type; } - offset += SCTP_SIZE32(param_length); if (offset >= asconf_limit) { /* no more data in the mbuf chain */ @@ -2476,7 +2461,6 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int a if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { continue; } - sin6 = &sctp_ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* @@ -2770,7 +2754,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, /* go through the addresses in the init-ack */ ph = (struct sctp_paramhdr *) sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), - (uint8_t *) & tmp_param); + (uint8_t *)&tmp_param); while (ph != NULL) { ptype = ntohs(ph->param_type); plen = ntohs(ph->param_length); @@ -2784,7 +2768,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, a6p = (struct sctp_ipv6addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv6addr_param), - (uint8_t *) & addr6_store); + (uint8_t *)&addr6_store); if (plen != sizeof(struct sctp_ipv6addr_param) || a6p == NULL) { return; @@ -2805,7 +2789,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, /* get the entire IPv4 address param */ a4p = (struct sctp_ipv4addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_ipv4addr_param), - (uint8_t *) & addr4_store); + (uint8_t *)&addr4_store); if (plen != sizeof(struct sctp_ipv4addr_param) || a4p == NULL) { return; @@ -2852,7 +2836,6 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, } } } - next_addr: /* * Sanity check: Make sure the length isn't 0, otherwise @@ -2868,7 +2851,7 @@ next_addr: if ((offset + sizeof(struct sctp_paramhdr)) > length) return; ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, - sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); + sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); } /* while */ } @@ -2878,7 +2861,8 @@ next_addr: * 1 if found, 0 if not */ static uint32_t -sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa){ +sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa) +{ struct sctp_paramhdr tmp_param, *ph; uint16_t plen, ptype; #ifdef INET @@ -2918,7 +2902,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, } /* go through the addresses in the init-ack */ ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, - sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); + sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); while (ph != NULL) { ptype = ntohs(ph->param_type); plen = ntohs(ph->param_length); @@ -2934,7 +2918,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, a6p = (struct sctp_ipv6addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv6addr_param), - (uint8_t *) & addr6_store); + (uint8_t *)&addr6_store); if (a6p == NULL) { return (0); } @@ -2964,7 +2948,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, a4p = (struct sctp_ipv4addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv4addr_param), - (uint8_t *) & addr4_store); + (uint8_t *)&addr4_store); if (a4p == NULL) { return (0); } @@ -2986,7 +2970,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, } ph = (struct sctp_paramhdr *) sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), - (uint8_t *) & tmp_param); + (uint8_t *)&tmp_param); } /* while */ /* not found! */ return (0); @@ -3157,7 +3141,8 @@ sctp_check_address_list(struct sctp_tcb *stcb, struct */ uint32_t sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct sockaddr *sa, - uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap){ + uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap) +{ struct sctp_ifa *ifa; struct sctp_laddr *laddr, *nladdr; @@ -3385,7 +3370,6 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc if (vrf == NULL) { goto skip_rest; } - SCTP_IPI_ADDR_RLOCK(); LIST_FOREACH(sctp_ifnp, &vrf->ifnlist, next_ifn) { LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { Modified: head/sys/netinet/sctp_asconf.h ============================================================================== --- head/sys/netinet/sctp_asconf.h Thu Jul 19 20:11:08 2018 (r336507) +++ head/sys/netinet/sctp_asconf.h Thu Jul 19 20:11:14 2018 (r336508) @@ -60,10 +60,10 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct socka uint32_t, uint32_t, struct sctp_ifa *); -extern int +extern int sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val); -extern void +extern void sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, uint32_t type); Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Thu Jul 19 20:11:08 2018 (r336507) +++ head/sys/netinet/sctp_auth.c Thu Jul 19 20:11:14 2018 (r336508) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); void -sctp_clear_chunklist(sctp_auth_chklist_t * chklist) +sctp_clear_chunklist(sctp_auth_chklist_t *chklist) { memset(chklist, 0, sizeof(*chklist)); /* chklist->num_chunks = 0; */ @@ -75,14 +75,14 @@ sctp_alloc_chunklist(void) } void -sctp_free_chunklist(sctp_auth_chklist_t * list) +sctp_free_chunklist(sctp_auth_chklist_t *list) { if (list != NULL) SCTP_FREE(list, SCTP_M_AUTH_CL); } sctp_auth_chklist_t * -sctp_copy_chunklist(sctp_auth_chklist_t * list) +sctp_copy_chunklist(sctp_auth_chklist_t *list) { sctp_auth_chklist_t *new_list; @@ -104,7 +104,7 @@ sctp_copy_chunklist(sctp_auth_chklist_t * list) * add a chunk to the required chunks list */ int -sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t * list) +sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t *list) { if (list == NULL) return (-1); @@ -130,7 +130,7 @@ sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t * delete a chunk from the required chunks list */ int -sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t * list) +sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t *list) { if (list == NULL) return (-1); @@ -146,7 +146,7 @@ sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklis } size_t -sctp_auth_get_chklist_size(const sctp_auth_chklist_t * list) +sctp_auth_get_chklist_size(const sctp_auth_chklist_t *list) { if (list == NULL) return (0); @@ -159,7 +159,7 @@ sctp_auth_get_chklist_size(const sctp_auth_chklist_t * * guarantee ptr has space for up to 256 bytes */ int -sctp_serialize_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * ptr) +sctp_serialize_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) { int i, count = 0; @@ -176,7 +176,7 @@ sctp_serialize_auth_chunks(const sctp_auth_chklist_t * } int -sctp_pack_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * ptr) +sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) { int i, size = 0; @@ -208,8 +208,8 @@ sctp_pack_auth_chunks(const sctp_auth_chklist_t * list } int -sctp_unpack_auth_chunks(const uint8_t * ptr, uint8_t num_chunks, - sctp_auth_chklist_t * list) +sctp_unpack_auth_chunks(const uint8_t *ptr, uint8_t num_chunks, + sctp_auth_chklist_t *list) { int i; int size; @@ -259,14 +259,14 @@ sctp_alloc_key(uint32_t keylen) } void -sctp_free_key(sctp_key_t * key) +sctp_free_key(sctp_key_t *key) { if (key != NULL) SCTP_FREE(key, SCTP_M_AUTH_KY); } void -sctp_print_key(sctp_key_t * key, const char *str) +sctp_print_key(sctp_key_t *key, const char *str) { uint32_t i; @@ -285,7 +285,7 @@ sctp_print_key(sctp_key_t * key, const char *str) } void -sctp_show_key(sctp_key_t * key, const char *str) +sctp_show_key(sctp_key_t *key, const char *str) { uint32_t i; @@ -304,7 +304,8 @@ sctp_show_key(sctp_key_t * key, const char *str) } static uint32_t -sctp_get_keylen(sctp_key_t * key) { +sctp_get_keylen(sctp_key_t *key) +{ if (key != NULL) return (key->keylen); else @@ -330,7 +331,7 @@ sctp_generate_random_key(uint32_t keylen) } sctp_key_t * -sctp_set_key(uint8_t * key, uint32_t keylen) +sctp_set_key(uint8_t *key, uint32_t keylen) { sctp_key_t *new_key; @@ -350,7 +351,7 @@ sctp_set_key(uint8_t * key, uint32_t keylen) * 0 if key1 = key2 */ static int -sctp_compare_key(sctp_key_t * key1, sctp_key_t * key2) +sctp_compare_key(sctp_key_t *key1, sctp_key_t *key2) { uint32_t maxlen; uint32_t i; @@ -401,7 +402,7 @@ sctp_compare_key(sctp_key_t * key1, sctp_key_t * key2) * order for concatenation */ sctp_key_t * -sctp_compute_hashkey(sctp_key_t * key1, sctp_key_t * key2, sctp_key_t * shared) +sctp_compute_hashkey(sctp_key_t *key1, sctp_key_t *key2, sctp_key_t *shared) { uint32_t keylen; sctp_key_t *new_key; @@ -475,7 +476,7 @@ sctp_alloc_sharedkey(void) } void -sctp_free_sharedkey(sctp_sharedkey_t * skey) +sctp_free_sharedkey(sctp_sharedkey_t *skey) { if (skey == NULL) return; @@ -501,7 +502,7 @@ sctp_find_sharedkey(struct sctp_keyhead *shared_keys, int sctp_insert_sharedkey(struct sctp_keyhead *shared_keys, - sctp_sharedkey_t * new_skey) + sctp_sharedkey_t *new_skey) { sctp_sharedkey_t *skey; @@ -595,7 +596,8 @@ sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t } static sctp_sharedkey_t * -sctp_copy_sharedkey(const sctp_sharedkey_t * skey){ +sctp_copy_sharedkey(const sctp_sharedkey_t *skey) +{ sctp_sharedkey_t *new_skey; if (skey == NULL) @@ -652,7 +654,7 @@ sctp_alloc_hmaclist(uint16_t num_hmacs) } void -sctp_free_hmaclist(sctp_hmaclist_t * list) +sctp_free_hmaclist(sctp_hmaclist_t *list) { if (list != NULL) { SCTP_FREE(list, SCTP_M_AUTH_HL); @@ -661,7 +663,7 @@ sctp_free_hmaclist(sctp_hmaclist_t * list) } int -sctp_auth_add_hmacid(sctp_hmaclist_t * list, uint16_t hmac_id) +sctp_auth_add_hmacid(sctp_hmaclist_t *list, uint16_t hmac_id) { int i; @@ -689,7 +691,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t * list, uint16_t } sctp_hmaclist_t * -sctp_copy_hmaclist(sctp_hmaclist_t * list) +sctp_copy_hmaclist(sctp_hmaclist_t *list) { sctp_hmaclist_t *new_list; int i; @@ -727,7 +729,8 @@ sctp_default_supported_hmaclist(void) * find the best HMAC id to use for the peer based on local support */ uint16_t -sctp_negotiate_hmacid(sctp_hmaclist_t * peer, sctp_hmaclist_t * local) { +sctp_negotiate_hmacid(sctp_hmaclist_t *peer, sctp_hmaclist_t *local) +{ int i, j; if ((local == NULL) || (peer == NULL)) @@ -753,7 +756,7 @@ sctp_negotiate_hmacid(sctp_hmaclist_t * peer, sctp_hma * caller must guarantee ptr has appropriate space */ int -sctp_serialize_hmaclist(sctp_hmaclist_t * list, uint8_t * ptr) +sctp_serialize_hmaclist(sctp_hmaclist_t *list, uint8_t *ptr) { int i; uint16_t hmac_id; @@ -799,7 +802,7 @@ sctp_alloc_authinfo(void) } void -sctp_free_authinfo(sctp_authinfo_t * authinfo) +sctp_free_authinfo(sctp_authinfo_t *authinfo) { if (authinfo == NULL) return; @@ -819,7 +822,8 @@ sctp_free_authinfo(sctp_authinfo_t * authinfo) uint32_t -sctp_get_auth_chunk_len(uint16_t hmac_algo) { +sctp_get_auth_chunk_len(uint16_t hmac_algo) +{ int size; size = sizeof(struct sctp_auth_chunk) + sctp_get_hmac_digest_len(hmac_algo); @@ -827,7 +831,8 @@ sctp_get_auth_chunk_len(uint16_t hmac_algo) { } uint32_t -sctp_get_hmac_digest_len(uint16_t hmac_algo) { +sctp_get_hmac_digest_len(uint16_t hmac_algo) +{ switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: return (SCTP_AUTH_DIGEST_LEN_SHA1); @@ -855,7 +860,7 @@ sctp_get_hmac_block_len(uint16_t hmac_algo) } static void -sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t * ctx) +sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t *ctx) { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: @@ -872,8 +877,8 @@ sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t } static void -sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t * ctx, - uint8_t * text, uint32_t textlen) +sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t *ctx, + uint8_t *text, uint32_t textlen) { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: @@ -890,8 +895,8 @@ sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context } static void -sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t * ctx, - uint8_t * digest) +sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t *ctx, + uint8_t *digest) { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: @@ -918,8 +923,9 @@ sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_ * resultant digest. */ uint32_t -sctp_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, - uint8_t * text, uint32_t textlen, uint8_t * digest) { +sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, + uint8_t *text, uint32_t textlen, uint8_t *digest) +{ uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -977,8 +983,9 @@ sctp_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t /* mbuf version */ uint32_t -sctp_hmac_m(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, - struct mbuf *m, uint32_t m_offset, uint8_t * digest, uint32_t trailer){ +sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, + struct mbuf *m, uint32_t m_offset, uint8_t *digest, uint32_t trailer) +{ uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -1024,17 +1031,17 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t * key, uint32_ sctp_hmac_update(hmac_algo, &ctx, ipad, blocklen); /* find the correct starting mbuf and offset (get start of text) */ m_tmp = m; - while ((m_tmp != NULL) && (m_offset >= (uint32_t) SCTP_BUF_LEN(m_tmp))) { + while ((m_tmp != NULL) && (m_offset >= (uint32_t)SCTP_BUF_LEN(m_tmp))) { m_offset -= SCTP_BUF_LEN(m_tmp); m_tmp = SCTP_BUF_NEXT(m_tmp); } /* now use the rest of the mbuf chain for the text */ while (m_tmp != NULL) { if ((SCTP_BUF_NEXT(m_tmp) == NULL) && trailer) { - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, SCTP_BUF_LEN(m_tmp) - (trailer + m_offset)); } else { - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, SCTP_BUF_LEN(m_tmp) - m_offset); } @@ -1059,9 +1066,9 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t * key, uint32_ * Returns -1 on error, 0 on success. */ int -sctp_verify_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, - uint8_t * text, uint32_t textlen, - uint8_t * digest, uint32_t digestlen) +sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, + uint8_t *text, uint32_t textlen, + uint8_t *digest, uint32_t digestlen) { uint32_t len; uint8_t temp[SCTP_AUTH_DIGEST_LEN_MAX]; @@ -1092,8 +1099,9 @@ sctp_verify_hmac(uint16_t hmac_algo, uint8_t * key, ui * the keylen exceeds the HMAC block len). */ uint32_t -sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t * key, uint8_t * text, - uint32_t textlen, uint8_t * digest) { +sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, uint8_t *text, + uint32_t textlen, uint8_t *digest) +{ uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -1126,8 +1134,9 @@ sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t * key /* mbuf version */ uint32_t -sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t * key, struct mbuf *m, - uint32_t m_offset, uint8_t * digest){ +sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t *key, struct mbuf *m, + uint32_t m_offset, uint8_t *digest) +{ uint32_t digestlen; uint32_t blocklen; sctp_hash_context_t ctx; @@ -1157,7 +1166,7 @@ sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t * k } int -sctp_auth_is_supported_hmac(sctp_hmaclist_t * list, uint16_t id) +sctp_auth_is_supported_hmac(sctp_hmaclist_t *list, uint16_t id) { int i; @@ -1300,7 +1309,6 @@ sctp_auth_setactivekey(struct sctp_tcb *stcb, uint16_t /* can't reactivate a deactivated key with other refcounts */ return (-1); } - /* set the (new) active key */ stcb->asoc.authinfo.active_keyid = keyid; /* reset the deactivated flag */ @@ -1355,7 +1363,6 @@ sctp_deact_sharedkey(struct sctp_tcb *stcb, uint16_t k sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, keyid, 0, SCTP_SO_LOCKED); } - /* mark the key as deactivated */ skey->deactivated = 1; @@ -1417,7 +1424,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str length += offset; phdr = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, - sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); + sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); while (phdr != NULL) { ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); @@ -1484,7 +1491,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (offset + sizeof(struct sctp_paramhdr) > length) break; phdr = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), - (uint8_t *) & tmp_param); + (uint8_t *)&tmp_param); } /* concatenate the full random key */ keylen = sizeof(*p_random) + random_len + sizeof(*hmacs) + hmacs_len; @@ -1575,7 +1582,6 @@ sctp_fill_hmac_digest_m(struct mbuf *m, uint32_t auth_ "Assoc Key"); #endif } - /* set in the active key id */ auth->shared_key_id = htons(keyid); @@ -1597,14 +1603,14 @@ sctp_zero_m(struct mbuf *m, uint32_t m_offset, uint32_ /* find the correct starting mbuf and offset (get start position) */ m_tmp = m; - while ((m_tmp != NULL) && (m_offset >= (uint32_t) SCTP_BUF_LEN(m_tmp))) { + while ((m_tmp != NULL) && (m_offset >= (uint32_t)SCTP_BUF_LEN(m_tmp))) { m_offset -= SCTP_BUF_LEN(m_tmp); m_tmp = SCTP_BUF_NEXT(m_tmp); } /* now use the rest of the mbuf chain */ while ((m_tmp != NULL) && (size > 0)) { - data = mtod(m_tmp, uint8_t *) + m_offset; - if (size > (uint32_t) (SCTP_BUF_LEN(m_tmp) - m_offset)) { + data = mtod(m_tmp, uint8_t *)+m_offset; + if (size > (uint32_t)(SCTP_BUF_LEN(m_tmp) - m_offset)) { memset(data, 0, SCTP_BUF_LEN(m_tmp) - m_offset); size -= SCTP_BUF_LEN(m_tmp) - m_offset; } else { @@ -1763,7 +1769,6 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint /* If the socket is gone we are out of here */ return; } - if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_AUTHEVNT)) /* event not enabled */ return; @@ -1924,7 +1929,6 @@ sctp_validate_init_auth_params(struct mbuf *m, int off if (num_chunks) got_chklist = 1; } - offset += SCTP_SIZE32(plen); if (offset >= limit) { break; @@ -2019,7 +2023,6 @@ sctp_initialize_auth_params(struct sctp_inpcb *inp, st new_key->key[keylen++] = i; } } - /* append in the HMACs */ ph = (struct sctp_paramhdr *)(new_key->key + keylen); ph->param_type = htons(SCTP_HMAC_LIST); Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Thu Jul 19 20:11:08 2018 (r336507) +++ head/sys/netinet/sctp_auth.h Thu Jul 19 20:11:14 2018 (r336508) @@ -53,12 +53,12 @@ __FBSDID("$FreeBSD$"); typedef union sctp_hash_context { SCTP_SHA1_CTX sha1; SCTP_SHA256_CTX sha256; -} sctp_hash_context_t; +} sctp_hash_context_t; typedef struct sctp_key { uint32_t keylen; uint8_t key[]; -} sctp_key_t; +} sctp_key_t; typedef struct sctp_shared_key { LIST_ENTRY(sctp_shared_key) next; @@ -66,7 +66,7 @@ typedef struct sctp_shared_key { uint32_t refcount; /* reference count */ uint16_t keyid; /* shared key ID */ uint8_t deactivated; /* key is deactivated */ -} sctp_sharedkey_t; +} sctp_sharedkey_t; LIST_HEAD(sctp_keyhead, sctp_shared_key); @@ -74,26 +74,26 @@ LIST_HEAD(sctp_keyhead, sctp_shared_key); typedef struct sctp_auth_chklist { uint8_t chunks[256]; uint8_t num_chunks; -} sctp_auth_chklist_t; +} sctp_auth_chklist_t; /* hmac algos supported list */ typedef struct sctp_hmaclist { uint16_t max_algo; /* max algorithms allocated */ uint16_t num_algo; /* num algorithms used */ uint16_t hmac[]; -} sctp_hmaclist_t; +} sctp_hmaclist_t; /* authentication info */ typedef struct sctp_authinformation { sctp_key_t *random; /* local random key (concatenated) */ uint32_t random_len; /* local random number length for param */ - sctp_key_t *peer_random; /* peer's random key (concatenated) */ + sctp_key_t *peer_random;/* peer's random key (concatenated) */ sctp_key_t *assoc_key; /* cached concatenated send key */ sctp_key_t *recv_key; /* cached concatenated recv key */ uint16_t active_keyid; /* active send keyid */ uint16_t assoc_keyid; /* current send keyid (cached) */ uint16_t recv_keyid; /* last recv keyid (cached) */ -} sctp_authinfo_t; +} sctp_authinfo_t; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Jul 19 20:11:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5059104831A; Thu, 19 Jul 2018 20:11:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 752D37834C; Thu, 19 Jul 2018 20:11:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f174.google.com with SMTP id i18-v6so8115453ioj.13; Thu, 19 Jul 2018 13:11:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=T41AuBZbhQp//ZgqKhXhmDHDGYfBHpiZ0VC8TuRfi4A=; b=X6MdNZUXKFZUI6WgW7xJDmcOwFoZ7gDkxNCmDw+xfpCpArh64rm2s0BfomxGqYDPCP BECcu7PI57vRY2wUh81TC4kX9DlQoVatnvpoaJmI7MWyBjYuYwauqVrtGXg9jZKxSwFA amK9bcnyCEltVQ9ZOqBuZFDdLgZfzXU543KT3EJJ0t3lxlG9BRgFSdjW3bgQj/xw2xC8 ypUljjnJPmSKHsjPV5bQY6d1RDl9WkSpTxF0QnkbX0JD9pMJX50AMjHv8y6auFLfYD4t /pu64zZBqAbBwMxDjWugkHFH2C5lNYCSwXwwkRAadpZJECd4zQwWpOJ2mINBYlSQWvZF QPpw== X-Gm-Message-State: AOUpUlGnyf7XzGJRrIh8pFMdTZAAeU7h6QKbbLFIIJPZD9rlceNGU0K2 /gN2GbOg+TKobUdXPeahksC0km9O X-Google-Smtp-Source: AA+uWPw/pO4rzAym269SC3aQ4qfl5xex0gD38Myz3RIO+PjP/qdbCswAVWVdKr84nxsow0QjJdYfBw== X-Received: by 2002:a6b:dd01:: with SMTP id f1-v6mr9760798ioc.45.1532031082135; Thu, 19 Jul 2018 13:11:22 -0700 (PDT) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com. [209.85.214.43]) by smtp.gmail.com with ESMTPSA id 7-v6sm227509itz.12.2018.07.19.13.11.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 13:11:22 -0700 (PDT) Received: by mail-it0-f43.google.com with SMTP id 16-v6so11607135itl.5; Thu, 19 Jul 2018 13:11:21 -0700 (PDT) X-Received: by 2002:a02:10c6:: with SMTP id 189-v6mr11082921jay.54.1532031081620; Thu, 19 Jul 2018 13:11:21 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:7e0a:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 13:11:21 -0700 (PDT) In-Reply-To: <201807191933.w6JJXhof018383@repo.freebsd.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> From: Conrad Meyer Date: Thu, 19 Jul 2018 13:11:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 To: Michael Tuexen Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:11:29 -0000 These changes mostly seem like style regressions, rather than improvements. (Not to mention, largescale churn like this makes it more difficult for future readers to research history (confusing tools like "git/svn blame").) On Thu, Jul 19, 2018 at 12:33 PM, Michael Tuexen wrote: > Author: tuexen > Date: Thu Jul 19 19:33:42 2018 > New Revision: 336503 > URL: https://svnweb.freebsd.org/changeset/base/336503 > > Log: > Whitespace changes due to change if ident. > > Modified: > head/sys/netinet/sctp.h > head/sys/netinet/sctp_asconf.c > head/sys/netinet/sctp_asconf.h > head/sys/netinet/sctp_auth.c > head/sys/netinet/sctp_auth.h > head/sys/netinet/sctp_bsd_addr.c > head/sys/netinet/sctp_bsd_addr.h > head/sys/netinet/sctp_cc_functions.c > head/sys/netinet/sctp_crc32.c > head/sys/netinet/sctp_header.h > head/sys/netinet/sctp_indata.c > head/sys/netinet/sctp_indata.h > head/sys/netinet/sctp_input.c > head/sys/netinet/sctp_input.h > head/sys/netinet/sctp_output.c > head/sys/netinet/sctp_output.h > head/sys/netinet/sctp_pcb.c > head/sys/netinet/sctp_pcb.h > head/sys/netinet/sctp_peeloff.c > head/sys/netinet/sctp_ss_functions.c > head/sys/netinet/sctp_structs.h > head/sys/netinet/sctp_sysctl.c > head/sys/netinet/sctp_timer.c > head/sys/netinet/sctp_uio.h > head/sys/netinet/sctp_usrreq.c > head/sys/netinet/sctp_var.h > head/sys/netinet/sctputil.c > head/sys/netinet/sctputil.h > head/sys/netinet6/sctp6_usrreq.c > head/sys/netinet6/sctp6_var.h > > Modified: head/sys/netinet/sctp.h > ============================================================================== > --- head/sys/netinet/sctp.h Thu Jul 19 19:32:08 2018 (r336502) > +++ head/sys/netinet/sctp.h Thu Jul 19 19:33:42 2018 (r336503) > @@ -419,7 +419,7 @@ struct sctp_error_unresolv_addr { > > struct sctp_error_unrecognized_chunk { > struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNRECOG_CHUNK */ > - struct sctp_chunkhdr ch;/* header from chunk in error */ > + struct sctp_chunkhdr ch; /* header from chunk in error */ > } SCTP_PACKED; > > struct sctp_error_no_user_data { > > Modified: head/sys/netinet/sctp_asconf.c > ============================================================================== > --- head/sys/netinet/sctp_asconf.c Thu Jul 19 19:32:08 2018 (r336502) > +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 (r336503) > @@ -99,7 +99,7 @@ sctp_asconf_success_response(uint32_t id) > } > > static struct mbuf * > -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, > +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv, > uint16_t tlv_length) > { > struct mbuf *m_reply = NULL; > @@ -134,7 +134,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause > return (NULL); > } > if (error_tlv != NULL) { > - tlv = (uint8_t *)(error + 1); > + tlv = (uint8_t *) (error + 1); > memcpy(tlv, error_tlv, tlv_length); > } > SCTP_BUF_LEN(m_reply) = aph->ph.param_length; > @@ -224,7 +224,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc > #endif > default: > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, > + SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, > aparam_length); > return (m_reply); > } /* end switch */ > @@ -239,7 +239,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc > /* add the address */ > if (bad_address) { > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, > + SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, > aparam_length); > } else if (sctp_add_remote_addr(stcb, sa, &net, stcb->asoc.port, > SCTP_DONOT_SETSCOPE, > @@ -247,7 +247,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struc > SCTPDBG(SCTP_DEBUG_ASCONF1, > "process_asconf_add_ip: error adding address\n"); > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *)aph, > + SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *) aph, > aparam_length); > } else { > /* notify upper layer */ > @@ -277,6 +277,7 @@ sctp_asconf_del_remote_addrs_except(struct sctp_tcb *s > /* not found */ > return (-1); > } > + > /* delete all destination addresses except the source */ > TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { > if (net != src_net) { > @@ -369,7 +370,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, > #endif > default: > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, > + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, > aparam_length); > return (m_reply); > } > @@ -379,10 +380,11 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, > /* trying to delete the source address! */ > SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete source addr\n"); > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *)aph, > + SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *) aph, > aparam_length); > return (m_reply); > } > + > /* if deleting 0.0.0.0/::0, delete all addresses except src addr */ > if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { > result = sctp_asconf_del_remote_addrs_except(stcb, src); > @@ -393,7 +395,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, > /* what error to reply with?? */ > m_reply = > sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *)aph, > + SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *) aph, > aparam_length); > } else if (response_required) { > m_reply = > @@ -401,6 +403,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, > } > return (m_reply); > } > + > /* delete the address */ > result = sctp_del_remote_addr(stcb, sa); > /* > @@ -412,7 +415,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, > /* only one address in the asoc */ > SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete last IP addr!\n"); > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *)aph, > + SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *) aph, > aparam_length); > } else { > if (response_required) { > @@ -494,7 +497,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, > #endif > default: > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, > + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, > aparam_length); > return (m_reply); > } > @@ -565,7 +568,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, > "process_asconf_set_primary: set primary failed!\n"); > /* must have been an invalid address, so report */ > m_reply = sctp_asconf_error_response(aph->correlation_id, > - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, > + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, > aparam_length); > } > > @@ -616,6 +619,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset > serial_num, asoc->asconf_seq_in + 1); > return; > } > + > /* it's the expected "next" sequence number, so process it */ > asoc->asconf_seq_in = serial_num; /* update sequence */ > /* get length of all the param's in the ASCONF */ > @@ -640,6 +644,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset > SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_asconf_ack), ack); > } > } > + > m_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_ack_chunk), 0, > M_NOWAIT, 1, MT_DATA); > if (m_ack == NULL) { > @@ -660,7 +665,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset > > /* skip the lookup address parameter */ > offset += sizeof(struct sctp_asconf_chunk); > - p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *)&aparam_buf); > + p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *) & aparam_buf); > if (p_addr == NULL) { > SCTPDBG(SCTP_DEBUG_ASCONF1, > "handle_asconf: couldn't get lookup addr!\n"); > @@ -670,7 +675,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset > /* param_length is already validated in process_control... */ > offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */ > /* get pointer to first asconf param in ASCONF */ > - aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf); > + aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *) & aparam_buf); > if (aph == NULL) { > SCTPDBG(SCTP_DEBUG_ASCONF1, "Empty ASCONF received?\n"); > goto send_reply; > @@ -767,7 +772,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset > /* get pointer to next asconf param */ > aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, > sizeof(struct sctp_asconf_paramhdr), > - (uint8_t *)&aparam_buf); > + (uint8_t *) & aparam_buf); > if (aph == NULL) { > /* can't get an asconf paramhdr */ > SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: can't get asconf param hdr!\n"); > @@ -816,8 +821,7 @@ send_reply: > * does the address match? returns 0 if not, 1 if so > */ > static uint32_t > -sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa) > -{ > +sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa){ > switch (sa->sa_family) { > #ifdef INET6 > case AF_INET6: > @@ -856,8 +860,7 @@ sctp_asconf_addr_match(struct sctp_asconf_addr *aa, st > * does the address match? returns 0 if not, 1 if so > */ > static uint32_t > -sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa) > -{ > +sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa){ > #if defined(INET) || defined(INET6) > uint16_t param_type, param_length; > > @@ -974,6 +977,7 @@ sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, st > if (stcb->asoc.deleted_primary == NULL) { > return; > } > + > if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) { > SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: Deleted primary is "); > SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.deleted_primary->ro._l_addr.sa); > @@ -1077,6 +1081,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc > } > return; > } > + > /* Multiple local addresses exsist in the association. */ > TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { > /* clear any cached route and source address */ > @@ -1096,7 +1101,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc > * NOT corresponding to the current nexthop, the path will > * not be changed. > */ > - SCTP_RTALLOC((sctp_route_t *)&net->ro, > + SCTP_RTALLOC((sctp_route_t *) & net->ro, > stcb->sctp_ep->def_vrf_id, > stcb->sctp_ep->fibnum); > if (net->ro.ro_rt == NULL) > @@ -1106,7 +1111,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc > switch (net->ro._l_addr.sa.sa_family) { > #ifdef INET > case AF_INET: > - if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *)&net->ro)) { > + if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *) & net->ro)) { > changed = 1; > } > break; > @@ -1114,7 +1119,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc > #ifdef INET6 > case AF_INET6: > if (sctp_v6src_match_nexthop( > - &newifa->address.sin6, (sctp_route_t *)&net->ro)) { > + &newifa->address.sin6, (sctp_route_t *) & net->ro)) { > changed = 1; > } > break; > @@ -1323,6 +1328,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc > if (stcb->asoc.asconf_supported == 0) { > return (-1); > } > + > /* > * if this is deleting the last address from the assoc, mark it as > * pending. > @@ -1343,6 +1349,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc > return (-1); > } > } > + > /* queue an asconf parameter */ > status = sctp_asconf_queue_mgmt(stcb, ifa, type); > > @@ -1364,6 +1371,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc > stcb->asoc.asconf_addr_del_pending = NULL; > } > } > + > if (pending_delete_queued) { > struct sctp_nets *net; > > @@ -1388,6 +1396,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc > SCTP_FROM_SCTP_ASCONF, > __LINE__); > } > + > /* queue in an advisory set primary too */ > (void)sctp_asconf_queue_mgmt(stcb, ifa, SCTP_SET_PRIM_ADDR); > /* let caller know we should send this out immediately */ > @@ -1685,11 +1694,13 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, > serial_num, asoc->asconf_seq_out_acked + 1); > return; > } > + > if (serial_num == asoc->asconf_seq_out - 1) { > /* stop our timer */ > sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, > SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); > } > + > /* process the ASCONF-ACK contents */ > ack_length = ntohs(cp->ch.chunk_length) - > sizeof(struct sctp_asconf_ack_chunk); > @@ -1778,7 +1789,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, > * at any given time > */ > if (last_error_id == 0) > - last_error_id--;/* set to "max" value */ > + last_error_id--; /* set to "max" value */ > TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { > if (aa->sent == 1) { > /* > @@ -1818,8 +1829,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, > > #ifdef INET6 > static uint32_t > -sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa) > -{ > +sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa){ > struct sockaddr_in6 *sin6, *net6; > struct sctp_nets *net; > > @@ -2058,6 +2068,7 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, vo > laddr->action = 0; > break; > } > + > } > } else if (l->action == SCTP_DEL_IP_ADDRESS) { > LIST_FOREACH_SAFE(laddr, &inp->sctp_addr_list, sctp_nxt_addr, nladdr) { > @@ -2091,6 +2102,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru > if (ifa->vrf_id != stcb->asoc.vrf_id) { > continue; > } > + > /* Same checks again for assoc */ > switch (ifa->address.sa.sa_family) { > #ifdef INET6 > @@ -2269,8 +2281,7 @@ sctp_asconf_iterator_end(void *ptr, uint32_t val SCTP_ > * returns: 0 = completed, -1 = error > */ > int32_t > -sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa) > -{ > +sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa){ > uint32_t vrf_id; > struct sctp_ifa *ifa; > > @@ -2281,6 +2292,7 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, > /* Invalid address */ > return (-1); > } > + > /* queue an ASCONF:SET_PRIM_ADDR to be sent */ > if (!sctp_asconf_queue_add(stcb, ifa, SCTP_SET_PRIM_ADDR)) { > /* set primary queuing succeeded */ > @@ -2359,11 +2371,13 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct > SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: param length(%u) too short\n", param_length); > break; > } > + > aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(chk->data, offset, param_length, aparam_buf); > if (aph == NULL) { > SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: couldn't get entire param\n"); > break; > } > + > ph = (struct sctp_paramhdr *)(aph + 1); > if (sctp_addr_match(ph, &sctp_ifa->address.sa) != 0) { > switch (param_type) { > @@ -2378,6 +2392,7 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct > } > last_param_type = param_type; > } > + > offset += SCTP_SIZE32(param_length); > if (offset >= asconf_limit) { > /* no more data in the mbuf chain */ > @@ -2461,6 +2476,7 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int a > if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { > continue; > } > + > sin6 = &sctp_ifa->address.sin6; > if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { > /* > @@ -2754,7 +2770,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, > /* go through the addresses in the init-ack */ > ph = (struct sctp_paramhdr *) > sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), > - (uint8_t *)&tmp_param); > + (uint8_t *) & tmp_param); > while (ph != NULL) { > ptype = ntohs(ph->param_type); > plen = ntohs(ph->param_length); > @@ -2768,7 +2784,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, > a6p = (struct sctp_ipv6addr_param *) > sctp_m_getptr(m, offset, > sizeof(struct sctp_ipv6addr_param), > - (uint8_t *)&addr6_store); > + (uint8_t *) & addr6_store); > if (plen != sizeof(struct sctp_ipv6addr_param) || > a6p == NULL) { > return; > @@ -2789,7 +2805,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, > /* get the entire IPv4 address param */ > a4p = (struct sctp_ipv4addr_param *)sctp_m_getptr(m, offset, > sizeof(struct sctp_ipv4addr_param), > - (uint8_t *)&addr4_store); > + (uint8_t *) & addr4_store); > if (plen != sizeof(struct sctp_ipv4addr_param) || > a4p == NULL) { > return; > @@ -2836,6 +2852,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, > } > } > } > + > next_addr: > /* > * Sanity check: Make sure the length isn't 0, otherwise > @@ -2851,7 +2868,7 @@ next_addr: > if ((offset + sizeof(struct sctp_paramhdr)) > length) > return; > ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, > - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); > + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); > } /* while */ > } > > @@ -2861,8 +2878,7 @@ next_addr: > * 1 if found, 0 if not > */ > static uint32_t > -sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa) > -{ > +sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa){ > struct sctp_paramhdr tmp_param, *ph; > uint16_t plen, ptype; > #ifdef INET > @@ -2902,7 +2918,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, > } > /* go through the addresses in the init-ack */ > ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, > - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); > + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); > while (ph != NULL) { > ptype = ntohs(ph->param_type); > plen = ntohs(ph->param_length); > @@ -2918,7 +2934,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, > a6p = (struct sctp_ipv6addr_param *) > sctp_m_getptr(m, offset, > sizeof(struct sctp_ipv6addr_param), > - (uint8_t *)&addr6_store); > + (uint8_t *) & addr6_store); > if (a6p == NULL) { > return (0); > } > @@ -2948,7 +2964,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, > a4p = (struct sctp_ipv4addr_param *) > sctp_m_getptr(m, offset, > sizeof(struct sctp_ipv4addr_param), > - (uint8_t *)&addr4_store); > + (uint8_t *) & addr4_store); > if (a4p == NULL) { > return (0); > } > @@ -2970,7 +2986,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t offset, > } > ph = (struct sctp_paramhdr *) > sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), > - (uint8_t *)&tmp_param); > + (uint8_t *) & tmp_param); > } /* while */ > /* not found! */ > return (0); > @@ -3141,8 +3157,7 @@ sctp_check_address_list(struct sctp_tcb *stcb, struct > */ > uint32_t > sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct sockaddr *sa, > - uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap) > -{ > + uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap){ > struct sctp_ifa *ifa; > struct sctp_laddr *laddr, *nladdr; > > @@ -3370,6 +3385,7 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc > if (vrf == NULL) { > goto skip_rest; > } > + > SCTP_IPI_ADDR_RLOCK(); > LIST_FOREACH(sctp_ifnp, &vrf->ifnlist, next_ifn) { > LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { > > Modified: head/sys/netinet/sctp_asconf.h > ============================================================================== > --- head/sys/netinet/sctp_asconf.h Thu Jul 19 19:32:08 2018 (r336502) > +++ head/sys/netinet/sctp_asconf.h Thu Jul 19 19:33:42 2018 (r336503) > @@ -60,10 +60,10 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct socka > uint32_t, uint32_t, struct sctp_ifa *); > > > -extern int > +extern int > sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, > uint32_t val); > -extern void > +extern void > sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, > struct sctp_tcb *stcb, > void *ptr, uint32_t type); > > Modified: head/sys/netinet/sctp_auth.c > ============================================================================== > --- head/sys/netinet/sctp_auth.c Thu Jul 19 19:32:08 2018 (r336502) > +++ head/sys/netinet/sctp_auth.c Thu Jul 19 19:33:42 2018 (r336503) > @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); > > > void > -sctp_clear_chunklist(sctp_auth_chklist_t *chklist) > +sctp_clear_chunklist(sctp_auth_chklist_t * chklist) > { > memset(chklist, 0, sizeof(*chklist)); > /* chklist->num_chunks = 0; */ > @@ -75,14 +75,14 @@ sctp_alloc_chunklist(void) > } > > void > -sctp_free_chunklist(sctp_auth_chklist_t *list) > +sctp_free_chunklist(sctp_auth_chklist_t * list) > { > if (list != NULL) > SCTP_FREE(list, SCTP_M_AUTH_CL); > } > > sctp_auth_chklist_t * > -sctp_copy_chunklist(sctp_auth_chklist_t *list) > +sctp_copy_chunklist(sctp_auth_chklist_t * list) > { > sctp_auth_chklist_t *new_list; > > @@ -104,7 +104,7 @@ sctp_copy_chunklist(sctp_auth_chklist_t *list) > * add a chunk to the required chunks list > */ > int > -sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t *list) > +sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t * list) > { > if (list == NULL) > return (-1); > @@ -130,7 +130,7 @@ sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t > * delete a chunk from the required chunks list > */ > int > -sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t *list) > +sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t * list) > { > if (list == NULL) > return (-1); > @@ -146,7 +146,7 @@ sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklis > } > > size_t > -sctp_auth_get_chklist_size(const sctp_auth_chklist_t *list) > +sctp_auth_get_chklist_size(const sctp_auth_chklist_t * list) > { > if (list == NULL) > return (0); > @@ -159,7 +159,7 @@ sctp_auth_get_chklist_size(const sctp_auth_chklist_t * > * guarantee ptr has space for up to 256 bytes > */ > int > -sctp_serialize_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) > +sctp_serialize_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * ptr) > { > int i, count = 0; > > @@ -176,7 +176,7 @@ sctp_serialize_auth_chunks(const sctp_auth_chklist_t * > } > > int > -sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) > +sctp_pack_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * ptr) > { > int i, size = 0; > > @@ -208,8 +208,8 @@ sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, > } > > int > -sctp_unpack_auth_chunks(const uint8_t *ptr, uint8_t num_chunks, > - sctp_auth_chklist_t *list) > +sctp_unpack_auth_chunks(const uint8_t * ptr, uint8_t num_chunks, > + sctp_auth_chklist_t * list) > { > int i; > int size; > @@ -259,14 +259,14 @@ sctp_alloc_key(uint32_t keylen) > } > > void > -sctp_free_key(sctp_key_t *key) > +sctp_free_key(sctp_key_t * key) > { > if (key != NULL) > SCTP_FREE(key, SCTP_M_AUTH_KY); > } > > void > -sctp_print_key(sctp_key_t *key, const char *str) > +sctp_print_key(sctp_key_t * key, const char *str) > { > uint32_t i; > > @@ -285,7 +285,7 @@ sctp_print_key(sctp_key_t *key, const char *str) > } > > void > -sctp_show_key(sctp_key_t *key, const char *str) > +sctp_show_key(sctp_key_t * key, const char *str) > { > uint32_t i; > > @@ -304,8 +304,7 @@ sctp_show_key(sctp_key_t *key, const char *str) > } > > static uint32_t > -sctp_get_keylen(sctp_key_t *key) > -{ > +sctp_get_keylen(sctp_key_t * key) { > if (key != NULL) > return (key->keylen); > else > @@ -331,7 +330,7 @@ sctp_generate_random_key(uint32_t keylen) > } > > sctp_key_t * > -sctp_set_key(uint8_t *key, uint32_t keylen) > +sctp_set_key(uint8_t * key, uint32_t keylen) > { > sctp_key_t *new_key; > > @@ -351,7 +350,7 @@ sctp_set_key(uint8_t *key, uint32_t keylen) > * 0 if key1 = key2 > */ > static int > -sctp_compare_key(sctp_key_t *key1, sctp_key_t *key2) > +sctp_compare_key(sctp_key_t * key1, sctp_key_t * key2) > { > uint32_t maxlen; > uint32_t i; > @@ -402,7 +401,7 @@ sctp_compare_key(sctp_key_t *key1, sctp_key_t *key2) > * order for concatenation > */ > sctp_key_t * > -sctp_compute_hashkey(sctp_key_t *key1, sctp_key_t *key2, sctp_key_t *shared) > +sctp_compute_hashkey(sctp_key_t * key1, sctp_key_t * key2, sctp_key_t * shared) > { > uint32_t keylen; > sctp_key_t *new_key; > @@ -476,7 +475,7 @@ sctp_alloc_sharedkey(void) > } > > void > -sctp_free_sharedkey(sctp_sharedkey_t *skey) > +sctp_free_sharedkey(sctp_sharedkey_t * skey) > { > if (skey == NULL) > return; > @@ -502,7 +501,7 @@ sctp_find_sharedkey(struct sctp_keyhead *shared_keys, > > int > sctp_insert_sharedkey(struct sctp_keyhead *shared_keys, > - sctp_sharedkey_t *new_skey) > + sctp_sharedkey_t * new_skey) > { > sctp_sharedkey_t *skey; > > @@ -596,8 +595,7 @@ sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t > } > > static sctp_sharedkey_t * > -sctp_copy_sharedkey(const sctp_sharedkey_t *skey) > -{ > +sctp_copy_sharedkey(const sctp_sharedkey_t * skey){ > sctp_sharedkey_t *new_skey; > > if (skey == NULL) > @@ -654,7 +652,7 @@ sctp_alloc_hmaclist(uint16_t num_hmacs) > } > > void > -sctp_free_hmaclist(sctp_hmaclist_t *list) > +sctp_free_hmaclist(sctp_hmaclist_t * list) > { > if (list != NULL) { > SCTP_FREE(list, SCTP_M_AUTH_HL); > @@ -663,7 +661,7 @@ sctp_free_hmaclist(sctp_hmaclist_t *list) > } > > int > -sctp_auth_add_hmacid(sctp_hmaclist_t *list, uint16_t hmac_id) > +sctp_auth_add_hmacid(sctp_hmaclist_t * list, uint16_t hmac_id) > { > int i; > > @@ -691,7 +689,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t *list, uint16_t h > } > > sctp_hmaclist_t * > -sctp_copy_hmaclist(sctp_hmaclist_t *list) > +sctp_copy_hmaclist(sctp_hmaclist_t * list) > { > sctp_hmaclist_t *new_list; > int i; > @@ -729,8 +727,7 @@ sctp_default_supported_hmaclist(void) > * find the best HMAC id to use for the peer based on local support > */ > uint16_t > -sctp_negotiate_hmacid(sctp_hmaclist_t *peer, sctp_hmaclist_t *local) > -{ > +sctp_negotiate_hmacid(sctp_hmaclist_t * peer, sctp_hmaclist_t * local) { > int i, j; > > if ((local == NULL) || (peer == NULL)) > @@ -756,7 +753,7 @@ sctp_negotiate_hmacid(sctp_hmaclist_t *peer, sctp_hmac > * caller must guarantee ptr has appropriate space > */ > int > -sctp_serialize_hmaclist(sctp_hmaclist_t *list, uint8_t *ptr) > +sctp_serialize_hmaclist(sctp_hmaclist_t * list, uint8_t * ptr) > { > int i; > uint16_t hmac_id; > @@ -802,7 +799,7 @@ sctp_alloc_authinfo(void) > } > > void > -sctp_free_authinfo(sctp_authinfo_t *authinfo) > +sctp_free_authinfo(sctp_authinfo_t * authinfo) > { > if (authinfo == NULL) > return; > @@ -822,8 +819,7 @@ sctp_free_authinfo(sctp_authinfo_t *authinfo) > > > uint32_t > -sctp_get_auth_chunk_len(uint16_t hmac_algo) > -{ > +sctp_get_auth_chunk_len(uint16_t hmac_algo) { > int size; > > size = sizeof(struct sctp_auth_chunk) + sctp_get_hmac_digest_len(hmac_algo); > @@ -831,8 +827,7 @@ sctp_get_auth_chunk_len(uint16_t hmac_algo) > } > > uint32_t > -sctp_get_hmac_digest_len(uint16_t hmac_algo) > -{ > +sctp_get_hmac_digest_len(uint16_t hmac_algo) { > switch (hmac_algo) { > case SCTP_AUTH_HMAC_ID_SHA1: > return (SCTP_AUTH_DIGEST_LEN_SHA1); > @@ -860,7 +855,7 @@ sctp_get_hmac_block_len(uint16_t hmac_algo) > } > > static void > -sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t *ctx) > +sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t * ctx) > { > switch (hmac_algo) { > case SCTP_AUTH_HMAC_ID_SHA1: > @@ -877,8 +872,8 @@ sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t > } > > static void > -sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t *ctx, > - uint8_t *text, uint32_t textlen) > +sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t * ctx, > + uint8_t * text, uint32_t textlen) > { > switch (hmac_algo) { > case SCTP_AUTH_HMAC_ID_SHA1: > @@ -895,8 +890,8 @@ sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context > } > > static void > -sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t *ctx, > - uint8_t *digest) > +sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t * ctx, > + uint8_t * digest) > { > switch (hmac_algo) { > case SCTP_AUTH_HMAC_ID_SHA1: > @@ -923,9 +918,8 @@ sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_ > * resultant digest. > */ > uint32_t > -sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, > - uint8_t *text, uint32_t textlen, uint8_t *digest) > -{ > +sctp_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, > + uint8_t * text, uint32_t textlen, uint8_t * digest) { > uint32_t digestlen; > uint32_t blocklen; > sctp_hash_context_t ctx; > @@ -983,9 +977,8 @@ sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t k > > /* mbuf version */ > uint32_t > -sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, > - struct mbuf *m, uint32_t m_offset, uint8_t *digest, uint32_t trailer) > -{ > +sctp_hmac_m(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, > + struct mbuf *m, uint32_t m_offset, uint8_t * digest, uint32_t trailer){ > uint32_t digestlen; > uint32_t blocklen; > sctp_hash_context_t ctx; > @@ -1031,17 +1024,17 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t > sctp_hmac_update(hmac_algo, &ctx, ipad, blocklen); > /* find the correct starting mbuf and offset (get start of text) */ > m_tmp = m; > - while ((m_tmp != NULL) && (m_offset >= (uint32_t)SCTP_BUF_LEN(m_tmp))) { > + while ((m_tmp != NULL) && (m_offset >= (uint32_t) SCTP_BUF_LEN(m_tmp))) { > m_offset -= SCTP_BUF_LEN(m_tmp); > m_tmp = SCTP_BUF_NEXT(m_tmp); > } > /* now use the rest of the mbuf chain for the text */ > while (m_tmp != NULL) { > if ((SCTP_BUF_NEXT(m_tmp) == NULL) && trailer) { > - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, > + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, > SCTP_BUF_LEN(m_tmp) - (trailer + m_offset)); > } else { > - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, > + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, > SCTP_BUF_LEN(m_tmp) - m_offset); > } > > @@ -1066,9 +1059,9 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t > * Returns -1 on error, 0 on success. > */ > int > -sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, > - uint8_t *text, uint32_t textlen, > - uint8_t *digest, uint32_t digestlen) > +sctp_verify_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, > + uint8_t * text, uint32_t textlen, > + uint8_t * digest, uint32_t digestlen) > { > uint32_t len; > uint8_t temp[SCTP_AUTH_DIGEST_LEN_MAX]; > @@ -1099,9 +1092,8 @@ sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uin > * the keylen exceeds the HMAC block len). > */ > uint32_t > -sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, uint8_t *text, > - uint32_t textlen, uint8_t *digest) > -{ > +sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t * key, uint8_t * text, > + uint32_t textlen, uint8_t * digest) { > uint32_t digestlen; > uint32_t blocklen; > sctp_hash_context_t ctx; > @@ -1134,9 +1126,8 @@ sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, > > /* mbuf version */ > uint32_t > -sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t *key, struct mbuf *m, > - uint32_t m_offset, uint8_t *digest) > -{ > +sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t * key, struct mbuf *m, > + uint32_t m_offset, uint8_t * digest){ > uint32_t digestlen; > uint32_t blocklen; > sctp_hash_context_t ctx; > @@ -1166,7 +1157,7 @@ sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t *ke > } > > int > -sctp_auth_is_supported_hmac(sctp_hmaclist_t *list, uint16_t id) > +sctp_auth_is_supported_hmac(sctp_hmaclist_t * list, uint16_t id) > { > int i; > > @@ -1309,6 +1300,7 @@ sctp_auth_setactivekey(struct sctp_tcb *stcb, uint16_t > /* can't reactivate a deactivated key with other refcounts */ > return (-1); > } > + > /* set the (new) active key */ > stcb->asoc.authinfo.active_keyid = keyid; > /* reset the deactivated flag */ > @@ -1363,6 +1355,7 @@ sctp_deact_sharedkey(struct sctp_tcb *stcb, uint16_t k > sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, keyid, 0, > SCTP_SO_LOCKED); > } > + > /* mark the key as deactivated */ > skey->deactivated = 1; > > @@ -1424,7 +1417,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str > length += offset; > > phdr = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, > - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); > + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); > while (phdr != NULL) { > ptype = ntohs(phdr->param_type); > plen = ntohs(phdr->param_length); > @@ -1491,7 +1484,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str > if (offset + sizeof(struct sctp_paramhdr) > length) > break; > phdr = (struct sctp_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), > - (uint8_t *)&tmp_param); > + (uint8_t *) & tmp_param); > } > /* concatenate the full random key */ > keylen = sizeof(*p_random) + random_len + sizeof(*hmacs) + hmacs_len; > @@ -1582,6 +1575,7 @@ sctp_fill_hmac_digest_m(struct mbuf *m, uint32_t auth_ > "Assoc Key"); > #endif > } > + > /* set in the active key id */ > auth->shared_key_id = htons(keyid); > > @@ -1603,14 +1597,14 @@ sctp_zero_m(struct mbuf *m, uint32_t m_offset, uint32_ > > /* find the correct starting mbuf and offset (get start position) */ > m_tmp = m; > - while ((m_tmp != NULL) && (m_offset >= (uint32_t)SCTP_BUF_LEN(m_tmp))) { > + while ((m_tmp != NULL) && (m_offset >= (uint32_t) SCTP_BUF_LEN(m_tmp))) { > m_offset -= SCTP_BUF_LEN(m_tmp); > m_tmp = SCTP_BUF_NEXT(m_tmp); > } > /* now use the rest of the mbuf chain */ > while ((m_tmp != NULL) && (size > 0)) { > - data = mtod(m_tmp, uint8_t *)+m_offset; > - if (size > (uint32_t)(SCTP_BUF_LEN(m_tmp) - m_offset)) { > + data = mtod(m_tmp, uint8_t *) + m_offset; > + if (size > (uint32_t) (SCTP_BUF_LEN(m_tmp) - m_offset)) { > memset(data, 0, SCTP_BUF_LEN(m_tmp) - m_offset); > size -= SCTP_BUF_LEN(m_tmp) - m_offset; > } else { > @@ -1769,6 +1763,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint > /* If the socket is gone we are out of here */ > return; > } > + > if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_AUTHEVNT)) > /* event not enabled */ > return; > @@ -1929,6 +1924,7 @@ sctp_validate_init_auth_params(struct mbuf *m, int off > if (num_chunks) > got_chklist = 1; > } > + > offset += SCTP_SIZE32(plen); > if (offset >= limit) { > break; > @@ -2023,6 +2019,7 @@ sctp_initialize_auth_params(struct sctp_inpcb *inp, st > new_key->key[keylen++] = i; > } > } > + > /* append in the HMACs */ > ph = (struct sctp_paramhdr *)(new_key->key + keylen); > ph->param_type = htons(SCTP_HMAC_LIST); > > Modified: head/sys/netinet/sctp_auth.h > ============================================================================== > --- head/sys/netinet/sctp_auth.h Thu Jul 19 19:32:08 2018 (r336502) > +++ head/sys/netinet/sctp_auth.h Thu Jul 19 19:33:42 2018 (r336503) > @@ -53,12 +53,12 @@ __FBSDID("$FreeBSD$"); > typedef union sctp_hash_context { > SCTP_SHA1_CTX sha1; > SCTP_SHA256_CTX sha256; > -} sctp_hash_context_t; > +} sctp_hash_context_t; > > typedef struct sctp_key { > uint32_t keylen; > uint8_t key[]; > -} sctp_key_t; > +} sctp_key_t; > > typedef struct sctp_shared_key { > LIST_ENTRY(sctp_shared_key) next; > @@ -66,7 +66,7 @@ typedef struct sctp_shared_key { > uint32_t refcount; /* reference count */ > uint16_t keyid; /* shared key ID */ > uint8_t deactivated; /* key is deactivated */ > -} sctp_sharedkey_t; > +} sctp_sharedkey_t; > > LIST_HEAD(sctp_keyhead, sctp_shared_key); > > @@ -74,26 +74,26 @@ LIST_HEAD(sctp_keyhead, sctp_shared_key); > typedef struct sctp_auth_chklist { > uint8_t chunks[256]; > uint8_t num_chunks; > -} sctp_auth_chklist_t; > +} sctp_auth_chklist_t; > > /* hmac algos supported list */ > typedef struct sctp_hmaclist { > uint16_t max_algo; /* max algorithms allocated */ > uint16_t num_algo; /* num algorithms used */ > uint16_t hmac[]; > -} sctp_hmaclist_t; > +} sctp_hmaclist_t; > > /* authentication info */ > typedef struct sctp_authinformation { > sctp_key_t *random; /* local random key (concatenated) */ > uint32_t random_len; /* local random number length for param */ > - sctp_key_t *peer_random;/* peer's random key (concatenated) */ > + sctp_key_t *peer_random; /* peer's random key (concatenated) */ > sctp_key_t *assoc_key; /* cached concatenated send key */ > sctp_key_t *recv_key; /* cached concatenated recv key */ > uint16_t active_keyid; /* active send keyid */ > uint16_t assoc_keyid; /* current send keyid (cached) */ > uint16_t recv_keyid; /* last recv keyid (cached) */ > -} sctp_authinfo_t; > +} sctp_authinfo_t; > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-head@freebsd.org Thu Jul 19 20:12:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA00E1048565; Thu, 19 Jul 2018 20:12:23 +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 6752C785B9; Thu, 19 Jul 2018 20:12:23 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=58646 helo=[10.0.0.104]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fgFHh-000MFd-0l; Thu, 19 Jul 2018 20:12:21 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Devin Teske In-Reply-To: <1532030389.1344.9.camel@freebsd.org> Date: Thu, 19 Jul 2018 13:12:19 -0700 Cc: Devin Teske , Alexey Dokuchaev , Michael Tuexen , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@FreeBSD.org> <1532030389.1344.9.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:12:24 -0000 > On Jul 19, 2018, at 12:59 PM, Ian Lepore wrote: >=20 > On Thu, 2018-07-19 at 19:53 +0000, Alexey Dokuchaev wrote: >>> +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 = (r336503) >>> static struct mbuf * >>> -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t = *error_tlv, >>> +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * = error_tlv, >>=20 >> This looks strange now. In C, asterisk is usually placed by the = variable. >=20 > "usually" may be true of freebsd, but most places I've worked consider > the * (and & in c++) to be more associated with the type being = declared > than with the variable name, thus they get snugged up against the type > info, not the var name. Putting the * or & with the var name leads to > particularly bad constructs such as=20 >=20 > int a, *b; >=20 > which, for maximal clarity, should be: >=20 > int a; > int* b; >=20 Are we free to prefer the former in C if that's how we've been coding in = C for 20+ years? --=20 Devin= From owner-svn-src-head@freebsd.org Thu Jul 19 20:13:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8629B10486BC; Thu, 19 Jul 2018 20:13:34 +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 3AA25787AE; Thu, 19 Jul 2018 20:13:34 +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 1C32B2E044; Thu, 19 Jul 2018 20:13:34 +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 w6JKDXZ5038926; Thu, 19 Jul 2018 20:13:33 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKDXcF038925; Thu, 19 Jul 2018 20:13:33 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807192013.w6JKDXcF038925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 19 Jul 2018 20:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336509 - 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: 336509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:13:34 -0000 Author: jhibbits Date: Thu Jul 19 20:13:33 2018 New Revision: 336509 URL: https://svnweb.freebsd.org/changeset/base/336509 Log: Merge the md_page structs for AIM and Book-E into a single unioned struct Summary: Ports like sysutils/lsof troll through kernel structures, and therefore include kernel headers and all the dirty secrets involved. struct vm_page includes the struct md_page inline, which currently is only defined if AIM or BOOKE is defined. Thus, by default, sysutils/lsof cannot build, due to the struct md_page having an incomplete type. Fix this by merging the two struct definitions into an anonymous struct-union. A similar change could be made to unify the pmap structures as well. Reviewed By: nwhitehorn Differential Revision: https://reviews.freebsd.org/D16232 Modified: head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Thu Jul 19 20:11:14 2018 (r336508) +++ head/sys/powerpc/include/pmap.h Thu Jul 19 20:13:33 2018 (r336509) @@ -150,12 +150,6 @@ struct pmap { struct pvo_tree pmap_pvo; }; -struct md_page { - volatile int32_t mdpg_attrs; - vm_memattr_t mdpg_cache_attrs; - struct pvo_head mdpg_pvoh; -}; - #define pmap_page_get_memattr(m) ((m)->md.mdpg_cache_attrs) #define pmap_page_is_mapped(m) (!LIST_EMPTY(&(m)->md.mdpg_pvoh)) @@ -212,11 +206,6 @@ struct pv_entry { }; typedef struct pv_entry *pv_entry_t; -struct md_page { - TAILQ_HEAD(, pv_entry) pv_list; - int pv_tracked; -}; - #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) @@ -231,6 +220,20 @@ struct pmap { struct mtx pm_mtx; /* pmap mutex */ }; #endif /* AIM */ + +struct md_page { + union { + struct md_page_booke { + TAILQ_HEAD(, pv_entry) pv_list; + int pv_tracked; + }; + struct md_page_aim { + volatile int32_t mdpg_attrs; + vm_memattr_t mdpg_cache_attrs; + struct pvo_head mdpg_pvoh; + }; + }; +}; extern struct pmap kernel_pmap_store; #define kernel_pmap (&kernel_pmap_store) From owner-svn-src-head@freebsd.org Thu Jul 19 20:14:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1C5110487B4; Thu, 19 Jul 2018 20:14:34 +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 752D778DDF; Thu, 19 Jul 2018 20:14:34 +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 57C812E048; Thu, 19 Jul 2018 20:14:34 +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 w6JKEYrv039005; Thu, 19 Jul 2018 20:14:34 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKEYAp039004; Thu, 19 Jul 2018 20:14:34 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807192014.w6JKEYAp039004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 20:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336510 - head/contrib/wpa X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa X-SVN-Commit-Revision: 336510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:14:34 -0000 Author: cy Date: Thu Jul 19 20:14:33 2018 New Revision: 336510 URL: https://svnweb.freebsd.org/changeset/base/336510 Log: MFV r336493: Fix PTK rekeying to generate a new ANonce. This is also upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85. This commit is a NOP, just changing props as the heavy lifting was done by r324696. This just brings us into line with the vendor branch. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0005-Fix-PTK-rekeying-to-\ generate-a-new-ANonce.patch Modified: Directory Properties: head/contrib/wpa/ (props changed) From owner-svn-src-head@freebsd.org Thu Jul 19 20:16:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1A8310489A2; Thu, 19 Jul 2018 20:16:36 +0000 (UTC) (envelope-from tuexen@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 530E579072; Thu, 19 Jul 2018 20:16:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FE582E049; Thu, 19 Jul 2018 20:16:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JKGaho039162; Thu, 19 Jul 2018 20:16:36 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKGXf1039147; Thu, 19 Jul 2018 20:16:33 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807192016.w6JKGXf1039147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 19 Jul 2018 20:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336511 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 336511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:16:37 -0000 Author: tuexen Date: Thu Jul 19 20:16:33 2018 New Revision: 336511 URL: https://svnweb.freebsd.org/changeset/base/336511 Log: Whitespace changes due to changes in ident. Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_asconf.h head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_peeloff.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/sctp6_var.h Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp.h Thu Jul 19 20:16:33 2018 (r336511) @@ -419,7 +419,7 @@ struct sctp_error_unresolv_addr { struct sctp_error_unrecognized_chunk { struct sctp_error_cause cause; /* code=SCTP_CAUSE_UNRECOG_CHUNK */ - struct sctp_chunkhdr ch;/* header from chunk in error */ + struct sctp_chunkhdr ch; /* header from chunk in error */ } SCTP_PACKED; struct sctp_error_no_user_data { Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 20:16:33 2018 (r336511) @@ -277,6 +277,7 @@ sctp_asconf_del_remote_addrs_except(struct sctp_tcb *s /* not found */ return (-1); } + /* delete all destination addresses except the source */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (net != src_net) { @@ -383,6 +384,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, aparam_length); return (m_reply); } + /* if deleting 0.0.0.0/::0, delete all addresses except src addr */ if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { result = sctp_asconf_del_remote_addrs_except(stcb, src); @@ -401,6 +403,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src, } return (m_reply); } + /* delete the address */ result = sctp_del_remote_addr(stcb, sa); /* @@ -616,6 +619,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset serial_num, asoc->asconf_seq_in + 1); return; } + /* it's the expected "next" sequence number, so process it */ asoc->asconf_seq_in = serial_num; /* update sequence */ /* get length of all the param's in the ASCONF */ @@ -640,6 +644,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_asconf_ack), ack); } } + m_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_ack_chunk), 0, M_NOWAIT, 1, MT_DATA); if (m_ack == NULL) { @@ -974,6 +979,7 @@ sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, st if (stcb->asoc.deleted_primary == NULL) { return; } + if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) { SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: Deleted primary is "); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.deleted_primary->ro._l_addr.sa); @@ -1077,6 +1083,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc } return; } + /* Multiple local addresses exsist in the association. */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { /* clear any cached route and source address */ @@ -1323,6 +1330,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc if (stcb->asoc.asconf_supported == 0) { return (-1); } + /* * if this is deleting the last address from the assoc, mark it as * pending. @@ -1343,6 +1351,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc return (-1); } } + /* queue an asconf parameter */ status = sctp_asconf_queue_mgmt(stcb, ifa, type); @@ -1364,6 +1373,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc stcb->asoc.asconf_addr_del_pending = NULL; } } + if (pending_delete_queued) { struct sctp_nets *net; @@ -1388,6 +1398,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sc SCTP_FROM_SCTP_ASCONF, __LINE__); } + /* queue in an advisory set primary too */ (void)sctp_asconf_queue_mgmt(stcb, ifa, SCTP_SET_PRIM_ADDR); /* let caller know we should send this out immediately */ @@ -1685,11 +1696,13 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, serial_num, asoc->asconf_seq_out_acked + 1); return; } + if (serial_num == asoc->asconf_seq_out - 1) { /* stop our timer */ sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); } + /* process the ASCONF-ACK contents */ ack_length = ntohs(cp->ch.chunk_length) - sizeof(struct sctp_asconf_ack_chunk); @@ -1778,7 +1791,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, * at any given time */ if (last_error_id == 0) - last_error_id--;/* set to "max" value */ + last_error_id--; /* set to "max" value */ TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { if (aa->sent == 1) { /* @@ -2058,6 +2071,7 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, vo laddr->action = 0; break; } + } } else if (l->action == SCTP_DEL_IP_ADDRESS) { LIST_FOREACH_SAFE(laddr, &inp->sctp_addr_list, sctp_nxt_addr, nladdr) { @@ -2091,6 +2105,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru if (ifa->vrf_id != stcb->asoc.vrf_id) { continue; } + /* Same checks again for assoc */ switch (ifa->address.sa.sa_family) { #ifdef INET6 @@ -2281,6 +2296,7 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, /* Invalid address */ return (-1); } + /* queue an ASCONF:SET_PRIM_ADDR to be sent */ if (!sctp_asconf_queue_add(stcb, ifa, SCTP_SET_PRIM_ADDR)) { /* set primary queuing succeeded */ @@ -2359,11 +2375,13 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: param length(%u) too short\n", param_length); break; } + aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(chk->data, offset, param_length, aparam_buf); if (aph == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: couldn't get entire param\n"); break; } + ph = (struct sctp_paramhdr *)(aph + 1); if (sctp_addr_match(ph, &sctp_ifa->address.sa) != 0) { switch (param_type) { @@ -2378,6 +2396,7 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sct } last_param_type = param_type; } + offset += SCTP_SIZE32(param_length); if (offset >= asconf_limit) { /* no more data in the mbuf chain */ @@ -2461,6 +2480,7 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int a if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { continue; } + sin6 = &sctp_ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* @@ -2836,6 +2856,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, } } } + next_addr: /* * Sanity check: Make sure the length isn't 0, otherwise @@ -3370,6 +3391,7 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc if (vrf == NULL) { goto skip_rest; } + SCTP_IPI_ADDR_RLOCK(); LIST_FOREACH(sctp_ifnp, &vrf->ifnlist, next_ifn) { LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, next_ifa) { Modified: head/sys/netinet/sctp_asconf.h ============================================================================== --- head/sys/netinet/sctp_asconf.h Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_asconf.h Thu Jul 19 20:16:33 2018 (r336511) @@ -60,10 +60,10 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct socka uint32_t, uint32_t, struct sctp_ifa *); -extern int +extern int sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val); -extern void +extern void sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, uint32_t type); Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_auth.c Thu Jul 19 20:16:33 2018 (r336511) @@ -1309,6 +1309,7 @@ sctp_auth_setactivekey(struct sctp_tcb *stcb, uint16_t /* can't reactivate a deactivated key with other refcounts */ return (-1); } + /* set the (new) active key */ stcb->asoc.authinfo.active_keyid = keyid; /* reset the deactivated flag */ @@ -1363,6 +1364,7 @@ sctp_deact_sharedkey(struct sctp_tcb *stcb, uint16_t k sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, keyid, 0, SCTP_SO_LOCKED); } + /* mark the key as deactivated */ skey->deactivated = 1; @@ -1582,6 +1584,7 @@ sctp_fill_hmac_digest_m(struct mbuf *m, uint32_t auth_ "Assoc Key"); #endif } + /* set in the active key id */ auth->shared_key_id = htons(keyid); @@ -1769,6 +1772,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint /* If the socket is gone we are out of here */ return; } + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_AUTHEVNT)) /* event not enabled */ return; @@ -1929,6 +1933,7 @@ sctp_validate_init_auth_params(struct mbuf *m, int off if (num_chunks) got_chklist = 1; } + offset += SCTP_SIZE32(plen); if (offset >= limit) { break; @@ -2023,6 +2028,7 @@ sctp_initialize_auth_params(struct sctp_inpcb *inp, st new_key->key[keylen++] = i; } } + /* append in the HMACs */ ph = (struct sctp_paramhdr *)(new_key->key + keylen); ph->param_type = htons(SCTP_HMAC_LIST); Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_auth.h Thu Jul 19 20:16:33 2018 (r336511) @@ -87,7 +87,7 @@ typedef struct sctp_hmaclist { typedef struct sctp_authinformation { sctp_key_t *random; /* local random key (concatenated) */ uint32_t random_len; /* local random number length for param */ - sctp_key_t *peer_random;/* peer's random key (concatenated) */ + sctp_key_t *peer_random; /* peer's random key (concatenated) */ sctp_key_t *assoc_key; /* cached concatenated send key */ sctp_key_t *recv_key; /* cached concatenated recv key */ uint16_t active_keyid; /* active send keyid */ @@ -114,13 +114,13 @@ extern sctp_auth_chklist_t *sctp_copy_chunklist(sctp_a extern int sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t *list); extern int sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t *list); extern size_t sctp_auth_get_chklist_size(const sctp_auth_chklist_t *list); -extern int +extern int sctp_serialize_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr); -extern int +extern int sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr); -extern int +extern int sctp_unpack_auth_chunks(const uint8_t *ptr, uint8_t num_chunks, sctp_auth_chklist_t *list); @@ -141,16 +141,16 @@ extern void sctp_free_sharedkey(sctp_sharedkey_t *skey extern sctp_sharedkey_t * sctp_find_sharedkey(struct sctp_keyhead *shared_keys, uint16_t key_id); -extern int +extern int sctp_insert_sharedkey(struct sctp_keyhead *shared_keys, sctp_sharedkey_t *new_skey); -extern int +extern int sctp_copy_skeylist(const struct sctp_keyhead *src, struct sctp_keyhead *dest); /* ref counts on shared keys, by key id */ extern void sctp_auth_key_acquire(struct sctp_tcb *stcb, uint16_t keyid); -extern void +extern void sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t keyid, int so_locked); @@ -161,11 +161,11 @@ extern void sctp_free_hmaclist(sctp_hmaclist_t *list); extern int sctp_auth_add_hmacid(sctp_hmaclist_t *list, uint16_t hmac_id); extern sctp_hmaclist_t *sctp_copy_hmaclist(sctp_hmaclist_t *list); extern sctp_hmaclist_t *sctp_default_supported_hmaclist(void); -extern uint16_t +extern uint16_t sctp_negotiate_hmacid(sctp_hmaclist_t *peer, sctp_hmaclist_t *local); extern int sctp_serialize_hmaclist(sctp_hmaclist_t *list, uint8_t *ptr); -extern int +extern int sctp_verify_hmac_param(struct sctp_auth_hmac_algo *hmacs, uint32_t num_hmacs); @@ -175,22 +175,22 @@ extern void sctp_free_authinfo(sctp_authinfo_t *authin /* keyed-HMAC functions */ extern uint32_t sctp_get_auth_chunk_len(uint16_t hmac_algo); extern uint32_t sctp_get_hmac_digest_len(uint16_t hmac_algo); -extern uint32_t +extern uint32_t sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, uint8_t *text, uint32_t textlen, uint8_t *digest); -extern int +extern int sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, uint8_t *text, uint32_t textlen, uint8_t *digest, uint32_t digestlen); -extern uint32_t +extern uint32_t sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, uint8_t *text, uint32_t textlen, uint8_t *digest); extern int sctp_auth_is_supported_hmac(sctp_hmaclist_t *list, uint16_t id); /* mbuf versions */ -extern uint32_t +extern uint32_t sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, struct mbuf *m, uint32_t m_offset, uint8_t *digest, uint32_t trailer); -extern uint32_t +extern uint32_t sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t *key, struct mbuf *m, uint32_t m_offset, uint8_t *digest); @@ -206,26 +206,26 @@ extern int sctp_auth_setactivekey_ep(struct sctp_inpcb extern int sctp_deact_sharedkey(struct sctp_tcb *stcb, uint16_t keyid); extern int sctp_deact_sharedkey_ep(struct sctp_inpcb *inp, uint16_t keyid); -extern void +extern void sctp_auth_get_cookie_params(struct sctp_tcb *stcb, struct mbuf *m, uint32_t offset, uint32_t length); -extern void +extern void sctp_fill_hmac_digest_m(struct mbuf *m, uint32_t auth_offset, struct sctp_auth_chunk *auth, struct sctp_tcb *stcb, uint16_t key_id); extern struct mbuf * sctp_add_auth_chunk(struct mbuf *m, struct mbuf **m_end, struct sctp_auth_chunk **auth_ret, uint32_t *offset, struct sctp_tcb *stcb, uint8_t chunk); -extern int +extern int sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_auth_chunk *ch, struct mbuf *m, uint32_t offset); -extern void +extern void sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, uint16_t keyid, uint16_t alt_keyid, int so_locked); -extern int +extern int sctp_validate_init_auth_params(struct mbuf *m, int offset, int limit); -extern void +extern void sctp_initialize_auth_params(struct sctp_inpcb *inp, struct sctp_tcb *stcb); Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_bsd_addr.c Thu Jul 19 20:16:33 2018 (r336511) @@ -305,10 +305,12 @@ sctp_addr_change(struct ifaddr *ifa, int cmd) SCTP_BASE_VAR(first_time) = 1; sctp_init_ifns_for_vrf(SCTP_DEFAULT_VRFID); } + if ((cmd != RTM_ADD) && (cmd != RTM_DELETE)) { /* don't know what to do with this */ return; } + if (ifa->ifa_addr == NULL) { return; } Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_cc_functions.c Thu Jul 19 20:16:33 2018 (r336511) @@ -131,6 +131,7 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb, t_ucwnd_sbw = 1; } } + /*- * CMT fast recovery code. Need to debug. ((sctp_cmt_on_off > 0) && * (net->fast_retran_loss_recovery == 0))) @@ -1119,6 +1120,7 @@ sctp_cwnd_update_after_ecn_echo_common(struct sctp_tcb if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); } + } SCTP_STAT_INCR(sctps_ecnereducedcwnd); } else { @@ -1318,7 +1320,7 @@ sctp_cwnd_update_rtcc_after_ecn_echo(struct sctp_tcb * static -void +void sctp_cwnd_update_rtcc_tsn_acknowledged(struct sctp_nets *net, struct sctp_tmit_chunk *tp1) { @@ -1935,6 +1937,7 @@ measure_achieved_throughput(struct sctp_nets *net) net->cc_mod.htcp_ca.lasttime = now; return; } + net->cc_mod.htcp_ca.bytecount += net->net_ack; if ((net->cc_mod.htcp_ca.bytecount >= net->cwnd - (((net->cc_mod.htcp_ca.alpha >> 7) ? (net->cc_mod.htcp_ca.alpha >> 7) : 1) * net->mtu)) && (now - net->cc_mod.htcp_ca.lasttime >= net->cc_mod.htcp_ca.minRTT) && @@ -1971,6 +1974,7 @@ htcp_beta_update(struct htcp *ca, uint32_t minRTT, uin return; } } + if (ca->modeswitch && minRTT > (uint32_t)MSEC_TO_TICKS(10) && maxRTT) { ca->beta = (minRTT << 7) / maxRTT; if (ca->beta < BETA_MIN) @@ -1994,6 +1998,7 @@ htcp_alpha_update(struct htcp *ca) diff -= hz; factor = 1 + (10 * diff + ((diff / 2) * (diff / 2) / hz)) / hz; } + if (use_rtt_scaling && minRTT) { uint32_t scale = (hz << 3) / (10 * minRTT); @@ -2003,6 +2008,7 @@ htcp_alpha_update(struct htcp *ca) if (!factor) factor = 1; } + ca->alpha = 2 * factor * ((1 << 7) - ca->beta); if (!ca->alpha) ca->alpha = ALPHA_BASE; @@ -2057,12 +2063,14 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_net sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_FROM_SS); } + } else { net->cwnd += net->net_ack; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_FROM_SS); } + } sctp_enforce_cwnd_limit(&stcb->asoc, net); } else { Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_header.h Thu Jul 19 20:16:33 2018 (r336511) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); * Parameter structures */ struct sctp_ipv4addr_param { - struct sctp_paramhdr ph;/* type=SCTP_IPV4_PARAM_TYPE, len=8 */ + struct sctp_paramhdr ph; /* type=SCTP_IPV4_PARAM_TYPE, len=8 */ uint32_t addr; /* IPV4 address */ } SCTP_PACKED; @@ -56,20 +56,20 @@ struct sctp_ipv4addr_param { struct sctp_ipv6addr_param { - struct sctp_paramhdr ph;/* type=SCTP_IPV6_PARAM_TYPE, len=20 */ + struct sctp_paramhdr ph; /* type=SCTP_IPV6_PARAM_TYPE, len=20 */ uint8_t addr[SCTP_V6_ADDR_BYTES]; /* IPV6 address */ } SCTP_PACKED; /* Cookie Preservative */ struct sctp_cookie_perserve_param { - struct sctp_paramhdr ph;/* type=SCTP_COOKIE_PRESERVE, len=8 */ + struct sctp_paramhdr ph; /* type=SCTP_COOKIE_PRESERVE, len=8 */ uint32_t time; /* time in ms to extend cookie */ } SCTP_PACKED; #define SCTP_ARRAY_MIN_LEN 1 /* Host Name Address */ struct sctp_host_name_param { - struct sctp_paramhdr ph;/* type=SCTP_HOSTNAME_ADDRESS */ + struct sctp_paramhdr ph; /* type=SCTP_HOSTNAME_ADDRESS */ char name[SCTP_ARRAY_MIN_LEN]; /* host name */ } SCTP_PACKED; @@ -80,7 +80,7 @@ struct sctp_host_name_param { #define SCTP_MAX_ADDR_PARAMS_SIZE 12 /* supported address type */ struct sctp_supported_addr_param { - struct sctp_paramhdr ph;/* type=SCTP_SUPPORTED_ADDRTYPE */ + struct sctp_paramhdr ph; /* type=SCTP_SUPPORTED_ADDRTYPE */ uint16_t addr_type[2]; /* array of supported address types */ } SCTP_PACKED; @@ -108,8 +108,8 @@ struct sctp_prsctp_supported_param { /* draft-ietf-tsvwg-addip-sctp */ struct sctp_asconf_paramhdr { /* an ASCONF "parameter" */ - struct sctp_paramhdr ph;/* a SCTP parameter header */ - uint32_t correlation_id;/* correlation id for this param */ + struct sctp_paramhdr ph; /* a SCTP parameter header */ + uint32_t correlation_id; /* correlation id for this param */ } SCTP_PACKED; struct sctp_asconf_addr_param { /* an ASCONF address parameter */ @@ -133,7 +133,7 @@ struct sctp_asconf_addrv4_param { /* an ASCONF address #define SCTP_MAX_SUPPORTED_EXT 256 struct sctp_supported_chunk_types_param { - struct sctp_paramhdr ph;/* type = 0x8008 len = x */ + struct sctp_paramhdr ph; /* type = 0x8008 len = x */ uint8_t chunk_types[]; } SCTP_PACKED; @@ -206,8 +206,8 @@ struct sctp_state_cookie { /* this is our definition.. uint16_t peerport; /* port address of the peer in the INIT */ uint16_t myport; /* my port address used in the INIT */ - uint8_t ipv4_addr_legal;/* Are V4 addr legal? */ - uint8_t ipv6_addr_legal;/* Are V6 addr legal? */ + uint8_t ipv4_addr_legal; /* Are V4 addr legal? */ + uint8_t ipv6_addr_legal; /* Are V6 addr legal? */ uint8_t local_scope; /* IPv6 local scope flag */ uint8_t site_scope; /* IPv6 site scope flag */ @@ -512,17 +512,17 @@ struct sctp_stream_reset_resp_tsn { /* Should we make the max be 32? */ #define SCTP_RANDOM_MAX_SIZE 256 struct sctp_auth_random { - struct sctp_paramhdr ph;/* type = 0x8002 */ + struct sctp_paramhdr ph; /* type = 0x8002 */ uint8_t random_data[]; } SCTP_PACKED; struct sctp_auth_chunk_list { - struct sctp_paramhdr ph;/* type = 0x8003 */ + struct sctp_paramhdr ph; /* type = 0x8003 */ uint8_t chunk_types[]; } SCTP_PACKED; struct sctp_auth_hmac_algo { - struct sctp_paramhdr ph;/* type = 0x8004 */ + struct sctp_paramhdr ph; /* type = 0x8004 */ uint16_t hmac_ids[]; } SCTP_PACKED; Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_indata.c Thu Jul 19 20:16:33 2018 (r336511) @@ -90,6 +90,7 @@ sctp_calc_rwnd(struct sctp_tcb *stcb, struct sctp_asso if (stcb->sctp_socket == NULL) { return (calc); } + KASSERT(asoc->cnt_on_reasm_queue > 0 || asoc->size_on_reasm_queue == 0, ("size_on_reasm_queue is %u", asoc->size_on_reasm_queue)); KASSERT(asoc->cnt_on_all_streams > 0 || asoc->size_on_all_streams == 0, @@ -115,6 +116,7 @@ sctp_calc_rwnd(struct sctp_tcb *stcb, struct sctp_asso /* out of space */ return (calc); } + /* what is the overhead of all these rwnd's */ calc = sctp_sbspace_sub(calc, stcb->asoc.my_rwnd_control_len); /* @@ -185,6 +187,7 @@ sctp_build_ctl_nchunk(struct sctp_inpcb *inp, struct s /* user does not want any ancillary data */ return (NULL); } + len = 0; if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO)) { len += CMSG_SPACE(sizeof(struct sctp_rcvinfo)); @@ -1044,6 +1047,7 @@ place_chunk: SCTP_FROM_SCTP_INDATA + SCTP_LOC_5); return; } + } if (inserted == 0) { /* Its at the end */ @@ -2138,6 +2142,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc control = NULL; goto finish_express_del; } + /* Now will we need a chunk too? */ if ((chk_flags & SCTP_DATA_NOT_FRAG) != SCTP_DATA_NOT_FRAG) { sctp_alloc_a_chunk(stcb, chk); @@ -3096,6 +3101,7 @@ sctp_process_segment_range(struct sctp_tcb *stcb, stru tp1->do_rtt = 0; } } + } if (tp1->sent <= SCTP_DATAGRAM_RESEND) { if (SCTP_TSN_GT(tp1->rec.data.tsn, @@ -3361,6 +3367,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, stru continue; } } + } if (SCTP_TSN_GT(tp1->rec.data.tsn, asoc->this_sack_highest_gap) && !(accum_moved && asoc->fast_retran_loss_recovery)) { @@ -3596,6 +3603,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, stru tp1); } } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) { sctp_log_rwnd(SCTP_INCREASE_PEER_RWND, asoc->peers_rwnd, tp1->send_size, SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)); @@ -3677,6 +3685,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, stru tp1->whoTo->find_pseudo_cumack = 1; tp1->whoTo->find_rtx_pseudo_cumack = 1; } + } else { /* CMT is OFF */ #ifdef SCTP_FR_TO_ALTERNATE @@ -3965,6 +3974,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 } return; } + /* First setup for CC stuff */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { if (SCTP_TSN_GT(cumack, net->cwr_window_tsn)) { @@ -4230,6 +4240,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 asoc->total_flight = 0; asoc->total_flight_count = 0; } + /* RWND update */ asoc->peers_rwnd = sctp_sbspace_sub(rwnd, (uint32_t)(asoc->total_flight + (asoc->total_flight_count * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); @@ -4482,6 +4493,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int o sctp_misc_ints(SCTP_SACK_LOG_NORMAL, cum_ack, rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); } + old_rwnd = stcb->asoc.peers_rwnd; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -4553,6 +4565,7 @@ hopeless_peer: /* acking something behind */ return; } + /* update the Rwnd of the peer */ if (TAILQ_EMPTY(&asoc->sent_queue) && TAILQ_EMPTY(&asoc->send_queue) && @@ -4606,6 +4619,7 @@ hopeless_peer: if (stcb->asoc.cc_functions.sctp_cwnd_prepare_net_for_sack) { (*stcb->asoc.cc_functions.sctp_cwnd_prepare_net_for_sack) (stcb, net); } + /* * CMT: SFR algo (and HTNA) - this_sack_highest_newack has * to be greater than the cumack. Also reset saw_newack to 0 @@ -4841,6 +4855,7 @@ hopeless_peer: #endif asoc->total_flight = 0; } + /* sa_ignore NO_NULL_CHK */ if ((wake_him) && (stcb->sctp_socket)) { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -4945,6 +4960,7 @@ hopeless_peer: sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } + if (net == stcb->asoc.primary_destination) { if (stcb->asoc.alternate) { /* @@ -4955,6 +4971,7 @@ hopeless_peer: stcb->asoc.alternate = NULL; } } + if (net->dest_state & SCTP_ADDR_PF) { net->dest_state &= ~SCTP_ADDR_PF; sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, @@ -4977,6 +4994,7 @@ hopeless_peer: } asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); } + if (TAILQ_EMPTY(&asoc->sent_queue)) { /* nothing left in-flight */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { @@ -4990,6 +5008,7 @@ hopeless_peer: asoc->total_flight = 0; asoc->total_flight_count = 0; } + /**********************************/ /* Now what about shutdown issues */ /**********************************/ @@ -5124,6 +5143,7 @@ hopeless_peer: if (asoc->peers_rwnd > old_rwnd) { win_probe_recovery = 1; } + /* * Now we must setup so we have a timer up for anyone with * outstanding data. Modified: head/sys/netinet/sctp_indata.h ============================================================================== --- head/sys/netinet/sctp_indata.h Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_indata.h Thu Jul 19 20:16:33 2018 (r336511) @@ -99,8 +99,7 @@ void sctp_handle_forward_tsn(struct sctp_tcb *, struct sctp_forward_tsn_chunk *, int *, struct mbuf *, int); -struct sctp_tmit_chunk * - sctp_try_advance_peer_ack_point(struct sctp_tcb *, struct sctp_association *); +struct sctp_tmit_chunk *sctp_try_advance_peer_ack_point(struct sctp_tcb *, struct sctp_association *); void sctp_service_queues(struct sctp_tcb *, struct sctp_association *); Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_input.c Thu Jul 19 20:16:33 2018 (r336511) @@ -305,6 +305,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct s if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { sctp_log_cwnd(stcb, lnet, 0, SCTP_CWND_INITIALIZATION); } + } } SCTP_TCB_SEND_LOCK(stcb); @@ -491,6 +492,7 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int SCTP_FREE(param, SCTP_M_ASC_ADDR); } } + stcb->asoc.peer_hmac_id = sctp_negotiate_hmacid(stcb->asoc.peer_hmacs, stcb->asoc.local_hmacs); if (op_err) { @@ -553,6 +555,7 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int } return (retval); } + return (0); } @@ -570,6 +573,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk /* Invalid length */ return; } + memset(&store, 0, sizeof(store)); switch (cp->heartbeat.hb_info.addr_family) { #ifdef INET @@ -1716,6 +1720,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle asoc->cookie_how[how_indx] = 5; return (stcb); } + if (ntohl(initack_cp->init.initiate_tag) != asoc->my_vtag && ntohl(init_cp->init.initiate_tag) == asoc->peer_vtag && cookie->tie_tag_my_vtag == 0 && @@ -2291,6 +2296,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in stcb->asoc.authenticated = 1; } } + /* * if we're doing ASCONFs, check to see if we have any new local * addresses that need to get added to the peer (eg. addresses @@ -2588,6 +2594,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in (uint32_t)offset, cookie_offset, sig_offset); return (NULL); } + /* * check the cookie timestamps to be sure it's not stale */ @@ -2708,6 +2715,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in } } } + cookie_len -= SCTP_SIGNATURE_SIZE; if (*stcb == NULL) { /* this is the "normal" case... get a new TCB */ @@ -2910,6 +2918,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, (*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED); } + /* * Pull it from the incomplete queue and wake the * guy @@ -2950,6 +2959,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *c if ((stcb == NULL) || (net == NULL)) { return; } + asoc = &stcb->asoc; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -3016,6 +3026,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *c */ goto closed_socket; } + sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); @@ -3794,6 +3805,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stc if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(0, 7, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); } + stcb->asoc.tsn_last_delivered = stcb->asoc.cumulative_tsn = stcb->asoc.highest_tsn_inside_map; stcb->asoc.mapping_array_base_tsn = ntohl(resp->senders_next_tsn); memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); @@ -4393,6 +4405,7 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk * if (trunc_len > limit) { trunc_len = limit; } + /* now the chunks themselves */ while ((ch != NULL) && (chlen >= sizeof(struct sctp_chunkhdr))) { desc.chunk_type = ch->chunk_type; @@ -4652,6 +4665,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int * */ SCTP_INP_DECR_REF(inp); } + /* now go back and verify any auth chunk to be sure */ if (auth_skipped && (stcb != NULL)) { struct sctp_auth_chunk *auth; @@ -4751,6 +4765,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int * sctp_handle_cookie_ack((struct sctp_cookie_ack_chunk *)ch, stcb, *netp); } + process_control_chunks: while (IS_SCTP_CONTROL(ch)) { /* validate chunk length */ @@ -4790,6 +4805,7 @@ process_control_chunks: } return (NULL); } + num_chunks++; /* Save off the last place we got a control from */ if (stcb != NULL) { @@ -5156,6 +5172,7 @@ process_control_chunks: goto abend; } } + if (netp != NULL) { struct sctp_tcb *locked_stcb; @@ -5328,6 +5345,7 @@ process_control_chunks: *offset = length; return (stcb); } + if (stcb != NULL) { int abort_flag = 0; @@ -5390,6 +5408,7 @@ process_control_chunks: *offset = length; return (stcb); } + if ((ch != NULL) && (stcb != NULL) && (netp != NULL) && (*netp != NULL)) { if (stcb->asoc.pktdrop_supported == 0) { goto unknown_chunk; @@ -5652,6 +5671,7 @@ sctp_common_input_processing(struct mbuf **mm, int iph vrf_id, port); goto out; } + } if (IS_SCTP_CONTROL(ch)) { /* process the control portion of the SCTP packet */ @@ -5727,6 +5747,7 @@ sctp_common_input_processing(struct mbuf **mm, int iph */ goto out; } + /* * DATA chunk processing */ @@ -5805,6 +5826,7 @@ sctp_common_input_processing(struct mbuf **mm, int iph * process_data */ } + /* take care of ecn */ if ((data_processed == 1) && (stcb->asoc.ecn_supported == 1) && @@ -5812,6 +5834,7 @@ sctp_common_input_processing(struct mbuf **mm, int iph /* Yep, we need to add a ECNE */ sctp_send_ecn_echo(stcb, net, high_tsn); } + if ((data_processed == 0) && (fwd_tsn_seen)) { int was_a_gap; uint32_t highest_tsn; Modified: head/sys/netinet/sctp_input.h ============================================================================== --- head/sys/netinet/sctp_input.h Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_input.h Thu Jul 19 20:16:33 2018 (r336511) @@ -52,7 +52,7 @@ struct sctp_stream_reset_request * sctp_find_stream_reset(struct sctp_tcb *stcb, uint32_t seq, struct sctp_tmit_chunk **bchk); -void +void sctp_reset_in_stream(struct sctp_tcb *stcb, uint32_t number_entries, uint16_t *list); Modified: head/sys/netinet/sctp_output.h ============================================================================== --- head/sys/netinet/sctp_output.h Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_output.h Thu Jul 19 20:16:33 2018 (r336511) @@ -74,7 +74,7 @@ int int sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_route_t *ro); -void +void sctp_send_initiate(struct sctp_inpcb *, struct sctp_tcb *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -117,7 +117,7 @@ void sctp_send_shutdown_ack(struct sctp_tcb *, struct void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *, int); -void +void sctp_send_shutdown_complete2(struct sockaddr *, struct sockaddr *, struct sctphdr *, uint8_t, uint32_t, uint16_t, @@ -146,13 +146,13 @@ int sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, struct mbuf *, struct thread *, int); -void +void sctp_chunk_output(struct sctp_inpcb *, struct sctp_tcb *, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif ); -void +void sctp_send_abort_tcb(struct sctp_tcb *, struct mbuf *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -201,7 +201,7 @@ sctp_send_abort(struct mbuf *, int, struct sockaddr *, uint8_t, uint32_t, uint16_t, uint32_t, uint16_t); -void +void sctp_send_operr_to(struct sockaddr *, struct sockaddr *, struct sctphdr *, uint32_t, struct mbuf *, uint8_t, uint32_t, uint16_t, Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Thu Jul 19 20:14:33 2018 (r336510) +++ head/sys/netinet/sctp_pcb.c Thu Jul 19 20:16:33 2018 (r336511) @@ -185,6 +185,7 @@ sctp_allocate_vrf(int vrf_id) SCTP_FREE(vrf, SCTP_M_VRF); return (NULL); } + /* Add it to the hash table */ bucket = &SCTP_BASE_INFO(sctp_vrfhash)[(vrf_id & SCTP_BASE_INFO(hashvrfmark))]; LIST_INSERT_HEAD(bucket, vrf, next_vrf); @@ -736,6 +737,7 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockadd SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id); goto out_now; } + #ifdef SCTP_DEBUG SCTPDBG(SCTP_DEBUG_PCB4, "vrf_id 0x%x: deleting address:", vrf_id); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Jul 19 20:18:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B33D1048B00; Thu, 19 Jul 2018 20:18:14 +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 B18FE7924F; Thu, 19 Jul 2018 20:18:13 +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 928FF2E04D; Thu, 19 Jul 2018 20:18:13 +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 w6JKIDNG039274; Thu, 19 Jul 2018 20:18:13 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKIDrQ039273; Thu, 19 Jul 2018 20:18:13 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807192018.w6JKIDrQ039273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 20:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336512 - head/contrib/wpa X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa X-SVN-Commit-Revision: 336512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:18:14 -0000 Author: cy Date: Thu Jul 19 20:18:13 2018 New Revision: 336512 URL: https://svnweb.freebsd.org/changeset/base/336512 Log: MFV r336494: TDLS: Reject TPK-TK reconfiguration. This is also upline git commmit ff89af96e5a35c86f50330d2b86c18323318a60c. Once again this is a NOP as this is a props change to sync up with the vendor branch. The real commit is in r324696. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0006-TDLS-Reject-TPK-TK-\ reconfiguration.patch Modified: Directory Properties: head/contrib/wpa/ (props changed) From owner-svn-src-head@freebsd.org Thu Jul 19 20:19:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C284E1048BA2 for ; Thu, 19 Jul 2018 20:19:03 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 45F43793CB for ; Thu, 19 Jul 2018 20:19:03 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: f5fe3a45-8b90-11e8-b829-b3adae557cda 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 outbound2.ore.mailhop.org (Halon) with ESMTPSA id f5fe3a45-8b90-11e8-b829-b3adae557cda; Thu, 19 Jul 2018 20:18:56 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6JKItk6003780; Thu, 19 Jul 2018 14:18:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532031535.1344.11.camel@freebsd.org> Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Ian Lepore To: Devin Teske Cc: Alexey Dokuchaev , Michael Tuexen , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 19 Jul 2018 14:18:55 -0600 In-Reply-To: <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@FreeBSD.org> <1532030389.1344.9.camel@freebsd.org> <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:19:03 -0000 On Thu, 2018-07-19 at 13:12 -0700, Devin Teske wrote: > > > > On Jul 19, 2018, at 12:59 PM, Ian Lepore wrote: > > > > On Thu, 2018-07-19 at 19:53 +0000, Alexey Dokuchaev wrote: > > > > > > > > > > > +++ head/sys/netinet/sctp_asconf.c    Thu Jul 19 19:33:42 2018        (r336503) > > > >   static struct mbuf * > > > > -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, > > > > +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv, > > > This looks strange now.  In C, asterisk is usually placed by the variable. > > "usually" may be true of freebsd, but most places I've worked consider > > the * (and & in c++) to be more associated with the type being declared > > than with the variable name, thus they get snugged up against the type > > info, not the var name. Putting the * or & with the var name leads to > > particularly bad constructs such as  > > > >  int a, *b; > > > > which, for maximal clarity, should be: > > > >   int  a; > >   int* b; > > > Are we free to prefer the former in C if that's how we've been coding in C for 20+ years? Only if I'm free to consider that kind of sarcasm to be a completely inappropriate response to what I said. -- Ian From owner-svn-src-head@freebsd.org Thu Jul 19 20:19:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E69F1048C37; Thu, 19 Jul 2018 20:19:42 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2148079527; Thu, 19 Jul 2018 20:19:42 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 185FE29CA; Thu, 19 Jul 2018 20:19:42 +0000 (UTC) Date: Thu, 19 Jul 2018 20:19:42 +0000 From: Alexey Dokuchaev To: Devin Teske Cc: Ian Lepore , Michael Tuexen , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 Message-ID: <20180719201942.GA61225@FreeBSD.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@FreeBSD.org> <1532030389.1344.9.camel@freebsd.org> <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:19:42 -0000 On Thu, Jul 19, 2018 at 01:12:19PM -0700, Devin Teske wrote: > > On Jul 19, 2018, at 12:59 PM, Ian Lepore wrote: > > ... > > "usually" may be true of freebsd, but most places I've worked consider > > the * (and & in c++) to be more associated with the type being declared > > than with the variable name This is often true for C++ (partially because it has both * and &), but... > > info, not the var name. Putting the * or & with the var name leads to > > particularly bad constructs such as > > > > int a, *b; > > > > which, for maximal clarity, should be: > > > > int a; > > int* b; > > Are we free to prefer the former in C if that's how we've been coding in > C for 20+ years? I agree with Devin here: we, in FreeBSD, which is mostly coded in C, place the star by the variable rather than its type. ./danfe From owner-svn-src-head@freebsd.org Thu Jul 19 20:20:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CB0E1048D54; Thu, 19 Jul 2018 20:20:44 +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 C3611796EF; Thu, 19 Jul 2018 20:20:43 +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 A4ABA2E05F; Thu, 19 Jul 2018 20:20:43 +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 w6JKKhrM041677; Thu, 19 Jul 2018 20:20:43 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKKh7U041676; Thu, 19 Jul 2018 20:20:43 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807192020.w6JKKh7U041676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 20:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336513 - head/contrib/wpa X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa X-SVN-Commit-Revision: 336513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:20:44 -0000 Author: cy Date: Thu Jul 19 20:20:43 2018 New Revision: 336513 URL: https://svnweb.freebsd.org/changeset/base/336513 Log: MFV r336495: Another props change. The real work was done by r324696. We're simply syncing up with the vendor branch again. mport upline security patch: WNM: Ignore WNM-Sleep Mode Request in wnm_sleep_mode=0 case. This is also upline git commit 114f2830d2c2aee6db23d48240e93415a256a37c. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-\ Response-without-pending-r.patch Modified: Directory Properties: head/contrib/wpa/ (props changed) From owner-svn-src-head@freebsd.org Thu Jul 19 20:22:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 500E410490AE; Thu, 19 Jul 2018 20:22:47 +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 0567179B1E; Thu, 19 Jul 2018 20:22:47 +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 DA91C2E1DB; Thu, 19 Jul 2018 20:22:46 +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 w6JKMkrt044332; Thu, 19 Jul 2018 20:22:46 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKMkE6044331; Thu, 19 Jul 2018 20:22:46 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807192022.w6JKMkE6044331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 19 Jul 2018 20:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336514 - head/sys/dev/vt/hw/ofwfb X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/vt/hw/ofwfb X-SVN-Commit-Revision: 336514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:22:47 -0000 Author: jhibbits Date: Thu Jul 19 20:22:46 2018 New Revision: 336514 URL: https://svnweb.freebsd.org/changeset/base/336514 Log: ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout Some platforms use /chosen/stdout-path as the property containing the path to the stdout node, not /chosen/stdout. Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:20:43 2018 (r336513) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:22:46 2018 (r336514) @@ -102,6 +102,10 @@ ofwfb_probe(struct vt_device *vd) if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == sizeof(stdout)) node = OF_instance_to_package(stdout); + if (node == -1) + if (OF_getprop(chosen, "stdout-path", &stdout, sizeof(stdout)) == + sizeof(stdout)) + node = OF_instance_to_package(stdout); if (node == -1) { /* * The "/chosen/stdout" does not exist try From owner-svn-src-head@freebsd.org Thu Jul 19 20:23:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2455D10491A9; Thu, 19 Jul 2018 20:23:28 +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 C4E3079C9E; Thu, 19 Jul 2018 20:23:27 +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 A60522E1E3; Thu, 19 Jul 2018 20:23:27 +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 w6JKNRr0044400; Thu, 19 Jul 2018 20:23:27 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKNRK1044399; Thu, 19 Jul 2018 20:23:27 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807192023.w6JKNRK1044399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Jul 2018 20:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336515 - head/contrib/wpa X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa X-SVN-Commit-Revision: 336515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:23:28 -0000 Author: cy Date: Thu Jul 19 20:23:27 2018 New Revision: 336515 URL: https://svnweb.freebsd.org/changeset/base/336515 Log: MFV r336496: A props change to sync up with the vendor branch. The real work was done by r324696. FILS: Do not allow multiple (Re)Association Response frames. This is also upline git commit e760851176c77ae6de19821bb1d5bf3ae2cb5187. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0008-FT-Do-not-allow-multiple-\ Reassociation-Response-fram.patch Modified: Directory Properties: head/contrib/wpa/ (props changed) From owner-svn-src-head@freebsd.org Thu Jul 19 20:23:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E76310491E3; Thu, 19 Jul 2018 20:23:37 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (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 A87C579D9D; Thu, 19 Jul 2018 20:23:36 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76] (unknown [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 28D29721E280D; Thu, 19 Jul 2018 22:23:29 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Michael Tuexen In-Reply-To: Date: Thu, 19 Jul 2018 16:23:27 -0400 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201807191933.w6JJXhof018383@repo.freebsd.org> To: cem@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) 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-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:23:37 -0000 > On 19. Jul 2018, at 16:11, Conrad Meyer wrote: >=20 > These changes mostly seem like style regressions, rather than > improvements. (Not to mention, largescale churn like this makes it > more difficult for future readers to research history (confusing tools > like "git/svn blame").) We have upstream code and run this to an formatter tool which depends on ident, which has been changed recently. Unfortunately, I also ran an older version of the script, so I reverted this in https://svnweb.freebsd.org/changeset/base/336508 and committed a version really only showing the differences related to the ident changes in https://svnweb.freebsd.org/changeset/base/336511 Sorry for the noise! Best regards Michael >=20 > On Thu, Jul 19, 2018 at 12:33 PM, Michael Tuexen = wrote: >> Author: tuexen >> Date: Thu Jul 19 19:33:42 2018 >> New Revision: 336503 >> URL: https://svnweb.freebsd.org/changeset/base/336503 >>=20 >> Log: >> Whitespace changes due to change if ident. >>=20 >> Modified: >> head/sys/netinet/sctp.h >> head/sys/netinet/sctp_asconf.c >> head/sys/netinet/sctp_asconf.h >> head/sys/netinet/sctp_auth.c >> head/sys/netinet/sctp_auth.h >> head/sys/netinet/sctp_bsd_addr.c >> head/sys/netinet/sctp_bsd_addr.h >> head/sys/netinet/sctp_cc_functions.c >> head/sys/netinet/sctp_crc32.c >> head/sys/netinet/sctp_header.h >> head/sys/netinet/sctp_indata.c >> head/sys/netinet/sctp_indata.h >> head/sys/netinet/sctp_input.c >> head/sys/netinet/sctp_input.h >> head/sys/netinet/sctp_output.c >> head/sys/netinet/sctp_output.h >> head/sys/netinet/sctp_pcb.c >> head/sys/netinet/sctp_pcb.h >> head/sys/netinet/sctp_peeloff.c >> head/sys/netinet/sctp_ss_functions.c >> head/sys/netinet/sctp_structs.h >> head/sys/netinet/sctp_sysctl.c >> head/sys/netinet/sctp_timer.c >> head/sys/netinet/sctp_uio.h >> head/sys/netinet/sctp_usrreq.c >> head/sys/netinet/sctp_var.h >> head/sys/netinet/sctputil.c >> head/sys/netinet/sctputil.h >> head/sys/netinet6/sctp6_usrreq.c >> head/sys/netinet6/sctp6_var.h >>=20 >> Modified: head/sys/netinet/sctp.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/netinet/sctp.h Thu Jul 19 19:32:08 2018 = (r336502) >> +++ head/sys/netinet/sctp.h Thu Jul 19 19:33:42 2018 = (r336503) >> @@ -419,7 +419,7 @@ struct sctp_error_unresolv_addr { >>=20 >> struct sctp_error_unrecognized_chunk { >> struct sctp_error_cause cause; /* = code=3DSCTP_CAUSE_UNRECOG_CHUNK */ >> - struct sctp_chunkhdr ch;/* header from chunk in error */ >> + struct sctp_chunkhdr ch; /* header from chunk in error = */ >> } SCTP_PACKED; >>=20 >> struct sctp_error_no_user_data { >>=20 >> Modified: head/sys/netinet/sctp_asconf.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/netinet/sctp_asconf.c Thu Jul 19 19:32:08 2018 = (r336502) >> +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 = (r336503) >> @@ -99,7 +99,7 @@ sctp_asconf_success_response(uint32_t id) >> } >>=20 >> static struct mbuf * >> -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t = *error_tlv, >> +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * = error_tlv, >> uint16_t tlv_length) >> { >> struct mbuf *m_reply =3D NULL; >> @@ -134,7 +134,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t = cause >> return (NULL); >> } >> if (error_tlv !=3D NULL) { >> - tlv =3D (uint8_t *)(error + 1); >> + tlv =3D (uint8_t *) (error + 1); >> memcpy(tlv, error_tlv, tlv_length); >> } >> SCTP_BUF_LEN(m_reply) =3D aph->ph.param_length; >> @@ -224,7 +224,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, = struc >> #endif >> default: >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, >> + SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, >> aparam_length); >> return (m_reply); >> } /* end switch */ >> @@ -239,7 +239,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, = struc >> /* add the address */ >> if (bad_address) { >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, >> + SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, >> aparam_length); >> } else if (sctp_add_remote_addr(stcb, sa, &net, = stcb->asoc.port, >> SCTP_DONOT_SETSCOPE, >> @@ -247,7 +247,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, = struc >> SCTPDBG(SCTP_DEBUG_ASCONF1, >> "process_asconf_add_ip: error adding address\n"); >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *)aph, >> + SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *) aph, >> aparam_length); >> } else { >> /* notify upper layer */ >> @@ -277,6 +277,7 @@ sctp_asconf_del_remote_addrs_except(struct = sctp_tcb *s >> /* not found */ >> return (-1); >> } >> + >> /* delete all destination addresses except the source */ >> TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { >> if (net !=3D src_net) { >> @@ -369,7 +370,7 @@ sctp_process_asconf_delete_ip(struct sockaddr = *src, >> #endif >> default: >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, >> + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, >> aparam_length); >> return (m_reply); >> } >> @@ -379,10 +380,11 @@ sctp_process_asconf_delete_ip(struct sockaddr = *src, >> /* trying to delete the source address! */ >> SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: = tried to delete source addr\n"); >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *)aph, >> + SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *) aph, >> aparam_length); >> return (m_reply); >> } >> + >> /* if deleting 0.0.0.0/::0, delete all addresses except src = addr */ >> if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { >> result =3D sctp_asconf_del_remote_addrs_except(stcb, = src); >> @@ -393,7 +395,7 @@ sctp_process_asconf_delete_ip(struct sockaddr = *src, >> /* what error to reply with?? */ >> m_reply =3D >> = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_REQUEST_REFUSED, (uint8_t = *)aph, >> + SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *) = aph, >> aparam_length); >> } else if (response_required) { >> m_reply =3D >> @@ -401,6 +403,7 @@ sctp_process_asconf_delete_ip(struct sockaddr = *src, >> } >> return (m_reply); >> } >> + >> /* delete the address */ >> result =3D sctp_del_remote_addr(stcb, sa); >> /* >> @@ -412,7 +415,7 @@ sctp_process_asconf_delete_ip(struct sockaddr = *src, >> /* only one address in the asoc */ >> SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: = tried to delete last IP addr!\n"); >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *)aph, >> + SCTP_CAUSE_DELETING_LAST_ADDR, (uint8_t *) aph, >> aparam_length); >> } else { >> if (response_required) { >> @@ -494,7 +497,7 @@ sctp_process_asconf_set_primary(struct sockaddr = *src, >> #endif >> default: >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, >> + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, >> aparam_length); >> return (m_reply); >> } >> @@ -565,7 +568,7 @@ sctp_process_asconf_set_primary(struct sockaddr = *src, >> "process_asconf_set_primary: set primary = failed!\n"); >> /* must have been an invalid address, so report */ >> m_reply =3D = sctp_asconf_error_response(aph->correlation_id, >> - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, >> + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, >> aparam_length); >> } >>=20 >> @@ -616,6 +619,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int = offset >> serial_num, asoc->asconf_seq_in + 1); >> return; >> } >> + >> /* it's the expected "next" sequence number, so process it */ >> asoc->asconf_seq_in =3D serial_num; /* update sequence = */ >> /* get length of all the param's in the ASCONF */ >> @@ -640,6 +644,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int = offset >> = SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_asconf_ack), ack); >> } >> } >> + >> m_ack =3D sctp_get_mbuf_for_msg(sizeof(struct = sctp_asconf_ack_chunk), 0, >> M_NOWAIT, 1, MT_DATA); >> if (m_ack =3D=3D NULL) { >> @@ -660,7 +665,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int = offset >>=20 >> /* skip the lookup address parameter */ >> offset +=3D sizeof(struct sctp_asconf_chunk); >> - p_addr =3D (struct sctp_ipv6addr_param *)sctp_m_getptr(m, = offset, sizeof(struct sctp_paramhdr), (uint8_t *)&aparam_buf); >> + p_addr =3D (struct sctp_ipv6addr_param *)sctp_m_getptr(m, = offset, sizeof(struct sctp_paramhdr), (uint8_t *) & aparam_buf); >> if (p_addr =3D=3D NULL) { >> SCTPDBG(SCTP_DEBUG_ASCONF1, >> "handle_asconf: couldn't get lookup addr!\n"); >> @@ -670,7 +675,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int = offset >> /* param_length is already validated in process_control... */ >> offset +=3D ntohs(p_addr->ph.param_length); /* skip = lookup addr */ >> /* get pointer to first asconf param in ASCONF */ >> - aph =3D (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, = offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf); >> + aph =3D (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, = offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *) & aparam_buf); >> if (aph =3D=3D NULL) { >> SCTPDBG(SCTP_DEBUG_ASCONF1, "Empty ASCONF = received?\n"); >> goto send_reply; >> @@ -767,7 +772,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int = offset >> /* get pointer to next asconf param */ >> aph =3D (struct sctp_asconf_paramhdr = *)sctp_m_getptr(m, offset, >> sizeof(struct sctp_asconf_paramhdr), >> - (uint8_t *)&aparam_buf); >> + (uint8_t *) & aparam_buf); >> if (aph =3D=3D NULL) { >> /* can't get an asconf paramhdr */ >> SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: = can't get asconf param hdr!\n"); >> @@ -816,8 +821,7 @@ send_reply: >> * does the address match? returns 0 if not, 1 if so >> */ >> static uint32_t >> -sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr = *sa) >> -{ >> +sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr = *sa){ >> switch (sa->sa_family) { >> #ifdef INET6 >> case AF_INET6: >> @@ -856,8 +860,7 @@ sctp_asconf_addr_match(struct sctp_asconf_addr = *aa, st >> * does the address match? returns 0 if not, 1 if so >> */ >> static uint32_t >> -sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa) >> -{ >> +sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa){ >> #if defined(INET) || defined(INET6) >> uint16_t param_type, param_length; >>=20 >> @@ -974,6 +977,7 @@ sctp_assoc_immediate_retrans(struct sctp_tcb = *stcb, st >> if (stcb->asoc.deleted_primary =3D=3D NULL) { >> return; >> } >> + >> if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) { >> SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: = Deleted primary is "); >> SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, = &stcb->asoc.deleted_primary->ro._l_addr.sa); >> @@ -1077,6 +1081,7 @@ sctp_path_check_and_react(struct sctp_tcb = *stcb, struc >> } >> return; >> } >> + >> /* Multiple local addresses exsist in the association. */ >> TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { >> /* clear any cached route and source address */ >> @@ -1096,7 +1101,7 @@ sctp_path_check_and_react(struct sctp_tcb = *stcb, struc >> * NOT corresponding to the current nexthop, the path = will >> * not be changed. >> */ >> - SCTP_RTALLOC((sctp_route_t *)&net->ro, >> + SCTP_RTALLOC((sctp_route_t *) & net->ro, >> stcb->sctp_ep->def_vrf_id, >> stcb->sctp_ep->fibnum); >> if (net->ro.ro_rt =3D=3D NULL) >> @@ -1106,7 +1111,7 @@ sctp_path_check_and_react(struct sctp_tcb = *stcb, struc >> switch (net->ro._l_addr.sa.sa_family) { >> #ifdef INET >> case AF_INET: >> - if (sctp_v4src_match_nexthop(newifa, = (sctp_route_t *)&net->ro)) { >> + if (sctp_v4src_match_nexthop(newifa, = (sctp_route_t *) & net->ro)) { >> changed =3D 1; >> } >> break; >> @@ -1114,7 +1119,7 @@ sctp_path_check_and_react(struct sctp_tcb = *stcb, struc >> #ifdef INET6 >> case AF_INET6: >> if (sctp_v6src_match_nexthop( >> - &newifa->address.sin6, (sctp_route_t = *)&net->ro)) { >> + &newifa->address.sin6, (sctp_route_t *) & = net->ro)) { >> changed =3D 1; >> } >> break; >> @@ -1323,6 +1328,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, = struct sc >> if (stcb->asoc.asconf_supported =3D=3D 0) { >> return (-1); >> } >> + >> /* >> * if this is deleting the last address from the assoc, mark = it as >> * pending. >> @@ -1343,6 +1349,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, = struct sc >> return (-1); >> } >> } >> + >> /* queue an asconf parameter */ >> status =3D sctp_asconf_queue_mgmt(stcb, ifa, type); >>=20 >> @@ -1364,6 +1371,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, = struct sc >> stcb->asoc.asconf_addr_del_pending =3D NULL; >> } >> } >> + >> if (pending_delete_queued) { >> struct sctp_nets *net; >>=20 >> @@ -1388,6 +1396,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, = struct sc >> SCTP_FROM_SCTP_ASCONF, >> __LINE__); >> } >> + >> /* queue in an advisory set primary too */ >> (void)sctp_asconf_queue_mgmt(stcb, ifa, = SCTP_SET_PRIM_ADDR); >> /* let caller know we should send this out immediately = */ >> @@ -1685,11 +1694,13 @@ sctp_handle_asconf_ack(struct mbuf *m, int = offset, >> serial_num, asoc->asconf_seq_out_acked + 1); >> return; >> } >> + >> if (serial_num =3D=3D asoc->asconf_seq_out - 1) { >> /* stop our timer */ >> sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, = stcb, net, >> SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); >> } >> + >> /* process the ASCONF-ACK contents */ >> ack_length =3D ntohs(cp->ch.chunk_length) - >> sizeof(struct sctp_asconf_ack_chunk); >> @@ -1778,7 +1789,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int = offset, >> * at any given time >> */ >> if (last_error_id =3D=3D 0) >> - last_error_id--;/* set to "max" value */ >> + last_error_id--; /* set to "max" value */ >> TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, = aa_next) { >> if (aa->sent =3D=3D 1) { >> /* >> @@ -1818,8 +1829,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int = offset, >>=20 >> #ifdef INET6 >> static uint32_t >> -sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa) >> -{ >> +sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa){ >> struct sockaddr_in6 *sin6, *net6; >> struct sctp_nets *net; >>=20 >> @@ -2058,6 +2068,7 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb = *inp, vo >> laddr->action =3D 0; >> break; >> } >> + >> } >> } else if (l->action =3D=3D SCTP_DEL_IP_ADDRESS) { >> LIST_FOREACH_SAFE(laddr, &inp->sctp_addr_list, = sctp_nxt_addr, nladdr) { >> @@ -2091,6 +2102,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb = *inp, stru >> if (ifa->vrf_id !=3D stcb->asoc.vrf_id) { >> continue; >> } >> + >> /* Same checks again for assoc */ >> switch (ifa->address.sa.sa_family) { >> #ifdef INET6 >> @@ -2269,8 +2281,7 @@ sctp_asconf_iterator_end(void *ptr, uint32_t = val SCTP_ >> * returns: 0 =3D completed, -1 =3D error >> */ >> int32_t >> -sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct = sockaddr *sa) >> -{ >> +sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct = sockaddr *sa){ >> uint32_t vrf_id; >> struct sctp_ifa *ifa; >>=20 >> @@ -2281,6 +2292,7 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb = *stcb, >> /* Invalid address */ >> return (-1); >> } >> + >> /* queue an ASCONF:SET_PRIM_ADDR to be sent */ >> if (!sctp_asconf_queue_add(stcb, ifa, SCTP_SET_PRIM_ADDR)) { >> /* set primary queuing succeeded */ >> @@ -2359,11 +2371,13 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, = struct sct >> SCTPDBG(SCTP_DEBUG_ASCONF1, = "is_addr_pending: param length(%u) too short\n", param_length); >> break; >> } >> + >> aph =3D (struct sctp_asconf_paramhdr = *)sctp_m_getptr(chk->data, offset, param_length, aparam_buf); >> if (aph =3D=3D NULL) { >> SCTPDBG(SCTP_DEBUG_ASCONF1, = "is_addr_pending: couldn't get entire param\n"); >> break; >> } >> + >> ph =3D (struct sctp_paramhdr *)(aph + 1); >> if (sctp_addr_match(ph, &sctp_ifa->address.sa) = !=3D 0) { >> switch (param_type) { >> @@ -2378,6 +2392,7 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, = struct sct >> } >> last_param_type =3D param_type; >> } >> + >> offset +=3D SCTP_SIZE32(param_length); >> if (offset >=3D asconf_limit) { >> /* no more data in the mbuf chain */ >> @@ -2461,6 +2476,7 @@ sctp_find_valid_localaddr(struct sctp_tcb = *stcb, int a >> if (sctp_ifa->localifa_flags & = SCTP_ADDR_IFA_UNUSEABLE) { >> continue; >> } >> + >> sin6 =3D = &sctp_ifa->address.sin6; >> if = (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { >> /* >> @@ -2754,7 +2770,7 @@ sctp_process_initack_addresses(struct sctp_tcb = *stcb, >> /* go through the addresses in the init-ack */ >> ph =3D (struct sctp_paramhdr *) >> sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), >> - (uint8_t *)&tmp_param); >> + (uint8_t *) & tmp_param); >> while (ph !=3D NULL) { >> ptype =3D ntohs(ph->param_type); >> plen =3D ntohs(ph->param_length); >> @@ -2768,7 +2784,7 @@ sctp_process_initack_addresses(struct sctp_tcb = *stcb, >> a6p =3D (struct sctp_ipv6addr_param *) >> sctp_m_getptr(m, offset, >> sizeof(struct = sctp_ipv6addr_param), >> - (uint8_t *)&addr6_store); >> + (uint8_t *) & addr6_store); >> if (plen !=3D sizeof(struct = sctp_ipv6addr_param) || >> a6p =3D=3D NULL) { >> return; >> @@ -2789,7 +2805,7 @@ sctp_process_initack_addresses(struct sctp_tcb = *stcb, >> /* get the entire IPv4 address param = */ >> a4p =3D (struct sctp_ipv4addr_param = *)sctp_m_getptr(m, offset, >> sizeof(struct = sctp_ipv4addr_param), >> - (uint8_t *)&addr4_store); >> + (uint8_t *) & addr4_store); >> if (plen !=3D sizeof(struct = sctp_ipv4addr_param) || >> a4p =3D=3D NULL) { >> return; >> @@ -2836,6 +2852,7 @@ sctp_process_initack_addresses(struct sctp_tcb = *stcb, >> } >> } >> } >> + >> next_addr: >> /* >> * Sanity check: Make sure the length isn't 0, = otherwise >> @@ -2851,7 +2868,7 @@ next_addr: >> if ((offset + sizeof(struct sctp_paramhdr)) > length) >> return; >> ph =3D (struct sctp_paramhdr *)sctp_m_getptr(m, = offset, >> - sizeof(struct sctp_paramhdr), (uint8_t = *)&tmp_param); >> + sizeof(struct sctp_paramhdr), (uint8_t *) & = tmp_param); >> } /* while */ >> } >>=20 >> @@ -2861,8 +2878,7 @@ next_addr: >> * 1 if found, 0 if not >> */ >> static uint32_t >> -sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t = length, struct sockaddr *sa) >> -{ >> +sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t = length, struct sockaddr *sa){ >> struct sctp_paramhdr tmp_param, *ph; >> uint16_t plen, ptype; >> #ifdef INET >> @@ -2902,7 +2918,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t = offset, >> } >> /* go through the addresses in the init-ack */ >> ph =3D (struct sctp_paramhdr *)sctp_m_getptr(m, offset, >> - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); >> + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); >> while (ph !=3D NULL) { >> ptype =3D ntohs(ph->param_type); >> plen =3D ntohs(ph->param_length); >> @@ -2918,7 +2934,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t = offset, >> a6p =3D (struct sctp_ipv6addr_param *) >> sctp_m_getptr(m, offset, >> sizeof(struct = sctp_ipv6addr_param), >> - (uint8_t *)&addr6_store); >> + (uint8_t *) & addr6_store); >> if (a6p =3D=3D NULL) { >> return (0); >> } >> @@ -2948,7 +2964,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t = offset, >> a4p =3D (struct sctp_ipv4addr_param *) >> sctp_m_getptr(m, offset, >> sizeof(struct = sctp_ipv4addr_param), >> - (uint8_t *)&addr4_store); >> + (uint8_t *) & addr4_store); >> if (a4p =3D=3D NULL) { >> return (0); >> } >> @@ -2970,7 +2986,7 @@ sctp_addr_in_initack(struct mbuf *m, uint32_t = offset, >> } >> ph =3D (struct sctp_paramhdr *) >> sctp_m_getptr(m, offset, sizeof(struct = sctp_paramhdr), >> - (uint8_t *)&tmp_param); >> + (uint8_t *) & tmp_param); >> } /* while */ >> /* not found! */ >> return (0); >> @@ -3141,8 +3157,7 @@ sctp_check_address_list(struct sctp_tcb *stcb, = struct >> */ >> uint32_t >> sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct sockaddr *sa, >> - uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap) >> -{ >> + uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap){ >> struct sctp_ifa *ifa; >> struct sctp_laddr *laddr, *nladdr; >>=20 >> @@ -3370,6 +3385,7 @@ sctp_asconf_send_nat_state_update(struct = sctp_tcb *stc >> if (vrf =3D=3D NULL) { >> goto skip_rest; >> } >> + >> SCTP_IPI_ADDR_RLOCK(); >> LIST_FOREACH(sctp_ifnp, &vrf->ifnlist, next_ifn) { >> LIST_FOREACH(sctp_ifap, &sctp_ifnp->ifalist, = next_ifa) { >>=20 >> Modified: head/sys/netinet/sctp_asconf.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/netinet/sctp_asconf.h Thu Jul 19 19:32:08 2018 = (r336502) >> +++ head/sys/netinet/sctp_asconf.h Thu Jul 19 19:33:42 2018 = (r336503) >> @@ -60,10 +60,10 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct = socka >> uint32_t, uint32_t, struct sctp_ifa *); >>=20 >>=20 >> -extern int >> +extern int >> sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, >> uint32_t val); >> -extern void >> +extern void >> sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, >> struct sctp_tcb *stcb, >> void *ptr, uint32_t type); >>=20 >> Modified: head/sys/netinet/sctp_auth.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/netinet/sctp_auth.c Thu Jul 19 19:32:08 2018 = (r336502) >> +++ head/sys/netinet/sctp_auth.c Thu Jul 19 19:33:42 2018 = (r336503) >> @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); >>=20 >>=20 >> void >> -sctp_clear_chunklist(sctp_auth_chklist_t *chklist) >> +sctp_clear_chunklist(sctp_auth_chklist_t * chklist) >> { >> memset(chklist, 0, sizeof(*chklist)); >> /* chklist->num_chunks =3D 0; */ >> @@ -75,14 +75,14 @@ sctp_alloc_chunklist(void) >> } >>=20 >> void >> -sctp_free_chunklist(sctp_auth_chklist_t *list) >> +sctp_free_chunklist(sctp_auth_chklist_t * list) >> { >> if (list !=3D NULL) >> SCTP_FREE(list, SCTP_M_AUTH_CL); >> } >>=20 >> sctp_auth_chklist_t * >> -sctp_copy_chunklist(sctp_auth_chklist_t *list) >> +sctp_copy_chunklist(sctp_auth_chklist_t * list) >> { >> sctp_auth_chklist_t *new_list; >>=20 >> @@ -104,7 +104,7 @@ sctp_copy_chunklist(sctp_auth_chklist_t *list) >> * add a chunk to the required chunks list >> */ >> int >> -sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t *list) >> +sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t * list) >> { >> if (list =3D=3D NULL) >> return (-1); >> @@ -130,7 +130,7 @@ sctp_auth_add_chunk(uint8_t chunk, = sctp_auth_chklist_t >> * delete a chunk from the required chunks list >> */ >> int >> -sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t *list) >> +sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t * list) >> { >> if (list =3D=3D NULL) >> return (-1); >> @@ -146,7 +146,7 @@ sctp_auth_delete_chunk(uint8_t chunk, = sctp_auth_chklis >> } >>=20 >> size_t >> -sctp_auth_get_chklist_size(const sctp_auth_chklist_t *list) >> +sctp_auth_get_chklist_size(const sctp_auth_chklist_t * list) >> { >> if (list =3D=3D NULL) >> return (0); >> @@ -159,7 +159,7 @@ sctp_auth_get_chklist_size(const = sctp_auth_chklist_t * >> * guarantee ptr has space for up to 256 bytes >> */ >> int >> -sctp_serialize_auth_chunks(const sctp_auth_chklist_t *list, uint8_t = *ptr) >> +sctp_serialize_auth_chunks(const sctp_auth_chklist_t * list, uint8_t = * ptr) >> { >> int i, count =3D 0; >>=20 >> @@ -176,7 +176,7 @@ sctp_serialize_auth_chunks(const = sctp_auth_chklist_t * >> } >>=20 >> int >> -sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) >> +sctp_pack_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * = ptr) >> { >> int i, size =3D 0; >>=20 >> @@ -208,8 +208,8 @@ sctp_pack_auth_chunks(const sctp_auth_chklist_t = *list, >> } >>=20 >> int >> -sctp_unpack_auth_chunks(const uint8_t *ptr, uint8_t num_chunks, >> - sctp_auth_chklist_t *list) >> +sctp_unpack_auth_chunks(const uint8_t * ptr, uint8_t num_chunks, >> + sctp_auth_chklist_t * list) >> { >> int i; >> int size; >> @@ -259,14 +259,14 @@ sctp_alloc_key(uint32_t keylen) >> } >>=20 >> void >> -sctp_free_key(sctp_key_t *key) >> +sctp_free_key(sctp_key_t * key) >> { >> if (key !=3D NULL) >> SCTP_FREE(key, SCTP_M_AUTH_KY); >> } >>=20 >> void >> -sctp_print_key(sctp_key_t *key, const char *str) >> +sctp_print_key(sctp_key_t * key, const char *str) >> { >> uint32_t i; >>=20 >> @@ -285,7 +285,7 @@ sctp_print_key(sctp_key_t *key, const char *str) >> } >>=20 >> void >> -sctp_show_key(sctp_key_t *key, const char *str) >> +sctp_show_key(sctp_key_t * key, const char *str) >> { >> uint32_t i; >>=20 >> @@ -304,8 +304,7 @@ sctp_show_key(sctp_key_t *key, const char *str) >> } >>=20 >> static uint32_t >> -sctp_get_keylen(sctp_key_t *key) >> -{ >> +sctp_get_keylen(sctp_key_t * key) { >> if (key !=3D NULL) >> return (key->keylen); >> else >> @@ -331,7 +330,7 @@ sctp_generate_random_key(uint32_t keylen) >> } >>=20 >> sctp_key_t * >> -sctp_set_key(uint8_t *key, uint32_t keylen) >> +sctp_set_key(uint8_t * key, uint32_t keylen) >> { >> sctp_key_t *new_key; >>=20 >> @@ -351,7 +350,7 @@ sctp_set_key(uint8_t *key, uint32_t keylen) >> * 0 if key1 =3D key2 >> */ >> static int >> -sctp_compare_key(sctp_key_t *key1, sctp_key_t *key2) >> +sctp_compare_key(sctp_key_t * key1, sctp_key_t * key2) >> { >> uint32_t maxlen; >> uint32_t i; >> @@ -402,7 +401,7 @@ sctp_compare_key(sctp_key_t *key1, sctp_key_t = *key2) >> * order for concatenation >> */ >> sctp_key_t * >> -sctp_compute_hashkey(sctp_key_t *key1, sctp_key_t *key2, sctp_key_t = *shared) >> +sctp_compute_hashkey(sctp_key_t * key1, sctp_key_t * key2, = sctp_key_t * shared) >> { >> uint32_t keylen; >> sctp_key_t *new_key; >> @@ -476,7 +475,7 @@ sctp_alloc_sharedkey(void) >> } >>=20 >> void >> -sctp_free_sharedkey(sctp_sharedkey_t *skey) >> +sctp_free_sharedkey(sctp_sharedkey_t * skey) >> { >> if (skey =3D=3D NULL) >> return; >> @@ -502,7 +501,7 @@ sctp_find_sharedkey(struct sctp_keyhead = *shared_keys, >>=20 >> int >> sctp_insert_sharedkey(struct sctp_keyhead *shared_keys, >> - sctp_sharedkey_t *new_skey) >> + sctp_sharedkey_t * new_skey) >> { >> sctp_sharedkey_t *skey; >>=20 >> @@ -596,8 +595,7 @@ sctp_auth_key_release(struct sctp_tcb *stcb, = uint16_t >> } >>=20 >> static sctp_sharedkey_t * >> -sctp_copy_sharedkey(const sctp_sharedkey_t *skey) >> -{ >> +sctp_copy_sharedkey(const sctp_sharedkey_t * skey){ >> sctp_sharedkey_t *new_skey; >>=20 >> if (skey =3D=3D NULL) >> @@ -654,7 +652,7 @@ sctp_alloc_hmaclist(uint16_t num_hmacs) >> } >>=20 >> void >> -sctp_free_hmaclist(sctp_hmaclist_t *list) >> +sctp_free_hmaclist(sctp_hmaclist_t * list) >> { >> if (list !=3D NULL) { >> SCTP_FREE(list, SCTP_M_AUTH_HL); >> @@ -663,7 +661,7 @@ sctp_free_hmaclist(sctp_hmaclist_t *list) >> } >>=20 >> int >> -sctp_auth_add_hmacid(sctp_hmaclist_t *list, uint16_t hmac_id) >> +sctp_auth_add_hmacid(sctp_hmaclist_t * list, uint16_t hmac_id) >> { >> int i; >>=20 >> @@ -691,7 +689,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t *list, = uint16_t h >> } >>=20 >> sctp_hmaclist_t * >> -sctp_copy_hmaclist(sctp_hmaclist_t *list) >> +sctp_copy_hmaclist(sctp_hmaclist_t * list) >> { >> sctp_hmaclist_t *new_list; >> int i; >> @@ -729,8 +727,7 @@ sctp_default_supported_hmaclist(void) >> * find the best HMAC id to use for the peer based on local support >> */ >> uint16_t >> -sctp_negotiate_hmacid(sctp_hmaclist_t *peer, sctp_hmaclist_t *local) >> -{ >> +sctp_negotiate_hmacid(sctp_hmaclist_t * peer, sctp_hmaclist_t * = local) { >> int i, j; >>=20 >> if ((local =3D=3D NULL) || (peer =3D=3D NULL)) >> @@ -756,7 +753,7 @@ sctp_negotiate_hmacid(sctp_hmaclist_t *peer, = sctp_hmac >> * caller must guarantee ptr has appropriate space >> */ >> int >> -sctp_serialize_hmaclist(sctp_hmaclist_t *list, uint8_t *ptr) >> +sctp_serialize_hmaclist(sctp_hmaclist_t * list, uint8_t * ptr) >> { >> int i; >> uint16_t hmac_id; >> @@ -802,7 +799,7 @@ sctp_alloc_authinfo(void) >> } >>=20 >> void >> -sctp_free_authinfo(sctp_authinfo_t *authinfo) >> +sctp_free_authinfo(sctp_authinfo_t * authinfo) >> { >> if (authinfo =3D=3D NULL) >> return; >> @@ -822,8 +819,7 @@ sctp_free_authinfo(sctp_authinfo_t *authinfo) >>=20 >>=20 >> uint32_t >> -sctp_get_auth_chunk_len(uint16_t hmac_algo) >> -{ >> +sctp_get_auth_chunk_len(uint16_t hmac_algo) { >> int size; >>=20 >> size =3D sizeof(struct sctp_auth_chunk) + = sctp_get_hmac_digest_len(hmac_algo); >> @@ -831,8 +827,7 @@ sctp_get_auth_chunk_len(uint16_t hmac_algo) >> } >>=20 >> uint32_t >> -sctp_get_hmac_digest_len(uint16_t hmac_algo) >> -{ >> +sctp_get_hmac_digest_len(uint16_t hmac_algo) { >> switch (hmac_algo) { >> case SCTP_AUTH_HMAC_ID_SHA1: >> return (SCTP_AUTH_DIGEST_LEN_SHA1); >> @@ -860,7 +855,7 @@ sctp_get_hmac_block_len(uint16_t hmac_algo) >> } >>=20 >> static void >> -sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t *ctx) >> +sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t * ctx) >> { >> switch (hmac_algo) { >> case SCTP_AUTH_HMAC_ID_SHA1: >> @@ -877,8 +872,8 @@ sctp_hmac_init(uint16_t hmac_algo, = sctp_hash_context_t >> } >>=20 >> static void >> -sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t *ctx, >> - uint8_t *text, uint32_t textlen) >> +sctp_hmac_update(uint16_t hmac_algo, sctp_hash_context_t * ctx, >> + uint8_t * text, uint32_t textlen) >> { >> switch (hmac_algo) { >> case SCTP_AUTH_HMAC_ID_SHA1: >> @@ -895,8 +890,8 @@ sctp_hmac_update(uint16_t hmac_algo, = sctp_hash_context >> } >>=20 >> static void >> -sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t *ctx, >> - uint8_t *digest) >> +sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t * ctx, >> + uint8_t * digest) >> { >> switch (hmac_algo) { >> case SCTP_AUTH_HMAC_ID_SHA1: >> @@ -923,9 +918,8 @@ sctp_hmac_final(uint16_t hmac_algo, = sctp_hash_context_ >> * resultant digest. >> */ >> uint32_t >> -sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, >> - uint8_t *text, uint32_t textlen, uint8_t *digest) >> -{ >> +sctp_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, >> + uint8_t * text, uint32_t textlen, uint8_t * digest) { >> uint32_t digestlen; >> uint32_t blocklen; >> sctp_hash_context_t ctx; >> @@ -983,9 +977,8 @@ sctp_hmac(uint16_t hmac_algo, uint8_t *key, = uint32_t k >>=20 >> /* mbuf version */ >> uint32_t >> -sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, >> - struct mbuf *m, uint32_t m_offset, uint8_t *digest, uint32_t = trailer) >> -{ >> +sctp_hmac_m(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, >> + struct mbuf *m, uint32_t m_offset, uint8_t * digest, uint32_t = trailer){ >> uint32_t digestlen; >> uint32_t blocklen; >> sctp_hash_context_t ctx; >> @@ -1031,17 +1024,17 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, = uint32_t >> sctp_hmac_update(hmac_algo, &ctx, ipad, blocklen); >> /* find the correct starting mbuf and offset (get start of = text) */ >> m_tmp =3D m; >> - while ((m_tmp !=3D NULL) && (m_offset >=3D = (uint32_t)SCTP_BUF_LEN(m_tmp))) { >> + while ((m_tmp !=3D NULL) && (m_offset >=3D (uint32_t) = SCTP_BUF_LEN(m_tmp))) { >> m_offset -=3D SCTP_BUF_LEN(m_tmp); >> m_tmp =3D SCTP_BUF_NEXT(m_tmp); >> } >> /* now use the rest of the mbuf chain for the text */ >> while (m_tmp !=3D NULL) { >> if ((SCTP_BUF_NEXT(m_tmp) =3D=3D NULL) && trailer) { >> - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, = uint8_t *)+m_offset, >> + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, = uint8_t *) + m_offset, >> SCTP_BUF_LEN(m_tmp) - (trailer + = m_offset)); >> } else { >> - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, = uint8_t *)+m_offset, >> + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, = uint8_t *) + m_offset, >> SCTP_BUF_LEN(m_tmp) - m_offset); >> } >>=20 >> @@ -1066,9 +1059,9 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, = uint32_t >> * Returns -1 on error, 0 on success. >> */ >> int >> -sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, >> - uint8_t *text, uint32_t textlen, >> - uint8_t *digest, uint32_t digestlen) >> +sctp_verify_hmac(uint16_t hmac_algo, uint8_t * key, uint32_t keylen, >> + uint8_t * text, uint32_t textlen, >> + uint8_t * digest, uint32_t digestlen) >> { >> uint32_t len; >> uint8_t temp[SCTP_AUTH_DIGEST_LEN_MAX]; >> @@ -1099,9 +1092,8 @@ sctp_verify_hmac(uint16_t hmac_algo, uint8_t = *key, uin >> * the keylen exceeds the HMAC block len). >> */ >> uint32_t >> -sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, uint8_t = *text, >> - uint32_t textlen, uint8_t *digest) >> -{ >> +sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t * key, uint8_t * = text, >> + uint32_t textlen, uint8_t * digest) { >> uint32_t digestlen; >> uint32_t blocklen; >> sctp_hash_context_t ctx; >> @@ -1134,9 +1126,8 @@ sctp_compute_hmac(uint16_t hmac_algo, = sctp_key_t *key, >>=20 >> /* mbuf version */ >> uint32_t >> -sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t *key, struct mbuf = *m, >> - uint32_t m_offset, uint8_t *digest) >> -{ >> +sctp_compute_hmac_m(uint16_t hmac_algo, sctp_key_t * key, struct = mbuf *m, >> + uint32_t m_offset, uint8_t * digest){ >> uint32_t digestlen; >> uint32_t blocklen; >> sctp_hash_context_t ctx; >> @@ -1166,7 +1157,7 @@ sctp_compute_hmac_m(uint16_t hmac_algo, = sctp_key_t *ke >> } >>=20 >> int >> -sctp_auth_is_supported_hmac(sctp_hmaclist_t *list, uint16_t id) >> +sctp_auth_is_supported_hmac(sctp_hmaclist_t * list, uint16_t id) >> { >> int i; >>=20 >> @@ -1309,6 +1300,7 @@ sctp_auth_setactivekey(struct sctp_tcb *stcb, = uint16_t >> /* can't reactivate a deactivated key with other = refcounts */ >> return (-1); >> } >> + >> /* set the (new) active key */ >> stcb->asoc.authinfo.active_keyid =3D keyid; >> /* reset the deactivated flag */ >> @@ -1363,6 +1355,7 @@ sctp_deact_sharedkey(struct sctp_tcb *stcb, = uint16_t k >> sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, = keyid, 0, >> SCTP_SO_LOCKED); >> } >> + >> /* mark the key as deactivated */ >> skey->deactivated =3D 1; >>=20 >> @@ -1424,7 +1417,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb = *stcb, str >> length +=3D offset; >>=20 >> phdr =3D (struct sctp_paramhdr *)sctp_m_getptr(m, offset, >> - sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param); >> + sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param); >> while (phdr !=3D NULL) { >> ptype =3D ntohs(phdr->param_type); >> plen =3D ntohs(phdr->param_length); >> @@ -1491,7 +1484,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb = *stcb, str >> if (offset + sizeof(struct sctp_paramhdr) > length) >> break; >> phdr =3D (struct sctp_paramhdr *)sctp_m_getptr(m, = offset, sizeof(struct sctp_paramhdr), >> - (uint8_t *)&tmp_param); >> + (uint8_t *) & tmp_param); >> } >> /* concatenate the full random key */ >> keylen =3D sizeof(*p_random) + random_len + sizeof(*hmacs) + = hmacs_len; >> @@ -1582,6 +1575,7 @@ sctp_fill_hmac_digest_m(struct mbuf *m, = uint32_t auth_ >> "Assoc Key"); >> #endif >> } >> + >> /* set in the active key id */ >> auth->shared_key_id =3D htons(keyid); >>=20 >> @@ -1603,14 +1597,14 @@ sctp_zero_m(struct mbuf *m, uint32_t = m_offset, uint32_ >>=20 >> /* find the correct starting mbuf and offset (get start = position) */ >> m_tmp =3D m; >> - while ((m_tmp !=3D NULL) && (m_offset >=3D = (uint32_t)SCTP_BUF_LEN(m_tmp))) { >> + while ((m_tmp !=3D NULL) && (m_offset >=3D (uint32_t) = SCTP_BUF_LEN(m_tmp))) { >> m_offset -=3D SCTP_BUF_LEN(m_tmp); >> m_tmp =3D SCTP_BUF_NEXT(m_tmp); >> } >> /* now use the rest of the mbuf chain */ >> while ((m_tmp !=3D NULL) && (size > 0)) { >> - data =3D mtod(m_tmp, uint8_t *)+m_offset; >> - if (size > (uint32_t)(SCTP_BUF_LEN(m_tmp) - = m_offset)) { >> + data =3D mtod(m_tmp, uint8_t *) + m_offset; >> + if (size > (uint32_t) (SCTP_BUF_LEN(m_tmp) - = m_offset)) { >> memset(data, 0, SCTP_BUF_LEN(m_tmp) - = m_offset); >> size -=3D SCTP_BUF_LEN(m_tmp) - m_offset; >> } else { >> @@ -1769,6 +1763,7 @@ sctp_notify_authentication(struct sctp_tcb = *stcb, uint >> /* If the socket is gone we are out of here */ >> return; >> } >> + >> if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, = SCTP_PCB_FLAGS_AUTHEVNT)) >> /* event not enabled */ >> return; >> @@ -1929,6 +1924,7 @@ sctp_validate_init_auth_params(struct mbuf *m, = int off >> if (num_chunks) >> got_chklist =3D 1; >> } >> + >> offset +=3D SCTP_SIZE32(plen); >> if (offset >=3D limit) { >> break; >> @@ -2023,6 +2019,7 @@ sctp_initialize_auth_params(struct sctp_inpcb = *inp, st >> new_key->key[keylen++] =3D i; >> } >> } >> + >> /* append in the HMACs */ >> ph =3D (struct sctp_paramhdr *)(new_key->key + = keylen); >> ph->param_type =3D htons(SCTP_HMAC_LIST); >>=20 >> Modified: head/sys/netinet/sctp_auth.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/netinet/sctp_auth.h Thu Jul 19 19:32:08 2018 = (r336502) >> +++ head/sys/netinet/sctp_auth.h Thu Jul 19 19:33:42 2018 = (r336503) >> @@ -53,12 +53,12 @@ __FBSDID("$FreeBSD$"); >> typedef union sctp_hash_context { >> SCTP_SHA1_CTX sha1; >> SCTP_SHA256_CTX sha256; >> -} sctp_hash_context_t; >> +} sctp_hash_context_t; >>=20 >> typedef struct sctp_key { >> uint32_t keylen; >> uint8_t key[]; >> -} sctp_key_t; >> +} sctp_key_t; >>=20 >> typedef struct sctp_shared_key { >> LIST_ENTRY(sctp_shared_key) next; >> @@ -66,7 +66,7 @@ typedef struct sctp_shared_key { >> uint32_t refcount; /* reference count */ >> uint16_t keyid; /* shared key ID */ >> uint8_t deactivated; /* key is deactivated */ >> -} sctp_sharedkey_t; >> +} sctp_sharedkey_t; >>=20 >> LIST_HEAD(sctp_keyhead, sctp_shared_key); >>=20 >> @@ -74,26 +74,26 @@ LIST_HEAD(sctp_keyhead, sctp_shared_key); >> typedef struct sctp_auth_chklist { >> uint8_t chunks[256]; >> uint8_t num_chunks; >> -} sctp_auth_chklist_t; >> +} sctp_auth_chklist_t; >>=20 >> /* hmac algos supported list */ >> typedef struct sctp_hmaclist { >> uint16_t max_algo; /* max algorithms allocated */ >> uint16_t num_algo; /* num algorithms used */ >> uint16_t hmac[]; >> -} sctp_hmaclist_t; >> +} sctp_hmaclist_t; >>=20 >> /* authentication info */ >> typedef struct sctp_authinformation { >> sctp_key_t *random; /* local random key (concatenated) */ >> uint32_t random_len; /* local random number length for = param */ >> - sctp_key_t *peer_random;/* peer's random key (concatenated) = */ >> + sctp_key_t *peer_random; /* peer's random key = (concatenated) */ >> sctp_key_t *assoc_key; /* cached concatenated send key */ >> sctp_key_t *recv_key; /* cached concatenated recv key */ >> uint16_t active_keyid; /* active send keyid */ >> uint16_t assoc_keyid; /* current send keyid (cached) */ >> uint16_t recv_keyid; /* last recv keyid (cached) */ >> -} sctp_authinfo_t; >> +} sctp_authinfo_t; >>=20 >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>=20 >=20 From owner-svn-src-head@freebsd.org Thu Jul 19 20:27:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F21A104957B; Thu, 19 Jul 2018 20:27:39 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 051977A17E; Thu, 19 Jul 2018 20:27:39 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id F1744312B; Thu, 19 Jul 2018 20:27:38 +0000 (UTC) Date: Thu, 19 Jul 2018 20:27:38 +0000 From: Alexey Dokuchaev To: Michael Tuexen Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 Message-ID: <20180719202738.GA69018@FreeBSD.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:27:39 -0000 On Thu, Jul 19, 2018 at 04:23:27PM -0400, Michael Tuexen wrote: > > On 19. Jul 2018, at 16:11, Conrad Meyer wrote: > > These changes mostly seem like style regressions, rather than > > improvements. (Not to mention, largescale churn like this makes it > > more difficult for future readers to research history (confusing tools > > like "git/svn blame").) > > We have upstream code and run this to an formatter tool which depends > on ident, which has been changed recently. Unfortunately, I also ran > an older version of the script, so I reverted this in > https://svnweb.freebsd.org/changeset/base/336508 > and committed a version really only showing the differences related to > the ident changes in > https://svnweb.freebsd.org/changeset/base/336511 Thanks for fixing, but you might find doing "svn diff" prior to commit very handy next time (no offense). ./danfe From owner-svn-src-head@freebsd.org Thu Jul 19 20:29:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D83310496B5; Thu, 19 Jul 2018 20:29:15 +0000 (UTC) (envelope-from tuexen@freebsd.org) 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 163837A327; Thu, 19 Jul 2018 20:29:15 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76] (unknown [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 97155721E280D; Thu, 19 Jul 2018 22:29:11 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Michael Tuexen In-Reply-To: <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> Date: Thu, 19 Jul 2018 16:29:09 -0400 Cc: Ian Lepore , Alexey Dokuchaev , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7B5E13F1-A134-4762-BEC3-99FB3306621A@freebsd.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@FreeBSD.org> <1532030389.1344.9.camel@freebsd.org> <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> To: Devin Teske X-Mailer: Apple Mail (2.3445.9.1) 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-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:29:15 -0000 > On 19. Jul 2018, at 16:12, Devin Teske wrote: >=20 >=20 >> On Jul 19, 2018, at 12:59 PM, Ian Lepore wrote: >>=20 >> On Thu, 2018-07-19 at 19:53 +0000, Alexey Dokuchaev wrote: >>>> +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 = (r336503) >>>> static struct mbuf * >>>> -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t = *error_tlv, >>>> +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * = error_tlv, >>>=20 >>> This looks strange now. In C, asterisk is usually placed by the = variable. >>=20 >> "usually" may be true of freebsd, but most places I've worked = consider >> the * (and & in c++) to be more associated with the type being = declared >> than with the variable name, thus they get snugged up against the = type >> info, not the var name. Putting the * or & with the var name leads to >> particularly bad constructs such as=20 >>=20 >> int a, *b; >>=20 >> which, for maximal clarity, should be: >>=20 >> int a; >> int* b; >>=20 >=20 > Are we free to prefer the former in C if that's how we've been coding = in C for 20+ years? The code you see is a result of running a formatting tool based on ident on code supporting a variety of platforms. Since ident has changed = recently I wanted to commit the corresponding whitespace changes separately, but used an older parametrisation of the script. So I reverted it in https://svnweb.freebsd.org/changeset/base/336508 and committed the correct version in https://svnweb.freebsd.org/changeset/base/336511 Best regards Michael > --=20 > Devin From owner-svn-src-head@freebsd.org Thu Jul 19 20:33:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D96F41049A62; Thu, 19 Jul 2018 20:33:34 +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 7A11C7A841; Thu, 19 Jul 2018 20:33:34 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=58731 helo=[10.0.0.104]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fgFcC-000MSD-7O; Thu, 19 Jul 2018 20:33:32 +0000 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 Date: Thu, 19 Jul 2018 13:33:31 -0700 In-Reply-To: <1532031535.1344.11.camel@freebsd.org> Cc: Devin Teske , Alexey Dokuchaev , Michael Tuexen , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Ian Lepore References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@FreeBSD.org> <1532030389.1344.9.camel@freebsd.org> <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> <1532031535.1344.11.camel@freebsd.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:33:35 -0000 > On Jul 19, 2018, at 1:18 PM, Ian Lepore wrote: >=20 > On Thu, 2018-07-19 at 13:12 -0700, Devin Teske wrote: >>>=20 >>> On Jul 19, 2018, at 12:59 PM, Ian Lepore wrote: >>>=20 >>> On Thu, 2018-07-19 at 19:53 +0000, Alexey Dokuchaev wrote: >>>>=20 >>>>>=20 >>>>> +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 = (r336503) >>>>> static struct mbuf * >>>>> -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t = *error_tlv, >>>>> +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * = error_tlv, >>>> This looks strange now. In C, asterisk is usually placed by the = variable. >>> "usually" may be true of freebsd, but most places I've worked = consider >>> the * (and & in c++) to be more associated with the type being = declared >>> than with the variable name, thus they get snugged up against the = type >>> info, not the var name. Putting the * or & with the var name leads = to >>> particularly bad constructs such as=20 >>>=20 >>> int a, *b; >>>=20 >>> which, for maximal clarity, should be: >>>=20 >>> int a; >>> int* b; >>>=20 >> Are we free to prefer the former in C if that's how we've been coding = in C for 20+ years? >=20 > Only if I'm free to consider that kind of sarcasm to be a completely > inappropriate response to what I said. >=20 I sincerely believe you when you say you've worked at places that use = "int* b". I use "int *b;" and I want to know if I am free to use that for the = stated reasons. --=20 Devin= From owner-svn-src-head@freebsd.org Thu Jul 19 20:37:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 812131049C29; Thu, 19 Jul 2018 20:37:04 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 126617AA58; Thu, 19 Jul 2018 20:37:03 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from helicon.physics.ucla.edu (helicon.physics.ucla.edu [169.232.156.253]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w6JKQYUf025736 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 19 Jul 2018 13:26:34 -0700 Subject: Re: svn commit: r336514 - head/sys/dev/vt/hw/ofwfb To: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807192022.w6JKMkE6044331@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <72e23592-9ff2-b373-f8cc-755c358989f5@freebsd.org> Date: Thu, 19 Jul 2018 13:26:33 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201807192022.w6JKMkE6044331@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVYjwzHTpWV7K19vd5XK6Y7xdvpYX3H3hh70IbJA0KFLlGqom/u4szQIj9TLLYhTHJ8GN2JeDhcN2IxxLKVwGm+awJfFnO2qbUM= X-Sonic-ID: C;kLxiB5KL6BG11IG7ftbltA== M;ElC7B5KL6BG11IG7ftbltA== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:37:04 -0000 Isn't stdout-path supposed to contain a string rather than an ihandle? This code assumes it is an ihandle (or xref phandle), which I think is wrong. -Nathan On 07/19/18 13:22, Justin Hibbits wrote: > Author: jhibbits > Date: Thu Jul 19 20:22:46 2018 > New Revision: 336514 > URL: https://svnweb.freebsd.org/changeset/base/336514 > > Log: > ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout > > Some platforms use /chosen/stdout-path as the property containing the path to > the stdout node, not /chosen/stdout. > > Modified: > head/sys/dev/vt/hw/ofwfb/ofwfb.c > > Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c > ============================================================================== > --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:20:43 2018 (r336513) > +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:22:46 2018 (r336514) > @@ -102,6 +102,10 @@ ofwfb_probe(struct vt_device *vd) > if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == > sizeof(stdout)) > node = OF_instance_to_package(stdout); > + if (node == -1) > + if (OF_getprop(chosen, "stdout-path", &stdout, sizeof(stdout)) == > + sizeof(stdout)) > + node = OF_instance_to_package(stdout); > if (node == -1) { > /* > * The "/chosen/stdout" does not exist try > From owner-svn-src-head@freebsd.org Thu Jul 19 20:39:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A484D1049D83; Thu, 19 Jul 2018 20:39:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 556B87AD2B; Thu, 19 Jul 2018 20:39:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E920B8F9A; Thu, 19 Jul 2018 20:39:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f172.google.com with SMTP id v9-v6so9287562ljk.4; Thu, 19 Jul 2018 13:39:10 -0700 (PDT) X-Gm-Message-State: AOUpUlGHGvzx5JYo96rJrg5KllXH/jKwEd80zpLFHKkn9s+b8MNwyRzo 6S+rIT50+sHS1kUrK0Kh394e4NcZjEUvgzfWSDU= X-Google-Smtp-Source: AAOMgpdeDH2quhXDcb0fxKUtARnkTlxI19dJnjOJgkTsnNlWQyvtKJncif1JRqNYOzwZiXdzWQwZdugqcjRKmiIW+hg= X-Received: by 2002:a19:7b08:: with SMTP id w8-v6mr7412230lfc.22.1532032749606; Thu, 19 Jul 2018 13:39:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 13:38:49 -0700 (PDT) In-Reply-To: <72e23592-9ff2-b373-f8cc-755c358989f5@freebsd.org> References: <201807192022.w6JKMkE6044331@repo.freebsd.org> <72e23592-9ff2-b373-f8cc-755c358989f5@freebsd.org> From: Kyle Evans Date: Thu, 19 Jul 2018 15:38:49 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336514 - head/sys/dev/vt/hw/ofwfb To: Nathan Whitehorn Cc: Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:39:11 -0000 Seems like some bad decisions have been made with regards to naming... e.g. https://lkml.org/lkml/2018/6/25/784 On Thu, Jul 19, 2018 at 3:26 PM, Nathan Whitehorn wrote: > Isn't stdout-path supposed to contain a string rather than an ihandle? This > code assumes it is an ihandle (or xref phandle), which I think is wrong. > -Nathan > > > On 07/19/18 13:22, Justin Hibbits wrote: >> >> Author: jhibbits >> Date: Thu Jul 19 20:22:46 2018 >> New Revision: 336514 >> URL: https://svnweb.freebsd.org/changeset/base/336514 >> >> Log: >> ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout >> Some platforms use /chosen/stdout-path as the property containing >> the path to >> the stdout node, not /chosen/stdout. >> >> Modified: >> head/sys/dev/vt/hw/ofwfb/ofwfb.c >> >> Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c >> >> ============================================================================== >> --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:20:43 2018 >> (r336513) >> +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:22:46 2018 >> (r336514) >> @@ -102,6 +102,10 @@ ofwfb_probe(struct vt_device *vd) >> if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == >> sizeof(stdout)) >> node = OF_instance_to_package(stdout); >> + if (node == -1) >> + if (OF_getprop(chosen, "stdout-path", &stdout, sizeof(stdout)) >> == >> + sizeof(stdout)) >> + node = OF_instance_to_package(stdout); >> if (node == -1) { >> /* >> * The "/chosen/stdout" does not exist try >> > > From owner-svn-src-head@freebsd.org Thu Jul 19 20:44:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF255104A28B; Thu, 19 Jul 2018 20:44:19 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64C687B3E1; Thu, 19 Jul 2018 20:44:19 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from helicon.physics.ucla.edu (helicon.physics.ucla.edu [169.232.156.253]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w6JKiGnZ013691 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 19 Jul 2018 13:44:16 -0700 Subject: Re: svn commit: r336514 - head/sys/dev/vt/hw/ofwfb To: Kyle Evans Cc: Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807192022.w6JKMkE6044331@repo.freebsd.org> <72e23592-9ff2-b373-f8cc-755c358989f5@freebsd.org> From: Nathan Whitehorn Message-ID: <62cdb328-9423-cf71-cf8f-d2811a78c1b1@freebsd.org> Date: Thu, 19 Jul 2018 13:44:16 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVbppJo5C61r5iTunMmk8373uuT7onbWNQyxK+20TwMkLF3Ik63n3HXbRvCOfRxc8Y84hQWC2oBY42VAUjcXhL2+Cxodb1SRzWw= X-Sonic-ID: C;PjaXgJSL6BGchoG7ftbltA== M;uCW6gJSL6BGchoG7ftbltA== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:44:20 -0000 Oh wow. That's just... horrific. Here, it is a string: https://github.com/open-power/petitboot/blob/master/utils/hooks/30-dtb-updates.c#L560 So I think this code needs to accept both. -Nathan On 07/19/18 13:38, Kyle Evans wrote: > Seems like some bad decisions have been made with regards to naming... > e.g. https://lkml.org/lkml/2018/6/25/784 > > On Thu, Jul 19, 2018 at 3:26 PM, Nathan Whitehorn > wrote: >> Isn't stdout-path supposed to contain a string rather than an ihandle? This >> code assumes it is an ihandle (or xref phandle), which I think is wrong. >> -Nathan >> >> >> On 07/19/18 13:22, Justin Hibbits wrote: >>> Author: jhibbits >>> Date: Thu Jul 19 20:22:46 2018 >>> New Revision: 336514 >>> URL: https://svnweb.freebsd.org/changeset/base/336514 >>> >>> Log: >>> ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout >>> Some platforms use /chosen/stdout-path as the property containing >>> the path to >>> the stdout node, not /chosen/stdout. >>> >>> Modified: >>> head/sys/dev/vt/hw/ofwfb/ofwfb.c >>> >>> Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c >>> >>> ============================================================================== >>> --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:20:43 2018 >>> (r336513) >>> +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:22:46 2018 >>> (r336514) >>> @@ -102,6 +102,10 @@ ofwfb_probe(struct vt_device *vd) >>> if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == >>> sizeof(stdout)) >>> node = OF_instance_to_package(stdout); >>> + if (node == -1) >>> + if (OF_getprop(chosen, "stdout-path", &stdout, sizeof(stdout)) >>> == >>> + sizeof(stdout)) >>> + node = OF_instance_to_package(stdout); >>> if (node == -1) { >>> /* >>> * The "/chosen/stdout" does not exist try >>> >> From owner-svn-src-head@freebsd.org Thu Jul 19 20:48:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C2AC104A4AB; Thu, 19 Jul 2018 20:48:18 +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 52E4D7B6B7; Thu, 19 Jul 2018 20:48:17 +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 b250e4f3; Thu, 19 Jul 2018 22:48:09 +0200 (CEST) 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=BLMt4JohtHJvRmTzG3PCwDsiP88=; b=D7RdL8EQoPXcEWmos9GeLzS6AapN OeT0hYeqxdlv9Y84pkRU/DqTxB4hZU+rEJpuNrgUhtCikt4YCyCdZGVsgC15XSzq dJMO7yg0sFfM39OvLC+hgzG0TxgQZObn2PFtOD9kMk4x0RAUq2+P3OEnLApe7qP6 4/lcD4EwKKvXByE= 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=dRES1Iwl4HXxqkYSr92wnmsCeqEZBerQ81nCMz7y0hTm4igxEX4MtfNS 00Db8NOjD2/uVLLUuTb6xnJWdQNHnaLWvS/+48LS2CEpxG7jt+IiqCv/NMXo3yjM 8ojNMU3Os7+vRvLjkcexl7MlIkbY7bb4dw/TwiATQGljgGvwbQ0= 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 0e7bea69 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 19 Jul 2018 22:48:08 +0200 (CEST) Date: Thu, 19 Jul 2018 22:48:08 +0200 From: Emmanuel Vadot To: Kyle Evans Cc: Nathan Whitehorn , Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336514 - head/sys/dev/vt/hw/ofwfb Message-Id: <20180719224808.36eb9909375a1db67ac42fed@bidouilliste.com> In-Reply-To: References: <201807192022.w6JKMkE6044331@repo.freebsd.org> <72e23592-9ff2-b373-f8cc-755c358989f5@freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:48:18 -0000 On Thu, 19 Jul 2018 15:38:49 -0500 Kyle Evans wrote: > Seems like some bad decisions have been made with regards to naming... > e.g. https://lkml.org/lkml/2018/6/25/784 See this thread too : http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/584613.html They did bad things. It seems that the IMX linux guys don't really know what they are talking about. stdout-path is supposed to contain a string. > On Thu, Jul 19, 2018 at 3:26 PM, Nathan Whitehorn > wrote: > > Isn't stdout-path supposed to contain a string rather than an ihandle? This > > code assumes it is an ihandle (or xref phandle), which I think is wrong. > > -Nathan > > > > > > On 07/19/18 13:22, Justin Hibbits wrote: > >> > >> Author: jhibbits > >> Date: Thu Jul 19 20:22:46 2018 > >> New Revision: 336514 > >> URL: https://svnweb.freebsd.org/changeset/base/336514 > >> > >> Log: > >> ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout > >> Some platforms use /chosen/stdout-path as the property containing > >> the path to > >> the stdout node, not /chosen/stdout. > >> > >> Modified: > >> head/sys/dev/vt/hw/ofwfb/ofwfb.c > >> > >> Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c > >> > >> ============================================================================== > >> --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:20:43 2018 > >> (r336513) > >> +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:22:46 2018 > >> (r336514) > >> @@ -102,6 +102,10 @@ ofwfb_probe(struct vt_device *vd) > >> if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == > >> sizeof(stdout)) > >> node = OF_instance_to_package(stdout); > >> + if (node == -1) > >> + if (OF_getprop(chosen, "stdout-path", &stdout, sizeof(stdout)) > >> == > >> + sizeof(stdout)) > >> + node = OF_instance_to_package(stdout); > >> if (node == -1) { > >> /* > >> * The "/chosen/stdout" does not exist try > >> > > > > -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Thu Jul 19 20:48:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A7E8104A4DE; Thu, 19 Jul 2018 20:48:25 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (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 47FDE7B746; Thu, 19 Jul 2018 20:48:23 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76] (unknown [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 64253721E282F; Thu, 19 Jul 2018 22:48:20 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Michael Tuexen In-Reply-To: <20180719202738.GA69018@FreeBSD.org> Date: Thu, 19 Jul 2018 16:48:18 -0400 Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Transfer-Encoding: 7bit Message-Id: <4E76E1DC-DB70-47D1-A59D-E99058C00D53@freebsd.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719202738.GA69018@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3445.9.1) 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-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:48:25 -0000 > On 19. Jul 2018, at 16:27, Alexey Dokuchaev wrote: > > On Thu, Jul 19, 2018 at 04:23:27PM -0400, Michael Tuexen wrote: >>> On 19. Jul 2018, at 16:11, Conrad Meyer wrote: >>> These changes mostly seem like style regressions, rather than >>> improvements. (Not to mention, largescale churn like this makes it >>> more difficult for future readers to research history (confusing tools >>> like "git/svn blame").) >> >> We have upstream code and run this to an formatter tool which depends >> on ident, which has been changed recently. Unfortunately, I also ran >> an older version of the script, so I reverted this in >> https://svnweb.freebsd.org/changeset/base/336508 >> and committed a version really only showing the differences related to >> the ident changes in >> https://svnweb.freebsd.org/changeset/base/336511 > > Thanks for fixing, but you might find doing "svn diff" prior to commit > very handy next time (no offense). I did actually making sure the there are only whitespace changes. However, I just take what the tool produces (for years). Only after doing svn diff for a functional change, where no whitespace changes should be, but actually were, I realised my usage error and reverted... Best regards Michael > > ./danfe From owner-svn-src-head@freebsd.org Thu Jul 19 20:49:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF777104A56B; Thu, 19 Jul 2018 20:49: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 1BE887B926; Thu, 19 Jul 2018 20:49: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 w6JKn4A3013554; Thu, 19 Jul 2018 13:49:04 -0700 (PDT) (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 w6JKn4c0013553; Thu, 19 Jul 2018 13:49:04 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807192049.w6JKn4c0013553@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336475 - head/sys/xen/interface/arch-x86/hvm In-Reply-To: <20180719162929.lxklf6pdb3vlmxof@mac> To: "Roger Pau Monn?" Date: Thu, 19 Jul 2018 13:49:04 -0700 (PDT) CC: rgrimes@freebsd.org, 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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 20:49:14 -0000 > On Thu, Jul 19, 2018 at 07:02:08AM -0700, Rodney W. Grimes wrote: > > > Author: royger > > > Date: Thu Jul 19 10:14:52 2018 > > > New Revision: 336475 > > > URL: https://svnweb.freebsd.org/changeset/base/336475 > > > > > > Log: > > > xen: add missing file from r336474 > > > > > > Added: > > > head/sys/xen/interface/arch-x86/hvm/start_info.h (contents, props changed) > > > > > > Added: head/sys/xen/interface/arch-x86/hvm/start_info.h > > > ============================================================================== > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > +++ head/sys/xen/interface/arch-x86/hvm/start_info.h Thu Jul 19 10:14:52 2018 (r336475) > > > @@ -0,0 +1,159 @@ > > > +/* > > > + * Permission is hereby granted, free of charge, to any person obtaining a copy > > > + * of this software and associated documentation files (the "Software"), to > > > + * deal in the Software without restriction, including without limitation the > > > + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or > > > + * sell copies of the Software, and to permit persons to whom the Software is > > > + * furnished to do so, subject to the following conditions: > > > + * > > > + * The above copyright notice and this permission notice shall be included in > > > > There is no copyright above. > > > > > + * all copies or substantial portions of the Software. > > > + * > > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > > > + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > > > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > > > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > > > + * DEALINGS IN THE SOFTWARE. > > > + * > > > + * Copyright (c) 2016, Citrix Systems, Inc. > > > > The copyright is below. > > This is a verbatim copy of: > > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/arch-x86/hvm/start_info.h > > And I'm not intending to modify it locally in the FreeBSD tree, but > patches can be submitted upstream :). I agree that it should not be modified localy, howerver you as the person bringing it into the tree are resposible to insure it has a proper copyright and license. Since it does not, and you have been informed of this, and seem to be unwilling to facilitate it being corrected I would request that this commit be reverted. Infact this commit should be reverted until the copyright and license are of proper form anyway. > Roger. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Jul 19 21:06:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CD79104B2D4; Thu, 19 Jul 2018 21:06:59 +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 43FB77C7A6; Thu, 19 Jul 2018 21:06:59 +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 18C092E869; Thu, 19 Jul 2018 21:06:59 +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 w6JL6w8w067871; Thu, 19 Jul 2018 21:06:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JL6wYQ067870; Thu, 19 Jul 2018 21:06:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807192106.w6JL6wYQ067870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 19 Jul 2018 21:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336517 - 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: 336517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 21:06:59 -0000 Author: jhibbits Date: Thu Jul 19 21:06:58 2018 New Revision: 336517 URL: https://svnweb.freebsd.org/changeset/base/336517 Log: Revert r336509. Fails buildworld. I had naively assumed that building kernel would be sufficient to test that the header is sane. However, it turns out this now needs -fms-extensions to build. Rather than sprinkling -fms-extensions all over the place, revert for now, and revisit with a better fix. Modified: head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Thu Jul 19 20:58:59 2018 (r336516) +++ head/sys/powerpc/include/pmap.h Thu Jul 19 21:06:58 2018 (r336517) @@ -150,6 +150,12 @@ struct pmap { struct pvo_tree pmap_pvo; }; +struct md_page { + volatile int32_t mdpg_attrs; + vm_memattr_t mdpg_cache_attrs; + struct pvo_head mdpg_pvoh; +}; + #define pmap_page_get_memattr(m) ((m)->md.mdpg_cache_attrs) #define pmap_page_is_mapped(m) (!LIST_EMPTY(&(m)->md.mdpg_pvoh)) @@ -206,6 +212,11 @@ struct pv_entry { }; typedef struct pv_entry *pv_entry_t; +struct md_page { + TAILQ_HEAD(, pv_entry) pv_list; + int pv_tracked; +}; + #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) @@ -220,20 +231,6 @@ struct pmap { struct mtx pm_mtx; /* pmap mutex */ }; #endif /* AIM */ - -struct md_page { - union { - struct md_page_booke { - TAILQ_HEAD(, pv_entry) pv_list; - int pv_tracked; - }; - struct md_page_aim { - volatile int32_t mdpg_attrs; - vm_memattr_t mdpg_cache_attrs; - struct pvo_head mdpg_pvoh; - }; - }; -}; extern struct pmap kernel_pmap_store; #define kernel_pmap (&kernel_pmap_store) From owner-svn-src-head@freebsd.org Thu Jul 19 21:14:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7C88104B87A; Thu, 19 Jul 2018 21:14:45 +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 0961F7CEFC; Thu, 19 Jul 2018 21:14:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id gGFzfGZtT5HxqgGG0fvQua; Thu, 19 Jul 2018 15:14:43 -0600 X-Authority-Analysis: v=2.3 cv=BMcHU2YG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=QCccru2TAAAA:8 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=_iOL5osU8BtTbS64amwA:9 a=CjuIK1q_8ugA:10 a=rCjsK_HQOcgUb9vb-KUg:22 a=IfaqVvZgccqrtc8gcwf2: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 438EE1221; Thu, 19 Jul 2018 14:14:37 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6JLEaPr097592; Thu, 19 Jul 2018 14:14:36 -0700 (PDT) (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 w6JLEapA097589; Thu, 19 Jul 2018 14:14:36 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807192114.w6JLEapA097589@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: "Oleg V. Nauman" cc: svn-src-all@freebsd.org, Cy Schubert , src-committers , svn-src-head@freebsd.org, Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from "Oleg V. Nauman" of "Thu, 19 Jul 2018 17:26:38 +0300." <17042686.Mc0X0P6XHu@asus.theweb.org.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 14:14:36 -0700 X-CMAE-Envelope: MS4wfPpnX5LkQHydZzrlPW/U+WXUQ684DNrVVa3v39+T/q+zMxMn5dqBy9LtLLYeh+kpYHj5w/2clJ2My/bOnTDO4RkWcELgIldbl0dVTP0YaDIoSlbs6bfP 8D/Y10Vfuil0WgoDvArYpHyTTrOa6KZE27Jfj8B1rMVqfSeUpOH9UeqApDGLxFoN0K/1pNf9auj0yejVUM6Iru4VNVV8BIaw1lHDcAt9Wo4GFV+mF3/FwJx7 +HGBmGeLTJQnVSyL9yuCheTqsX/TroXCB2WHEJkSGiYDSwC+zomvJI4hFOauA9uG X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 21:14:45 -0000 In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" writes: > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: > > In message > il.com> > > > > , Kyle Evans writes: > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > > > > > > wrote: > > > > [ sending this again since I missed the list the first time, apologies > > > > if > > > > anyone receives a duplicate ] > > > > > > > > On 07/19/18 13:57, Kyle Evans wrote: > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > > > >> > > > >> wrote: > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > > > >>>> ... > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant > > > >>>> restart > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from ol > d > > > >>>> source and now it works stable already about 2 hours. > > > >>> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ > > > >> > > > >> Well, "broken". It's incredibly stable outside of rekeying events, and > > > >> further testing shows that I don't actually notice these disconnects > > > >> most of the time because it reassociates fast enough. I noticed it the > > > >> first time because apparently I had both SSIDs from my AP uncommented > > > >> in my wpa_supplicant.conf and it decided at that point to connect to > > > >> the other one, which took a little longer. > > > >> > > > >> Contrary to Andrey's report, though, I don't have to kick > > > >> wpa_supplicant at all. It will reassociate on its own every single > > > >> time. > > > > > > > > Hi! > > > > I have the exact same problem as Andrey, with the same driver. I've no > t > > > > investigated very much, but when using the 2.8 wpa_supplicant the wifi > > > > network dies after a little while, and I have to restart it (usually > > > > with > > > > /etc/rc.d/netif restart). Then it works for a little while, before > > > > going > > > > down again. With the old wpa_supplicant I didn't have this problem. > > > > > > > > I don't have very much else to add except noting that I'm affected as > > > > well. > > > > I haven't had time to debug it properly (which is why I've never > > > > reported > > > > it) > > > > > > I plan on trying out the latest from upstream beyond the patch Cy sent > > > along earlier to see if it's perhaps been addressed elsewhere in the > > > past two years since this release was made. > > > > A point of reference. I've had no issues here with any of the networks > > I use. All the networks I use are either WPA-PSK or open. The last > > WPA-EAP I used was at former $JOB a few years ago. However, at the Link > > Lounge just outside where $JOB is at my wifi would disconnect every 30 > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 resolved > > that issue. > > > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also looks > > interesting. > > > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 > > Author: Jouni Malinen > > Date: Sun Oct 1 12:32:57 2017 +0300 > > > > Fix PTK rekeying to generate a new ANonce > > > > The Authenticator state machine path for PTK rekeying ended up > > bypassing > > the AUTHENTICATION2 state where a new ANonce is generated when going > > directly to the PTKSTART state since there is no need to try to > > determine the PMK again in such a case. This is far from ideal > > since the > > new PTK would depend on a new nonce only from the supplicant. > > > > Fix this by generating a new ANonce when moving to the PTKSTART > > state > > for the purpose of starting new 4-way handshake to rekey PTK. > > > > Signed-off-by: Jouni Malinen > > > > > > I suspect a timeout because reason=1 in Kyle's log. > > > I have two systems experienced wifi connection issues after recent HEAD > update. > Both of them experiencing frequent up/down wlan0 events on boot so wireless > connection can not negotiate DHCP requests, possibly due to fact that both > connecting to the same AP. > AP capabilities list: > > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH WPS > > Interesting enough that switching wpa_supplicant to version 2.6 from ports > fixes that issue completely. > > Hopefully it helps. > > Thank you. I've imported all the patches in the port, from our upline into base. Some were already committed to -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. base 2.5 others not. This should bring base up to par with the port, address the remaining security issues, and probably fix this thread too. From owner-svn-src-head@freebsd.org Thu Jul 19 21:28:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C260E104BE27 for ; Thu, 19 Jul 2018 21:28:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 4A7F57D611 for ; Thu, 19 Jul 2018 21:28:38 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: aaf88a9b-8b9a-11e8-aff6-0b9b8210da61 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 outbound1.eu.mailhop.org (Halon) with ESMTPSA id aaf88a9b-8b9a-11e8-aff6-0b9b8210da61; Thu, 19 Jul 2018 21:28:25 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6JLSODE003960; Thu, 19 Jul 2018 15:28:24 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532035703.1344.15.camel@freebsd.org> Subject: Re: svn commit: r336475 - head/sys/xen/interface/arch-x86/hvm From: Ian Lepore To: rgrimes@freebsd.org, Roger Pau Monn? Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 19 Jul 2018 15:28:23 -0600 In-Reply-To: <201807192049.w6JKn4c0013553@pdx.rh.CN85.dnsmgr.net> References: <201807192049.w6JKn4c0013553@pdx.rh.CN85.dnsmgr.net> 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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 21:28:39 -0000 On Thu, 2018-07-19 at 13:49 -0700, Rodney W. Grimes wrote: > > > > On Thu, Jul 19, 2018 at 07:02:08AM -0700, Rodney W. Grimes wrote: > > > > > > > > > > > Author: royger > > > > Date: Thu Jul 19 10:14:52 2018 > > > > New Revision: 336475 > > > > URL: https://svnweb.freebsd.org/changeset/base/336475 > > > > > > > > Log: > > > >   xen: add missing file from r336474 > > > > > > > > Added: > > > >   head/sys/xen/interface/arch-x86/hvm/start_info.h   (contents, props changed) > > > > > > > > Added: head/sys/xen/interface/arch-x86/hvm/start_info.h > > > > ============================================================================== > > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > > +++ head/sys/xen/interface/arch-x86/hvm/start_info.h Thu Jul 19 10:14:52 2018 (r336475) > > > > @@ -0,0 +1,159 @@ > > > > +/* > > > > + * Permission is hereby granted, free of charge, to any person obtaining a copy > > > > + * of this software and associated documentation files (the "Software"), to > > > > + * deal in the Software without restriction, including without limitation the > > > > + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or > > > > + * sell copies of the Software, and to permit persons to whom the Software is > > > > + * furnished to do so, subject to the following conditions: > > > > + * > > > > + * The above copyright notice and this permission notice shall be included in > > > There is no copyright above. > > > > > > > > > > > + * all copies or substantial portions of the Software. > > > > + * > > > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > > > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > > > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > > > > + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > > > > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > > > > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > > > > + * DEALINGS IN THE SOFTWARE. > > > > + * > > > > + * Copyright (c) 2016, Citrix Systems, Inc. > > > The copyright is below. > > This is a verbatim copy of: > > > > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/arch-x86/hvm/start_info.h > > > > And I'm not intending to modify it locally in the FreeBSD tree, but > > patches can be submitted upstream :). > I agree that it should not be modified localy, howerver you as the person > bringing it into the tree are resposible to insure it has a proper copyright > and license.  Since it does not, and you have been informed of this, and > seem to be unwilling to facilitate it being corrected I would request that > this commit be reverted.  Infact this commit should be reverted until > the copyright and license are of proper form anyway. > > > > > Roger. Seriously?  So much drama over the word "above" instead of "below"? Since when is it our responsibility to be copyeditors on other people's licensing text? If we're going to embark on this kind of thing where we're interpreting the validity of an author's wording, do we need to now remove all the code that has licenses referring to the voices in Bill Paul's head? -- Ian From owner-svn-src-head@freebsd.org Thu Jul 19 21:33:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93A37104C12D; Thu, 19 Jul 2018 21:33:33 +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 E7B357DA9D; Thu, 19 Jul 2018 21:33:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id gGYEfGfp55HxqgGYFfvV4k; Thu, 19 Jul 2018 15:33:32 -0600 X-Authority-Analysis: v=2.3 cv=BMcHU2YG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=VxmjJ2MpAAAA:8 a=QCccru2TAAAA:8 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EGBCvn61GOBSjflQzKwA:9 a=8S43odlx9e_sHVFA:21 a=88dLsmoe_8izHvkX:21 a=CjuIK1q_8ugA:10 a=8GuA_aGtTd0A:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=rCjsK_HQOcgUb9vb-KUg:22 a=IfaqVvZgccqrtc8gcwf2: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 D8BB2125B; Thu, 19 Jul 2018 14:33:28 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6JLXRKD066522; Thu, 19 Jul 2018 14:33:27 -0700 (PDT) (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 w6JLXRX4066519; Thu, 19 Jul 2018 14:33:27 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807192133.w6JLXRX4066519@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: "Oleg V. Nauman" , svn-src-all@freebsd.org, src-committers , svn-src-head@freebsd.org, Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Cy Schubert of "Thu, 19 Jul 2018 14:14:36 -0700." <201807192114.w6JLEapA097589@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 14:33:27 -0700 X-CMAE-Envelope: MS4wfIHsC8v1RR9JdUmV7EMku/0hvQ6MsEoMiYchWavUxi/wg4Frcm0/YLIh/QB1KuC2gmVB/RA47vRO/IcK43Tp8TpFcbO6+ckauCpXYYBwbqOcStpMzpHz Jkq6XIXETlMtE/FlvBtPAxVk1cvVSc8DwWetz3vNimCyOmkb7wM3BCDC5MW12jSj+uP/SFYiouYe9QNu4+plk2etqkd14kg5fDNQYK6RADnyLc8+esltzTIc gXgjr75ocy07XjqF8TAbJj7L2UYesL/auHmHF8RZXnP08C8QkMPDxFzifhnIjoF7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 21:33:33 -0000 In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schubert writes: > In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" > writes: > > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: > > > In message > > il.com> > > > > > > , Kyle Evans writes: > > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > > > > > > > > wrote: > > > > > [ sending this again since I missed the list the first time, apologie > s > > > > > if > > > > > anyone receives a duplicate ] > > > > > > > > > > On 07/19/18 13:57, Kyle Evans wrote: > > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > > > > > >> > > > > >> wrote: > > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > > > > >>>> ... > > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed tha > t > > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant > > > > >>>> restart > > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from > ol > > d > > > > >>>> source and now it works stable already about 2 hours. > > > > >>> > > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ > > > > >> > > > > >> Well, "broken". It's incredibly stable outside of rekeying events, a > nd > > > > >> further testing shows that I don't actually notice these disconnects > > > > >> most of the time because it reassociates fast enough. I noticed it t > he > > > > >> first time because apparently I had both SSIDs from my AP uncommente > d > > > > >> in my wpa_supplicant.conf and it decided at that point to connect to > > > > >> the other one, which took a little longer. > > > > >> > > > > >> Contrary to Andrey's report, though, I don't have to kick > > > > >> wpa_supplicant at all. It will reassociate on its own every single > > > > >> time. > > > > > > > > > > Hi! > > > > > I have the exact same problem as Andrey, with the same driver. I've > no > > t > > > > > investigated very much, but when using the 2.8 wpa_supplicant the wif > i > > > > > network dies after a little while, and I have to restart it (usually > > > > > with > > > > > /etc/rc.d/netif restart). Then it works for a little while, before > > > > > going > > > > > down again. With the old wpa_supplicant I didn't have this problem. > > > > > > > > > > I don't have very much else to add except noting that I'm affected as > > > > > well. > > > > > I haven't had time to debug it properly (which is why I've never > > > > > reported > > > > > it) > > > > > > > > I plan on trying out the latest from upstream beyond the patch Cy sent > > > > along earlier to see if it's perhaps been addressed elsewhere in the > > > > past two years since this release was made. > > > > > > A point of reference. I've had no issues here with any of the networks > > > I use. All the networks I use are either WPA-PSK or open. The last > > > WPA-EAP I used was at former $JOB a few years ago. However, at the Link > > > Lounge just outside where $JOB is at my wifi would disconnect every 30 > > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 resolved > > > that issue. > > > > > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also looks > > > interesting. > > > > > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 > > > Author: Jouni Malinen > > > Date: Sun Oct 1 12:32:57 2017 +0300 > > > > > > Fix PTK rekeying to generate a new ANonce > > > > > > The Authenticator state machine path for PTK rekeying ended up > > > bypassing > > > the AUTHENTICATION2 state where a new ANonce is generated when going > > > directly to the PTKSTART state since there is no need to try to > > > determine the PMK again in such a case. This is far from ideal > > > since the > > > new PTK would depend on a new nonce only from the supplicant. > > > > > > Fix this by generating a new ANonce when moving to the PTKSTART > > > state > > > for the purpose of starting new 4-way handshake to rekey PTK. > > > > > > Signed-off-by: Jouni Malinen > > > > > > > > > I suspect a timeout because reason=1 in Kyle's log. > > > > > > I have two systems experienced wifi connection issues after recent HEAD > > update. > > Both of them experiencing frequent up/down wlan0 events on boot so wireles > s > > connection can not negotiate DHCP requests, possibly due to fact that both > > connecting to the same AP. > > AP capabilities list: > > > > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH WPS > > > > Interesting enough that switching wpa_supplicant to version 2.6 from ports > > fixes that issue completely. > > > > Hopefully it helps. > > > > Thank you. > > I've imported all the patches in the port, from our upline into base. > Some were already committed to > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > base 2.5 others not. This should bring base up to par with the port, > address the remaining security issues, and probably fix this thread too. exmh. I had my cursor in the wrong place when I hit send. I've imported all the patches in the port, from our upline into base. Some were already committed to base 2.5 others not. This should bring base up to par with the port, address the remaining security issues, and probably fix this thread too. -- 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-head@freebsd.org Thu Jul 19 21:58:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45A53104CA10; Thu, 19 Jul 2018 21:58: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.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 EB3207E451; Thu, 19 Jul 2018 21:58: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 C991A2F05C; Thu, 19 Jul 2018 21:58: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 w6JLw78O093518; Thu, 19 Jul 2018 21:58:07 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JLw7Rq093515; Thu, 19 Jul 2018 21:58:07 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807192158.w6JLw7Rq093515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 19 Jul 2018 21:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336519 - in head/sys: arm64/arm64 arm64/include kern X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm64/arm64 arm64/include kern X-SVN-Commit-Revision: 336519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 21:58:08 -0000 Author: manu Date: Thu Jul 19 21:58:06 2018 New Revision: 336519 URL: https://svnweb.freebsd.org/changeset/base/336519 Log: Raise the size of L3 table for early devmap on arm64 Some driver (like efifb) needs to map more than the current L2_SIZE Raise the size so we can map the framebuffer setup by the bootloader. Reviewed by: cognet Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pte.h head/sys/kern/subr_devmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu Jul 19 21:07:39 2018 (r336518) +++ head/sys/arm64/arm64/pmap.c Thu Jul 19 21:58:06 2018 (r336519) @@ -836,7 +836,7 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ freemempos = pmap_bootstrap_l2(l1pt, va, freemempos); /* And the l3 tables for the early devmap */ freemempos = pmap_bootstrap_l3(l1pt, - VM_MAX_KERNEL_ADDRESS - L2_SIZE, freemempos); + VM_MAX_KERNEL_ADDRESS - (PMAP_MAPDEV_EARLY_SIZE), freemempos); cpu_tlb_flushID(); @@ -858,7 +858,7 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ virtual_avail = preinit_map_va + PMAP_PREINIT_MAPPING_SIZE; virtual_avail = roundup2(virtual_avail, L1_SIZE); - virtual_end = VM_MAX_KERNEL_ADDRESS - L2_SIZE; + virtual_end = VM_MAX_KERNEL_ADDRESS - (PMAP_MAPDEV_EARLY_SIZE); kernel_vm_end = virtual_avail; pa = pmap_early_vtophys(l1pt, freemempos); Modified: head/sys/arm64/include/pte.h ============================================================================== --- head/sys/arm64/include/pte.h Thu Jul 19 21:07:39 2018 (r336518) +++ head/sys/arm64/include/pte.h Thu Jul 19 21:58:06 2018 (r336519) @@ -109,6 +109,8 @@ typedef uint64_t pt_entry_t; /* page table entry */ /* 0x2 also marks an invalid address */ #define L3_PAGE 0x3 +#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 4) + #define L0_ENTRIES_SHIFT 9 #define L0_ENTRIES (1 << L0_ENTRIES_SHIFT) #define L0_ADDR_MASK (L0_ENTRIES - 1) Modified: head/sys/kern/subr_devmap.c ============================================================================== --- head/sys/kern/subr_devmap.c Thu Jul 19 21:07:39 2018 (r336518) +++ head/sys/kern/subr_devmap.c Thu Jul 19 21:58:06 2018 (r336519) @@ -305,8 +305,8 @@ pmap_mapdev_attr(vm_offset_t pa, vm_size_t size, vm_me if (early_boot) { akva_devmap_vaddr = trunc_page(akva_devmap_vaddr - size); va = akva_devmap_vaddr; - KASSERT(va >= VM_MAX_KERNEL_ADDRESS - L2_SIZE, - ("Too many early devmap mappings")); + KASSERT(va >= (VM_MAX_KERNEL_ADDRESS - (PMAP_MAPDEV_EARLY_SIZE)), + ("Too many early devmap mappings 2")); } else va = kva_alloc(size); if (!va) From owner-svn-src-head@freebsd.org Thu Jul 19 21:59:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95817104CACF; Thu, 19 Jul 2018 21:59: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.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 4491C7E5D0; Thu, 19 Jul 2018 21:59:53 +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 1D5402F05D; Thu, 19 Jul 2018 21:59:53 +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 w6JLxqh0093623; Thu, 19 Jul 2018 21:59:52 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JLxqIC093622; Thu, 19 Jul 2018 21:59:52 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807192159.w6JLxqIC093622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 19 Jul 2018 21:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336520 - head/sys/arm64/conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/conf X-SVN-Commit-Revision: 336520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 21:59:53 -0000 Author: manu Date: Thu Jul 19 21:59:52 2018 New Revision: 336520 URL: https://svnweb.freebsd.org/changeset/base/336520 Log: arm64: Add vt_efifb to GENERIC We can now have efifb being setup correctly. Enjoy video output on some boards when you couldn't before. Tested-On: Pine64 Tested-On: Pine64-LTS Tested-On: Pinebook Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Thu Jul 19 21:58:06 2018 (r336519) +++ head/sys/arm64/conf/GENERIC Thu Jul 19 21:59:52 2018 (r336520) @@ -233,6 +233,8 @@ device bcm2835_spi # Broadcom BCM283x SPI bus device vt device kbdmux +device vt_efifb + # Pseudo devices. device loop # Network loopback device random # Entropy device From owner-svn-src-head@freebsd.org Thu Jul 19 22:55:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B483104F2EB for ; Thu, 19 Jul 2018 22:55:13 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 276C680B67 for ; Thu, 19 Jul 2018 22:55:13 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: ca06c539-8ba6-11e8-93fa-f3ebd9db2b94 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 outbound1.ore.mailhop.org (Halon) with ESMTPSA id ca06c539-8ba6-11e8-93fa-f3ebd9db2b94; Thu, 19 Jul 2018 22:55:11 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6JMtAhd004115; Thu, 19 Jul 2018 16:55:10 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532040910.1344.19.camel@freebsd.org> Subject: Re: svn commit: r336451 - in head/sys/dev/mlx5: . mlx5_core mlx5_en From: Ian Lepore To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 19 Jul 2018 16:55:10 -0600 In-Reply-To: <201807181012.w6IACrib086913@repo.freebsd.org> References: <201807181012.w6IACrib086913@repo.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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 22:55:13 -0000 On Wed, 2018-07-18 at 10:12 +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jul 18 10:12:53 2018 > New Revision: 336451 > URL: https://svnweb.freebsd.org/changeset/base/336451 > > Log: >   Update version information for the mlx5 and mlx5en(4) modules. >    >   While at it bump some copyright dates. >    >   MFC after: 1 week >   Sponsored by: Mellanox Technologies After this recent set of commits, the sparc64, powerpc64, and armv4 LINT kernels are failing to build. The problems are all some combo of missing fcmpset functions, or missing 64-bit atomic functions. I'm not sure this driver is useful on any of those platforms, but I guess it has always built fine in the past. -- Ian From owner-svn-src-head@freebsd.org Thu Jul 19 23:21:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 665CB10506C2; Thu, 19 Jul 2018 23:21:40 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 180A981995; Thu, 19 Jul 2018 23:21:40 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id A884AA0D3; Thu, 19 Jul 2018 23:21:39 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f182.google.com with SMTP id l15-v6so9590516lji.6; Thu, 19 Jul 2018 16:21:39 -0700 (PDT) X-Gm-Message-State: AOUpUlG1d7Z6rZ42eupO1xIrVtk9ArUPvXCpkIIO4SFLT/NUyNs3xcZq kTds+aInTnb8Zq5AwVOdg8Ue1kD2W0VDjV2gQuc= X-Google-Smtp-Source: AAOMgpfQ4X6Jhe7WLgax6H+Grz0/xP/GQJJpRc9Y7YWdNFy2r9sA68aLXS78CGye0FiyjHiHkiVhp5hbUOpJZTItUP0= X-Received: by 2002:a2e:498:: with SMTP id a24-v6mr9473567ljf.27.1532042498103; Thu, 19 Jul 2018 16:21:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 16:21:17 -0700 (PDT) In-Reply-To: <201807192133.w6JLXRX4066519@slippy.cwsent.com> References: <201807192114.w6JLEapA097589@slippy.cwsent.com> <201807192133.w6JLXRX4066519@slippy.cwsent.com> From: Kyle Evans Date: Thu, 19 Jul 2018 18:21:17 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Cy Schubert Cc: "Oleg V. Nauman" , svn-src-all@freebsd.org, src-committers , svn-src-head@freebsd.org, Cy Schubert Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 23:21:40 -0000 On Thu, Jul 19, 2018 at 4:33 PM, Cy Schubert wrote: > In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schubert > writes: >> In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" >> writes: >> > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: >> > > In message > > > il.com> >> > > >> > > , Kyle Evans writes: >> > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising >> > > > >> > > > wrote: >> > > > > [ sending this again since I missed the list the first time, apologie >> s >> > > > > if >> > > > > anyone receives a duplicate ] >> > > > > >> > > > > On 07/19/18 13:57, Kyle Evans wrote: >> > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > > >> > > > >> >> > > > >> wrote: >> > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >> > > > >>>> ... >> > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed tha >> t >> > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant >> > > > >>>> restart >> > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from >> ol >> > d >> > > > >>>> source and now it works stable already about 2 hours. >> > > > >>> >> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ >> > > > >> >> > > > >> Well, "broken". It's incredibly stable outside of rekeying events, a >> nd >> > > > >> further testing shows that I don't actually notice these disconnects >> > > > >> most of the time because it reassociates fast enough. I noticed it t >> he >> > > > >> first time because apparently I had both SSIDs from my AP uncommente >> d >> > > > >> in my wpa_supplicant.conf and it decided at that point to connect to >> > > > >> the other one, which took a little longer. >> > > > >> >> > > > >> Contrary to Andrey's report, though, I don't have to kick >> > > > >> wpa_supplicant at all. It will reassociate on its own every single >> > > > >> time. >> > > > > >> > > > > Hi! >> > > > > I have the exact same problem as Andrey, with the same driver. I've >> no >> > t >> > > > > investigated very much, but when using the 2.8 wpa_supplicant the wif >> i >> > > > > network dies after a little while, and I have to restart it (usually >> > > > > with >> > > > > /etc/rc.d/netif restart). Then it works for a little while, before >> > > > > going >> > > > > down again. With the old wpa_supplicant I didn't have this problem. >> > > > > >> > > > > I don't have very much else to add except noting that I'm affected as >> > > > > well. >> > > > > I haven't had time to debug it properly (which is why I've never >> > > > > reported >> > > > > it) >> > > > >> > > > I plan on trying out the latest from upstream beyond the patch Cy sent >> > > > along earlier to see if it's perhaps been addressed elsewhere in the >> > > > past two years since this release was made. >> > > >> > > A point of reference. I've had no issues here with any of the networks >> > > I use. All the networks I use are either WPA-PSK or open. The last >> > > WPA-EAP I used was at former $JOB a few years ago. However, at the Link >> > > Lounge just outside where $JOB is at my wifi would disconnect every 30 >> > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 resolved >> > > that issue. >> > > >> > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also looks >> > > interesting. >> > > >> > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 >> > > Author: Jouni Malinen >> > > Date: Sun Oct 1 12:32:57 2017 +0300 >> > > >> > > Fix PTK rekeying to generate a new ANonce >> > > >> > > The Authenticator state machine path for PTK rekeying ended up >> > > bypassing >> > > the AUTHENTICATION2 state where a new ANonce is generated when going >> > > directly to the PTKSTART state since there is no need to try to >> > > determine the PMK again in such a case. This is far from ideal >> > > since the >> > > new PTK would depend on a new nonce only from the supplicant. >> > > >> > > Fix this by generating a new ANonce when moving to the PTKSTART >> > > state >> > > for the purpose of starting new 4-way handshake to rekey PTK. >> > > >> > > Signed-off-by: Jouni Malinen >> > > >> > > >> > > I suspect a timeout because reason=1 in Kyle's log. >> > >> > >> > I have two systems experienced wifi connection issues after recent HEAD >> > update. >> > Both of them experiencing frequent up/down wlan0 events on boot so wireles >> s >> > connection can not negotiate DHCP requests, possibly due to fact that both >> > connecting to the same AP. >> > AP capabilities list: >> > >> > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH WPS >> > >> > Interesting enough that switching wpa_supplicant to version 2.6 from ports >> > fixes that issue completely. >> > >> > Hopefully it helps. >> > >> > Thank you. >> >> I've imported all the patches in the port, from our upline into base. >> Some were already committed to >> -- >> Cheers, >> Cy Schubert >> FreeBSD UNIX: Web: http://www.FreeBSD.org >> >> The need of the many outweighs the greed of the few. >> base 2.5 others not. This should bring base up to par with the port, >> address the remaining security issues, and probably fix this thread too. > > exmh. I had my cursor in the wrong place when I hit send. > > I've imported all the patches in the port, from our upline into base. > Some were already committed to base 2.5 others not. This should bring > base up to par with the port, address the remaining security issues, > and probably fix this thread too. > FWIW- with ports 2.6 I've confirmed that instead of the reassociation I get: Jul 19 18:17:30 shiva wpa_supplicant[34199]: wlan0: WPA: Group rekeying completed with ... [GTK=CCMP] I'll try with base 2.6 now that you've updated with all of these patches. From owner-svn-src-head@freebsd.org Thu Jul 19 23:49:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85B791051022; Thu, 19 Jul 2018 23:49:11 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E69CE823FE; Thu, 19 Jul 2018 23:49:10 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf1-f49.google.com with SMTP id a4-v6so545523lff.5; Thu, 19 Jul 2018 16:49:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3lVsAqxlOsrWWvPbIoyplYOpoYnk9J8pHqJt9mV+OoE=; b=RxiTt60VnHfb1XptOtBMqdQgDEEqAijXQyYwPgI9bJpRY/1wPWlNfAsGeu/ChHGcit rpkdp2m9DKLIeccVYl6FnGplX83NV2dUZsEauI0DUIBOrfnSWl8KOkWtjr6lKJOBVp8f 7DZtIX/LHu7mXVaYL4jTt2yku4g/yC1WndXsO0GjZYFgczG88kAo6jCEthQCC9F1afio eXEpGQRfLPYeAWeZzXaSalsE/kTPhKJeMqYXh8mq2Dwe2X4HlCTKDAXsfojMO9FJj+U4 DRHgm2BlmVTrunyzaFRB3Ft9gge7Iy8ybmi2W57yGyoedWFhIuGjt6j6/SV9B7VoakYg WRtg== X-Gm-Message-State: AOUpUlGv/hhFQOmxfkEz4NdKxt9vkbWmed9xr+3U6GoKwlBrm+Bj0kg+ wbT6hczeemjW+Gds0oulRw2xEyyhtgUIHtloBkCLckUI X-Google-Smtp-Source: AAOMgpduHXenzwydJrCnjkfVtHrhLkk/WYTKbd19uEJ3uCzWqWjmuo0Hsy2Famjs+zdXXldoHaQHuY+WnrTexJjrK0Y= X-Received: by 2002:a19:ebd7:: with SMTP id f84-v6mr7326569lfk.18.1532033102488; Thu, 19 Jul 2018 13:45:02 -0700 (PDT) MIME-Version: 1.0 References: <201807192022.w6JKMkE6044331@repo.freebsd.org> <72e23592-9ff2-b373-f8cc-755c358989f5@freebsd.org> In-Reply-To: <72e23592-9ff2-b373-f8cc-755c358989f5@freebsd.org> From: Justin Hibbits Date: Thu, 19 Jul 2018 15:44:49 -0500 Message-ID: Subject: Re: svn commit: r336514 - head/sys/dev/vt/hw/ofwfb To: Nathan Whitehorn Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 23:49:11 -0000 You're right. I'm an idiot. I compiled but didn't try booting. Fixing it after I fix the build. - Justin On Thu, Jul 19, 2018 at 3:37 PM Nathan Whitehorn wrote: > > Isn't stdout-path supposed to contain a string rather than an ihandle? > This code assumes it is an ihandle (or xref phandle), which I think is > wrong. > -Nathan > > On 07/19/18 13:22, Justin Hibbits wrote: > > Author: jhibbits > > Date: Thu Jul 19 20:22:46 2018 > > New Revision: 336514 > > URL: https://svnweb.freebsd.org/changeset/base/336514 > > > > Log: > > ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout > > > > Some platforms use /chosen/stdout-path as the property containing the path to > > the stdout node, not /chosen/stdout. > > > > Modified: > > head/sys/dev/vt/hw/ofwfb/ofwfb.c > > > > Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c > > ============================================================================== > > --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:20:43 2018 (r336513) > > +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Jul 19 20:22:46 2018 (r336514) > > @@ -102,6 +102,10 @@ ofwfb_probe(struct vt_device *vd) > > if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == > > sizeof(stdout)) > > node = OF_instance_to_package(stdout); > > + if (node == -1) > > + if (OF_getprop(chosen, "stdout-path", &stdout, sizeof(stdout)) == > > + sizeof(stdout)) > > + node = OF_instance_to_package(stdout); > > if (node == -1) { > > /* > > * The "/chosen/stdout" does not exist try > > > From owner-svn-src-head@freebsd.org Thu Jul 19 23:54:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 482251051314; Thu, 19 Jul 2018 23:54:19 +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 E4DCB8284F; Thu, 19 Jul 2018 23:54:18 +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 C2D1C3EE; Thu, 19 Jul 2018 23:54:18 +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 w6JNsIqG054502; Thu, 19 Jul 2018 23:54:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JNsI64054501; Thu, 19 Jul 2018 23:54:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807192354.w6JNsI64054501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 19 Jul 2018 23:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336524 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 23:54:19 -0000 Author: imp Date: Thu Jul 19 23:54:18 2018 New Revision: 336524 URL: https://svnweb.freebsd.org/changeset/base/336524 Log: Note big endian arm removal. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jul 19 22:53:23 2018 (r336523) +++ head/UPDATING Thu Jul 19 23:54:18 2018 (r336524) @@ -31,6 +31,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20180717: + Big endian arm support has been removed. + 20180711: The static environment setup in kernel configs is no longer mutually exclusive with the loader(8) environment by default. In order to From owner-svn-src-head@freebsd.org Thu Jul 19 23:55:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85D5310513AF; Thu, 19 Jul 2018 23:55:32 +0000 (UTC) (envelope-from ian@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 34506829B4; Thu, 19 Jul 2018 23:55:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 153EB3EF; Thu, 19 Jul 2018 23:55:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JNtVKe054658; Thu, 19 Jul 2018 23:55:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JNtTqc054644; Thu, 19 Jul 2018 23:55:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807192355.w6JNtTqc054644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 19 Jul 2018 23:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336525 - in head: contrib/ntp/ntpd etc etc/mtree share/man/man4 sys/conf sys/modules sys/modules/mac_ntpd sys/security/mac_ntpd usr.sbin/ntp X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head: contrib/ntp/ntpd etc etc/mtree share/man/man4 sys/conf sys/modules sys/modules/mac_ntpd sys/security/mac_ntpd usr.sbin/ntp X-SVN-Commit-Revision: 336525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 23:55:32 -0000 Author: ian Date: Thu Jul 19 23:55:29 2018 New Revision: 336525 URL: https://svnweb.freebsd.org/changeset/base/336525 Log: Make it possible to run ntpd as a non-root user, add ntpd uid and gid. Code analysis and runtime analysis using truss(8) indicate that the only privileged operations performed by ntpd are adjusting system time, and (re-)binding to privileged UDP port 123. These changes add a new mac(4) policy module, mac_ntpd(4), which grants just those privileges to any process running with uid 123. This also adds a new user and group, ntpd:ntpd, (uid:gid 123:123), and makes them the owner of the /var/db/ntp directory, so that it can be used as a location where the non-privileged daemon can write files such as the driftfile, and any optional logfile or stats files. Because there are so many ways to configure ntpd, the question of how to configure it to run without root privs can be a bit complex, so that will be addressed in a separate commit. These changes are just what's required to grant the limited subset of privs to ntpd, and the small change to ntpd to prevent it from exiting with an error if running as non-root. Differential Revision: https://reviews.freebsd.org/D16281 Added: head/share/man/man4/mac_ntpd.4 (contents, props changed) head/sys/modules/mac_ntpd/ head/sys/modules/mac_ntpd/Makefile (contents, props changed) head/sys/security/mac_ntpd/ head/sys/security/mac_ntpd/mac_ntpd.c (contents, props changed) Modified: head/contrib/ntp/ntpd/ntpd.c head/etc/group head/etc/master.passwd head/etc/mtree/BSD.var.dist head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile head/usr.sbin/ntp/config.h Modified: head/contrib/ntp/ntpd/ntpd.c ============================================================================== --- head/contrib/ntp/ntpd/ntpd.c Thu Jul 19 23:54:18 2018 (r336524) +++ head/contrib/ntp/ntpd/ntpd.c Thu Jul 19 23:55:29 2018 (r336525) @@ -123,6 +123,9 @@ #if defined(HAVE_PRIV_H) && defined(HAVE_SOLARIS_PRIVS) # include #endif /* HAVE_PRIV_H */ +#if defined(HAVE_TRUSTEDBSD_MAC) +# include +#endif /* HAVE_TRUSTEDBSD_MAC */ #endif /* HAVE_DROPROOT */ #if defined (LIBSECCOMP) && (KERN_SECCOMP) @@ -634,7 +637,12 @@ ntpdmain( /* MPE lacks the concept of root */ # if defined(HAVE_GETUID) && !defined(MPE) uid = getuid(); - if (uid && !HAVE_OPT( SAVECONFIGQUIT )) { + if (uid && !HAVE_OPT( SAVECONFIGQUIT ) +# if defined(HAVE_TRUSTEDBSD_MAC) + /* We can run as non-root if the mac_ntpd policy is enabled. */ + && mac_is_present("ntpd") != 1 +# endif + ) { msyslog_term = TRUE; msyslog(LOG_ERR, "must be run as root, not uid %ld", (long)uid); @@ -1082,7 +1090,17 @@ getgroup: exit (-1); } -# if !defined(HAVE_LINUX_CAPABILITIES) && !defined(HAVE_SOLARIS_PRIVS) +# if defined(HAVE_TRUSTEDBSD_MAC) + /* + * To manipulate system time and (re-)bind to NTP_PORT as needed + * following interface changes, we must either run as uid 0 or + * the mac_ntpd policy module must be enabled. + */ + if (sw_uid != 0 && mac_is_present("ntpd") != 1) { + msyslog(LOG_ERR, "Need MAC 'ntpd' policy enabled to drop root privileges"); + exit (-1); + } +# elif !defined(HAVE_LINUX_CAPABILITIES) && !defined(HAVE_SOLARIS_PRIVS) /* * for now assume that the privilege to bind to privileged ports * is associated with running with uid 0 - should be refined on Modified: head/etc/group ============================================================================== --- head/etc/group Thu Jul 19 23:54:18 2018 (r336524) +++ head/etc/group Thu Jul 19 23:55:29 2018 (r336525) @@ -29,6 +29,7 @@ dialer:*:68: network:*:69: audit:*:77: www:*:80: +ntpd:*:123: _ypldap:*:160: hast:*:845: nogroup:*:65533: Modified: head/etc/master.passwd ============================================================================== --- head/etc/master.passwd Thu Jul 19 23:54:18 2018 (r336524) +++ head/etc/master.passwd Thu Jul 19 23:55:29 2018 (r336525) @@ -22,6 +22,7 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppubl pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +ntpd:*:123:123::0:0:NTP Daemon:/var/db/ntp:/usr/sbin/nologin _ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/nologin hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Thu Jul 19 23:54:18 2018 (r336524) +++ head/etc/mtree/BSD.var.dist Thu Jul 19 23:55:29 2018 (r336525) @@ -46,7 +46,7 @@ .. ipf mode=0700 .. - ntp mode=0700 + ntp uname=ntpd gname=ntpd .. pkg .. Added: head/share/man/man4/mac_ntpd.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/mac_ntpd.4 Thu Jul 19 23:55:29 2018 (r336525) @@ -0,0 +1,116 @@ +.\" Copyright (c) 2018 Ian Lepore +.\" +.\" 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 AUTHORS 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 AUTHORS 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 June 28, 2018 +.Dt MAC_NTPD 4 +.Os +.Sh NAME +.Nm mac_ntpd +.Nd "policy allowing ntpd to run as non-root user" +.Sh SYNOPSIS +To compile the ntpd policy into your kernel, place the following lines +in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Cd "options MAC_NTPD" +.Ed +.Pp +Alternately, to load the ntpd policy module at boot time, +place the following line in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Ed +.Pp +and in +.Xr loader.conf 5 : +.Pp +.Dl "mac_ntpd_load=""YES""" +.Sh DESCRIPTION +The +.Nm +policy grants any process running as user +.Sq ntpd +(uid 123) the privileges needed to manipulate +system time, and to (re-)bind to the privileged NTP port. +.Pp +When +.Xr ntpd 8 +is started with +.Sq -u\ +on the command line, it performs all initializations requiring root +privileges, then drops root privileges by switching to the given user id. +From that point on, the only privileges it requires are the ability +to manipulate system time, and the ability to re-bind a UDP socket +to the NTP port (port 123) after a network interface change. +By default, +.Fx +starts +.Xr ntpd 8 +with +.Sq -u\ ntpd:ntpd +on the command line, if the mac_ntpd policy is available to grant +the required privileges. +.Pp +.Ss Privileges Granted +The exact set of kernel privileges granted to any process running +with the configured uid is: +.Bl -inset -compact -offset indent +.It PRIV_ADJTIME +.It PRIV_CLOCK_SETTIME +.It PRIV_NTP_ADJTIME +.It PRIV_NETINET_RESERVEDPORT +.It PRIV_NETINET_REUSEPORT +.El +.Pp +.Ss Runtime Configuration +The following +.Xr sysctl 8 +MIBs are available for fine-tuning this MAC policy. +All +.Xr sysctl 8 +variables can also be set as +.Xr loader 8 +tunables in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va security.mac.ntpd.enabled +Enable the +.Nm +policy. +(Default: 1). +.It Va security.mac.ntpd.uid +The numeric uid of the ntpd user. +(Default: 123). +.El +.Sh SEE ALSO +.Xr mac 4 , +.Xr ntpd 8 +.Sh HISTORY +MAC first appeared in +.Fx 5.0 +and +.Nm +first appeared in +.Fx 12.0 . Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Jul 19 23:54:18 2018 (r336524) +++ head/sys/conf/NOTES Thu Jul 19 23:55:29 2018 (r336525) @@ -1193,6 +1193,7 @@ options MAC_IFOFF options MAC_LOMAC options MAC_MLS options MAC_NONE +options MAC_NTPD options MAC_PARTITION options MAC_PORTACL options MAC_SEEOTHERUIDS Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jul 19 23:54:18 2018 (r336524) +++ head/sys/conf/files Thu Jul 19 23:55:29 2018 (r336525) @@ -4887,6 +4887,7 @@ security/mac_ifoff/mac_ifoff.c optional mac_ifoff security/mac_lomac/mac_lomac.c optional mac_lomac security/mac_mls/mac_mls.c optional mac_mls security/mac_none/mac_none.c optional mac_none +security/mac_ntpd/mac_ntpd.c optional mac_ntpd security/mac_partition/mac_partition.c optional mac_partition security/mac_portacl/mac_portacl.c optional mac_portacl security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Jul 19 23:54:18 2018 (r336524) +++ head/sys/conf/options Thu Jul 19 23:55:29 2018 (r336525) @@ -158,6 +158,7 @@ MAC_IFOFF opt_dontuse.h MAC_LOMAC opt_dontuse.h MAC_MLS opt_dontuse.h MAC_NONE opt_dontuse.h +MAC_NTPD opt_dontuse.h MAC_PARTITION opt_dontuse.h MAC_PORTACL opt_dontuse.h MAC_SEEOTHERUIDS opt_dontuse.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Jul 19 23:54:18 2018 (r336524) +++ head/sys/modules/Makefile Thu Jul 19 23:55:29 2018 (r336525) @@ -230,6 +230,7 @@ SUBDIR= \ mac_lomac \ mac_mls \ mac_none \ + mac_ntpd \ mac_partition \ mac_portacl \ mac_seeotheruids \ Added: head/sys/modules/mac_ntpd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/mac_ntpd/Makefile Thu Jul 19 23:55:29 2018 (r336525) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/security/mac_ntpd + +KMOD= mac_ntpd +SRCS= mac_ntpd.c + +.include Added: head/sys/security/mac_ntpd/mac_ntpd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/security/mac_ntpd/mac_ntpd.c Thu Jul 19 23:55:29 2018 (r336525) @@ -0,0 +1,77 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2018 Ian Lepore + * + * 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 +#include +#include +#include +#include +#include + +#include + +SYSCTL_DECL(_security_mac); + +static SYSCTL_NODE(_security_mac, OID_AUTO, ntpd, CTLFLAG_RW, 0, + "mac_ntpd policy controls"); + +static int ntpd_enabled = 1; +SYSCTL_INT(_security_mac_ntpd, OID_AUTO, enabled, CTLFLAG_RWTUN, + &ntpd_enabled, 0, "Enable mac_ntpd policy"); + +static int ntpd_uid = 123; +SYSCTL_INT(_security_mac_ntpd, OID_AUTO, uid, CTLFLAG_RWTUN, + &ntpd_uid, 0, "User id for ntpd user"); + +static int +ntpd_priv_grant(struct ucred *cred, int priv) +{ + + if (ntpd_enabled && cred->cr_uid == ntpd_uid) { + switch (priv) { + case PRIV_ADJTIME: + case PRIV_CLOCK_SETTIME: + case PRIV_NTP_ADJTIME: + case PRIV_NETINET_RESERVEDPORT: + case PRIV_NETINET_REUSEPORT: + return (0); + default: + break; + } + } + return (EPERM); +} + +static struct mac_policy_ops ntpd_ops = +{ + .mpo_priv_grant = ntpd_priv_grant, +}; + +MAC_POLICY_SET(&ntpd_ops, mac_ntpd, "MAC/ntpd", + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Thu Jul 19 23:54:18 2018 (r336524) +++ head/usr.sbin/ntp/config.h Thu Jul 19 23:55:29 2018 (r336525) @@ -392,7 +392,7 @@ /* #undef HAVE_DOPRNT */ /* Can we drop root privileges? */ -/* #undef HAVE_DROPROOT */ +#define HAVE_DROPROOT /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 @@ -1118,6 +1118,9 @@ /* Do we have the TIO serial stuff? */ /* #undef HAVE_TIO_SERIAL_STUFF */ + +/* Are TrustedBSD MAC policy privileges available? */ +#define HAVE_TRUSTEDBSD_MAC 1 /* Define to 1 if the system has the type `uint16_t'. */ #define HAVE_UINT16_T 1 From owner-svn-src-head@freebsd.org Fri Jul 20 00:25:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08D451051F0E for ; Fri, 20 Jul 2018 00:25:09 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA337835FB for ; Fri, 20 Jul 2018 00:25:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 3E354A6FD for ; Fri, 20 Jul 2018 00:25:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f176.google.com with SMTP id p10-v6so9675632ljg.2 for ; Thu, 19 Jul 2018 17:25:08 -0700 (PDT) X-Gm-Message-State: AOUpUlFnSuOjL4tt7g3TMuqM1CIGf1JdxefC4rbvnvCiip0DoJI38hQV zLRCjWXnQxxTX1/bzPtufJMXdWJz9LdR37Z+H3U= X-Received: by 2002:a2e:144f:: with SMTP id 15-v6mt10587862lju.122.1532046306711; Thu, 19 Jul 2018 17:25:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 17:24:46 -0700 (PDT) In-Reply-To: References: <201807192114.w6JLEapA097589@slippy.cwsent.com> <201807192133.w6JLXRX4066519@slippy.cwsent.com> From: Kyle Evans Date: Thu, 19 Jul 2018 19:24:46 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... Cc: Cy Schubert , "Oleg V. Nauman" , svn-src-all@freebsd.org, src-committers , svn-src-head@freebsd.org, Cy Schubert Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 00:25:09 -0000 On Thu, Jul 19, 2018 at 6:21 PM, Kyle Evans wrote: > On Thu, Jul 19, 2018 at 4:33 PM, Cy Schubert wrote: >> In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schubert >> writes: >>> In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" >>> writes: >>> > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: >>> > > In message >> > > il.com> >>> > > >>> > > , Kyle Evans writes: >>> > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising >>> > > > >>> > > > wrote: >>> > > > > [ sending this again since I missed the list the first time, apologie >>> s >>> > > > > if >>> > > > > anyone receives a duplicate ] >>> > > > > >>> > > > > On 07/19/18 13:57, Kyle Evans wrote: >>> > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev >> > >>> > > > >> >>> > > > >> wrote: >>> > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >>> > > > >>>> ... >>> > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed tha >>> t >>> > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant >>> > > > >>>> restart >>> > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from >>> ol >>> > d >>> > > > >>>> source and now it works stable already about 2 hours. >>> > > > >>> >>> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ >>> > > > >> >>> > > > >> Well, "broken". It's incredibly stable outside of rekeying events, a >>> nd >>> > > > >> further testing shows that I don't actually notice these disconnects >>> > > > >> most of the time because it reassociates fast enough. I noticed it t >>> he >>> > > > >> first time because apparently I had both SSIDs from my AP uncommente >>> d >>> > > > >> in my wpa_supplicant.conf and it decided at that point to connect to >>> > > > >> the other one, which took a little longer. >>> > > > >> >>> > > > >> Contrary to Andrey's report, though, I don't have to kick >>> > > > >> wpa_supplicant at all. It will reassociate on its own every single >>> > > > >> time. >>> > > > > >>> > > > > Hi! >>> > > > > I have the exact same problem as Andrey, with the same driver. I've >>> no >>> > t >>> > > > > investigated very much, but when using the 2.8 wpa_supplicant the wif >>> i >>> > > > > network dies after a little while, and I have to restart it (usually >>> > > > > with >>> > > > > /etc/rc.d/netif restart). Then it works for a little while, before >>> > > > > going >>> > > > > down again. With the old wpa_supplicant I didn't have this problem. >>> > > > > >>> > > > > I don't have very much else to add except noting that I'm affected as >>> > > > > well. >>> > > > > I haven't had time to debug it properly (which is why I've never >>> > > > > reported >>> > > > > it) >>> > > > >>> > > > I plan on trying out the latest from upstream beyond the patch Cy sent >>> > > > along earlier to see if it's perhaps been addressed elsewhere in the >>> > > > past two years since this release was made. >>> > > >>> > > A point of reference. I've had no issues here with any of the networks >>> > > I use. All the networks I use are either WPA-PSK or open. The last >>> > > WPA-EAP I used was at former $JOB a few years ago. However, at the Link >>> > > Lounge just outside where $JOB is at my wifi would disconnect every 30 >>> > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 resolved >>> > > that issue. >>> > > >>> > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also looks >>> > > interesting. >>> > > >>> > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 >>> > > Author: Jouni Malinen >>> > > Date: Sun Oct 1 12:32:57 2017 +0300 >>> > > >>> > > Fix PTK rekeying to generate a new ANonce >>> > > >>> > > The Authenticator state machine path for PTK rekeying ended up >>> > > bypassing >>> > > the AUTHENTICATION2 state where a new ANonce is generated when going >>> > > directly to the PTKSTART state since there is no need to try to >>> > > determine the PMK again in such a case. This is far from ideal >>> > > since the >>> > > new PTK would depend on a new nonce only from the supplicant. >>> > > >>> > > Fix this by generating a new ANonce when moving to the PTKSTART >>> > > state >>> > > for the purpose of starting new 4-way handshake to rekey PTK. >>> > > >>> > > Signed-off-by: Jouni Malinen >>> > > >>> > > >>> > > I suspect a timeout because reason=1 in Kyle's log. >>> > >>> > >>> > I have two systems experienced wifi connection issues after recent HEAD >>> > update. >>> > Both of them experiencing frequent up/down wlan0 events on boot so wireles >>> s >>> > connection can not negotiate DHCP requests, possibly due to fact that both >>> > connecting to the same AP. >>> > AP capabilities list: >>> > >>> > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH WPS >>> > >>> > Interesting enough that switching wpa_supplicant to version 2.6 from ports >>> > fixes that issue completely. >>> > >>> > Hopefully it helps. >>> > >>> > Thank you. >>> >>> I've imported all the patches in the port, from our upline into base. >>> Some were already committed to >>> -- >>> Cheers, >>> Cy Schubert >>> FreeBSD UNIX: Web: http://www.FreeBSD.org >>> >>> The need of the many outweighs the greed of the few. >>> base 2.5 others not. This should bring base up to par with the port, >>> address the remaining security issues, and probably fix this thread too. >> >> exmh. I had my cursor in the wrong place when I hit send. >> >> I've imported all the patches in the port, from our upline into base. >> Some were already committed to base 2.5 others not. This should bring >> base up to par with the port, address the remaining security issues, >> and probably fix this thread too. >> > > FWIW- with ports 2.6 I've confirmed that instead of the reassociation I get: > > Jul 19 18:17:30 shiva wpa_supplicant[34199]: wlan0: WPA: Group > rekeying completed with ... [GTK=CCMP] > > I'll try with base 2.6 now that you've updated with all of these patches. Alright, base 2.6 is still no good here. I note that there's still some diff between ports and base [1] (about 252 lines of diff to sort through, nothing serious... I removed the obviously-for-libressl diff). Some of it looks kind of suspicious, but I'd guess the changes in ./src/rsn_supp/wpa.c are mostly what make the difference for me. How much of this really needs to stick around, given that ports wpa_supplicant is actually pretty stable? [1] https://people.freebsd.org/~kevans/wpa.diff From owner-svn-src-head@freebsd.org Fri Jul 20 00:33:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D55EE1052412 for ; Fri, 20 Jul 2018 00:33:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yb0-x241.google.com (mail-yb0-x241.google.com [IPv6:2607:f8b0:4002:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70BE783BF5 for ; Fri, 20 Jul 2018 00:33:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yb0-x241.google.com with SMTP id i9-v6so4010235ybo.5 for ; Thu, 19 Jul 2018 17:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2fm/hqVdhK7TFH8gy8k5ljOFQv8fJI2stKf+nvLIxjY=; b=WF8ydBDtlLqSPTj5hWUxby6CJa7t4cEtemmK7HaURkHgay1LPlnQAhm6Z9SbAiQU0N vPJrzVvJE3ZlzE6IUZD/VF3NCsGQIWzJbr3Ddp6zg5XPr6afL9z3yeErF2G7/+t1pvaN iayFQfahWsufEEymshNtj7FRqgGwP0KtaO20zf2VFqXe3TsgfZYZGKKNOFbS8khq4d85 Knm2EWKG7WRn6EdSRbsVacR6HZUfRnvGLKpIVdt3NxYUkXQTYYfCiTYVEXoqhj5XOPDq DtpQoLdB4GFSYjgpo/oRH5yF+3a0sDw8A/sfAbfbL7BqE+NlauATlYVOesXwo4EC98R+ 2Atw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2fm/hqVdhK7TFH8gy8k5ljOFQv8fJI2stKf+nvLIxjY=; b=DM/3bmSpxTiIXnNhDWeZ3jG1aIKFCvjPWh/zSHErCavCrfzr/nKXeccl8eWPyZzc4u 2DyQEporaFoXyBdS3V93geLZhW7l6TXBAlULlWRtDYZtJs/ewPrlS5ISPK2cjtjLxWMw Z0Ffu5HdyuhG0EQ626d93PirbFYIMFAxqycZcEXHd6Fv3v3/7BhqtE44/ed1x99Kj/3o O724YkS3HYeFAAA1nkq4w1wDrIjZCQtRj+UgPnCPcQW//lWWbRx39aaoqGz4GCgjI0Qm xs0K5E6BsSnnbyynkKR7AT3bkg7V5sAUh7wi03fZU+55Xl4SW6510KfkVANbz+7hWcTI /3ew== X-Gm-Message-State: AOUpUlEzrWpAqYpEyaIXNGZzbwSENGJk95UdketcoJekEa3HQhs+Y9Nz WTwz10o3RVO6/is9cv3rd/20Iw== X-Google-Smtp-Source: AAOMgpeiMq7KZfjQt8gyaUY0/JlaYQIImAXpGM+QJbDzzySv3tJkt6cCNU98jizBqqG5T1+XGK7V/A== X-Received: by 2002:a25:b225:: with SMTP id i37-v6mr6800145ybj.195.1532046815580; Thu, 19 Jul 2018 17:33:35 -0700 (PDT) Received: from mutt-hbsd (shuri.billingeenvo.p5.tiktalik.io. [37.233.102.65]) by smtp.gmail.com with ESMTPSA id z125-v6sm1120717ywg.57.2018.07.19.17.33.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 17:33:34 -0700 (PDT) Date: Thu, 19 Jul 2018 20:32:55 -0400 From: Shawn Webb To: Kyle Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Cy Schubert , "Oleg V. Nauman" , Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... Message-ID: <20180720003255.6dglwhbrnyewowdh@mutt-hbsd> References: <201807192114.w6JLEapA097589@slippy.cwsent.com> <201807192133.w6JLXRX4066519@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bvk5gnc4ixttbtgj" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180622 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 00:33:37 -0000 --bvk5gnc4ixttbtgj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 19, 2018 at 07:24:46PM -0500, Kyle Evans wrote: > On Thu, Jul 19, 2018 at 6:21 PM, Kyle Evans wrote: > > On Thu, Jul 19, 2018 at 4:33 PM, Cy Schubert wrote: > >> In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schubert > >> writes: > >>> In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" > >>> writes: > >>> > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: > >>> > > In message >>> > > il.com> > >>> > > > >>> > > , Kyle Evans writes: > >>> > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > >>> > > > > >>> > > > wrote: > >>> > > > > [ sending this again since I missed the list the first time, = apologie > >>> s > >>> > > > > if > >>> > > > > anyone receives a duplicate ] > >>> > > > > > >>> > > > > On 07/19/18 13:57, Kyle Evans wrote: > >>> > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev >>> > > >>> > > > >> > >>> > > > >> wrote: > >>> > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov= wrote: > >>> > > > >>>> ... > >>> > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also not= iced tha > >>> t > >>> > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_suppli= cant > >>> > > > >>>> restart > >>> > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplica= nt from > >>> ol > >>> > d > >>> > > > >>>> source and now it works stable already about 2 hours. > >>> > > > >>> > >>> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT= ? :-/ > >>> > > > >> > >>> > > > >> Well, "broken". It's incredibly stable outside of rekeying e= vents, a > >>> nd > >>> > > > >> further testing shows that I don't actually notice these dis= connects > >>> > > > >> most of the time because it reassociates fast enough. I noti= ced it t > >>> he > >>> > > > >> first time because apparently I had both SSIDs from my AP un= commente > >>> d > >>> > > > >> in my wpa_supplicant.conf and it decided at that point to co= nnect to > >>> > > > >> the other one, which took a little longer. > >>> > > > >> > >>> > > > >> Contrary to Andrey's report, though, I don't have to kick > >>> > > > >> wpa_supplicant at all. It will reassociate on its own every = single > >>> > > > >> time. > >>> > > > > > >>> > > > > Hi! > >>> > > > > I have the exact same problem as Andrey, with the same driver= =2E I've > >>> no > >>> > t > >>> > > > > investigated very much, but when using the 2.8 wpa_supplicant= the wif > >>> i > >>> > > > > network dies after a little while, and I have to restart it (= usually > >>> > > > > with > >>> > > > > /etc/rc.d/netif restart). Then it works for a little while, = before > >>> > > > > going > >>> > > > > down again. With the old wpa_supplicant I didn't have this p= roblem. > >>> > > > > > >>> > > > > I don't have very much else to add except noting that I'm aff= ected as > >>> > > > > well. > >>> > > > > I haven't had time to debug it properly (which is why I've ne= ver > >>> > > > > reported > >>> > > > > it) > >>> > > > > >>> > > > I plan on trying out the latest from upstream beyond the patch = Cy sent > >>> > > > along earlier to see if it's perhaps been addressed elsewhere i= n the > >>> > > > past two years since this release was made. > >>> > > > >>> > > A point of reference. I've had no issues here with any of the net= works > >>> > > I use. All the networks I use are either WPA-PSK or open. The last > >>> > > WPA-EAP I used was at former $JOB a few years ago. However, at th= e Link > >>> > > Lounge just outside where $JOB is at my wifi would disconnect eve= ry 30 > >>> > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 res= olved > >>> > > that issue. > >>> > > > >>> > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also l= ooks > >>> > > interesting. > >>> > > > >>> > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 > >>> > > Author: Jouni Malinen > >>> > > Date: Sun Oct 1 12:32:57 2017 +0300 > >>> > > > >>> > > Fix PTK rekeying to generate a new ANonce > >>> > > > >>> > > The Authenticator state machine path for PTK rekeying ended up > >>> > > bypassing > >>> > > the AUTHENTICATION2 state where a new ANonce is generated whe= n going > >>> > > directly to the PTKSTART state since there is no need to try = to > >>> > > determine the PMK again in such a case. This is far from ideal > >>> > > since the > >>> > > new PTK would depend on a new nonce only from the supplicant. > >>> > > > >>> > > Fix this by generating a new ANonce when moving to the PTKSTA= RT > >>> > > state > >>> > > for the purpose of starting new 4-way handshake to rekey PTK. > >>> > > > >>> > > Signed-off-by: Jouni Malinen > >>> > > > >>> > > > >>> > > I suspect a timeout because reason=3D1 in Kyle's log. > >>> > > >>> > > >>> > I have two systems experienced wifi connection issues after recent= HEAD > >>> > update. > >>> > Both of them experiencing frequent up/down wlan0 events on boot so= wireles > >>> s > >>> > connection can not negotiate DHCP requests, possibly due to fact th= at both > >>> > connecting to the same AP. > >>> > AP capabilities list: > >>> > > >>> > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME AT= H WPS > >>> > > >>> > Interesting enough that switching wpa_supplicant to version 2.6 fro= m ports > >>> > fixes that issue completely. > >>> > > >>> > Hopefully it helps. > >>> > > >>> > Thank you. > >>> > >>> I've imported all the patches in the port, from our upline into base. > >>> Some were already committed to > >>> -- > >>> Cheers, > >>> Cy Schubert > >>> FreeBSD UNIX: Web: http://www.FreeBSD.org > >>> > >>> The need of the many outweighs the greed of the few. > >>> base 2.5 others not. This should bring base up to par with the port, > >>> address the remaining security issues, and probably fix this thread t= oo. > >> > >> exmh. I had my cursor in the wrong place when I hit send. > >> > >> I've imported all the patches in the port, from our upline into base. > >> Some were already committed to base 2.5 others not. This should bring > >> base up to par with the port, address the remaining security issues, > >> and probably fix this thread too. > >> > > > > FWIW- with ports 2.6 I've confirmed that instead of the reassociation I= get: > > > > Jul 19 18:17:30 shiva wpa_supplicant[34199]: wlan0: WPA: Group > > rekeying completed with ... [GTK=3DCCMP] > > > > I'll try with base 2.6 now that you've updated with all of these patche= s. >=20 > Alright, base 2.6 is still no good here. I note that there's still > some diff between ports and base [1] (about 252 lines of diff to sort > through, nothing serious... I removed the obviously-for-libressl > diff). >=20 > Some of it looks kind of suspicious, but I'd guess the changes in > ./src/rsn_supp/wpa.c are mostly what make the difference for me. How > much of this really needs to stick around, given that ports > wpa_supplicant is actually pretty stable? (Attempting to read between the lines, forgive me if I misinterpreted.) Some of the systems I've set up recently are more easily set up with wireless. Running a 100ft cable in an office building isn't that fun. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --bvk5gnc4ixttbtgj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAltRLbIACgkQaoRlj1JF bu4LrQ//S/++VBsLDBqvlv61VfI498aW8GGHPtPMvy11yQnPi5y7sRFRjO1U9q6+ 7GKiBlSNAmFxr8ycblWyvAqzs46H3KlwKBIdquBnc+A+sdQj2KaheUEBIuw1bEPd GQ0lqwb9CxJjMDm8TSThmeNgWxtzS1wQNpuc36PuszQvLUwRYHeVphYUeBYUPo9P Ao4C5gB7GVOoJ8quYtoi+XMXOyPkQKO8f2v4tto+GSgulxWC8/UrD7Oy/87GGxbN cIrIDp6+d1tdnz+q5CEo8ib5J6Nex79ENs4Z3hvfGyWz/9LLk6VQxRNdN0K/m1Vr pnJTD37gtwCVnGYs2I9jSkHJV8JTiulRA7ZZiaC5ZQU7rFAFCymx9qdk6+jkPdHi zSbQdoC/J2yEhzMhX39/BKAfgJpOfwtNIn0bszb1mG753aXdrFyDK0rPM7e1hb+Q sWKnBYgjUmMQs01AYMC3gIpy1fZbMgDWA+bCHwQeRloRbFe97E1kA5woIZpxq0jP 4S0Ruuy0QmJat9v+ZRtCqbarHDZXSorC5xPDc414XNyVo9gbH5G856a3ggNxtJfx 8wJVylTDXuNgEhI4J2sAJG7OrUxKRbGoNBsU0IYyWuFdX+tkhvHDn/dcG+3Di+kD sSuFPmWQR9Ret9nSECeWfjBMTbp5/kzgpVO8VRo+NM+fL8FSG3g= =HiYc -----END PGP SIGNATURE----- --bvk5gnc4ixttbtgj-- From owner-svn-src-head@freebsd.org Fri Jul 20 00:44:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 288F0105292B; Fri, 20 Jul 2018 00:44:05 +0000 (UTC) (envelope-from ian@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 C251E84144; Fri, 20 Jul 2018 00:44:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F10AC1C; Fri, 20 Jul 2018 00:44:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6K0i4L1079895; Fri, 20 Jul 2018 00:44:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K0i4QQ079894; Fri, 20 Jul 2018 00:44:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807200044.w6K0i4QQ079894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 20 Jul 2018 00:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336526 - head X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 00:44:05 -0000 Author: ian Date: Fri Jul 20 00:44:04 2018 New Revision: 336526 URL: https://svnweb.freebsd.org/changeset/base/336526 Log: Add ntpd to the list of users/groups to check before installing. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jul 19 23:55:29 2018 (r336525) +++ head/Makefile.inc1 Fri Jul 20 00:44:04 2018 (r336526) @@ -1187,6 +1187,10 @@ CHECK_GIDS+= proxy authpf CHECK_UIDS+= unbound CHECK_GIDS+= unbound .endif +.if ${MK_NTP} != "no" +CHECK_UIDS+= ntpd +CHECK_GIDS+= ntpd +.endif _installcheck_world: __installcheck_UGID __installcheck_UGID: .PHONY .for uid in ${CHECK_UIDS} From owner-svn-src-head@freebsd.org Fri Jul 20 00:45:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEC3210529B2; Fri, 20 Jul 2018 00:45:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E9ED842AA; Fri, 20 Jul 2018 00:45:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id EF8C5A8F7; Fri, 20 Jul 2018 00:45:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f170.google.com with SMTP id f8-v6so9702184ljk.1; Thu, 19 Jul 2018 17:45:00 -0700 (PDT) X-Gm-Message-State: AOUpUlFqhx1lncdZrSFVTpUcVa9BGTCYJjzpJ64EtfRrbqikip+o0DAt 7iEfw7xlIM7dtUJZluCEHNteEZl6qoRKzdZRXpA= X-Google-Smtp-Source: AAOMgpfMynUKzfOwSx65ZuTTDEaMDb5/+7QYcA6hHsdR8QL6FGVl2cUBSQrqwq+4sb2UGkOMlAqgRTqWB7hVgL6ojR0= X-Received: by 2002:a2e:2e02:: with SMTP id u2-v6mr9611404lju.77.1532047499602; Thu, 19 Jul 2018 17:44:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 17:44:38 -0700 (PDT) In-Reply-To: <20180720003255.6dglwhbrnyewowdh@mutt-hbsd> References: <201807192114.w6JLEapA097589@slippy.cwsent.com> <201807192133.w6JLXRX4066519@slippy.cwsent.com> <20180720003255.6dglwhbrnyewowdh@mutt-hbsd> From: Kyle Evans Date: Thu, 19 Jul 2018 19:44:38 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Shawn Webb Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Cy Schubert , "Oleg V. Nauman" , Cy Schubert Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 00:45:01 -0000 On Thu, Jul 19, 2018 at 7:32 PM, Shawn Webb wrote: > On Thu, Jul 19, 2018 at 07:24:46PM -0500, Kyle Evans wrote: >> On Thu, Jul 19, 2018 at 6:21 PM, Kyle Evans wrote: >> > On Thu, Jul 19, 2018 at 4:33 PM, Cy Schubert wrote: >> >> In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schubert >> >> writes: >> >>> In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" >> >>> writes: >> >>> > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: >> >>> > > In message > >>> > > il.com> >> >>> > > >> >>> > > , Kyle Evans writes: >> >>> > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising >> >>> > > > >> >>> > > > wrote: >> >>> > > > > [ sending this again since I missed the list the first time, apologie >> >>> s >> >>> > > > > if >> >>> > > > > anyone receives a duplicate ] >> >>> > > > > >> >>> > > > > On 07/19/18 13:57, Kyle Evans wrote: >> >>> > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > >>> > >> >>> > > > >> >> >>> > > > >> wrote: >> >>> > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >> >>> > > > >>>> ... >> >>> > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noticed tha >> >>> t >> >>> > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant >> >>> > > > >>>> restart >> >>> > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplicant from >> >>> ol >> >>> > d >> >>> > > > >>>> source and now it works stable already about 2 hours. >> >>> > > > >>> >> >>> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? :-/ >> >>> > > > >> >> >>> > > > >> Well, "broken". It's incredibly stable outside of rekeying events, a >> >>> nd >> >>> > > > >> further testing shows that I don't actually notice these disconnects >> >>> > > > >> most of the time because it reassociates fast enough. I noticed it t >> >>> he >> >>> > > > >> first time because apparently I had both SSIDs from my AP uncommente >> >>> d >> >>> > > > >> in my wpa_supplicant.conf and it decided at that point to connect to >> >>> > > > >> the other one, which took a little longer. >> >>> > > > >> >> >>> > > > >> Contrary to Andrey's report, though, I don't have to kick >> >>> > > > >> wpa_supplicant at all. It will reassociate on its own every single >> >>> > > > >> time. >> >>> > > > > >> >>> > > > > Hi! >> >>> > > > > I have the exact same problem as Andrey, with the same driver. I've >> >>> no >> >>> > t >> >>> > > > > investigated very much, but when using the 2.8 wpa_supplicant the wif >> >>> i >> >>> > > > > network dies after a little while, and I have to restart it (usually >> >>> > > > > with >> >>> > > > > /etc/rc.d/netif restart). Then it works for a little while, before >> >>> > > > > going >> >>> > > > > down again. With the old wpa_supplicant I didn't have this problem. >> >>> > > > > >> >>> > > > > I don't have very much else to add except noting that I'm affected as >> >>> > > > > well. >> >>> > > > > I haven't had time to debug it properly (which is why I've never >> >>> > > > > reported >> >>> > > > > it) >> >>> > > > >> >>> > > > I plan on trying out the latest from upstream beyond the patch Cy sent >> >>> > > > along earlier to see if it's perhaps been addressed elsewhere in the >> >>> > > > past two years since this release was made. >> >>> > > >> >>> > > A point of reference. I've had no issues here with any of the networks >> >>> > > I use. All the networks I use are either WPA-PSK or open. The last >> >>> > > WPA-EAP I used was at former $JOB a few years ago. However, at the Link >> >>> > > Lounge just outside where $JOB is at my wifi would disconnect every 30 >> >>> > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 resolved >> >>> > > that issue. >> >>> > > >> >>> > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also looks >> >>> > > interesting. >> >>> > > >> >>> > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 >> >>> > > Author: Jouni Malinen >> >>> > > Date: Sun Oct 1 12:32:57 2017 +0300 >> >>> > > >> >>> > > Fix PTK rekeying to generate a new ANonce >> >>> > > >> >>> > > The Authenticator state machine path for PTK rekeying ended up >> >>> > > bypassing >> >>> > > the AUTHENTICATION2 state where a new ANonce is generated when going >> >>> > > directly to the PTKSTART state since there is no need to try to >> >>> > > determine the PMK again in such a case. This is far from ideal >> >>> > > since the >> >>> > > new PTK would depend on a new nonce only from the supplicant. >> >>> > > >> >>> > > Fix this by generating a new ANonce when moving to the PTKSTART >> >>> > > state >> >>> > > for the purpose of starting new 4-way handshake to rekey PTK. >> >>> > > >> >>> > > Signed-off-by: Jouni Malinen >> >>> > > >> >>> > > >> >>> > > I suspect a timeout because reason=1 in Kyle's log. >> >>> > >> >>> > >> >>> > I have two systems experienced wifi connection issues after recent HEAD >> >>> > update. >> >>> > Both of them experiencing frequent up/down wlan0 events on boot so wireles >> >>> s >> >>> > connection can not negotiate DHCP requests, possibly due to fact that both >> >>> > connecting to the same AP. >> >>> > AP capabilities list: >> >>> > >> >>> > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH WPS >> >>> > >> >>> > Interesting enough that switching wpa_supplicant to version 2.6 from ports >> >>> > fixes that issue completely. >> >>> > >> >>> > Hopefully it helps. >> >>> > >> >>> > Thank you. >> >>> >> >>> I've imported all the patches in the port, from our upline into base. >> >>> Some were already committed to >> >>> -- >> >>> Cheers, >> >>> Cy Schubert >> >>> FreeBSD UNIX: Web: http://www.FreeBSD.org >> >>> >> >>> The need of the many outweighs the greed of the few. >> >>> base 2.5 others not. This should bring base up to par with the port, >> >>> address the remaining security issues, and probably fix this thread too. >> >> >> >> exmh. I had my cursor in the wrong place when I hit send. >> >> >> >> I've imported all the patches in the port, from our upline into base. >> >> Some were already committed to base 2.5 others not. This should bring >> >> base up to par with the port, address the remaining security issues, >> >> and probably fix this thread too. >> >> >> > >> > FWIW- with ports 2.6 I've confirmed that instead of the reassociation I get: >> > >> > Jul 19 18:17:30 shiva wpa_supplicant[34199]: wlan0: WPA: Group >> > rekeying completed with ... [GTK=CCMP] >> > >> > I'll try with base 2.6 now that you've updated with all of these patches. >> >> Alright, base 2.6 is still no good here. I note that there's still >> some diff between ports and base [1] (about 252 lines of diff to sort >> through, nothing serious... I removed the obviously-for-libressl >> diff). >> >> Some of it looks kind of suspicious, but I'd guess the changes in >> ./src/rsn_supp/wpa.c are mostly what make the difference for me. How >> much of this really needs to stick around, given that ports >> wpa_supplicant is actually pretty stable? > > (Attempting to read between the lines, forgive me if I > misinterpreted.) Sorry, I seem to have missed a word there. I meant "How much of this [diff] really needs to stick around, given that ports wpa_supplicant is actually pretty stable?" -- we've had a couple reports of improvements from the 2.6 in ports, so I wonder if some of our local diffs should have gone away with the 2.6 update but we didn't quite get there. > Some of the systems I've set up recently are more easily set up with > wireless. Running a 100ft cable in an office building isn't that fun. > Ahh, indeed- at $work we have tons of those, with 2ft thick concrete walls sprinkled conservatively and legacy wire runs -everywhere-, and not necessarily with drop ceilings or conduit... ugh. From owner-svn-src-head@freebsd.org Fri Jul 20 00:57:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFB3D1052E23; Fri, 20 Jul 2018 00:57:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 06CF984754; Fri, 20 Jul 2018 00:57:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id gJk1fOlpDWppDgJk2fu2E7; Thu, 19 Jul 2018 18:57:56 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=xfDLHkLGAAAA:8 a=ypVJL4-jAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=VxmjJ2MpAAAA:8 a=QCccru2TAAAA:8 a=IIX2BFdiAAAA:8 a=an4dgOI3XeT5qPOkphUA:9 a=4_Q7UE5L5NobuAbs:21 a=XkM-1eGfRrmYCSfm:21 a=CjuIK1q_8ugA:10 a=1TkR0V35R7QA:10 a=8GuA_aGtTd0A:10 a=IfaqVvZgccqrtc8gcwf2:22 a=khIbc0fXALFIcTpOSxgJ:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=rCjsK_HQOcgUb9vb-KUg:22 a=rHg00LAlvzXsuODty-Nv:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B45B01479; Thu, 19 Jul 2018 17:57:52 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6K0vqbm055344; Thu, 19 Jul 2018 17:57:52 -0700 (PDT) (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 w6K0vqV9055341; Thu, 19 Jul 2018 17:57:52 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807200057.w6K0vqV9055341@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: Kyle Evans cc: Shawn Webb , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Cy Schubert , "Oleg V. Nauman" , Cy Schubert Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Kyle Evans of "Thu, 19 Jul 2018 19:44:38 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 17:57:51 -0700 X-CMAE-Envelope: MS4wfDo87buEYqSHrLZZmNOJ5tM604myUm6896iH90WLyQkjbtIcXVH84nMnsXgzjlNjsqNfRK21B26766jkkEly2imzZRgOoNToqbMIxmhk1Wt6JWS1xlCK zmULD0fq+OREoI/L1lNIkSvs8pN+FaWKMRiKrWVsLsfORhkHgKYqu3IHslEbBNn0zDAvZ74GJc93fBcnTygxrJiNbulBv9+L8n+H7agGIucudHhantyA+KGP h5B0xcNkPxFOHmLZgrcX1OuSAGohJvSixQflv+XDsXerLDx+6Hk7NvrNP4JI7vgFW+vvhEz3pVV5ZoPoQluDwM52HATGZ2bSGYwJlrhf0SnomtACpnBX+62l d9Nlox/u X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 00:57:59 -0000 In message , Kyle Evans writes: > On Thu, Jul 19, 2018 at 7:32 PM, Shawn Webb wrot > e: > > On Thu, Jul 19, 2018 at 07:24:46PM -0500, Kyle Evans wrote: > >> On Thu, Jul 19, 2018 at 6:21 PM, Kyle Evans wrote: > >> > On Thu, Jul 19, 2018 at 4:33 PM, Cy Schubert > wrote: > >> >> In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schubert > >> >> writes: > >> >>> In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" > >> >>> writes: > >> >>> > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: > >> >>> > > In message il.gma > >> >>> > > il.com> > >> >>> > > > >> >>> > > , Kyle Evans writes: > >> >>> > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > >> >>> > > > > >> >>> > > > wrote: > >> >>> > > > > [ sending this again since I missed the list the first time, a > pologie > >> >>> s > >> >>> > > > > if > >> >>> > > > > anyone receives a duplicate ] > >> >>> > > > > > >> >>> > > > > On 07/19/18 13:57, Kyle Evans wrote: > >> >>> > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev bsd.org > >> >>> > > >> >>> > > > >> > >> >>> > > > >> wrote: > >> >>> > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov > wrote: > >> >>> > > > >>>> ... > >> >>> > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noti > ced tha > >> >>> t > >> >>> > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplic > ant > >> >>> > > > >>>> restart > >> >>> > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplican > t from > >> >>> ol > >> >>> > d > >> >>> > > > >>>> source and now it works stable already about 2 hours. > >> >>> > > > >>> > >> >>> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? > :-/ > >> >>> > > > >> > >> >>> > > > >> Well, "broken". It's incredibly stable outside of rekeying ev > ents, a > >> >>> nd > >> >>> > > > >> further testing shows that I don't actually notice these disc > onnects > >> >>> > > > >> most of the time because it reassociates fast enough. I notic > ed it t > >> >>> he > >> >>> > > > >> first time because apparently I had both SSIDs from my AP unc > ommente > >> >>> d > >> >>> > > > >> in my wpa_supplicant.conf and it decided at that point to con > nect to > >> >>> > > > >> the other one, which took a little longer. > >> >>> > > > >> > >> >>> > > > >> Contrary to Andrey's report, though, I don't have to kick > >> >>> > > > >> wpa_supplicant at all. It will reassociate on its own every s > ingle > >> >>> > > > >> time. > >> >>> > > > > > >> >>> > > > > Hi! > >> >>> > > > > I have the exact same problem as Andrey, with the same driver. > I've > >> >>> no > >> >>> > t > >> >>> > > > > investigated very much, but when using the 2.8 wpa_supplicant > the wif > >> >>> i > >> >>> > > > > network dies after a little while, and I have to restart it (u > sually > >> >>> > > > > with > >> >>> > > > > /etc/rc.d/netif restart). Then it works for a little while, b > efore > >> >>> > > > > going > >> >>> > > > > down again. With the old wpa_supplicant I didn't have this pr > oblem. > >> >>> > > > > > >> >>> > > > > I don't have very much else to add except noting that I'm affe > cted as > >> >>> > > > > well. > >> >>> > > > > I haven't had time to debug it properly (which is why I've nev > er > >> >>> > > > > reported > >> >>> > > > > it) > >> >>> > > > > >> >>> > > > I plan on trying out the latest from upstream beyond the patch C > y sent > >> >>> > > > along earlier to see if it's perhaps been addressed elsewhere in > the > >> >>> > > > past two years since this release was made. > >> >>> > > > >> >>> > > A point of reference. I've had no issues here with any of the netw > orks > >> >>> > > I use. All the networks I use are either WPA-PSK or open. The last > >> >>> > > WPA-EAP I used was at former $JOB a few years ago. However, at the > Link > >> >>> > > Lounge just outside where $JOB is at my wifi would disconnect ever > y 30 > >> >>> > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 reso > lved > >> >>> > > that issue. > >> >>> > > > >> >>> > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also lo > oks > >> >>> > > interesting. > >> >>> > > > >> >>> > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 > >> >>> > > Author: Jouni Malinen > >> >>> > > Date: Sun Oct 1 12:32:57 2017 +0300 > >> >>> > > > >> >>> > > Fix PTK rekeying to generate a new ANonce > >> >>> > > > >> >>> > > The Authenticator state machine path for PTK rekeying ended up > >> >>> > > bypassing > >> >>> > > the AUTHENTICATION2 state where a new ANonce is generated when > going > >> >>> > > directly to the PTKSTART state since there is no need to try t > o > >> >>> > > determine the PMK again in such a case. This is far from ideal > >> >>> > > since the > >> >>> > > new PTK would depend on a new nonce only from the supplicant. > >> >>> > > > >> >>> > > Fix this by generating a new ANonce when moving to the PTKSTAR > T > >> >>> > > state > >> >>> > > for the purpose of starting new 4-way handshake to rekey PTK. > >> >>> > > > >> >>> > > Signed-off-by: Jouni Malinen > >> >>> > > > >> >>> > > > >> >>> > > I suspect a timeout because reason=1 in Kyle's log. > >> >>> > > >> >>> > > >> >>> > I have two systems experienced wifi connection issues after recent > HEAD > >> >>> > update. > >> >>> > Both of them experiencing frequent up/down wlan0 events on boot so > wireles > >> >>> s > >> >>> > connection can not negotiate DHCP requests, possibly due to fact tha > t both > >> >>> > connecting to the same AP. > >> >>> > AP capabilities list: > >> >>> > > >> >>> > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH > WPS > >> >>> > > >> >>> > Interesting enough that switching wpa_supplicant to version 2.6 from > ports > >> >>> > fixes that issue completely. > >> >>> > > >> >>> > Hopefully it helps. > >> >>> > > >> >>> > Thank you. > >> >>> > >> >>> I've imported all the patches in the port, from our upline into base. > >> >>> Some were already committed to > >> >>> -- > >> >>> Cheers, > >> >>> Cy Schubert > >> >>> FreeBSD UNIX: Web: http://www.FreeBSD.org > >> >>> > >> >>> The need of the many outweighs the greed of the few. > >> >>> base 2.5 others not. This should bring base up to par with the port, > >> >>> address the remaining security issues, and probably fix this thread to > o. > >> >> > >> >> exmh. I had my cursor in the wrong place when I hit send. > >> >> > >> >> I've imported all the patches in the port, from our upline into base. > >> >> Some were already committed to base 2.5 others not. This should bring > >> >> base up to par with the port, address the remaining security issues, > >> >> and probably fix this thread too. > >> >> > >> > > >> > FWIW- with ports 2.6 I've confirmed that instead of the reassociation I > get: > >> > > >> > Jul 19 18:17:30 shiva wpa_supplicant[34199]: wlan0: WPA: Group > >> > rekeying completed with ... [GTK=CCMP] > >> > > >> > I'll try with base 2.6 now that you've updated with all of these patches > . > >> > >> Alright, base 2.6 is still no good here. I note that there's still > >> some diff between ports and base [1] (about 252 lines of diff to sort > >> through, nothing serious... I removed the obviously-for-libressl > >> diff). > >> > >> Some of it looks kind of suspicious, but I'd guess the changes in > >> ./src/rsn_supp/wpa.c are mostly what make the difference for me. How > >> much of this really needs to stick around, given that ports > >> wpa_supplicant is actually pretty stable? > > > > (Attempting to read between the lines, forgive me if I > > misinterpreted.) > > Sorry, I seem to have missed a word there. I meant "How much of this > [diff] really needs to stick around, given that ports wpa_supplicant > is actually pretty stable?" -- we've had a couple reports of > improvements from the 2.6 in ports, so I wonder if some of our local > diffs should have gone away with the 2.6 update but we didn't quite > get there. > > > Some of the systems I've set up recently are more easily set up with > > wireless. Running a 100ft cable in an office building isn't that fun. > > > > Ahh, indeed- at $work we have tons of those, with 2ft thick concrete > walls sprinkled conservatively and legacy wire runs -everywhere-, and > not necessarily with drop ceilings or conduit... ugh. I'm on a $work issue right now. I'll get back to this in an hour. -- 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-head@freebsd.org Fri Jul 20 01:23:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECD481029B43 for ; Fri, 20 Jul 2018 01:23:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-2.consmr.mail.bf2.yahoo.com (sonic302-2.consmr.mail.bf2.yahoo.com [74.6.135.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9253A85406 for ; Fri, 20 Jul 2018 01:23:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: i9igrtIVM1mHqcsJBOUHzrIIQSzE5hnvbllQeqsNLAXot.JIftbBh5oIdhCKtV3 Jt_1PHh6leGsEeM3CMdgVph0WbrtRp0F6jnmPIGeT0x.4udhMYvpBzj0BTRT7w_ssWT1GelSIsiX UE60GsYbtmT8uYwdqiK6ZdrCs6rBsBjQZhgHagW4bdgRTjSGEN8ff6H0a5rSu33wG608lUYYbSRW jNBKwYu73KymN.xrLzfcDe2WmOAjcMGSMsgCl3wgONgwTujGKxrvjIFLFLTkurxkRL7sFluAChoh X2F9gFlaeCBY7MsZtPx8aGKMVxZvW5tuRPoQGdHnz6tuGKBh0y3RuJ4Gl.bm3zvRWOWi.Qk7k2JF a.XCMbFlj3L4dqUQfSeQO2.lSh3msGTgWiDC.c1A_MViUmuNHNMTjqUNW19jhWqHiK.LBXu3jMvd U6mfqjiTFbUiTmijjoJELSRHX2UDwQE2RXEgh222LkHuTkfbktJV1waURMxvVYBNGepkf2f3Lrz3 R1gPR5i3EpIDmeJG1NY0qVWx0FzehijD91IL2Y6zg1NDj4fmTg3isWEfqw87IYXFK1yloAbqRabg dZBDdi.ZmgIkEZrBg4IbZhwpkEH_oKVkHV9zBzOac9jxtuWFiRvAFE41jx59G9oyG_Y8lZAmWDO4 DT2DbpyWrgPWH6o9faTYVVWqqMBqWFAFQ2u5AMhw3sw_JYMfl4Bh8SoKYwvBK.IgDZebHEdopCy3 lBPkWe6pb3JPrX8ng9D_ahyfSodjMDM7lrBQxrfM2ByUuPtmctPsstayKjRCJWFKxru94B97Ju1D hrkznEgFGXAC38niQoyE91tv3oFSIxhhWUK4jpbcDEKdQcuB067VdCqIzZ0MaMThXp7i4UYJNeun WaDwXBvp2b4Ys_yJpPyYjIdHHt21cMVzigyiUeabWSvl4cvEu.v22KEHJ6fCbdkREecilRjoh2CL h3gCYdmFs_5ftf5t6r7TqVk6I33i7sApxtA_eJ_QNNC.8iMEUOZI5oJOn9la3o6hs Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Fri, 20 Jul 2018 01:23:24 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp428.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 75899740a7b18658188be87c2ee2bbcd; Fri, 20 Jul 2018 01:13:16 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336525 - in head: contrib/ntp/ntpd etc etc/mtree . . . (with -r336526 as well): breaks ci.freebsd.org FreeBSD-head-sparc64-build (and others) Message-Id: <8B1518D2-D221-4C28-BC1E-C79A0EC743EC@yahoo.com> Date: Thu, 19 Jul 2018 18:13:14 -0700 To: ian@FreeBSD.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 01:23:31 -0000 https://ci.freebsd.org/job/FreeBSD-head-sparc64-build/8759/consoleText = shows ( -r336526 ): -------------------------------------------------------------- >>> Kernel build for GENERIC completed on Fri Jul 20 00:58:39 UTC 2018 -------------------------------------------------------------- + cd /usr/src/release + sudo make clean chflags -R noschg . rm -f packagesystem *.txz MANIFEST release disc1.iso bootonly.iso = memstick.img mini-memstick.img ec2ami cw-ec2-portinstall = azure-check-depends azure-do-upload gce-do-login vagrant-check-depends = vagrant-do-upload-virtualbox vagrant-do-upload-vmware = vagrant-do-package-virtualbox = FreeBSD-12.0-CURRENT-amd64-20180720.virtualbox.box = vagrant-do-upload-virtualbox vagrant-do-package-vmware = FreeBSD-12.0-CURRENT-amd64-20180720.vmware.box vagrant-do-upload-vmware rm -rf dist ftp disc1 bootonly dvd virtualbox vmware + sudo make -DNOPORTS -DNOSRC -DNODOC packagesystem 'TARGET=3Dsparc64' = 'TARGET_ARCH=3Dsparc64' 'MAKE=3Dmake __MAKE_CONF=3D/dev/null = SRCCONF=3D/dev/null' [Creating objdir /usr/obj/usr/src/sparc64.sparc64/release...] mkdir -p dist cd /usr/src/release/.. && make __MAKE_CONF=3D/dev/null SRCCONF=3D/dev/null= TARGET_ARCH=3Dsparc64 TARGET=3Dsparc64 distributeworld = DISTDIR=3D/usr/obj/usr/src/sparc64.sparc64/release/dist make[2]: "/usr/obj/usr/src/sparc64.sparc64/toolchain-metadata.mk" line = 1: Using cached toolchain metadata from build at = FreeBSD-head-sparc64-build.jail.ci.FreeBSD.org on Fri Jul 20 00:53:24 = UTC 2018 ERROR: Required ntpd user is missing, see /usr/src/UPDATING. *** Error code 1 The following are similar: https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/6789/consoleText https://ci.freebsd.org/job/FreeBSD-head-mips64-build/3450/consoleText -r336525 broke: = https://ci.freebsd.org/job/FreeBSD-head-powerpcspe-build/6836/consoleText https://ci.freebsd.org/job/FreeBSD-head-i386-build/8635/consoleText getting messages like: mtree -deU -i -f /usr/src/etc/mtree/BSD.var.dist -p = //usr/obj/usr/src/powerpc.powerpcspe/release/dist/base/var mtree: unknown user `ntpd' mtree: failed at line 49 of the specification *** Error code 1 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Jul 20 01:27:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE22D1029D36; Fri, 20 Jul 2018 01:27:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E62D854D2; Fri, 20 Jul 2018 01:27:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id EF149AD04; Fri, 20 Jul 2018 01:27:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f44.google.com with SMTP id b22-v6so652961lfa.3; Thu, 19 Jul 2018 18:27:53 -0700 (PDT) X-Gm-Message-State: AOUpUlEhb5nSzbnmYHOTdbxebqB0GyK0dBXONqqCzar0j82h+ucKaIT7 u5BiI4J1OQdp1c8o0gGj2cvx/0BfhRNZDNb3Fvc= X-Google-Smtp-Source: AAOMgpdHa2KJtMr9c61U3Uzn49/UwuIUQddztyYC6S/U/JZlysRoqfHrOh+mqzqzY1QIdzWHrCfArQ49ER0sSfcDSCw= X-Received: by 2002:a19:9481:: with SMTP id o1-v6mr22915lfk.38.1532050072415; Thu, 19 Jul 2018 18:27:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 18:27:31 -0700 (PDT) In-Reply-To: <201807200057.w6K0vqV9055341@slippy.cwsent.com> References: <201807200057.w6K0vqV9055341@slippy.cwsent.com> From: Kyle Evans Date: Thu, 19 Jul 2018 20:27:31 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Cy Schubert Cc: Shawn Webb , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Cy Schubert , "Oleg V. Nauman" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 01:27:55 -0000 On Thu, Jul 19, 2018 at 7:57 PM, Cy Schubert wrote: > In message il.com> > , Kyle Evans writes: >> On Thu, Jul 19, 2018 at 7:32 PM, Shawn Webb wrot >> e: >> > On Thu, Jul 19, 2018 at 07:24:46PM -0500, Kyle Evans wrote: >> >> On Thu, Jul 19, 2018 at 6:21 PM, Kyle Evans wrote: >> >> > On Thu, Jul 19, 2018 at 4:33 PM, Cy Schubert >> wrote: >> >> >> In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schubert >> >> >> writes: >> >> >>> In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauman" >> >> >>> writes: >> >> >>> > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: >> >> >>> > > In message > il.gma >> >> >>> > > il.com> >> >> >>> > > >> >> >>> > > , Kyle Evans writes: >> >> >>> > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising >> >> >>> > > > >> >> >>> > > > wrote: >> >> >>> > > > > [ sending this again since I missed the list the first time, a >> pologie >> >> >>> s >> >> >>> > > > > if >> >> >>> > > > > anyone receives a duplicate ] >> >> >>> > > > > >> >> >>> > > > > On 07/19/18 13:57, Kyle Evans wrote: >> >> >>> > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > bsd.org >> >> >>> > >> >> >>> > > > >> >> >> >>> > > > >> wrote: >> >> >>> > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov >> wrote: >> >> >>> > > > >>>> ... >> >> >>> > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also noti >> ced tha >> >> >>> t >> >> >>> > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplic >> ant >> >> >>> > > > >>>> restart >> >> >>> > > > >>>> wlan0 helps. After your message I reinstalled wpa_supplican >> t from >> >> >>> ol >> >> >>> > d >> >> >>> > > > >>>> source and now it works stable already about 2 hours. >> >> >>> > > > >>> >> >> >>> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRENT? >> :-/ >> >> >>> > > > >> >> >> >>> > > > >> Well, "broken". It's incredibly stable outside of rekeying ev >> ents, a >> >> >>> nd >> >> >>> > > > >> further testing shows that I don't actually notice these disc >> onnects >> >> >>> > > > >> most of the time because it reassociates fast enough. I notic >> ed it t >> >> >>> he >> >> >>> > > > >> first time because apparently I had both SSIDs from my AP unc >> ommente >> >> >>> d >> >> >>> > > > >> in my wpa_supplicant.conf and it decided at that point to con >> nect to >> >> >>> > > > >> the other one, which took a little longer. >> >> >>> > > > >> >> >> >>> > > > >> Contrary to Andrey's report, though, I don't have to kick >> >> >>> > > > >> wpa_supplicant at all. It will reassociate on its own every s >> ingle >> >> >>> > > > >> time. >> >> >>> > > > > >> >> >>> > > > > Hi! >> >> >>> > > > > I have the exact same problem as Andrey, with the same driver. >> I've >> >> >>> no >> >> >>> > t >> >> >>> > > > > investigated very much, but when using the 2.8 wpa_supplicant >> the wif >> >> >>> i >> >> >>> > > > > network dies after a little while, and I have to restart it (u >> sually >> >> >>> > > > > with >> >> >>> > > > > /etc/rc.d/netif restart). Then it works for a little while, b >> efore >> >> >>> > > > > going >> >> >>> > > > > down again. With the old wpa_supplicant I didn't have this pr >> oblem. >> >> >>> > > > > >> >> >>> > > > > I don't have very much else to add except noting that I'm affe >> cted as >> >> >>> > > > > well. >> >> >>> > > > > I haven't had time to debug it properly (which is why I've nev >> er >> >> >>> > > > > reported >> >> >>> > > > > it) >> >> >>> > > > >> >> >>> > > > I plan on trying out the latest from upstream beyond the patch C >> y sent >> >> >>> > > > along earlier to see if it's perhaps been addressed elsewhere in >> the >> >> >>> > > > past two years since this release was made. >> >> >>> > > >> >> >>> > > A point of reference. I've had no issues here with any of the netw >> orks >> >> >>> > > I use. All the networks I use are either WPA-PSK or open. The last >> >> >>> > > WPA-EAP I used was at former $JOB a few years ago. However, at the >> Link >> >> >>> > > Lounge just outside where $JOB is at my wifi would disconnect ever >> y 30 >> >> >>> > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 reso >> lved >> >> >>> > > that issue. >> >> >>> > > >> >> >>> > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also lo >> oks >> >> >>> > > interesting. >> >> >>> > > >> >> >>> > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 >> >> >>> > > Author: Jouni Malinen >> >> >>> > > Date: Sun Oct 1 12:32:57 2017 +0300 >> >> >>> > > >> >> >>> > > Fix PTK rekeying to generate a new ANonce >> >> >>> > > >> >> >>> > > The Authenticator state machine path for PTK rekeying ended up >> >> >>> > > bypassing >> >> >>> > > the AUTHENTICATION2 state where a new ANonce is generated when >> going >> >> >>> > > directly to the PTKSTART state since there is no need to try t >> o >> >> >>> > > determine the PMK again in such a case. This is far from ideal >> >> >>> > > since the >> >> >>> > > new PTK would depend on a new nonce only from the supplicant. >> >> >>> > > >> >> >>> > > Fix this by generating a new ANonce when moving to the PTKSTAR >> T >> >> >>> > > state >> >> >>> > > for the purpose of starting new 4-way handshake to rekey PTK. >> >> >>> > > >> >> >>> > > Signed-off-by: Jouni Malinen >> >> >>> > > >> >> >>> > > >> >> >>> > > I suspect a timeout because reason=1 in Kyle's log. >> >> >>> > >> >> >>> > >> >> >>> > I have two systems experienced wifi connection issues after recent >> HEAD >> >> >>> > update. >> >> >>> > Both of them experiencing frequent up/down wlan0 events on boot so >> wireles >> >> >>> s >> >> >>> > connection can not negotiate DHCP requests, possibly due to fact tha >> t both >> >> >>> > connecting to the same AP. >> >> >>> > AP capabilities list: >> >> >>> > >> >> >>> > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME ATH >> WPS >> >> >>> > >> >> >>> > Interesting enough that switching wpa_supplicant to version 2.6 from >> ports >> >> >>> > fixes that issue completely. >> >> >>> > >> >> >>> > Hopefully it helps. >> >> >>> > >> >> >>> > Thank you. >> >> >>> >> >> >>> I've imported all the patches in the port, from our upline into base. >> >> >>> Some were already committed to >> >> >>> -- >> >> >>> Cheers, >> >> >>> Cy Schubert >> >> >>> FreeBSD UNIX: Web: http://www.FreeBSD.org >> >> >>> >> >> >>> The need of the many outweighs the greed of the few. >> >> >>> base 2.5 others not. This should bring base up to par with the port, >> >> >>> address the remaining security issues, and probably fix this thread to >> o. >> >> >> >> >> >> exmh. I had my cursor in the wrong place when I hit send. >> >> >> >> >> >> I've imported all the patches in the port, from our upline into base. >> >> >> Some were already committed to base 2.5 others not. This should bring >> >> >> base up to par with the port, address the remaining security issues, >> >> >> and probably fix this thread too. >> >> >> >> >> > >> >> > FWIW- with ports 2.6 I've confirmed that instead of the reassociation I >> get: >> >> > >> >> > Jul 19 18:17:30 shiva wpa_supplicant[34199]: wlan0: WPA: Group >> >> > rekeying completed with ... [GTK=CCMP] >> >> > >> >> > I'll try with base 2.6 now that you've updated with all of these patches >> . >> >> >> >> Alright, base 2.6 is still no good here. I note that there's still >> >> some diff between ports and base [1] (about 252 lines of diff to sort >> >> through, nothing serious... I removed the obviously-for-libressl >> >> diff). >> >> >> >> Some of it looks kind of suspicious, but I'd guess the changes in >> >> ./src/rsn_supp/wpa.c are mostly what make the difference for me. How >> >> much of this really needs to stick around, given that ports >> >> wpa_supplicant is actually pretty stable? >> > >> > (Attempting to read between the lines, forgive me if I >> > misinterpreted.) >> >> Sorry, I seem to have missed a word there. I meant "How much of this >> [diff] really needs to stick around, given that ports wpa_supplicant >> is actually pretty stable?" -- we've had a couple reports of >> improvements from the 2.6 in ports, so I wonder if some of our local >> diffs should have gone away with the 2.6 update but we didn't quite >> get there. >> >> > Some of the systems I've set up recently are more easily set up with >> > wireless. Running a 100ft cable in an office building isn't that fun. >> > >> >> Ahh, indeed- at $work we have tons of those, with 2ft thick concrete >> walls sprinkled conservatively and legacy wire runs -everywhere-, and >> not necessarily with drop ceilings or conduit... ugh. > > I'm on a $work issue right now. I'll get back to this in an hour. > FWIW- extracting the src/rsn_supp/wpa.c diff from the aforementioned diff between ports 2.6 and base 2.6 and doing a patch -R of that on the base 2.6 fixes my problem, at least. From owner-svn-src-head@freebsd.org Fri Jul 20 01:37:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAEEC102A2B0; Fri, 20 Jul 2018 01:37:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 118FD85C97; Fri, 20 Jul 2018 01:37:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id gKMLfOvBjWppDgKMMfu7cs; Thu, 19 Jul 2018 19:37:30 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=xfDLHkLGAAAA:8 a=YxBL1-UpAAAA:8 a=ypVJL4-jAAAA:8 a=6I5d2MoRAAAA:8 a=VxmjJ2MpAAAA:8 a=QCccru2TAAAA:8 a=IIX2BFdiAAAA:8 a=H7iLv7eKUq9jpd-PgQUA:9 a=9yUAienz81jZAseb:21 a=hgFp2bqX_GqDSb-v:21 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=8GuA_aGtTd0A:10 a=IfaqVvZgccqrtc8gcwf2:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=khIbc0fXALFIcTpOSxgJ:22 a=IjZwj45LgO3ly-622nXo:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=rCjsK_HQOcgUb9vb-KUg:22 a=rHg00LAlvzXsuODty-Nv:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 095A614FE; Thu, 19 Jul 2018 18:37:29 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6K1bSxH055920; Thu, 19 Jul 2018 18:37:28 -0700 (PDT) (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 w6K1bSMm055917; Thu, 19 Jul 2018 18:37:28 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807200137.w6K1bSMm055917@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: Kyle Evans cc: Cy Schubert , Shawn Webb , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Cy Schubert , "Oleg V. Nauman" Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Kyle Evans of "Thu, 19 Jul 2018 20:27:31 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 18:37:28 -0700 X-CMAE-Envelope: MS4wfHmeot3FtEa6KYlvfjEZzpzynv6fnfe/qgp+Bi97mKcF3x5KGnvp6KIddE5D2SEDmuAfYMxV7UUXpFvkW6XE2ua3XjdW00CkcUP+ai9DIv30vkhFzqW1 FdVGWRQ4Cp0rYrSS4rdk4WStH+wuXLsRLmdfoTvuTECPgFEDFK57R2+L/AdVxkUYILD7PJ74R8cnR7gPIUOrslhEQlv7UApEbPJgMP7OFC+jMjQicTaspyXi wJSm5y9Mw1+rakQxlNOH9LgQdyhTRHURsKM4MpzeUBdUKyUVj3LrZ2D+hs81UQBnEKt72OyznLeu4s/R4IA0pO5Qg6FgaYcQljDQFzl+SBV5lkqUNXsDsNTy DcNASFVv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 01:37:33 -0000 In message , Kyle Evans writes: > On Thu, Jul 19, 2018 at 7:57 PM, Cy Schubert wrot > e: > > In message > il.com> > > , Kyle Evans writes: > >> On Thu, Jul 19, 2018 at 7:32 PM, Shawn Webb w > rot > >> e: > >> > On Thu, Jul 19, 2018 at 07:24:46PM -0500, Kyle Evans wrote: > >> >> On Thu, Jul 19, 2018 at 6:21 PM, Kyle Evans wrote: > >> >> > On Thu, Jul 19, 2018 at 4:33 PM, Cy Schubert om> > >> wrote: > >> >> >> In message <201807192114.w6JLEapA097589@slippy.cwsent.com>, Cy Schub > ert > >> >> >> writes: > >> >> >>> In message <17042686.Mc0X0P6XHu@asus.theweb.org.ua>, "Oleg V. Nauma > n" > >> >> >>> writes: > >> >> >>> > On Thursday, July 19, 2018 4:54:42 PM EEST Cy Schubert wrote: > >> >> >>> > > In message @ma > >> il.gma > >> >> >>> > > il.com> > >> >> >>> > > > >> >> >>> > > , Kyle Evans writes: > >> >> >>> > > > On Thu, Jul 19, 2018 at 7:13 AM, Niclas Zeising > >> >> >>> > > > > >> >> >>> > > > wrote: > >> >> >>> > > > > [ sending this again since I missed the list the first time > , a > >> pologie > >> >> >>> s > >> >> >>> > > > > if > >> >> >>> > > > > anyone receives a duplicate ] > >> >> >>> > > > > > >> >> >>> > > > > On 07/19/18 13:57, Kyle Evans wrote: > >> >> >>> > > > >> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev ree > >> bsd.org > >> >> >>> > > >> >> >>> > > > >> > >> >> >>> > > > >> wrote: > >> >> >>> > > > >>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsuk > ov > >> wrote: > >> >> >>> > > > >>>> ... > >> >> >>> > > > >>>> Yesterday I updated my notebook (with iwm(4)) and also n > oti > >> ced tha > >> >> >>> t > >> >> >>> > > > >>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supp > lic > >> ant > >> >> >>> > > > >>>> restart > >> >> >>> > > > >>>> wlan0 helps. After your message I reinstalled wpa_suppli > can > >> t from > >> >> >>> ol > >> >> >>> > d > >> >> >>> > > > >>>> source and now it works stable already about 2 hours. > >> >> >>> > > > >>> > >> >> >>> > > > >>> So, right now, we have broken wpa_supplicant(8) in -CURRE > NT? > >> :-/ > >> >> >>> > > > >> > >> >> >>> > > > >> Well, "broken". It's incredibly stable outside of rekeying > ev > >> ents, a > >> >> >>> nd > >> >> >>> > > > >> further testing shows that I don't actually notice these d > isc > >> onnects > >> >> >>> > > > >> most of the time because it reassociates fast enough. I no > tic > >> ed it t > >> >> >>> he > >> >> >>> > > > >> first time because apparently I had both SSIDs from my AP > unc > >> ommente > >> >> >>> d > >> >> >>> > > > >> in my wpa_supplicant.conf and it decided at that point to > con > >> nect to > >> >> >>> > > > >> the other one, which took a little longer. > >> >> >>> > > > >> > >> >> >>> > > > >> Contrary to Andrey's report, though, I don't have to kick > >> >> >>> > > > >> wpa_supplicant at all. It will reassociate on its own ever > y s > >> ingle > >> >> >>> > > > >> time. > >> >> >>> > > > > > >> >> >>> > > > > Hi! > >> >> >>> > > > > I have the exact same problem as Andrey, with the same driv > er. > >> I've > >> >> >>> no > >> >> >>> > t > >> >> >>> > > > > investigated very much, but when using the 2.8 wpa_supplica > nt > >> the wif > >> >> >>> i > >> >> >>> > > > > network dies after a little while, and I have to restart it > (u > >> sually > >> >> >>> > > > > with > >> >> >>> > > > > /etc/rc.d/netif restart). Then it works for a little while > , b > >> efore > >> >> >>> > > > > going > >> >> >>> > > > > down again. With the old wpa_supplicant I didn't have this > pr > >> oblem. > >> >> >>> > > > > > >> >> >>> > > > > I don't have very much else to add except noting that I'm a > ffe > >> cted as > >> >> >>> > > > > well. > >> >> >>> > > > > I haven't had time to debug it properly (which is why I've > nev > >> er > >> >> >>> > > > > reported > >> >> >>> > > > > it) > >> >> >>> > > > > >> >> >>> > > > I plan on trying out the latest from upstream beyond the patc > h C > >> y sent > >> >> >>> > > > along earlier to see if it's perhaps been addressed elsewhere > in > >> the > >> >> >>> > > > past two years since this release was made. > >> >> >>> > > > >> >> >>> > > A point of reference. I've had no issues here with any of the n > etw > >> orks > >> >> >>> > > I use. All the networks I use are either WPA-PSK or open. The l > ast > >> >> >>> > > WPA-EAP I used was at former $JOB a few years ago. However, at > the > >> Link > >> >> >>> > > Lounge just outside where $JOB is at my wifi would disconnect e > ver > >> y 30 > >> >> >>> > > minutes using our old wpa 2.5, requiring a netif restart. 2.6 r > eso > >> lved > >> >> >>> > > that issue. > >> >> >>> > > > >> >> >>> > > Upline git commit 0adc9b28b39d414d5febfff752f6a1576f785c85 also > lo > >> oks > >> >> >>> > > interesting. > >> >> >>> > > > >> >> >>> > > ommit 0adc9b28b39d414d5febfff752f6a1576f785c85 > >> >> >>> > > Author: Jouni Malinen > >> >> >>> > > Date: Sun Oct 1 12:32:57 2017 +0300 > >> >> >>> > > > >> >> >>> > > Fix PTK rekeying to generate a new ANonce > >> >> >>> > > > >> >> >>> > > The Authenticator state machine path for PTK rekeying ended > up > >> >> >>> > > bypassing > >> >> >>> > > the AUTHENTICATION2 state where a new ANonce is generated w > hen > >> going > >> >> >>> > > directly to the PTKSTART state since there is no need to tr > y t > >> o > >> >> >>> > > determine the PMK again in such a case. This is far from id > eal > >> >> >>> > > since the > >> >> >>> > > new PTK would depend on a new nonce only from the supplican > t. > >> >> >>> > > > >> >> >>> > > Fix this by generating a new ANonce when moving to the PTKS > TAR > >> T > >> >> >>> > > state > >> >> >>> > > for the purpose of starting new 4-way handshake to rekey PT > K. > >> >> >>> > > > >> >> >>> > > Signed-off-by: Jouni Malinen > >> >> >>> > > > >> >> >>> > > > >> >> >>> > > I suspect a timeout because reason=1 in Kyle's log. > >> >> >>> > > >> >> >>> > > >> >> >>> > I have two systems experienced wifi connection issues after rece > nt > >> HEAD > >> >> >>> > update. > >> >> >>> > Both of them experiencing frequent up/down wlan0 events on boot > so > >> wireles > >> >> >>> s > >> >> >>> > connection can not negotiate DHCP requests, possibly due to fact > tha > >> t both > >> >> >>> > connecting to the same AP. > >> >> >>> > AP capabilities list: > >> >> >>> > > >> >> >>> > ***** f8:1a:67:56:16:16 1 54M -74:-96 100 EPS WPA WME > ATH > >> WPS > >> >> >>> > > >> >> >>> > Interesting enough that switching wpa_supplicant to version 2.6 f > rom > >> ports > >> >> >>> > fixes that issue completely. > >> >> >>> > > >> >> >>> > Hopefully it helps. > >> >> >>> > > >> >> >>> > Thank you. > >> >> >>> > >> >> >>> I've imported all the patches in the port, from our upline into bas > e. > >> >> >>> Some were already committed to > >> >> >>> -- > >> >> >>> Cheers, > >> >> >>> Cy Schubert > >> >> >>> FreeBSD UNIX: Web: http://www.FreeBSD.org > >> >> >>> > >> >> >>> The need of the many outweighs the greed of the few. > >> >> >>> base 2.5 others not. This should bring base up to par with the por > t, > >> >> >>> address the remaining security issues, and probably fix this thread > to > >> o. > >> >> >> > >> >> >> exmh. I had my cursor in the wrong place when I hit send. > >> >> >> > >> >> >> I've imported all the patches in the port, from our upline into base > . > >> >> >> Some were already committed to base 2.5 others not. This should brin > g > >> >> >> base up to par with the port, address the remaining security issues, > >> >> >> and probably fix this thread too. > >> >> >> > >> >> > > >> >> > FWIW- with ports 2.6 I've confirmed that instead of the reassociation > I > >> get: > >> >> > > >> >> > Jul 19 18:17:30 shiva wpa_supplicant[34199]: wlan0: WPA: Group > >> >> > rekeying completed with ... [GTK=CCMP] > >> >> > > >> >> > I'll try with base 2.6 now that you've updated with all of these patc > hes > >> . > >> >> > >> >> Alright, base 2.6 is still no good here. I note that there's still > >> >> some diff between ports and base [1] (about 252 lines of diff to sort > >> >> through, nothing serious... I removed the obviously-for-libressl > >> >> diff). > >> >> > >> >> Some of it looks kind of suspicious, but I'd guess the changes in > >> >> ./src/rsn_supp/wpa.c are mostly what make the difference for me. How > >> >> much of this really needs to stick around, given that ports > >> >> wpa_supplicant is actually pretty stable? > >> > > >> > (Attempting to read between the lines, forgive me if I > >> > misinterpreted.) > >> > >> Sorry, I seem to have missed a word there. I meant "How much of this > >> [diff] really needs to stick around, given that ports wpa_supplicant > >> is actually pretty stable?" -- we've had a couple reports of > >> improvements from the 2.6 in ports, so I wonder if some of our local > >> diffs should have gone away with the 2.6 update but we didn't quite > >> get there. > >> > >> > Some of the systems I've set up recently are more easily set up with > >> > wireless. Running a 100ft cable in an office building isn't that fun. > >> > > >> > >> Ahh, indeed- at $work we have tons of those, with 2ft thick concrete > >> walls sprinkled conservatively and legacy wire runs -everywhere-, and > >> not necessarily with drop ceilings or conduit... ugh. > > > > I'm on a $work issue right now. I'll get back to this in an hour. > > > > FWIW- extracting the src/rsn_supp/wpa.c diff from the aforementioned > diff between ports 2.6 and base 2.6 and doing a patch -R of that on > the base 2.6 fixes my problem, at least. Yes, I'm looking at that now. (I fixed the NFS issue -- firewall out of state impacting NFS -- at $JOB sooner than expected. I'm on it 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-head@freebsd.org Fri Jul 20 01:51:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD22B102AA55; Fri, 20 Jul 2018 01:51: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.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 5E37586561; Fri, 20 Jul 2018 01:51:06 +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 3F5C5160A; Fri, 20 Jul 2018 01:51:06 +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 w6K1p6MD011555; Fri, 20 Jul 2018 01:51:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K1p6Uj011554; Fri, 20 Jul 2018 01:51:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807200151.w6K1p6Uj011554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 20 Jul 2018 01:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336527 - head/tools/tools/crypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/tools/tools/crypto X-SVN-Commit-Revision: 336527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 01:51:06 -0000 Author: cem Date: Fri Jul 20 01:51:05 2018 New Revision: 336527 URL: https://svnweb.freebsd.org/changeset/base/336527 Log: cryptocheck: Correct mismatch between OpenSSL use and OCF Blake2 This corrects a mistake introduced to the cryptocheck tool in r331418. Our CRYPTO_BLAKE2B and CRYPTO_BLAKE2S algorithms refer to either the plain, unkeyed hashes (specified with cri_klen = 0), or a Blake2-specific keyed MAC (when a cri_key is provided). In contrast, OpenSSL's Blake2 algorithms only provide the plain hash. Cryptocheck's T_HMAC corresponds to OpenSSL's HMAC() routine, which is the ordinary HMAC construction applied to any plain, unkeyed hash. We don't have any HMAC-Blake2 cipher modes in OCF, so fix the test to only test Blake2 as a plain hash. (Ideally we would test keyed Blake2 as well, but that is left as future work.) PR: 229795 Modified: head/tools/tools/crypto/cryptocheck.c Modified: head/tools/tools/crypto/cryptocheck.c ============================================================================== --- head/tools/tools/crypto/cryptocheck.c Fri Jul 20 00:44:04 2018 (r336526) +++ head/tools/tools/crypto/cryptocheck.c Fri Jul 20 01:51:05 2018 (r336527) @@ -155,9 +155,9 @@ struct alg { .evp_md = EVP_sha384 }, { .name = "sha512hmac", .mac = CRYPTO_SHA2_512_HMAC, .type = T_HMAC, .evp_md = EVP_sha512 }, - { .name = "blake2b", .mac = CRYPTO_BLAKE2B, .type = T_HMAC, + { .name = "blake2b", .mac = CRYPTO_BLAKE2B, .type = T_HASH, .evp_md = EVP_blake2b512 }, - { .name = "blake2s", .mac = CRYPTO_BLAKE2S, .type = T_HMAC, + { .name = "blake2s", .mac = CRYPTO_BLAKE2S, .type = T_HASH, .evp_md = EVP_blake2s256 }, { .name = "aes-cbc", .cipher = CRYPTO_AES_CBC, .type = T_BLKCIPHER, .evp_cipher = EVP_aes_128_cbc }, From owner-svn-src-head@freebsd.org Fri Jul 20 01:51:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B76DF102AA5A for ; Fri, 20 Jul 2018 01:51:07 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 468A286566 for ; Fri, 20 Jul 2018 01:51:07 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 5b253fc2-8bbf-11e8-aff6-0b9b8210da61 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 outbound1.eu.mailhop.org (Halon) with ESMTPSA id 5b253fc2-8bbf-11e8-aff6-0b9b8210da61; Fri, 20 Jul 2018 01:51:03 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6K1p1DK004400; Thu, 19 Jul 2018 19:51:01 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532051461.1344.24.camel@freebsd.org> Subject: Re: svn commit: r336525 - in head: contrib/ntp/ntpd etc etc/mtree . . . (with -r336526 as well): breaks ci.freebsd.org FreeBSD-head-sparc64-build (and others) From: Ian Lepore To: Mark Millard , svn-src-head@freebsd.org Date: Thu, 19 Jul 2018 19:51:01 -0600 In-Reply-To: <8B1518D2-D221-4C28-BC1E-C79A0EC743EC@yahoo.com> References: <8B1518D2-D221-4C28-BC1E-C79A0EC743EC@yahoo.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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 01:51:07 -0000 On Thu, 2018-07-19 at 18:13 -0700, Mark Millard wrote: > https://ci.freebsd.org/job/FreeBSD-head-sparc64-build/8759/consoleTex > t shows > ( -r336526 ): > > -------------------------------------------------------------- > > > > > > > > > > > > > Kernel build for GENERIC completed on Fri Jul 20 00:58:39 UTC > > > > 2018 > -------------------------------------------------------------- > + cd /usr/src/release > + sudo make clean > chflags -R noschg . > rm -f packagesystem *.txz MANIFEST release  disc1.iso bootonly.iso > memstick.img mini-memstick.img ec2ami cw-ec2-portinstall azure-check- > depends  azure-do-upload gce-do-login vagrant-check-depends vagrant- > do-upload-virtualbox vagrant-do-upload-vmware vagrant-do-package- > virtualbox FreeBSD-12.0-CURRENT-amd64-20180720.virtualbox.box > vagrant-do-upload-virtualbox vagrant-do-package-vmware FreeBSD-12.0- > CURRENT-amd64-20180720.vmware.box vagrant-do-upload-vmware > rm -rf dist ftp disc1 bootonly dvd virtualbox vmware > + sudo make -DNOPORTS -DNOSRC -DNODOC packagesystem 'TARGET=sparc64' > 'TARGET_ARCH=sparc64' 'MAKE=make __MAKE_CONF=/dev/null > SRCCONF=/dev/null' > [Creating objdir /usr/obj/usr/src/sparc64.sparc64/release...] > mkdir -p dist > cd /usr/src/release/.. && make __MAKE_CONF=/dev/null > SRCCONF=/dev/null TARGET_ARCH=sparc64 TARGET=sparc64 distributeworld > DISTDIR=/usr/obj/usr/src/sparc64.sparc64/release/dist > make[2]: "/usr/obj/usr/src/sparc64.sparc64/toolchain-metadata.mk" > line 1: Using cached toolchain metadata from build at FreeBSD-head- > sparc64-build.jail.ci.FreeBSD.org on Fri Jul 20 00:53:24 UTC 2018 > ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > *** Error code 1 > > The following are similar: > > https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/6789/consoleTex > t > https://ci.freebsd.org/job/FreeBSD-head-mips64-build/3450/consoleText > > > -r336525 broke: > > https://ci.freebsd.org/job/FreeBSD-head-powerpcspe-build/6836/console > Text > https://ci.freebsd.org/job/FreeBSD-head-i386-build/8635/consoleText > > getting messages like: > > mtree -deU -i -f /usr/src/etc/mtree/BSD.var.dist -p > //usr/obj/usr/src/powerpc.powerpcspe/release/dist/base/var > mtree: unknown user `ntpd' > mtree: failed at line 49 of the specification > *** Error code 1 > > > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > I think this will have to be fixed in jenkins. It should probably be using the DB_FROM_SRC option. -- Ian From owner-svn-src-head@freebsd.org Fri Jul 20 01:53:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8EC6102AD56; Fri, 20 Jul 2018 01:53:29 +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 6D91D8690D; Fri, 20 Jul 2018 01:53:29 +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 4EC1D1770; Fri, 20 Jul 2018 01:53:29 +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 w6K1rTjk015612; Fri, 20 Jul 2018 01:53:29 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K1rTv2015611; Fri, 20 Jul 2018 01:53:29 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807200153.w6K1rTv2015611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 20 Jul 2018 01:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336528 - head/contrib/wpa/src/rsn_supp X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/src/rsn_supp X-SVN-Commit-Revision: 336528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 01:53:29 -0000 Author: cy Date: Fri Jul 20 01:53:28 2018 New Revision: 336528 URL: https://svnweb.freebsd.org/changeset/base/336528 Log: Revert r336501. It was a of the wrong rev from the vendor branch. Modified: head/contrib/wpa/src/rsn_supp/wpa.c Modified: head/contrib/wpa/src/rsn_supp/wpa.c ============================================================================== --- head/contrib/wpa/src/rsn_supp/wpa.c Fri Jul 20 01:51:05 2018 (r336527) +++ head/contrib/wpa/src/rsn_supp/wpa.c Fri Jul 20 01:53:28 2018 (r336528) @@ -942,15 +942,6 @@ static int ieee80211w_set_keys(struct wpa_sm *sm, return -1; igtk = (const struct wpa_igtk_kde *) ie->igtk; - keyidx = WPA_GET_LE16(igtk->keyid); - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d " - "pn %02x%02x%02x%02x%02x%02x", - keyidx, MAC2STR(igtk->pn)); - wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", - igtk->igtk, len); - if (keyidx > 4095) { - wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, - "WPA: Invalid IGTK KeyID %d", keyidx); if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0) return -1; } @@ -3031,23 +3022,6 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 sub } else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) { const struct wpa_igtk_kde *igtk; - os_memset(&igd, 0, sizeof(igd)); - keylen = wpa_cipher_key_len(sm->mgmt_group_cipher); - os_memcpy(igd.keyid, buf + 2, 2); - os_memcpy(igd.pn, buf + 4, 6); - - keyidx = WPA_GET_LE16(igd.keyid); - os_memcpy(igd.igtk, buf + 10, keylen); - - wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)", - igd.igtk, keylen); - if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), - broadcast_ether_addr, - keyidx, 0, igd.pn, sizeof(igd.pn), - igd.igtk, keylen) < 0) { - wpa_printf(MSG_DEBUG, "Failed to install the IGTK in " - "WNM mode"); - os_memset(&igd, 0, sizeof(igd)); igtk = (const struct wpa_igtk_kde *) (buf + 2); if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0) return -1; From owner-svn-src-head@freebsd.org Fri Jul 20 01:59:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 376CA102AF5F; Fri, 20 Jul 2018 01:59:23 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 B69A586AB6; Fri, 20 Jul 2018 01:59:22 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 2ECD11F353; Fri, 20 Jul 2018 01:59:16 +0000 (UTC) Subject: Re: svn commit: r336451 - in head/sys/dev/mlx5: . mlx5_core mlx5_en To: Ian Lepore , Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807181012.w6IACrib086913@repo.freebsd.org> <1532040910.1344.19.camel@freebsd.org> From: Allan Jude Openpgp: preference=signencrypt Autocrypt: addr=allanjude@freebsd.org; prefer-encrypt=mutual; keydata= xsFNBFVwZcYBEADwrZDH0xe0ZVjc9ORCc6PcBLwS/RTXA6NkvpD6ea02pZ8lPOVgteuuugFc D34LdDbiWr+479vfrKBh+Y38GL0oZ0/13j10tIlDMHSa5BU0y6ACtnhupFvVlQ57+XaJAb/q 7qkfSiuxVwQ3FY3PL3cl1RrIP5eGHLA9hu4eVbu+FOX/q/XVKz49HaeIaxzo2Q54572VzIo6 C28McX9m65UL5fXMUGJDDLCItLmehZlHsQQ+uBxvODLFpVV2lUgDR/0rDa0B9zHZX8jY8qQ7 ZdCSy7CwClXI054CkXZCaBzgxYh/CotdI8ezmaw7NLs5vWNTxaDEFXaFMQtMVhvqQBpHkfOD 7rjjOmFw00nJL4FuPE5Yut0CPyx8vLjVmNJSt/Y8WxxmhutsqJYFgYfWl/vaWkrFLur/Zcmz IklwLw35HLsCZytCN5A3rGKdRbQjD6QPXOTJu0JPrJF6t2xFkWAT7oxnSV0ELhl2g+JfMMz2 Z1PDmS3NRnyEdqEm7NoRGXJJ7bgxDbN+9SXTyOletqGNXj/bSrBvhvZ0RQrzdHAPwQUfVSU2 qBhQEi2apSZstgVNMan0GUPqCdbE2zpysg+zT7Yhvf9EUQbzPL4LpdK1llT9fZbrdMzEXvEF oSvwJFdV3sqKmZc7b+E3PuxK6GTsKqaukd/3Cj8aLHG1T1im1QARAQABzSJBbGxhbiBKdWRl IDxhbGxhbmp1ZGVAZnJlZWJzZC5vcmc+wsF/BBMBAgApBQJVcGXGAhsjBQkSzAMABwsJCAcD AgEGFQgCCQoLBBYCAwECHgECF4AACgkQGZU1PhKYC34Muw/+JOKpSfhhysWFYiRXynGRDe07 Z6pVsn7DzrPUMRNZfHu8Uujmmy3p2nx9FelIY9yjd2UKHhug+whM54MiIFs90eCRVa4XEsPR 4FFAm0DAWrrb7qhZFcE/GhHdRWpZ341WAElWf6Puj2devtRjfYbikvj5+1V1QmDbju7cEw5D mEET44pTuD2VMRJpu2yZZzkM0i+wKFuPxlhqreufA1VNkZXI/rIfkYWK+nkXd9Efw3YdCyCQ zUgTUCb88ttSqcyhik/li1CDbXBpkzDCKI6I/8fAb7jjOC9LAtrZJrdgONywcVFoyK9ZN7EN AVA+xvYCmuYhR/3zHWH1g4hAm1v1+gIsufhajhfo8/wY1SetlzPaYkSkVQLqD8T6zZyhf+AN bC7ci44UsiKGAplB3phAXrtSPUEqM86kbnHg3fSx37kWKUiYNOnx4AC2VXvEiKsOBlpyt3dw WQbOtOYM+vkfbBwDtoGOOPYAKxc4LOIt9r+J8aD+gTooi9Eo5tvphATf9WkCpl9+aaGbSixB tUpvQMRnSMqTqq4Z7DeiG6VMRQIjsXDSLJEUqcfhnLFo0Ko/RiaHd5xyAQ4DhQ9QpkyQjjNf /3f/dYG7JAtoD30txaQ5V8uHrz210/77DRRX+HJjEj6xCxWUGvQgvEZf5XXyxeePvqZ+zQyT DX61bYw6w6bOwU0EVXBlxgEQAMy7YVnCCLN4oAOBVLZ5nUbVPvpUhsdA94/0/P+uqCIh28Cz ar56OCX0X19N/nAWecxL4H32zFbIRyDB2V/MEh4p9Qvyu/j4i1r3Ex5GhOT2hnit43Ng46z5 29Es4TijrHJP4/l/rB2VOqMKBS7Cq8zk1cWqaI9XZ59imxDNjtLLPPM+zQ1yE3OAMb475QwN UgWxTMw8rkA7CEaqeIn4sqpTSD5C7kT1Bh26+rbgJDZ77D6Uv1LaCZZOaW52okW3bFbdozV8 yM2u+xz2Qs8bHz67p+s+BlygryiOyYytpkiK6Iy4N7FTolyj5EIwCuqzfk0SaRHeOKX2ZRjC qatkgoD/t13PNT38V9tw3qZVOJDS0W6WM8VSg+F+bkM9LgJ8CmKV+Hj0k3pfGfYPOZJ/v18i +SmZmL/Uw2RghnwDWGAsPCKu4uZR777iw7n9Io6Vfxndw2dcS0e9klvFYoaGS6H2F13Asygr WBzFNGFQscN4mUW+ZYBzpTOcHkdT7w8WS55BmXYLna+dYer9/HaAuUrONjujukN4SPS1fMJ2 /CS/idAUKyyVVX5vozoNK2JVC1h1zUAVsdnmhEzNPsvBoqcVNfyqBFROEVLIPwq+lQMGNVjH ekLTKRWf59MEhUC2ztjSKkGmwdg73d6xSXMuq45EgIJV2wPvOgWQonoHH/kxABEBAAHCwWUE GAECAA8FAlVwZcYCGwwFCRLMAwAACgkQGZU1PhKYC34w5A//YViBtZyDV5O+SJT9FFO3lb9x Zdxf0trA3ooCt7gdBkdnBM6T5EmjgVZ3KYYyFfwXZVkteuCCycMF/zVw5eE9FL1+zz9gg663 nY9q2F77TZTKXVWOLlOV2bY+xaK94U4ytogOGhh9b4UnQ/Ct3+6aviCF78Go608BXbmF/GVT 7uhddemk7ItxM1gE5Hscx3saxGKlayaOsdPKeGTVJCDEtHDuOc7/+jGh5Zxpk/Hpi+DUt1ot 8e6hPYLIQa4uVx4f1xxxV858PQ7QysSLr9pTV7FAQ18JclCaMc7JWIa3homZQL/MNKOfST0S 2e+msuRwQo7AnnfFKBUtb02KwpA4GhWryhkjUh/kbVc1wmGxaU3DgXYQ5GV5+Zf4kk/wqr/7 KG0dkTz6NLCVLyDlmAzuFhf66DJ3zzz4yIo3pbDYi3HB/BwJXVSKB3Ko0oUo+6/qMrOIS02L s++QE/z7K12CCcs7WwOjfCYHK7VtE0Sr/PfybBdTbuDncOuAyAIeIKxdI2nmQHzl035hhvQX s4CSghsP319jAOQiIolCeSbTMD4QWMK8RL/Pe1FI1jC3Nw9s+jq8Dudtbcj2UwAP/STUEbJ9 5rznzuuhPjE0e++EU/RpWmcaIMK/z1zZDMN+ce2v1qzgV936ZhJ3iaVzyqbEE81gDxg3P+IM kiYh4ZtPB4Q= Message-ID: <5e712e56-3b3b-2905-ce32-ff933886df77@freebsd.org> Date: Thu, 19 Jul 2018 21:59:09 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1532040910.1344.19.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LslEsjhrpQ88lcKRzVlWYXmmP4F5uItoG" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 01:59:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LslEsjhrpQ88lcKRzVlWYXmmP4F5uItoG Content-Type: multipart/mixed; boundary="UUczX0kgig1w2iUH4nm0KiyBEGtybbLGP"; protected-headers="v1" From: Allan Jude To: Ian Lepore , Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5e712e56-3b3b-2905-ce32-ff933886df77@freebsd.org> Subject: Re: svn commit: r336451 - in head/sys/dev/mlx5: . mlx5_core mlx5_en References: <201807181012.w6IACrib086913@repo.freebsd.org> <1532040910.1344.19.camel@freebsd.org> In-Reply-To: <1532040910.1344.19.camel@freebsd.org> --UUczX0kgig1w2iUH4nm0KiyBEGtybbLGP Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2018-07-19 18:55, Ian Lepore wrote: > On Wed, 2018-07-18 at 10:12 +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Jul 18 10:12:53 2018 >> New Revision: 336451 >> URL: https://svnweb.freebsd.org/changeset/base/336451 >> >> Log: >> =C2=A0 Update version information for the mlx5 and mlx5en(4) modules. >> =C2=A0=C2=A0 >> =C2=A0 While at it bump some copyright dates. >> =C2=A0=C2=A0 >> =C2=A0 MFC after: 1 week >> =C2=A0 Sponsored by: Mellanox Technologies >=20 > After this recent set of commits, the sparc64, powerpc64, and armv4 > LINT kernels are failing to build. The problems are all some combo of > missing fcmpset functions, or missing 64-bit atomic functions. I'm not > sure this driver is useful on any of those platforms, but I guess it > has always built fine in the past. >=20 > -- Ian >=20 I think you have the wrong commit. This commit only changes some static strings, and copyright comments. --=20 Allan Jude --UUczX0kgig1w2iUH4nm0KiyBEGtybbLGP-- --LslEsjhrpQ88lcKRzVlWYXmmP4F5uItoG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJbUUHzAAoJEBmVNT4SmAt+HVsQAJlYsBZSpz6lFI81HMPUmRNL LCzly0AAluGIrtbnRzlVpt9WpdMuAPbjeYCZvaTfZfDUyo0saXUqZ7fJI1i1I8kt rhYwqOctsCHEKbdw23ognRPewH18AIxIzgQGU14znYIhTR1L+xm+vpzvkREzIFaw Ex3vPCL2g/VjE9vOWzMkArZxTzHlrjwGrESA8xMOlpNAlCdm1vWVZnF5HWVLugWd OeDRyp+/6spjGQkhjWQ+r6S3A3HvGMiVAMIj6RB2XwmyXn8ek6tVvU8HK2jn1TVt 7zyplqse3JlcdM49YQwN2GrL8IimKNtaphTL2wV91tOf4Lbxv61vVz00L4WuafXD NOKvjmFix/udn7pJpAXpDkSkSzQ453Lw+lbVigTMFP62YNuDqxcKMQEP88Ui3vX/ R2hibcmupxQ/ifhMglEdraAr7tf2sRb7mCwLvUcCdHIwH+DRK92ezf6xxVLSMDtg t5M6g6ZV7GIP/Vfai5P2nG3uoUncBsTnDXhp8NfA/TT8T8ONQjEogbR5DcG4mVvZ e6aOxLQ1mdnAbvl6Y9CRTuuU/H0NeXw4Bv0LaZA15f60fs9ES7HkFugVtrhwsj8x DQfXGRID/1oP+8HzrSR0rCz04Q/3yHzIDjBlgg1Q0ttTpM2/8/zkAuoIcXgifWQj GgprHIdaMBX1/7ZUiUD1 =TRCf -----END PGP SIGNATURE----- --LslEsjhrpQ88lcKRzVlWYXmmP4F5uItoG-- From owner-svn-src-head@freebsd.org Fri Jul 20 02:00:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6983F102AFE9; Fri, 20 Jul 2018 02:00:20 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A09186BE8; Fri, 20 Jul 2018 02:00:20 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id ACF8AB017; Fri, 20 Jul 2018 02:00:19 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f45.google.com with SMTP id u14-v6so690932lfu.0; Thu, 19 Jul 2018 19:00:19 -0700 (PDT) X-Gm-Message-State: AOUpUlEiA8McyBMo0V4GfeQRm0Mzo20wfn/2/gi68xLcAfHdGUpwaLAa 3v5L625t44VnnHGgmCB3K06TxXDw6nwuyrWMGyo= X-Google-Smtp-Source: AAOMgpc6scCJDMwEaGtaSfRkUrCM3QH3gBD0H382kaCpAsy1VL+7iOT8NRjf5QdS6SULW4v0zrjXYcUOaA6YwnEa6mo= X-Received: by 2002:a19:7b08:: with SMTP id w8-v6mr60229lfc.22.1532052018351; Thu, 19 Jul 2018 19:00:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 18:59:57 -0700 (PDT) In-Reply-To: <201807200153.w6K1rTv2015611@repo.freebsd.org> References: <201807200153.w6K1rTv2015611@repo.freebsd.org> From: Kyle Evans Date: Thu, 19 Jul 2018 20:59:57 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336528 - head/contrib/wpa/src/rsn_supp To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 02:00:20 -0000 On Thu, Jul 19, 2018 at 8:53 PM, Cy Schubert wrote: > Author: cy > Date: Fri Jul 20 01:53:28 2018 > New Revision: 336528 > URL: https://svnweb.freebsd.org/changeset/base/336528 > > Log: > Revert r336501. It was a of the wrong rev from the vendor branch. > I updated my diff @ https://people.freebsd.org/~kevans/wpa.diff to reflect this having been reverted, FWIW. From owner-svn-src-head@freebsd.org Fri Jul 20 02:04:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80BF1102B3BD; Fri, 20 Jul 2018 02:04:11 +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 22676870A4; Fri, 20 Jul 2018 02:04:11 +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 F2EB51907; Fri, 20 Jul 2018 02:04:10 +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 w6K24ABW020856; Fri, 20 Jul 2018 02:04:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K24AiY020855; Fri, 20 Jul 2018 02:04:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807200204.w6K24AiY020855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 20 Jul 2018 02:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336529 - head/contrib/wpa/src/rsn_supp X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/src/rsn_supp X-SVN-Commit-Revision: 336529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 02:04:11 -0000 Author: cy Date: Fri Jul 20 02:04:10 2018 New Revision: 336529 URL: https://svnweb.freebsd.org/changeset/base/336529 Log: MFV: r336486 Prevent reinstallation of an already in-use group key. Upline git commit cb5132bb35698cc0c743e34fe0e845dfc4c3e410. Obtained from: https://w1.fi/security/2017-1/\ rebased-v2.6-0002-Prevent-reinstallation-\ of-an-already-in-use-group-ke.patch X-MFC-with: r336203 Modified: head/contrib/wpa/src/rsn_supp/wpa.c Modified: head/contrib/wpa/src/rsn_supp/wpa.c ============================================================================== --- head/contrib/wpa/src/rsn_supp/wpa.c Fri Jul 20 01:53:28 2018 (r336528) +++ head/contrib/wpa/src/rsn_supp/wpa.c Fri Jul 20 02:04:10 2018 (r336529) @@ -860,7 +860,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm * (wpa_supplicant_check_group_cipher(sm, sm->group_cipher, gtk_len, gtk_len, &gd.key_rsc_len, &gd.alg) || - wpa_supplicant_install_gtk(sm, &gd, key->key_rsc, 0))) { + wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0))) { wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "RSN: Failed to install GTK"); os_memset(&gd, 0, sizeof(gd)); @@ -1592,13 +1592,13 @@ static void wpa_supplicant_process_1_of_2(struct wpa_s if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc)) key_rsc = null_rsc; - if (wpa_supplicant_install_gtk(sm, &gd, key->key_rsc, 0) || - wpa_supplicant_send_2_of_2(sm, key, ver, key_info)) + if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0) || + wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0) goto failed; os_memset(&gd, 0, sizeof(gd)); if (rekey) { - wpa_msg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Group rekeying " + wpa_msg(sm->ctx->msg_ctx, MSG_INFO, "WPA: Group rekeying " "completed with " MACSTR " [GTK=%s]", MAC2STR(sm->bssid), wpa_cipher_txt(sm->group_cipher)); wpa_sm_cancel_auth_timeout(sm); From owner-svn-src-head@freebsd.org Fri Jul 20 02:17:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC824102B928; Fri, 20 Jul 2018 02:17:20 +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 93CBC8757F; Fri, 20 Jul 2018 02:17:20 +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 6B5441AAE; Fri, 20 Jul 2018 02:17:20 +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 w6K2HKcd026056; Fri, 20 Jul 2018 02:17:20 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K2HKvJ026055; Fri, 20 Jul 2018 02:17:20 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807200217.w6K2HKvJ026055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 20 Jul 2018 02:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336530 - head/contrib/wpa/wpa_supplicant X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/wpa_supplicant X-SVN-Commit-Revision: 336530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 02:17:21 -0000 Author: cy Date: Fri Jul 20 02:17:19 2018 New Revision: 336530 URL: https://svnweb.freebsd.org/changeset/base/336530 Log: To reduce our diff between our sources and our upline, sync up with upline. Also making it easier to read. Obtained from: diffing base with ports X-MFC-with: r336203 Modified: head/contrib/wpa/wpa_supplicant/wnm_sta.c Modified: head/contrib/wpa/wpa_supplicant/wnm_sta.c ============================================================================== --- head/contrib/wpa/wpa_supplicant/wnm_sta.c Fri Jul 20 02:04:10 2018 (r336529) +++ head/contrib/wpa/wpa_supplicant/wnm_sta.c Fri Jul 20 02:17:19 2018 (r336530) @@ -198,8 +198,8 @@ static void wnm_sleep_mode_exit_success(struct wpa_sup return; } - while (ptr + 1 < end) { - if (ptr + 2 + ptr[1] > end) { + while (end - ptr > 1) { + if (2 + ptr[1] > end - ptr) { wpa_printf(MSG_DEBUG, "WNM: Invalid Key Data element " "length"); if (end > ptr) { From owner-svn-src-head@freebsd.org Fri Jul 20 02:25:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFCA5102BCF8; Fri, 20 Jul 2018 02:25:40 +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 7815988329; Fri, 20 Jul 2018 02:25:40 +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 565991C42; Fri, 20 Jul 2018 02:25:40 +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 w6K2PeJJ031060; Fri, 20 Jul 2018 02:25:40 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K2PeDv031059; Fri, 20 Jul 2018 02:25:40 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807200225.w6K2PeDv031059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 20 Jul 2018 02:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336531 - head/contrib/wpa/src/drivers X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/wpa/src/drivers X-SVN-Commit-Revision: 336531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 02:25:41 -0000 Author: cy Date: Fri Jul 20 02:25:39 2018 New Revision: 336531 URL: https://svnweb.freebsd.org/changeset/base/336531 Log: Remove a redundant declaration. While at it add a blank line, conforming with the convention used in this file. X-MFC-with: r336203 Modified: head/contrib/wpa/src/drivers/driver_wired.c Modified: head/contrib/wpa/src/drivers/driver_wired.c ============================================================================== --- head/contrib/wpa/src/drivers/driver_wired.c Fri Jul 20 02:17:19 2018 (r336530) +++ head/contrib/wpa/src/drivers/driver_wired.c Fri Jul 20 02:25:39 2018 (r336531) @@ -471,6 +471,7 @@ static int wpa_driver_wired_set_ifflags(const char *if return 0; } + #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) static int wpa_driver_wired_get_ifstatus(const char *ifname, int *status) { @@ -558,7 +559,7 @@ static int wpa_driver_wired_multi(const char *ifname, static void * wpa_driver_wired_init(void *ctx, const char *ifname) { struct wpa_driver_wired_data *drv; - int flags, status; + int flags; drv = os_zalloc(sizeof(*drv)); if (drv == NULL) From owner-svn-src-head@freebsd.org Fri Jul 20 02:36:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C922A102C1EF for ; Fri, 20 Jul 2018 02:36:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-15.consmr.mail.bf2.yahoo.com (sonic313-15.consmr.mail.bf2.yahoo.com [74.6.133.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65FFF887BC for ; Fri, 20 Jul 2018 02:36:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: fachy38VM1m123csFvNiCM.L3Gi.qsy3_GGmIulzVDdsLdAzaOQCdA4x4BiPAj5 M4fBfKV.Pj4TVOSCK.4dMjlMRZ6mc1WouvHjzwbcQdkWm3A4UI2VcR35_7cGm8vcanrrh0AhXZtW qq5lBj_Ib35j84TnElQgRJvJmQnJV6QEdlwFO1EvivaXYECJ9Opb7_L5Bh8xVZb7Et9VlspXZvKA 4hJqiNfm6jp3LbICmKJXcEqjoC4Gh4SgWh3NFElQO_setuhxiuz95ljubcbRo_2PbdqgLNHX8jZu FUmnx35PNAY6y5ZZ6XxLjbIkWvZ6nuffLjqGZJbrqd6mMBm7vSI0wzjzS66gqhGLdB4NEKk0Rzj5 AeQvlPKjoVs71eDn7ogW4ef1tQLc1cze8nkqNTbKK78P26vwrwuP2TZMGXqXps.JVhhxlkwDyNjf nmJs__yF_2zu.bUja_i._3dC4MPPhsCZX.nPrQEtF5r5EkXbNNNV9rq3oKOUgo8TmCDvqx1SfE2O cSr5C885bqgwWkOkbxu9gILOKzlfEhG.3PKMFAuBsE0QEHRnmpJiIfjN3jWmDNGfZ8L3t01bP8GS cNWcsilPp96ML4nMdM3US7vB47Wis5h7cPUrj3e_qGuG74_E8cL_y1czG1seNPUNjAPzkuD1acGj Luuv8dgnl0W97LAvijT4AAvBXc1Uqo7TZF0UaIi64nF7dlozk68OKmnEvxROEuSGUXjHhmqa2hZX nbZDor4_G5XpcirgNeWISP5vmChfRIlLUeWVmLxDdnOsJj3SRgF_.aH_PX_ITyABtnSYvRPLPC2x MDrZcVTsmrES_fsizyvkP0l.6T_QT6VxaJPRt0EI3Pxit0o85V7bZAuAX9Bwpctk1uvNjXsclMXD HpXAPWikm6ZI2yzxXeJHyKVs.JCO.LXqTt6Zr3mzrmBH_qS7kjQsY.GAFjDuWH9W3mzXlf6Y33Vh OKj43wJ7etLycjL9ngDx0LueXoL0ROGS77oifL1job0DVmJaBS5yNKE8frB.RXI_OrYtpeC2hZg6 Wh9U- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.bf2.yahoo.com with HTTP; Fri, 20 Jul 2018 02:36:20 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp402.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 4b7fbd9a9c579d673e5b4511f0d9b04f; Fri, 20 Jul 2018 02:36:17 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336525 - in head: contrib/ntp/ntpd etc etc/mtree . . . (with -r336526 as well): breaks ci.freebsd.org FreeBSD-head-sparc64-build (and others) From: Mark Millard In-Reply-To: <1532051461.1344.24.camel@freebsd.org> Date: Thu, 19 Jul 2018 19:36:15 -0700 Cc: svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <8B1518D2-D221-4C28-BC1E-C79A0EC743EC@yahoo.com> <1532051461.1344.24.camel@freebsd.org> To: Li-Wen Hsu , ian@FreeBSD.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 02:36:22 -0000 [Li-Wen Hsu: Does Ian Lepore's reply put this in your area?] On 2018-Jul-19, at 6:51 PM, Ian Lepore wrote: > On Thu, 2018-07-19 at 18:13 -0700, Mark Millard wrote: >> https://ci.freebsd.org/job/FreeBSD-head-sparc64-build/8759/consoleTex >> t shows >> ( -r336526 ): >> >> -------------------------------------------------------------- >>> >>>> >>>>> >>>>> Kernel build for GENERIC completed on Fri Jul 20 00:58:39 UTC >>>>> 2018 >> -------------------------------------------------------------- >> + cd /usr/src/release >> + sudo make clean >> chflags -R noschg . >> rm -f packagesystem *.txz MANIFEST release disc1.iso bootonly.iso >> memstick.img mini-memstick.img ec2ami cw-ec2-portinstall azure-check- >> depends azure-do-upload gce-do-login vagrant-check-depends vagrant- >> do-upload-virtualbox vagrant-do-upload-vmware vagrant-do-package- >> virtualbox FreeBSD-12.0-CURRENT-amd64-20180720.virtualbox.box >> vagrant-do-upload-virtualbox vagrant-do-package-vmware FreeBSD-12.0- >> CURRENT-amd64-20180720.vmware.box vagrant-do-upload-vmware >> rm -rf dist ftp disc1 bootonly dvd virtualbox vmware >> + sudo make -DNOPORTS -DNOSRC -DNODOC packagesystem 'TARGET=sparc64' >> 'TARGET_ARCH=sparc64' 'MAKE=make __MAKE_CONF=/dev/null >> SRCCONF=/dev/null' >> [Creating objdir /usr/obj/usr/src/sparc64.sparc64/release...] >> mkdir -p dist >> cd /usr/src/release/.. && make __MAKE_CONF=/dev/null >> SRCCONF=/dev/null TARGET_ARCH=sparc64 TARGET=sparc64 distributeworld >> DISTDIR=/usr/obj/usr/src/sparc64.sparc64/release/dist >> make[2]: "/usr/obj/usr/src/sparc64.sparc64/toolchain-metadata.mk" >> line 1: Using cached toolchain metadata from build at FreeBSD-head- >> sparc64-build.jail.ci.FreeBSD.org on Fri Jul 20 00:53:24 UTC 2018 >> ERROR: Required ntpd user is missing, see /usr/src/UPDATING. >> *** Error code 1 >> >> The following are similar: >> >> https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/6789/consoleTex >> t >> https://ci.freebsd.org/job/FreeBSD-head-mips64-build/3450/consoleText >> >> >> -r336525 broke: >> >> https://ci.freebsd.org/job/FreeBSD-head-powerpcspe-build/6836/console >> Text >> https://ci.freebsd.org/job/FreeBSD-head-i386-build/8635/consoleText >> >> getting messages like: >> >> mtree -deU -i -f /usr/src/etc/mtree/BSD.var.dist -p >> //usr/obj/usr/src/powerpc.powerpcspe/release/dist/base/var >> mtree: unknown user `ntpd' >> mtree: failed at line 49 of the specification >> *** Error code 1 >> >> >> >> === >> Mark Millard >> marklmi at yahoo.com >> ( dsl-only.net went >> away in early 2018-Mar) >> >> > > I think this will have to be fixed in jenkins. It should probably be > using the DB_FROM_SRC option. > > -- Ian Okay. I'll try someone else, Li-Wen Hsu for now. [I'll note that all the FreeBSD-head-*-build have since failed.] === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Jul 20 02:42:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F9A5102C59B; Fri, 20 Jul 2018 02:42:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 8981F88B1D; Fri, 20 Jul 2018 02:42:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id gLNcf6eE1p5A1gLNdfTaEL; Thu, 19 Jul 2018 20:42:55 -0600 X-Authority-Analysis: v=2.3 cv=JLKPTPCb c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=ggpv_l4s0CwkDZuLMYsA:9 a=CjuIK1q_8ugA:10 a=vRcdKC0ogzYA:10 a=IfaqVvZgccqrtc8gcwf2: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 C416A15CA; Thu, 19 Jul 2018 19:42:51 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6K2gp2w092877; Thu, 19 Jul 2018 19:42:51 -0700 (PDT) (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 w6K2goSM092822; Thu, 19 Jul 2018 19:42:50 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807200242.w6K2goSM092822@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: Kyle Evans cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336528 - head/contrib/wpa/src/rsn_supp In-Reply-To: Message from Kyle Evans of "Thu, 19 Jul 2018 20:59:57 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Jul 2018 19:42:50 -0700 X-CMAE-Envelope: MS4wfCueWR1dHybIq2C85R+FsFE3rtonzt6K3g/lFvNbsUt7doLrQgNU3nr+/LutP21+ni4UNOxMZXZi5fjo8CCavgffZemdoj8Ds9geHpwZiAyd0hy6WCTF yVzK/abZZSzWUHjhdumOZq7B+msIXuVSz8vnUBFyQxHfgD1yn5FGNHyXCm2JgAVNCYLrFEZ4BkU9Kqfo0SAIPnV7T2yTNqtixaJ4hGJuqQnJliLcOdpRwSAI jyRr0CeKXsg4VKhjfCp5KX2o6wy+1UQE9S+WUnfLp1AdXWr051wLEL8gH0ZBYeUWgbbwua64Z4dGX4UWsIsLWnrOi29NfUqJDAXMuHT7nj8= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 02:42:58 -0000 In message , Kyle Evans writes: > On Thu, Jul 19, 2018 at 8:53 PM, Cy Schubert wrote: > > Author: cy > > Date: Fri Jul 20 01:53:28 2018 > > New Revision: 336528 > > URL: https://svnweb.freebsd.org/changeset/base/336528 > > > > Log: > > Revert r336501. It was a of the wrong rev from the vendor branch. > > > > I updated my diff @ https://people.freebsd.org/~kevans/wpa.diff to > reflect this having been reverted, FWIW. Hi Kyle, I'm terribly sorry for all the trouble this has caused. Let me know if there's anything else I can do. -- 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-head@freebsd.org Fri Jul 20 03:32:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFCFD102DEE4 for ; Fri, 20 Jul 2018 03:32:05 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 63B658A4D4 for ; Fri, 20 Jul 2018 03:32:05 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 76cf35b6-8bcd-11e8-93fa-f3ebd9db2b94 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 outbound1.ore.mailhop.org (Halon) with ESMTPSA id 76cf35b6-8bcd-11e8-93fa-f3ebd9db2b94; Fri, 20 Jul 2018 03:32:02 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6K3W1s5004558; Thu, 19 Jul 2018 21:32:01 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532057521.1344.26.camel@freebsd.org> Subject: Re: svn commit: r336451 - in head/sys/dev/mlx5: . mlx5_core mlx5_en From: Ian Lepore To: Allan Jude , Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 19 Jul 2018 21:32:01 -0600 In-Reply-To: <5e712e56-3b3b-2905-ce32-ff933886df77@freebsd.org> References: <201807181012.w6IACrib086913@repo.freebsd.org> <1532040910.1344.19.camel@freebsd.org> <5e712e56-3b3b-2905-ce32-ff933886df77@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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 03:32:06 -0000 On Thu, 2018-07-19 at 21:59 -0400, Allan Jude wrote: > On 2018-07-19 18:55, Ian Lepore wrote: > > > > On Wed, 2018-07-18 at 10:12 +0000, Hans Petter Selasky wrote: > > > > > > Author: hselasky > > > Date: Wed Jul 18 10:12:53 2018 > > > New Revision: 336451 > > > URL: https://svnweb.freebsd.org/changeset/base/336451 > > > > > > Log: > > >   Update version information for the mlx5 and mlx5en(4) modules. > > >    > > >   While at it bump some copyright dates. > > >    > > >   MFC after: 1 week > > >   Sponsored by: Mellanox Technologies > > After this recent set of commits, the sparc64, powerpc64, and armv4 > > LINT kernels are failing to build. The problems are all some combo of > > missing fcmpset functions, or missing 64-bit atomic functions. I'm not > > sure this driver is useful on any of those platforms, but I guess it > > has always built fine in the past. > > > > -- Ian > > > I think you have the wrong commit. This commit only changes some static > strings, and copyright comments. > I replied to the last in the "recent set of commits" I mentioned. I have no idea which specific commit in the group caused the problem. -- Ian From owner-svn-src-head@freebsd.org Fri Jul 20 05:17:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F8701030CBD; Fri, 20 Jul 2018 05:17:40 +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 C6D1B8CF68; Fri, 20 Jul 2018 05:17:39 +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 9C8D63CC6; Fri, 20 Jul 2018 05:17:39 +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 w6K5HdLP017807; Fri, 20 Jul 2018 05:17:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K5HchM017801; Fri, 20 Jul 2018 05:17:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807200517.w6K5HchM017801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Jul 2018 05:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336532 - in head/stand: . common i386 i386/loader i386/zfsboot i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: . common i386 i386/loader i386/zfsboot i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader X-SVN-Commit-Revision: 336532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:17:40 -0000 Author: imp Date: Fri Jul 20 05:17:37 2018 New Revision: 336532 URL: https://svnweb.freebsd.org/changeset/base/336532 Log: Collapse zfsloader functionality back down into loader. We no longer really need a separate zfsloader. It was useful when we were first supporting ZFS and had limited ability to properly boot off of ZFS without the special boot loader. Now that the boot loader has matured, go the way loader.efi pioneered and just build one binary. Change the name of the loader to load in the secondary boot blocks to be just /boot/loader. Provide a symbolic link from zfsloader to loader so people who have not upgraded their boot blocks are not affected. This has the happy benefit of making coexistence easier as well (fewer binaries in the matrix). Discussed with: allanjude@, kevans@ RelNotes: Yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16361 Deleted: head/stand/i386/zfsloader/Makefile head/stand/i386/zfsloader/Makefile.depend head/stand/sparc64/zfsloader/Makefile Modified: head/stand/common/paths.h head/stand/i386/Makefile head/stand/i386/loader/Makefile head/stand/i386/zfsboot/zfsboot.c head/stand/loader.mk head/stand/sparc64/Makefile head/stand/sparc64/loader/Makefile Modified: head/stand/common/paths.h ============================================================================== --- head/stand/common/paths.h Fri Jul 20 02:25:39 2018 (r336531) +++ head/stand/common/paths.h Fri Jul 20 05:17:37 2018 (r336532) @@ -33,7 +33,6 @@ #define PATH_CONFIG "/boot/config" #define PATH_LOADER "/boot/loader" #define PATH_LOADER_EFI "/boot/loader.efi" -#define PATH_LOADER_ZFS "/boot/zfsloader" #define PATH_KERNEL "/boot/kernel/kernel" #endif /* _PATHS_H_ */ Modified: head/stand/i386/Makefile ============================================================================== --- head/stand/i386/Makefile Fri Jul 20 02:25:39 2018 (r336531) +++ head/stand/i386/Makefile Fri Jul 20 05:17:37 2018 (r336532) @@ -18,6 +18,6 @@ SUBDIR.yes+= pxeldr SUBDIR.yes+= kgzldr .endif -SUBDIR.${MK_ZFS}+= zfsboot gptzfsboot zfsloader +SUBDIR.${MK_ZFS}+= zfsboot gptzfsboot .include Modified: head/stand/i386/loader/Makefile ============================================================================== --- head/stand/i386/loader/Makefile Fri Jul 20 02:25:39 2018 (r336531) +++ head/stand/i386/loader/Makefile Fri Jul 20 05:17:37 2018 (r336532) @@ -1,5 +1,7 @@ # $FreeBSD$ +HAVE_ZFS= ${MK_ZFS} + LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= yes @@ -62,6 +64,9 @@ ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} ${LOADER}.bin: ${LOADER}.sym strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC} +.if ${MK_ZFS} == "yes" +SYMLINKS= ${BINDIR}/${LOADER} ${BINDIR}/zfs${LOADER} +.endif FILES+= ${LOADER} # XXX INSTALLFLAGS_loader= -b FILESMODE_${LOADER}= ${BINMODE} -b Modified: head/stand/i386/zfsboot/zfsboot.c ============================================================================== --- head/stand/i386/zfsboot/zfsboot.c Fri Jul 20 02:25:39 2018 (r336531) +++ head/stand/i386/zfsboot/zfsboot.c Fri Jul 20 05:17:37 2018 (r336532) @@ -848,7 +848,7 @@ main(void) */ if (autoboot && !*kname) { - memcpy(kname, PATH_LOADER_ZFS, sizeof(PATH_LOADER_ZFS)); + memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER)); if (!keyhit(3)) { load(); memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL)); Modified: head/stand/loader.mk ============================================================================== --- head/stand/loader.mk Fri Jul 20 02:25:39 2018 (r336531) +++ head/stand/loader.mk Fri Jul 20 05:17:37 2018 (r336532) @@ -124,7 +124,7 @@ CFLAGS+= -DLOADER_GPT_SUPPORT CFLAGS+= -DLOADER_MBR_SUPPORT .endif -.if defined(HAVE_ZFS) +.if ${HAVE_ZFS:Uno} == "yes" CFLAGS+= -DLOADER_ZFS_SUPPORT CFLAGS+= -I${ZFSSRC} CFLAGS+= -I${SYSDIR}/cddl/boot/zfs Modified: head/stand/sparc64/Makefile ============================================================================== --- head/stand/sparc64/Makefile Fri Jul 20 02:25:39 2018 (r336531) +++ head/stand/sparc64/Makefile Fri Jul 20 05:17:37 2018 (r336532) @@ -5,6 +5,6 @@ NO_OBJ=t .include SUBDIR.yes= boot1 loader -SUBDIR.${MK_ZFS}+=zfsboot zfsloader +SUBDIR.${MK_ZFS}+=zfsboot .include Modified: head/stand/sparc64/loader/Makefile ============================================================================== --- head/stand/sparc64/loader/Makefile Fri Jul 20 02:25:39 2018 (r336531) +++ head/stand/sparc64/loader/Makefile Fri Jul 20 05:17:37 2018 (r336532) @@ -1,5 +1,7 @@ # $FreeBSD$ +HAVE_ZFS= ${MK_ZFS} + LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes @@ -39,6 +41,10 @@ HELP_FILES= ${.CURDIR}/help.sparc64 .include "${BOOTSRC}/loader.mk" LDFLAGS+= -static + +.if ${MK_ZFS} == "yes" +SYMLINKS= ${BINDIR}/loader ${BINDIR}/zfsloader +.endif # Open Firmware standalone support library LIBOFW= ${BOOTOBJ}/ofw/libofw/libofw.a From owner-svn-src-head@freebsd.org Fri Jul 20 05:17:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B07691030CFE; Fri, 20 Jul 2018 05:17:51 +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 538CA8D05A; Fri, 20 Jul 2018 05:17: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 35E8F3CC7; Fri, 20 Jul 2018 05:17: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 w6K5HpwM017865; Fri, 20 Jul 2018 05:17:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K5Ho9i017860; Fri, 20 Jul 2018 05:17:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807200517.w6K5Ho9i017860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Jul 2018 05:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336533 - in head/stand: i386/gptzfsboot i386/zfsboot lua man X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: i386/gptzfsboot i386/zfsboot lua man X-SVN-Commit-Revision: 336533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:17:52 -0000 Author: imp Date: Fri Jul 20 05:17:49 2018 New Revision: 336533 URL: https://svnweb.freebsd.org/changeset/base/336533 Log: Eliminate zfsloader man page. Remove all cross references to zfsloader.8 and /boot/zfsloader. Move ZFS specific info into loader.8. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16361 Deleted: head/stand/man/zfsloader.8 Modified: head/stand/i386/gptzfsboot/gptzfsboot.8 head/stand/i386/zfsboot/zfsboot.8 head/stand/lua/core.lua.8 head/stand/man/Makefile head/stand/man/loader.8 Modified: head/stand/i386/gptzfsboot/gptzfsboot.8 ============================================================================== --- head/stand/i386/gptzfsboot/gptzfsboot.8 Fri Jul 20 05:17:37 2018 (r336532) +++ head/stand/i386/gptzfsboot/gptzfsboot.8 Fri Jul 20 05:17:49 2018 (r336533) @@ -71,7 +71,7 @@ If the .Cm bootfs property is not set, then the root filesystem of the pool is used as the default. -.Xr zfsloader 8 +.Xr loader 8 is loaded from the boot filesystem. If .Pa /boot.config @@ -83,7 +83,7 @@ in the same way as .Pp The ZFS GUIDs of the first successfully probed device and the first detected pool are made available to -.Xr zfsloader 8 +.Xr loader 8 in the .Cm vfs.zfs.boot.primary_vdev and @@ -104,7 +104,7 @@ accepts all the options that supports. .Pp The filesystem specification and the path to -.Xr zfsloader 8 +.Xr loader 8 are different from .Xr boot 8 . The format is @@ -116,7 +116,7 @@ The format is Both the filesystem and the path can be specified. If only a path is specified, then the default filesystem is used. If only a pool and filesystem are specified, then -.Pa /boot/zfsloader +.Pa /boot/loader is used as a path. .Pp Additionally, the @@ -128,7 +128,7 @@ The output format is similar to that of .Pp The configured or automatically determined ZFS boot filesystem is stored in the -.Xr zfsloader 8 +.Xr loader 8 .Cm loaddev variable, and also set as the initial value of the .Cm currdev @@ -171,7 +171,6 @@ gpart bootcode -p /boot/gptzfsboot -i 1 ada0 .Xr boot 8 , .Xr gpart 8 , .Xr loader 8 , -.Xr zfsloader 8 , .Xr zpool 8 .Sh HISTORY .Nm Modified: head/stand/i386/zfsboot/zfsboot.8 ============================================================================== --- head/stand/i386/zfsboot/zfsboot.8 Fri Jul 20 05:17:37 2018 (r336532) +++ head/stand/i386/zfsboot/zfsboot.8 Fri Jul 20 05:17:49 2018 (r336533) @@ -114,7 +114,6 @@ in the example above. .Xr boot 8 , .Xr gptzfsboot 8 , .Xr loader 8 , -.Xr zfsloader 8 , .Xr zpool 8 .Sh HISTORY .Nm Modified: head/stand/lua/core.lua.8 ============================================================================== --- head/stand/lua/core.lua.8 Fri Jul 20 05:17:37 2018 (r336532) +++ head/stand/lua/core.lua.8 Fri Jul 20 05:17:49 2018 (r336533) @@ -169,7 +169,7 @@ These will be picked up using the and .Ev bootenvs_count variables set by -.Xr zfsloader 8 . +.Xr loader 8 . .It Fn core.setDefaults Resets ACPI, safe mode, single user, and verbose settings to their system defauilts. Modified: head/stand/man/Makefile ============================================================================== --- head/stand/man/Makefile Fri Jul 20 05:17:37 2018 (r336532) +++ head/stand/man/Makefile Fri Jul 20 05:17:49 2018 (r336533) @@ -3,8 +3,5 @@ .include MAN+= loader.8 -.if ${MK_ZFS} != "no" -MAN+= zfsloader.8 -.endif .include Modified: head/stand/man/loader.8 ============================================================================== --- head/stand/man/loader.8 Fri Jul 20 05:17:37 2018 (r336532) +++ head/stand/man/loader.8 Fri Jul 20 05:17:49 2018 (r336533) @@ -1038,6 +1038,52 @@ executed. .It -259 Unspecified error. .El +.Sh ZFS FEATURES +.Nm +supports the following format for specifying ZFS filesystems which +can be used wherever +.Xr loader 8 +refers to a device specification: +.Pp +.Ar zfs:pool/filesystem: +.Pp +where +.Pa pool/filesystem +is a ZFS filesystem name as described in +.Xr zfs 8 . +.Pp +If +.Pa /etc/fstab +does not have an entry for the root filesystem and +.Va vfs.root.mountfrom +is not set, but +.Va currdev +refers to a ZFS filesystem, then +.Nm +will instruct kernel to use that filesystem as the root filesystem. +.Sh ZFS COMMAND EXTENSIONS +.Bl -tag -width Ds -compact +.It Ic lsdev Op Fl v +Lists ZFS pools in addition to disks and partitions. +Adding +.Fl v +shows more ZFS pool details in a format that resembles +.Nm zpool Cm status +output. +.Pp +.It Ic lszfs Ar filesystem +A ZFS extended command that can be used to explore the ZFS filesystem +hierarchy in a pool. +Lists the immediate children of the +.Ar filesystem . +The filesystem hierarchy is rooted at a filesystem with the same name +as the pool. +.El +.Sh EXAMPLES +Set the default device used for loading a kernel from a ZFS filesystem: +.Bd -literal -offset indent +set currdev=zfs:tank/ROOT/knowngood: +.Ed .Sh SEE ALSO .Xr libstand 3 , .Xr loader.conf 5 , From owner-svn-src-head@freebsd.org Fri Jul 20 05:18:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F5661030D32; Fri, 20 Jul 2018 05:18:00 +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 8DB388D14A; Fri, 20 Jul 2018 05:17:58 +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 00B3A3CC8; Fri, 20 Jul 2018 05:17:57 +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 w6K5HvYG017925; Fri, 20 Jul 2018 05:17:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K5HuYd017918; Fri, 20 Jul 2018 05:17:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807200517.w6K5HuYd017918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Jul 2018 05:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336534 - in head/stand: efi/boot1 efi/loader i386/boot2 i386/gptboot i386/gptzfsboot i386/isoboot i386/zfsboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: efi/boot1 efi/loader i386/boot2 i386/gptboot i386/gptzfsboot i386/isoboot i386/zfsboot X-SVN-Commit-Revision: 336534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:18:00 -0000 Author: imp Date: Fri Jul 20 05:17:56 2018 New Revision: 336534 URL: https://svnweb.freebsd.org/changeset/base/336534 Log: NM and OBJCOPY are already defined for all builds. There's no need to conditionally define them here. Modified: head/stand/efi/boot1/Makefile head/stand/efi/loader/Makefile head/stand/i386/boot2/Makefile head/stand/i386/gptboot/Makefile head/stand/i386/gptzfsboot/Makefile head/stand/i386/isoboot/Makefile head/stand/i386/zfsboot/Makefile Modified: head/stand/efi/boot1/Makefile ============================================================================== --- head/stand/efi/boot1/Makefile Fri Jul 20 05:17:49 2018 (r336533) +++ head/stand/efi/boot1/Makefile Fri Jul 20 05:17:56 2018 (r336534) @@ -76,9 +76,6 @@ LDADD+= ${LIBEFI} ${LIBSA} DPADD+= ${LDSCRIPT} -NM?= nm -OBJCOPY?= objcopy - .if ${MACHINE_CPUARCH} == "amd64" EFI_TARGET= efi-app-x86_64 .elif ${MACHINE_CPUARCH} == "i386" Modified: head/stand/efi/loader/Makefile ============================================================================== --- head/stand/efi/loader/Makefile Fri Jul 20 05:17:49 2018 (r336533) +++ head/stand/efi/loader/Makefile Fri Jul 20 05:17:56 2018 (r336534) @@ -91,9 +91,6 @@ CLEANFILES+= loader.efi NEWVERSWHAT= "EFI loader" ${MACHINE} -NM?= nm -OBJCOPY?= objcopy - .if ${MACHINE_CPUARCH} == "amd64" EFI_TARGET= efi-app-x86_64 .elif ${MACHINE_CPUARCH} == "i386" Modified: head/stand/i386/boot2/Makefile ============================================================================== --- head/stand/i386/boot2/Makefile Fri Jul 20 05:17:49 2018 (r336533) +++ head/stand/i386/boot2/Makefile Fri Jul 20 05:17:56 2018 (r336534) @@ -4,8 +4,6 @@ FILES= boot boot1 boot2 -NM?= nm - # A value of 0x80 enables LBA support. BOOT_BOOT1_FLAGS?= 0x80 Modified: head/stand/i386/gptboot/Makefile ============================================================================== --- head/stand/i386/gptboot/Makefile Fri Jul 20 05:17:49 2018 (r336533) +++ head/stand/i386/gptboot/Makefile Fri Jul 20 05:17:56 2018 (r336534) @@ -7,8 +7,6 @@ FILES= gptboot MAN= gptboot.8 -NM?= nm - BOOT_COMCONSOLE_PORT?= 0x3f8 BOOT_COMCONSOLE_SPEED?= 9600 B2SIOFMT?= 0x3 Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Fri Jul 20 05:17:49 2018 (r336533) +++ head/stand/i386/gptzfsboot/Makefile Fri Jul 20 05:17:56 2018 (r336534) @@ -9,8 +9,6 @@ FILES= gptzfsboot MAN= gptzfsboot.8 -NM?= nm - BOOT_COMCONSOLE_PORT?= 0x3f8 BOOT_COMCONSOLE_SPEED?= 9600 B2SIOFMT?= 0x3 Modified: head/stand/i386/isoboot/Makefile ============================================================================== --- head/stand/i386/isoboot/Makefile Fri Jul 20 05:17:49 2018 (r336533) +++ head/stand/i386/isoboot/Makefile Fri Jul 20 05:17:56 2018 (r336534) @@ -8,8 +8,6 @@ FILES= isoboot MAN= isoboot.8 -NM?= nm - BOOT_COMCONSOLE_PORT?= 0x3f8 BOOT_COMCONSOLE_SPEED?= 9600 B2SIOFMT?= 0x3 Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Fri Jul 20 05:17:49 2018 (r336533) +++ head/stand/i386/zfsboot/Makefile Fri Jul 20 05:17:56 2018 (r336534) @@ -7,8 +7,6 @@ FILES= zfsboot MAN= zfsboot.8 -NM?= nm - BOOT_COMCONSOLE_PORT?= 0x3f8 BOOT_COMCONSOLE_SPEED?= 9600 B2SIOFMT?= 0x3 From owner-svn-src-head@freebsd.org Fri Jul 20 05:18:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 863A91030D79; Fri, 20 Jul 2018 05:18:05 +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 C4C1F8D1A8; Fri, 20 Jul 2018 05:18:04 +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 63DBC3CCC; Fri, 20 Jul 2018 05:18:04 +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 w6K5I4hc017985; Fri, 20 Jul 2018 05:18:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K5I3Jt017982; Fri, 20 Jul 2018 05:18:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807200518.w6K5I3Jt017982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Jul 2018 05:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336535 - in head/stand/efi: . boot1 loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: . boot1 loader X-SVN-Commit-Revision: 336535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:18:05 -0000 Author: imp Date: Fri Jul 20 05:18:03 2018 New Revision: 336535 URL: https://svnweb.freebsd.org/changeset/base/336535 Log: Hoist EFI_TARGET and SOURCE_DATE_EPOCH up into efi/Makefile.inc Modified: head/stand/efi/Makefile.inc head/stand/efi/boot1/Makefile head/stand/efi/loader/Makefile Modified: head/stand/efi/Makefile.inc ============================================================================== --- head/stand/efi/Makefile.inc Fri Jul 20 05:17:56 2018 (r336534) +++ head/stand/efi/Makefile.inc Fri Jul 20 05:18:03 2018 (r336535) @@ -19,4 +19,16 @@ CFLAGS+= -fPIC CFLAGS+= -fPIC .endif +.if ${MACHINE_CPUARCH} == "amd64" +EFI_TARGET= efi-app-x86_64 +.elif ${MACHINE_CPUARCH} == "i386" +EFI_TARGET= efi-app-ia32 +.else +EFI_TARGET= binary +.endif + +# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 +# for build reproducibility. +SOURCE_DATE_EPOCH?=1451606400 + .include "../Makefile.inc" Modified: head/stand/efi/boot1/Makefile ============================================================================== --- head/stand/efi/boot1/Makefile Fri Jul 20 05:17:56 2018 (r336534) +++ head/stand/efi/boot1/Makefile Fri Jul 20 05:18:03 2018 (r336535) @@ -76,17 +76,6 @@ LDADD+= ${LIBEFI} ${LIBSA} DPADD+= ${LDSCRIPT} -.if ${MACHINE_CPUARCH} == "amd64" -EFI_TARGET= efi-app-x86_64 -.elif ${MACHINE_CPUARCH} == "i386" -EFI_TARGET= efi-app-ia32 -.else -EFI_TARGET= binary -.endif - -# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 -# for build reproducibility. -SOURCE_DATE_EPOCH?=1451606400 boot1.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ Modified: head/stand/efi/loader/Makefile ============================================================================== --- head/stand/efi/loader/Makefile Fri Jul 20 05:17:56 2018 (r336534) +++ head/stand/efi/loader/Makefile Fri Jul 20 05:18:03 2018 (r336535) @@ -91,17 +91,6 @@ CLEANFILES+= loader.efi NEWVERSWHAT= "EFI loader" ${MACHINE} -.if ${MACHINE_CPUARCH} == "amd64" -EFI_TARGET= efi-app-x86_64 -.elif ${MACHINE_CPUARCH} == "i386" -EFI_TARGET= efi-app-ia32 -.else -EFI_TARGET= binary -.endif - -# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 -# for build reproducibility. -SOURCE_DATE_EPOCH?=1451606400 loader.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ From owner-svn-src-head@freebsd.org Fri Jul 20 05:22:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39EDB1031262; Fri, 20 Jul 2018 05:22:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id A66448D7DE; Fri, 20 Jul 2018 05:22:47 +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 mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 392501A0909; Fri, 20 Jul 2018 15:22:37 +1000 (AEST) Date: Fri, 20 Jul 2018 15:22:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336517 - head/sys/powerpc/include In-Reply-To: <201807192106.w6JL6wYQ067870@repo.freebsd.org> Message-ID: <20180720145441.Q2035@besplex.bde.org> References: <201807192106.w6JL6wYQ067870@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=s51nUx-keeAx5da5FxsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:22:48 -0000 On Thu, 19 Jul 2018, Justin Hibbits wrote: > Log: > Revert r336509. Fails buildworld. > > I had naively assumed that building kernel would be sufficient to test that > the header is sane. However, it turns out this now needs -fms-extensions to > build. Rather than sprinkling -fms-extensions all over the place, revert > for now, and revisit with a better fix. -ms-extensions is bogus. Try using the correct C nonstandard (-std=gnu99, not -std=c99). Unnamed struct/unions are an old gcc extension. They are also given by -std-gnu89 and might have been in gcc-1 before ms. -fms-extensions gives small further extensions for unnamed struct unions, and other ms extensions which are not wanted. Since buildworld already uses the correct C nonstandard, the location of the problem is unclear. It is the kernel that uses -std=c99. This asks for C99 compiler, but clang -std=c99 is very far from being a C99 compiler. One of its bugs is that it gives -ms-extensions by default. This bug is missing in gcc. This is worked around by adding -fms-extensions for gcc in kern.pre.mk and kmod.mk. gcc -std=c99 is also very far from being a C99 compiler. Very little of the kernel is written in strict C99, and not all parts are careful to use __extension__ and other things with underscores when they use extensions. It takes -pedantic as well as -std to get closer to being a C compiler. Userland is loser to being written in strict C, but it knows that it isn't and has used -std=gnu99 instead of -std=c99 to get hnu extensions automatically in all or almost all versions that use -std at all. This is of course only for the FreeBSD source tree part of userland -- bsd.sys.mk file adds this -std for FreeBSD builds. Overriding the broken -std setting is also broken in the kernel. The setting is supposed to be controlled by the user-settable variable CSTD. bsd.sys.mk implements this using CSTD?=gnu99, but kern.mk forces CSTD=c99. The -ms-extensions wart on this is also forced for gcc. Anyway, user headers shouldn't depend on nonstandard extensions even when the system compiler and mk files support the extensions. So backing this out might be the correct fix. Bruce From owner-svn-src-head@freebsd.org Fri Jul 20 05:26:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F169103141E; Fri, 20 Jul 2018 05:26:16 +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 0C9328D980; Fri, 20 Jul 2018 05:26:16 +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 DE0C03E69; Fri, 20 Jul 2018 05:26:15 +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 w6K5QFUD023023; Fri, 20 Jul 2018 05:26:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K5QF06023020; Fri, 20 Jul 2018 05:26:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807200526.w6K5QF06023020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Jul 2018 05:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336536 - in head: lib/geom/part tools/build/options tools/tools/zfsboottest X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/geom/part tools/build/options tools/tools/zfsboottest X-SVN-Commit-Revision: 336536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:26:16 -0000 Author: imp Date: Fri Jul 20 05:26:14 2018 New Revision: 336536 URL: https://svnweb.freebsd.org/changeset/base/336536 Log: Remove three stray instances of zfsloader. Modified: head/lib/geom/part/gpart.8 head/tools/build/options/WITH_LOADER_FIREWIRE head/tools/tools/zfsboottest/zfsboottest.c Modified: head/lib/geom/part/gpart.8 ============================================================================== --- head/lib/geom/part/gpart.8 Fri Jul 20 05:18:03 2018 (r336535) +++ head/lib/geom/part/gpart.8 Fri Jul 20 05:26:14 2018 (r336536) @@ -1086,8 +1086,8 @@ It searches through the GPT for .Cm freebsd-zfs partitions, trying to detect ZFS pools. After all pools are detected, -.Pa /boot/zfsloader -is started from the first one found. +.Pa /boot/loader +is started from the first one found set as bootable. .Pp The VTOC8 scheme does not support embedding bootstrap code. Instead, the 8 KBytes bootstrap code image Modified: head/tools/build/options/WITH_LOADER_FIREWIRE ============================================================================== --- head/tools/build/options/WITH_LOADER_FIREWIRE Fri Jul 20 05:18:03 2018 (r336535) +++ head/tools/build/options/WITH_LOADER_FIREWIRE Fri Jul 20 05:26:14 2018 (r336536) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Enable firewire support in /boot/loader and /boot/zfsloader on x86. -This option is a nop on all other platforms. +Enable firewire support in /boot/loader on x86. This option is a nop +on all other platforms. Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Fri Jul 20 05:18:03 2018 (r336535) +++ head/tools/tools/zfsboottest/zfsboottest.c Fri Jul 20 05:26:14 2018 (r336536) @@ -124,7 +124,7 @@ main(int argc, char** argv) "/dev/gpt/system0", "/dev/gpt/system1", "-", - "/boot/zfsloader", + "/boot/loader", "/boot/support.4th", "/boot/kernel/kernel", NULL, From owner-svn-src-head@freebsd.org Fri Jul 20 05:26:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A5121031468; Fri, 20 Jul 2018 05:26:37 +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 C1A2A8DAA6; Fri, 20 Jul 2018 05:26:36 +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 A429C3E6B; Fri, 20 Jul 2018 05:26:36 +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 w6K5QaFH023083; Fri, 20 Jul 2018 05:26:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K5QaMR023082; Fri, 20 Jul 2018 05:26:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807200526.w6K5QaMR023082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Jul 2018 05:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336537 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:26:37 -0000 Author: imp Date: Fri Jul 20 05:26:36 2018 New Revision: 336537 URL: https://svnweb.freebsd.org/changeset/base/336537 Log: Mention zfsloader being folded into loader in UPDATING. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jul 20 05:26:14 2018 (r336536) +++ head/UPDATING Fri Jul 20 05:26:36 2018 (r336537) @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20180720: + zfsloader's functionality has now been folded into loader. + zfsloader is no longer necesasary once you've updated your + boot blocks. For a transition period, there will be a symlink + in place from zfsloader to loader to allow a smooth transition + until the boot blocks can be updated. + 20180717: Big endian arm support has been removed. From owner-svn-src-head@freebsd.org Fri Jul 20 05:34:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5739C1031891; Fri, 20 Jul 2018 05:34:03 +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 EF0FC8DF25; Fri, 20 Jul 2018 05:34:02 +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 CABCB404B; Fri, 20 Jul 2018 05:34:02 +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 w6K5Y2fj027967; Fri, 20 Jul 2018 05:34:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K5Y2Dt027966; Fri, 20 Jul 2018 05:34:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807200534.w6K5Y2Dt027966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Jul 2018 05:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336538 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 336538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:34:03 -0000 Author: imp Date: Fri Jul 20 05:34:02 2018 New Revision: 336538 URL: https://svnweb.freebsd.org/changeset/base/336538 Log: Bump version to 1200075 for zfsloader being folded into loader. As an aside: 1200074 should be used as the last version with big endian arm support, should that be needed. it was actually removed a day later, but no bump was made until now. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Jul 20 05:26:36 2018 (r336537) +++ head/sys/sys/param.h Fri Jul 20 05:34:02 2018 (r336538) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200074 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200075 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Fri Jul 20 07:01:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E1F1103456A; Fri, 20 Jul 2018 07:01:32 +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 408A8707FD; Fri, 20 Jul 2018 07:01:32 +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 21B824E4A; Fri, 20 Jul 2018 07:01:32 +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 w6K71WX3073329; Fri, 20 Jul 2018 07:01:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K71TGB073315; Fri, 20 Jul 2018 07:01:29 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201807200701.w6K71TGB073315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 20 Jul 2018 07:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336539 - in head: lib/libmd sys/crypto/sha2 sys/crypto/skein X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: lib/libmd sys/crypto/sha2 sys/crypto/skein X-SVN-Commit-Revision: 336539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 07:01:32 -0000 Author: delphij Date: Fri Jul 20 07:01:28 2018 New Revision: 336539 URL: https://svnweb.freebsd.org/changeset/base/336539 Log: libmd: Always erase context in _Final method, and when doing it, consistently use explicit_bzero(). Update manual pages to match the behavior. Reviewed by: pfg, allanjude, jmg MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D16316 Modified: head/lib/libmd/md4c.c head/lib/libmd/md5c.c head/lib/libmd/mdX.3 head/lib/libmd/ripemd.3 head/lib/libmd/rmd160c.c head/lib/libmd/sha.3 head/lib/libmd/sha0c.c head/lib/libmd/sha1c.c head/lib/libmd/sha256.3 head/lib/libmd/sha512.3 head/lib/libmd/skein.3 head/sys/crypto/sha2/sha256c.c head/sys/crypto/sha2/sha512c.c head/sys/crypto/skein/skein.c Modified: head/lib/libmd/md4c.c ============================================================================== --- head/lib/libmd/md4c.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/md4c.c Fri Jul 20 07:01:28 2018 (r336539) @@ -183,7 +183,7 @@ MD4_CTX *context; /* Zeroize sensitive information. */ - memset ((POINTER)context, 0, sizeof (*context)); + explicit_bzero(context, sizeof(*context)); } /* MD4 basic transformation. Transforms state based on block. Modified: head/lib/libmd/md5c.c ============================================================================== --- head/lib/libmd/md5c.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/md5c.c Fri Jul 20 07:01:28 2018 (r336539) @@ -220,7 +220,7 @@ MD5Final (unsigned char digest[16], MD5_CTX *context) Encode (digest, context->state, 16); /* Zeroize sensitive information. */ - memset ((void *)context, 0, sizeof (*context)); + explicit_bzero(context, sizeof(*context)); } /* MD5 basic transformation. Transforms state based on block. */ Modified: head/lib/libmd/mdX.3 ============================================================================== --- head/lib/libmd/mdX.3 Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/mdX.3 Fri Jul 20 07:01:28 2018 (r336539) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2016 +.Dd July 20, 2018 .Dt MDX 3 .Os .Sh NAME @@ -78,7 +78,9 @@ initialize it with run over the data with .Fn MDXUpdate , and finally extract the result using -.Fn MDXFinal . +.Fn MDXFinal , +which will also erase the +.Vt MDX_CTX . .Pp The .Fn MDXPad Modified: head/lib/libmd/ripemd.3 ============================================================================== --- head/lib/libmd/ripemd.3 Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/ripemd.3 Fri Jul 20 07:01:28 2018 (r336539) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd April 26, 2016 +.Dd July 20, 2018 .Dt RIPEMD 3 .Os .Sh NAME @@ -65,7 +65,9 @@ initialize it with run over the data with .Fn RIPEMD160_Update , and finally extract the result using -.Fn RIPEMD160_Final . +.Fn RIPEMD160_Final , +which will also erase the +.Vt RIPEMD160_CTX . .Pp The .Fn RIPEMD160_End Modified: head/lib/libmd/rmd160c.c ============================================================================== --- head/lib/libmd/rmd160c.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/rmd160c.c Fri Jul 20 07:01:28 2018 (r336539) @@ -523,10 +523,8 @@ RIPEMD160_CTX *c; l=c->D; l2c(l,cp); l=c->E; l2c(l,cp); - /* clear stuff, ripemd160_block may be leaving some stuff on the stack - * but I'm not worried :-) */ - c->num=0; -/* memset((char *)&c,0,sizeof(c));*/ + /* Clear the context state */ + explicit_bzero(&c, sizeof(c)); } #ifdef undef Modified: head/lib/libmd/sha.3 ============================================================================== --- head/lib/libmd/sha.3 Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/sha.3 Fri Jul 20 07:01:28 2018 (r336539) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd April 26, 2016 +.Dd July 20, 2018 .Dt SHA 3 .Os .Sh NAME @@ -100,7 +100,9 @@ initialize it with run over the data with .Fn SHA1_Update , and finally extract the result using -.Fn SHA1_Final . +.Fn SHA1_Final , +which will also erase the +.Vt SHA_CTX . .Pp .Fn SHA1_End is a wrapper for Modified: head/lib/libmd/sha0c.c ============================================================================== --- head/lib/libmd/sha0c.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/sha0c.c Fri Jul 20 07:01:28 2018 (r336539) @@ -446,9 +446,7 @@ SHA_CTX *c; l=c->h3; nl2c(l,cp); l=c->h4; nl2c(l,cp); - /* clear stuff, sha_block may be leaving some stuff on the stack - * but I'm not worried :-) */ - c->num=0; -/* memset((char *)&c,0,sizeof(c));*/ + /* Clear the context state */ + explicit_bzero(&c, sizeof(c)); } Modified: head/lib/libmd/sha1c.c ============================================================================== --- head/lib/libmd/sha1c.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/sha1c.c Fri Jul 20 07:01:28 2018 (r336539) @@ -482,10 +482,8 @@ SHA_CTX *c; l=c->h3; nl2c(l,cp); l=c->h4; nl2c(l,cp); - /* clear stuff, sha1_block may be leaving some stuff on the stack - * but I'm not worried :-) */ - c->num=0; -/* memset((char *)&c,0,sizeof(c));*/ + /* Clear the context state */ + explicit_bzero(&c, sizeof(c)); } #ifdef WEAK_REFS Modified: head/lib/libmd/sha256.3 ============================================================================== --- head/lib/libmd/sha256.3 Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/sha256.3 Fri Jul 20 07:01:28 2018 (r336539) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd July 9, 2018 +.Dd July 20, 2018 .Dt SHA256 3 .Os .Sh NAME @@ -88,7 +88,9 @@ initialize it with run over the data with .Fn SHA256_Update , and finally extract the result using -.Fn SHA256_Final . +.Fn SHA256_Final , +which will also erase the +.Vt SHA256_CTX . .Pp .Fn SHA256_End is a wrapper for Modified: head/lib/libmd/sha512.3 ============================================================================== --- head/lib/libmd/sha512.3 Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/sha512.3 Fri Jul 20 07:01:28 2018 (r336539) @@ -9,7 +9,7 @@ .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp .\" $FreeBSD$ .\" -.Dd April 22, 2016 +.Dd July 20, 2018 .Dt SHA512 3 .Os .Sh NAME @@ -110,7 +110,9 @@ initialize it with run over the data with .Fn SHA512_Update , and finally extract the result using -.Fn SHA512_Final . +.Fn SHA512_Final , +which will also erase the +.Vt SHA512_CTX . .Pp .Fn SHA512_End is a wrapper for Modified: head/lib/libmd/skein.3 ============================================================================== --- head/lib/libmd/skein.3 Fri Jul 20 05:34:02 2018 (r336538) +++ head/lib/libmd/skein.3 Fri Jul 20 07:01:28 2018 (r336539) @@ -124,7 +124,9 @@ initialize it with run over the data with .Fn SKEIN256_Update , and finally extract the result using -.Fn SKEIN256_Final . +.Fn SKEIN256_Final , +which will also erase the +.Vt SKEIN256_CTX . .Pp .Fn SKEIN256_End is a wrapper for Modified: head/sys/crypto/sha2/sha256c.c ============================================================================== --- head/sys/crypto/sha2/sha256c.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/sys/crypto/sha2/sha256c.c Fri Jul 20 07:01:28 2018 (r336539) @@ -298,7 +298,7 @@ SHA256_Final(unsigned char digest[static SHA256_DIGEST be32enc_vect(digest, ctx->state, SHA256_DIGEST_LENGTH); /* Clear the context state */ - memset(ctx, 0, sizeof(*ctx)); + explicit_bzero(ctx, sizeof(*ctx)); } /*** SHA-224: *********************************************************/ Modified: head/sys/crypto/sha2/sha512c.c ============================================================================== --- head/sys/crypto/sha2/sha512c.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/sys/crypto/sha2/sha512c.c Fri Jul 20 07:01:28 2018 (r336539) @@ -331,7 +331,7 @@ SHA512_Final(unsigned char digest[static SHA512_DIGEST be64enc_vect(digest, ctx->state, SHA512_DIGEST_LENGTH); /* Clear the context state */ - memset(ctx, 0, sizeof(*ctx)); + explicit_bzero(ctx, sizeof(*ctx)); } /*** SHA-512t: *********************************************************/ @@ -374,7 +374,7 @@ SHA512_224_Final(unsigned char digest[static SHA512_22 be64enc_vect(digest, ctx->state, SHA512_224_DIGEST_LENGTH); /* Clear the context state */ - memset(ctx, 0, sizeof(*ctx)); + explicit_bzero(ctx, sizeof(*ctx)); } void @@ -413,7 +413,7 @@ SHA512_256_Final(unsigned char digest[static SHA512_25 be64enc_vect(digest, ctx->state, SHA512_256_DIGEST_LENGTH); /* Clear the context state */ - memset(ctx, 0, sizeof(*ctx)); + explicit_bzero(ctx, sizeof(*ctx)); } /*** SHA-384: *********************************************************/ @@ -463,7 +463,7 @@ SHA384_Final(unsigned char digest[static SHA384_DIGEST be64enc_vect(digest, ctx->state, SHA384_DIGEST_LENGTH); /* Clear the context state */ - memset(ctx, 0, sizeof(*ctx)); + explicit_bzero(ctx, sizeof(*ctx)); } #ifdef WEAK_REFS Modified: head/sys/crypto/skein/skein.c ============================================================================== --- head/sys/crypto/skein/skein.c Fri Jul 20 05:34:02 2018 (r336538) +++ head/sys/crypto/skein/skein.c Fri Jul 20 07:01:28 2018 (r336539) @@ -812,6 +812,7 @@ SKEIN256_Final(unsigned char digest[static SKEIN_256_B { Skein_256_Final(ctx, digest); + explicit_bzero(ctx, sizeof(*ctx)); } void @@ -819,6 +820,7 @@ SKEIN512_Final(unsigned char digest[static SKEIN_512_B { Skein_512_Final(ctx, digest); + explicit_bzero(ctx, sizeof(*ctx)); } void @@ -826,6 +828,7 @@ SKEIN1024_Final(unsigned char digest[static SKEIN1024_ { Skein1024_Final(ctx, digest); + explicit_bzero(ctx, sizeof(*ctx)); } #ifdef WEAK_REFS From owner-svn-src-head@freebsd.org Fri Jul 20 07:07:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3B411034A93; Fri, 20 Jul 2018 07:07:28 +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 A273170DA3; Fri, 20 Jul 2018 07:07:28 +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 80E854EB3; Fri, 20 Jul 2018 07:07:28 +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 w6K77SUK074390; Fri, 20 Jul 2018 07:07:28 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K77Sk7074389; Fri, 20 Jul 2018 07:07:28 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201807200707.w6K77Sk7074389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 20 Jul 2018 07:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336540 - head/lib/libcrypt X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/libcrypt X-SVN-Commit-Revision: 336540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 07:07:29 -0000 Author: delphij Date: Fri Jul 20 07:07:27 2018 New Revision: 336540 URL: https://svnweb.freebsd.org/changeset/base/336540 Log: Get rid of unused variables. copied_key and copied_salt are assigned with NULL and never used otherwise. Remove the two variables and related code. Reviewed by: pfg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16314 Modified: head/lib/libcrypt/crypt-sha256.c head/lib/libcrypt/crypt-sha512.c Modified: head/lib/libcrypt/crypt-sha256.c ============================================================================== --- head/lib/libcrypt/crypt-sha256.c Fri Jul 20 07:01:28 2018 (r336539) +++ head/lib/libcrypt/crypt-sha256.c Fri Jul 20 07:07:27 2018 (r336540) @@ -68,13 +68,10 @@ crypt_sha256(const char *key, const char *salt, char * uint8_t alt_result[32], temp_result[32]; SHA256_CTX ctx, alt_ctx; size_t salt_len, key_len, cnt, rounds; - char *cp, *copied_key, *copied_salt, *p_bytes, *s_bytes, *endp; + char *cp, *p_bytes, *s_bytes, *endp; const char *num; bool rounds_custom; - copied_key = NULL; - copied_salt = NULL; - /* Default number of rounds. */ rounds = ROUNDS_DEFAULT; rounds_custom = false; @@ -244,10 +241,6 @@ crypt_sha256(const char *key, const char *salt, char * memset(s_bytes, '\0', salt_len); memset(&ctx, '\0', sizeof(ctx)); memset(&alt_ctx, '\0', sizeof(alt_ctx)); - if (copied_key != NULL) - memset(copied_key, '\0', key_len); - if (copied_salt != NULL) - memset(copied_salt, '\0', salt_len); return (0); } Modified: head/lib/libcrypt/crypt-sha512.c ============================================================================== --- head/lib/libcrypt/crypt-sha512.c Fri Jul 20 07:01:28 2018 (r336539) +++ head/lib/libcrypt/crypt-sha512.c Fri Jul 20 07:07:27 2018 (r336540) @@ -68,13 +68,10 @@ crypt_sha512(const char *key, const char *salt, char * uint8_t alt_result[64], temp_result[64]; SHA512_CTX ctx, alt_ctx; size_t salt_len, key_len, cnt, rounds; - char *cp, *copied_key, *copied_salt, *p_bytes, *s_bytes, *endp; + char *cp, *p_bytes, *s_bytes, *endp; const char *num; bool rounds_custom; - copied_key = NULL; - copied_salt = NULL; - /* Default number of rounds. */ rounds = ROUNDS_DEFAULT; rounds_custom = false; @@ -256,10 +253,6 @@ crypt_sha512(const char *key, const char *salt, char * memset(s_bytes, '\0', salt_len); memset(&ctx, '\0', sizeof(ctx)); memset(&alt_ctx, '\0', sizeof(alt_ctx)); - if (copied_key != NULL) - memset(copied_key, '\0', key_len); - if (copied_salt != NULL) - memset(copied_salt, '\0', salt_len); return (0); } From owner-svn-src-head@freebsd.org Fri Jul 20 07:16:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40E771034F70; Fri, 20 Jul 2018 07:16:30 +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 DBA1971288; Fri, 20 Jul 2018 07:16:29 +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 B03495045; Fri, 20 Jul 2018 07:16:29 +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 w6K7GTtA079642; Fri, 20 Jul 2018 07:16:29 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6K7GT16079640; Fri, 20 Jul 2018 07:16:29 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201807200716.w6K7GT16079640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 20 Jul 2018 07:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336541 - head/lib/libcrypt X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/libcrypt X-SVN-Commit-Revision: 336541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 07:16:30 -0000 Author: delphij Date: Fri Jul 20 07:16:28 2018 New Revision: 336541 URL: https://svnweb.freebsd.org/changeset/base/336541 Log: libcrypt: There is no need to clear message digest context after they are finialized after r336539, so do not do it. Submitted by: David CARLIER MFC after: 1 month (after r336539) Differential Revision: https://reviews.freebsd.org/D16059 Modified: head/lib/libcrypt/crypt-sha256.c head/lib/libcrypt/crypt-sha512.c Modified: head/lib/libcrypt/crypt-sha256.c ============================================================================== --- head/lib/libcrypt/crypt-sha256.c Fri Jul 20 07:07:27 2018 (r336540) +++ head/lib/libcrypt/crypt-sha256.c Fri Jul 20 07:16:28 2018 (r336541) @@ -239,8 +239,6 @@ crypt_sha256(const char *key, const char *salt, char * memset(temp_result, '\0', sizeof(temp_result)); memset(p_bytes, '\0', key_len); memset(s_bytes, '\0', salt_len); - memset(&ctx, '\0', sizeof(ctx)); - memset(&alt_ctx, '\0', sizeof(alt_ctx)); return (0); } Modified: head/lib/libcrypt/crypt-sha512.c ============================================================================== --- head/lib/libcrypt/crypt-sha512.c Fri Jul 20 07:07:27 2018 (r336540) +++ head/lib/libcrypt/crypt-sha512.c Fri Jul 20 07:16:28 2018 (r336541) @@ -251,8 +251,6 @@ crypt_sha512(const char *key, const char *salt, char * memset(temp_result, '\0', sizeof(temp_result)); memset(p_bytes, '\0', key_len); memset(s_bytes, '\0', salt_len); - memset(&ctx, '\0', sizeof(ctx)); - memset(&alt_ctx, '\0', sizeof(alt_ctx)); return (0); } From owner-svn-src-head@freebsd.org Fri Jul 20 08:00:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62A97103A578; Fri, 20 Jul 2018 08:00:54 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0A1272495; Fri, 20 Jul 2018 08:00:53 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-pg1-f175.google.com with SMTP id y5-v6so6192533pgv.1; Fri, 20 Jul 2018 01:00:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DXydl6uxK7yShYpF0Fi3Nl6qnK3zPq3TtE41uwEf168=; b=tuKe0cgZCUy5vICDgWlHWmnpOYHx9O/ed+uFtlBJODWHNPjgQ4WfuhH/z3PcJ51JcK tv8kiigQsb7Dd8wclT9yiNoaU4f3O0whpUrPCzX/3chNXqio+fubYmKPFqL4L2i52jG6 uVSziuCy3Dr1Ifh4HemAVesmDib0KGsVkgc9qJa36T7wkXcmiUyFAdvu5ZvGJpGvIbz0 KyiRkRF7MOrbfCo+VSVn/Vr/As/dUJzftdouTpzTvf3lZvYs/yrrwNc8xTY/c1PCyX88 Wj7cSFfYH13qevHwtGf10atPe19aP6qbxvrhbDw+hF07CLPbWMCTKzEvme5Vb6vnHmL/ nh3w== X-Gm-Message-State: AOUpUlHjABjvTk2ta9/yKOiGYm9L0wlzVLzs8ZpQ4JCbhbeDPU4vqxDH Yl3KnUMZx2nUmtq7OjX6dhktXxYS X-Google-Smtp-Source: AAOMgpcLIhgSDZvlv2Vkm49EyLETHDH6KtDw0mtK4kmcB7wswcZRPgAmOKy4cXhoQ5EmXsQQh+bdAA== X-Received: by 2002:a62:87ce:: with SMTP id i197-v6mr1166825pfe.62.1532073652590; Fri, 20 Jul 2018 01:00:52 -0700 (PDT) Received: from [192.168.1.36] (broadband-82-140-206-85.atc.tvcom.ru. [82.140.206.85]) by smtp.googlemail.com with ESMTPSA id t12-v6sm2449688pgg.72.2018.07.20.01.00.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 01:00:52 -0700 (PDT) Subject: Re: svn commit: r336532 - in head/stand: . common i386 i386/loader i386/zfsboot i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807200517.w6K5HchM017801@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Message-ID: <54f1863c-8791-ea3e-3c4f-0f4e1107b2bd@FreeBSD.org> Date: Fri, 20 Jul 2018 11:00:51 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <201807200517.w6K5HchM017801@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 08:00:54 -0000 On 20/07/2018 08:17, Warner Losh wrote: > Provide a symbolic link from zfsloader > to loader so people who have not upgraded their boot blocks are not > affected I am not sure that ZFS boot blocks can handle symbolic links... I seem to recall that not a long time ago they lacked that ability. -- Andriy Gapon From owner-svn-src-head@freebsd.org Fri Jul 20 09:39:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1835D103D405; Fri, 20 Jul 2018 09:39:55 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp002.me.com (st13p35im-asmtp002.me.com [17.164.199.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B30FF75033; Fri, 20 Jul 2018 09:39:54 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp002.me.com by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0PC500A00RS2LK00@st13p35im-asmtp002.me.com>; Fri, 20 Jul 2018 09:39:48 +0000 (GMT) Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0PC500E44S68OF20@st13p35im-asmtp002.me.com>; Fri, 20 Jul 2018 09:39:47 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-20_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1807200113 From: Toomas Soome Message-id: <84EE7B03-935E-4D79-933E-35A9F80A227A@me.com> MIME-version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336532 - in head/stand: . common i386 i386/loader i386/zfsboot i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader Date: Fri, 20 Jul 2018 12:39:43 +0300 In-reply-to: <54f1863c-8791-ea3e-3c4f-0f4e1107b2bd@FreeBSD.org> Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Andriy Gapon References: <201807200517.w6K5HchM017801@repo.freebsd.org> <54f1863c-8791-ea3e-3c4f-0f4e1107b2bd@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 09:39:55 -0000 > On 20 Jul 2018, at 11:00, Andriy Gapon wrote: > > On 20/07/2018 08:17, Warner Losh wrote: >> Provide a symbolic link from zfsloader >> to loader so people who have not upgraded their boot blocks are not >> affected > > I am not sure that ZFS boot blocks can handle symbolic links... > I seem to recall that not a long time ago they lacked that ability. > I did implement it. Just need to be sure if its backported when needed. https://svnweb.freebsd.org/base?view=revision&revision=r314112 rgds, toomas From owner-svn-src-head@freebsd.org Fri Jul 20 12:03:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30EBC1042CC0; Fri, 20 Jul 2018 12:03:17 +0000 (UTC) (envelope-from rmacklem@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 D538E799F0; Fri, 20 Jul 2018 12:03:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B64CD7EEF; Fri, 20 Jul 2018 12:03:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KC3GRa029182; Fri, 20 Jul 2018 12:03:16 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KC3GYX029180; Fri, 20 Jul 2018 12:03:16 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807201203.w6KC3GYX029180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 20 Jul 2018 12:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336542 - head/sys/rpc X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/rpc X-SVN-Commit-Revision: 336542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 12:03:17 -0000 Author: rmacklem Date: Fri Jul 20 12:03:16 2018 New Revision: 336542 URL: https://svnweb.freebsd.org/changeset/base/336542 Log: Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done. During testing of the pNFS client, it was observed that an RPC could get stuck in sosend() for a very long time if the network connection to a DS had failed. This is fixed by setting SO_SNDTIMEO on the TCP socket. This is only done when CLSET_TIMEOUT is done and this is not done by any use of the krpc currently in the source tree, so there should be no effect on extant uses. A future patch will use CLSET_TIMEOUT for TCP connections to DSs. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16293 Modified: head/sys/rpc/clnt_rc.c Modified: head/sys/rpc/clnt_rc.c ============================================================================== --- head/sys/rpc/clnt_rc.c Fri Jul 20 07:16:28 2018 (r336541) +++ head/sys/rpc/clnt_rc.c Fri Jul 20 12:03:16 2018 (r336542) @@ -174,10 +174,26 @@ clnt_reconnect_connect(CLIENT *cl) newclient = clnt_dg_create(so, (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers, rc->rc_sendsz, rc->rc_recvsz); - else + else { + /* + * I do not believe a timeout of less than 1sec would make + * sense here since short delays can occur when a server is + * temporarily overloaded. + */ + if (rc->rc_timeout.tv_sec > 0 && rc->rc_timeout.tv_usec >= 0) { + error = so_setsockopt(so, SOL_SOCKET, SO_SNDTIMEO, + &rc->rc_timeout, sizeof(struct timeval)); + if (error != 0) { + stat = rpc_createerr.cf_stat = RPC_CANTSEND; + rpc_createerr.cf_error.re_errno = error; + td->td_ucred = oldcred; + goto out; + } + } newclient = clnt_vc_create(so, (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers, rc->rc_sendsz, rc->rc_recvsz, rc->rc_intr); + } td->td_ucred = oldcred; if (!newclient) { From owner-svn-src-head@freebsd.org Fri Jul 20 12:42:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE5861044608; Fri, 20 Jul 2018 12:42:26 +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 833827B3C4; Fri, 20 Jul 2018 12:42:26 +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 653741054A; Fri, 20 Jul 2018 12:42:26 +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 w6KCgQ8t048773; Fri, 20 Jul 2018 12:42:26 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KCgORn048599; Fri, 20 Jul 2018 12:42:24 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807201242.w6KCgORn048599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 20 Jul 2018 12:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336545 - in head/lib/msun: ld128 ld80 src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: in head/lib/msun: ld128 ld80 src X-SVN-Commit-Revision: 336545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 12:42:27 -0000 Author: bde Date: Fri Jul 20 12:42:24 2018 New Revision: 336545 URL: https://svnweb.freebsd.org/changeset/base/336545 Log: Centralize the complications for special efficient rounding to integers. This was open-coded in range reduction for trig and exp functions. Now there are 3 static inline functions rnint[fl]() that replace open-coded expressions, and type-generic irint() and i64rint() macros that hide the complications for efficiently using non-generic irint() and irintl() functions and casts. Special details: ld128/e_rem_pio2l.h needs to use i64rint() since it needs a 46-bit integer result. Everything else only needs a (less than) 32-bit integer result so uses irint(). Float and double cases now use float_t and double_t locally instead of STRICT_ASSIGN() to avoid bugs in extra precision. On amd64, inline asm is now only used for irint() on long doubles. The SSE asm for irint() on amd64 only existed because the ifdef tangles made the correct method of simply casting to int for this case non-obvious. Modified: head/lib/msun/ld128/e_rem_pio2l.h head/lib/msun/ld128/k_expl.h head/lib/msun/ld128/s_expl.c head/lib/msun/ld80/e_rem_pio2l.h head/lib/msun/ld80/k_expl.h head/lib/msun/ld80/s_expl.c head/lib/msun/src/e_rem_pio2.c head/lib/msun/src/e_rem_pio2f.c head/lib/msun/src/math_private.h Modified: head/lib/msun/ld128/e_rem_pio2l.h ============================================================================== --- head/lib/msun/ld128/e_rem_pio2l.h Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/ld128/e_rem_pio2l.h Fri Jul 20 12:42:24 2018 (r336545) @@ -74,14 +74,9 @@ __ieee754_rem_pio2l(long double x, long double *y) if (ex < BIAS + 45 || ex == BIAS + 45 && u.bits.manh < 0x921fb54442d1LL) { /* |x| ~< 2^45*(pi/2), medium size */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - fn = x*invpio2+0x1.8p112; - fn = fn-0x1.8p112; -#ifdef HAVE_EFFICIENT_I64RINT + /* TODO: use only double precision for fn, as in expl(). */ + fn = rnintl(x * invpio2); n = i64rint(fn); -#else - n = fn; -#endif r = x-fn*pio2_1; w = fn*pio2_1t; /* 1st round good to 180 bit */ { Modified: head/lib/msun/ld128/k_expl.h ============================================================================== --- head/lib/msun/ld128/k_expl.h Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/ld128/k_expl.h Fri Jul 20 12:42:24 2018 (r336545) @@ -244,16 +244,8 @@ __k_expl(long double x, long double *hip, long double int n, n2; /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - /* XXX assume no extra precision for the additions, as for trig fns. */ - /* XXX this set of comments is now quadruplicated. */ - /* XXX but see ../src/e_exp.c for a fix using double_t. */ - fn = (double)x * INV_L + 0x1.8p52 - 0x1.8p52; -#if defined(HAVE_EFFICIENT_IRINT) + fn = rnint((double)x * INV_L); n = irint(fn); -#else - n = (int)fn; -#endif n2 = (unsigned)n % INTERVALS; /* Depend on the sign bit being propagated: */ *kp = n >> LOG2_INTERVALS; Modified: head/lib/msun/ld128/s_expl.c ============================================================================== --- head/lib/msun/ld128/s_expl.c Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/ld128/s_expl.c Fri Jul 20 12:42:24 2018 (r336545) @@ -268,13 +268,8 @@ expm1l(long double x) } /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - fn = (double)x * INV_L + 0x1.8p52 - 0x1.8p52; -#if defined(HAVE_EFFICIENT_IRINT) + fn = rnint((double)x * INV_L); n = irint(fn); -#else - n = (int)fn; -#endif n2 = (unsigned)n % INTERVALS; k = n >> LOG2_INTERVALS; r1 = x - fn * L1; Modified: head/lib/msun/ld80/e_rem_pio2l.h ============================================================================== --- head/lib/msun/ld80/e_rem_pio2l.h Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/ld80/e_rem_pio2l.h Fri Jul 20 12:42:24 2018 (r336545) @@ -84,14 +84,8 @@ __ieee754_rem_pio2l(long double x, long double *y) ex = expsign & 0x7fff; if (ex < BIAS + 25 || (ex == BIAS + 25 && u.bits.manh < 0xc90fdaa2)) { /* |x| ~< 2^25*(pi/2), medium size */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - fn = x*invpio2+0x1.8p63; - fn = fn-0x1.8p63; -#ifdef HAVE_EFFICIENT_IRINT + fn = rnintl(x*invpio2); n = irint(fn); -#else - n = fn; -#endif r = x-fn*pio2_1; w = fn*pio2_1t; /* 1st round good to 102 bit */ { Modified: head/lib/msun/ld80/k_expl.h ============================================================================== --- head/lib/msun/ld80/k_expl.h Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/ld80/k_expl.h Fri Jul 20 12:42:24 2018 (r336545) @@ -225,16 +225,9 @@ __k_expl(long double x, long double *hip, long double int n, n2; /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - fn = x * INV_L + 0x1.8p63 - 0x1.8p63; + fn = rnintl(x * INV_L); r = x - fn * L1 - fn * L2; /* r = r1 + r2 done independently. */ -#if defined(HAVE_EFFICIENT_IRINTL) - n = irintl(fn); -#elif defined(HAVE_EFFICIENT_IRINT) n = irint(fn); -#else - n = (int)fn; -#endif n2 = (unsigned)n % INTERVALS; /* Depend on the sign bit being propagated: */ *kp = n >> LOG2_INTERVALS; Modified: head/lib/msun/ld80/s_expl.c ============================================================================== --- head/lib/msun/ld80/s_expl.c Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/ld80/s_expl.c Fri Jul 20 12:42:24 2018 (r336545) @@ -225,15 +225,8 @@ expm1l(long double x) } /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - fn = x * INV_L + 0x1.8p63 - 0x1.8p63; -#if defined(HAVE_EFFICIENT_IRINTL) - n = irintl(fn); -#elif defined(HAVE_EFFICIENT_IRINT) + fn = rnintl(x * INV_L); n = irint(fn); -#else - n = (int)fn; -#endif n2 = (unsigned)n % INTERVALS; k = n >> LOG2_INTERVALS; r1 = x - fn * L1; Modified: head/lib/msun/src/e_rem_pio2.c ============================================================================== --- head/lib/msun/src/e_rem_pio2.c Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/src/e_rem_pio2.c Fri Jul 20 12:42:24 2018 (r336545) @@ -127,14 +127,8 @@ __ieee754_rem_pio2(double x, double *y) } if(ix<0x413921fb) { /* |x| ~< 2^20*(pi/2), medium size */ medium: - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - STRICT_ASSIGN(double,fn,x*invpio2+0x1.8p52); - fn = fn-0x1.8p52; -#ifdef HAVE_EFFICIENT_IRINT + fn = rnint((double_t)x*invpio2); n = irint(fn); -#else - n = (int32_t)fn; -#endif r = x-fn*pio2_1; w = fn*pio2_1t; /* 1st round good to 85 bit */ { Modified: head/lib/msun/src/e_rem_pio2f.c ============================================================================== --- head/lib/msun/src/e_rem_pio2f.c Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/src/e_rem_pio2f.c Fri Jul 20 12:42:24 2018 (r336545) @@ -55,14 +55,8 @@ __ieee754_rem_pio2f(float x, double *y) ix = hx&0x7fffffff; /* 33+53 bit pi is good enough for medium size */ if(ix<0x4dc90fdb) { /* |x| ~< 2^28*(pi/2), medium size */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - STRICT_ASSIGN(double,fn,x*invpio2+0x1.8p52); - fn = fn-0x1.8p52; -#ifdef HAVE_EFFICIENT_IRINT + fn = rnint((float_t)x*invpio2); n = irint(fn); -#else - n = (int32_t)fn; -#endif r = x-fn*pio2_1; w = fn*pio2_1t; *y = r-w; Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Fri Jul 20 12:38:07 2018 (r336544) +++ head/lib/msun/src/math_private.h Fri Jul 20 12:42:24 2018 (r336545) @@ -571,47 +571,115 @@ CMPLXL(long double x, long double y) #endif /* _COMPLEX_H */ -#ifdef __GNUCLIKE_ASM +/* + * The rnint() family rounds to the nearest integer for a restricted range + * range of args (up to about 2**MANT_DIG). We assume that the current + * rounding mode is FE_TONEAREST so that this can be done efficiently. + * Extra precision causes more problems in practice, and we only centralize + * this here to reduce those problems, and have not solved the efficiency + * problems. The exp2() family uses a more delicate version of this that + * requires extracting bits from the intermediate value, so it is not + * centralized here and should copy any solution of the efficiency problems. + */ -/* Asm versions of some functions. */ +static inline double +rnint(__double_t x) +{ + /* + * This casts to double to kill any extra precision. This depends + * on the cast being applied to a double_t to avoid compiler bugs + * (this is a cleaner version of STRICT_ASSIGN()). This is + * inefficient if there actually is extra precision, but is hard + * to improve on. We use double_t in the API to minimise conversions + * for just calling here. Note that we cannot easily change the + * magic number to the one that works directly with double_t, since + * the rounding precision is variable at runtime on x86 so the + * magic number would need to be variable. Assuming that the + * rounding precision is always the default is too fragile. This + * and many other complications will move when the default is + * changed to FP_PE. + */ + return ((double)(x + 0x1.8p52) - 0x1.8p52); +} -#ifdef __amd64__ +static inline float +rnintf(__float_t x) +{ + /* + * As for rnint(), except we could just call that to handle the + * extra precision case, usually without losing efficiency. + */ + return ((float)(x + 0x1.8p23F) - 0x1.8p23F); +} + +#ifdef LDBL_MANT_DIG +/* + * The complications for extra precision are smaller for rnintl() since it + * can safely assume that the rounding precision has been increased from + * its default to FP_PE on x86. We don't exploit that here to get small + * optimizations from limiting the rangle to double. We just need it for + * the magic number to work with long doubles. ld128 callers should use + * rnint() instead of this if possible. ld80 callers should prefer + * rnintl() since for amd64 this avoids swapping the register set, while + * for i386 it makes no difference (assuming FP_PE), and for other arches + * it makes little difference. + */ +static inline long double +rnintl(long double x) +{ + return (x + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2 - + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2); +} +#endif /* LDBL_MANT_DIG */ + +/* + * irint() and i64rint() give the same result as casting to their integer + * return type provided their arg is a floating point integer. They can + * sometimes be more efficient because no rounding is required. + */ +#if (defined(amd64) || defined(__i386__)) && defined(__GNUCLIKE_ASM) +#define irint(x) \ + (sizeof(x) == sizeof(float) && \ + sizeof(__float_t) == sizeof(long double) ? irintf(x) : \ + sizeof(x) == sizeof(double) && \ + sizeof(__double_t) == sizeof(long double) ? irintd(x) : \ + sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x)) +#else +#define irint(x) ((int)(x)) +#endif + +#define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */ + +#if defined(__i386__) && defined(__GNUCLIKE_ASM) static __inline int -irint(double x) +irintf(float x) { int n; - asm("cvtsd2si %1,%0" : "=r" (n) : "x" (x)); + __asm("fistl %0" : "=m" (n) : "t" (x)); return (n); } -#define HAVE_EFFICIENT_IRINT -#endif -#ifdef __i386__ static __inline int -irint(double x) +irintd(double x) { int n; - asm("fistl %0" : "=m" (n) : "t" (x)); + __asm("fistl %0" : "=m" (n) : "t" (x)); return (n); } -#define HAVE_EFFICIENT_IRINT #endif -#if defined(__amd64__) || defined(__i386__) +#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM) static __inline int irintl(long double x) { int n; - asm("fistl %0" : "=m" (n) : "t" (x)); + __asm("fistl %0" : "=m" (n) : "t" (x)); return (n); } -#define HAVE_EFFICIENT_IRINTL #endif - -#endif /* __GNUCLIKE_ASM */ #ifdef DEBUG #if defined(__amd64__) || defined(__i386__) From owner-svn-src-head@freebsd.org Fri Jul 20 12:47:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55370104479E for ; Fri, 20 Jul 2018 12:47:12 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71AD17B669; Fri, 20 Jul 2018 12:47:10 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-wr1-f43.google.com with SMTP id s11-v6so11188026wra.13; Fri, 20 Jul 2018 05:47:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=14PSVcVD4icHduUaQhh2ppDBYdtWqpwxga+uwzMC1fg=; b=qYM28R1mN+nQF9i0eXCjMF2VgUgg48Q72xSAKfrM6EBvQg+b3Br7sbLajSVxh0lf2Y sJmIKwtt3AYXgc0pOY3UiDJL8GlswjgnG1gvn9wQCVc7SDP/8/3GZrDAucsrJ1nUp4OH LVI7T8MyuIqFEDYRiqosVFhdzCosXqf1ojWeowa4zE2BI5nwa1HTUD+Ivr3eAU4O4vqE E5hkwQIQnRPcIFIkTxa/uEfqakzYqq144zMIenjUJ75s0b2xCmBZSIcMFBnJA0w39CUz 3CUwYBgfIxmszawE5tpQQgSD3zikcWItfdfryXwUqqa1lJ4K99rIuW7fqxtAo34NjePR Sn/A== X-Gm-Message-State: AOUpUlEIeSqN34fWeUq2z8j51TeUp3kjvvIWwoXLMkcPfcIad6HLuoIC +tt+Y4EU2Jsp4eWwKal4OyQ8ijnxSSal2LuTsPc= X-Google-Smtp-Source: AAOMgpc0v0mUoyBEEf8NKMCSVmSM9Csfdn0jrAh0++td52kxGtGLyjkrAPkkTTCzmyiFste3fE47e2I7b3t7jkxraT0= X-Received: by 2002:adf:ea0a:: with SMTP id q10-v6mr1414846wrm.224.1532090484840; Fri, 20 Jul 2018 05:41:24 -0700 (PDT) MIME-Version: 1.0 References: <8B1518D2-D221-4C28-BC1E-C79A0EC743EC@yahoo.com> <1532051461.1344.24.camel@freebsd.org> In-Reply-To: From: Li-Wen Hsu Date: Fri, 20 Jul 2018 13:41:12 +0100 Message-ID: Subject: Re: svn commit: r336525 - in head: contrib/ntp/ntpd etc etc/mtree . . . (with -r336526 as well): breaks ci.freebsd.org FreeBSD-head-sparc64-build (and others) To: Mark Millard Cc: Ian Lepore , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 12:47:12 -0000 On Fri, Jul 20, 2018 at 3:36 AM Mark Millard wrote: > > [Li-Wen Hsu: Does Ian Lepore's reply put this in your area?] > > On 2018-Jul-19, at 6:51 PM, Ian Lepore wrote: > > > I think this will have to be fixed in jenkins. It should probably be > > using the DB_FROM_SRC option. > > > > -- Ian > > Okay. I'll try someone else, Li-Wen Hsu for now. > > [I'll note that all the FreeBSD-head-*-build have since failed.] DB_FROM_SRC is added to build script now. Li-Wen -- Li-Wen Hsu https://lwhsu.org From owner-svn-src-head@freebsd.org Fri Jul 20 13:41:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9051B10460F0 for ; Fri, 20 Jul 2018 13:41:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5B17D077 for ; Fri, 20 Jul 2018 13:41:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id j185-v6so14635860ite.1 for ; Fri, 20 Jul 2018 06:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ItnSDdXhwftD6+Z8QebMFl34qF5qjtRK89q9rS6jFMU=; b=QI0mnajqNEpyaDMscxFl1u9GAeloy8ctRpRggkS5PbUIyH8UExsgVory4R+FiIE8sT ZjCZbz89635jagSJmUPbxbnfI2gBh06XqcrAiBPJzwsRGHEx475gcBaCNq3WeGUzz59y XKSx/Y5eeXp7F2WpZhM9D6U8C4qSwPDTfVQ7QB9fiO9Ys6zmaC8fcG68iuGH2jiv7efv gKxZQspLyXMujbFgyXO3m+YCTQYJAg+eIOV9RWlergs7Ksl9DlNvimKQs2UZHVbdXbmM NZTxDFZLAydMNNbi2qDW0lbGBKjL5AEVr+bpSSCPESW2XsPYw+siHZtInlUVDcfU1yxh HIVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ItnSDdXhwftD6+Z8QebMFl34qF5qjtRK89q9rS6jFMU=; b=Ug48bbb3T0zqKK8WiCmn5kHcu/WRadsYQxhySnmfz44tV9G79wK4amQ++jHb+PM/Uh 5OgvPW6nPSCxs7VEndguiTUezwDiz+Z8i27mYZIvQUkFRsmlurlCu4urS5goh4GtrjSZ 5LZ1P9t+ngvF2zcGxN8Ir+RodHxTxszHkClY+OzMa/jHzF57CapwzlrZhvQCzHG8WfZo WJFTUNG/YrpFj7fLHu8Ijp4Y3sh0K58pWVNoNBR3wzoVtY+WEpSyasFGqbUoGWHrbTBZ O7a545/xF8tIfqbIsUaNq6tDhIIZpoI07CZ+Q3soErO5T62pm7SSE/MA910H5oI5YOry bmDg== X-Gm-Message-State: AOUpUlFER9VaGYJDelBV6cScaM/o1kiz83tai8qAjJmgnEihKJXOmIl2 Qj92dKbS1jsxFvzDiMydJuKJjJmHeoMnS4ergfcCSw== X-Google-Smtp-Source: AAOMgpcd1eyoEWsEj/O7cG2yiiccRQTJwQYysBdrdB6SEE2jsO9SMb85qMkpV2n5j+Di5Zr2sR4zdhka++RbSxeRNPE= X-Received: by 2002:a24:b211:: with SMTP id u17-v6mr1853288ite.1.1532094106387; Fri, 20 Jul 2018 06:41:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:4485:0:0:0:0:0 with HTTP; Fri, 20 Jul 2018 06:41:45 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <84EE7B03-935E-4D79-933E-35A9F80A227A@me.com> References: <201807200517.w6K5HchM017801@repo.freebsd.org> <54f1863c-8791-ea3e-3c4f-0f4e1107b2bd@FreeBSD.org> <84EE7B03-935E-4D79-933E-35A9F80A227A@me.com> From: Warner Losh Date: Fri, 20 Jul 2018 07:41:45 -0600 X-Google-Sender-Auth: upM05N7ZqjB8N1XHUf6xjxnFS3w Message-ID: Subject: Re: svn commit: r336532 - in head/stand: . common i386 i386/loader i386/zfsboot i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader To: Toomas Soome Cc: Andriy Gapon , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 13:41:47 -0000 On Fri, Jul 20, 2018 at 3:39 AM, Toomas Soome wrote: > > > On 20 Jul 2018, at 11:00, Andriy Gapon wrote: > > On 20/07/2018 08:17, Warner Losh wrote: > > Provide a symbolic link from zfsloader > to loader so people who have not upgraded their boot blocks are not > affected > > > I am not sure that ZFS boot blocks can handle symbolic links... > I seem to recall that not a long time ago they lacked that ability. > > > I did implement it. Just need to be sure if its backported when needed. > > https://svnweb.freebsd.org/base?view=revision&revision=r314112 > > That's too late in the game. I did this for compatibility with older systems. I guess I'll make it a hard-link. Warner From owner-svn-src-head@freebsd.org Fri Jul 20 13:45:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5385E10462B3; Fri, 20 Jul 2018 13:45:11 +0000 (UTC) (envelope-from 0mp@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 EA7D37D403; Fri, 20 Jul 2018 13:45:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE0C410F17; Fri, 20 Jul 2018 13:45:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KDjAPX081585; Fri, 20 Jul 2018 13:45:10 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KDj9hX081581; Fri, 20 Jul 2018 13:45:09 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201807201345.w6KDj9hX081581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Fri, 20 Jul 2018 13:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336546 - head/share/examples/mdoc X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/examples/mdoc X-SVN-Commit-Revision: 336546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 13:45:11 -0000 Author: 0mp (ports committer) Date: Fri Jul 20 13:45:09 2018 New Revision: 336546 URL: https://svnweb.freebsd.org/changeset/base/336546 Log: Add SPDX tags to example manual pages and POSIX copyright. Reviewed by: eadler Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D14958 Modified: head/share/examples/mdoc/POSIX-copyright head/share/examples/mdoc/example.1 head/share/examples/mdoc/example.3 head/share/examples/mdoc/example.4 head/share/examples/mdoc/example.9 Modified: head/share/examples/mdoc/POSIX-copyright ============================================================================== --- head/share/examples/mdoc/POSIX-copyright Fri Jul 20 12:42:24 2018 (r336545) +++ head/share/examples/mdoc/POSIX-copyright Fri Jul 20 13:45:09 2018 (r336546) @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" .\" Copyright (c) [year] [your name] .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/examples/mdoc/example.1 ============================================================================== --- head/share/examples/mdoc/example.1 Fri Jul 20 12:42:24 2018 (r336545) +++ head/share/examples/mdoc/example.1 Fri Jul 20 13:45:09 2018 (r336546) @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" .\" Copyright (c) [year] [your name] .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/examples/mdoc/example.3 ============================================================================== --- head/share/examples/mdoc/example.3 Fri Jul 20 12:42:24 2018 (r336545) +++ head/share/examples/mdoc/example.3 Fri Jul 20 13:45:09 2018 (r336546) @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" .\" Copyright (c) [year] [your name] .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/examples/mdoc/example.4 ============================================================================== --- head/share/examples/mdoc/example.4 Fri Jul 20 12:42:24 2018 (r336545) +++ head/share/examples/mdoc/example.4 Fri Jul 20 13:45:09 2018 (r336546) @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" .\" Copyright (c) [year] [your name] .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/examples/mdoc/example.9 ============================================================================== --- head/share/examples/mdoc/example.9 Fri Jul 20 12:42:24 2018 (r336545) +++ head/share/examples/mdoc/example.9 Fri Jul 20 13:45:09 2018 (r336546) @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" .\" Copyright (c) [year] [your name] .\" .\" Redistribution and use in source and binary forms, with or without From owner-svn-src-head@freebsd.org Fri Jul 20 13:59:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC7511046740; Fri, 20 Jul 2018 13:59:30 +0000 (UTC) (envelope-from ian@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 7CFB57DA59; Fri, 20 Jul 2018 13:59:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52B63110E9; Fri, 20 Jul 2018 13:59:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KDxUoA087002; Fri, 20 Jul 2018 13:59:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KDxT1p087000; Fri, 20 Jul 2018 13:59:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807201359.w6KDxT1p087000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 20 Jul 2018 13:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336547 - in head/etc: defaults rc.d X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/etc: defaults rc.d X-SVN-Commit-Revision: 336547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 13:59:31 -0000 Author: ian Date: Fri Jul 20 13:59:29 2018 New Revision: 336547 URL: https://svnweb.freebsd.org/changeset/base/336547 Log: Automatically run ntpd as non-root when possible. Ntpd needs only a subset of full root privileges to do its job. Specifically it needs the ability to manipulate system time, and to re-bind to a privileged UDP port after interface changes. The mac_ntpd(4) policy module (see r336525) can grant these privs. These changes detect the availability of mac_ntpd(4). If enabled, and if the ntpd configuration is fairly vanilla, it automatically runs ntpd as the non-root user 'ntpd' (uid 123). "Vanilla" means the config doesn't include command line or ntp.conf options changing the location of files or using any files/dirs likely to be inaccessible to user ntpd. Ntpd can still run as non-root when using such options, but the admin must ensure all required files and dirs are accessible, and then set ntpd_user=ntpd in rc.conf. Note that these changes also address PR 199127 by using the command_args technique suggested in the patch. They also tangentially address PR 113552, which is primarily about inconsistent filenames in documentation, but some of the inconsistancy was caused by old code in rc.d/ntpd which is leftover from the intial import from netbsd. There was code to do chroot setup which required the use of the netbsd clockctl(4) device; that code never had any effect on freebsd, because we lack that device and don't build ntpd with the options that would allow using it. PR: 113552 199127 Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16050 Modified: head/etc/defaults/rc.conf head/etc/rc.d/ntpd Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Jul 20 13:45:09 2018 (r336546) +++ head/etc/defaults/rc.conf Fri Jul 20 13:59:29 2018 (r336547) @@ -381,8 +381,7 @@ ntpd_enable="NO" # Run ntpd Network Time Protocol (or ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one. ntpd_config="/etc/ntp.conf" # ntpd(8) configuration file ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if offset is high -ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift" - # Flags to ntpd (if enabled). +ntpd_flags="" # Additional flags to ntpd ntp_src_leapfile="/etc/ntp/leap-seconds" # Initial source for ntpd leapfile ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" Modified: head/etc/rc.d/ntpd ============================================================================== --- head/etc/rc.d/ntpd Fri Jul 20 13:45:09 2018 (r336546) +++ head/etc/rc.d/ntpd Fri Jul 20 13:59:29 2018 (r336547) @@ -14,53 +14,103 @@ name="ntpd" desc="Network Time Protocol daemon" rcvar="ntpd_enable" command="/usr/sbin/${name}" -pidfile="/var/run/${name}.pid" extra_commands="fetch needfetch" fetch_cmd="ntpd_fetch_leapfile" needfetch_cmd="ntpd_needfetch_leapfile" start_precmd="ntpd_precmd" _ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" +_ntp_default_dir="/var/db/ntp" +_ntp_default_driftfile="${_ntp_default_dir}/ntpd.drift" +_ntp_old_driftfile="/var/db/ntpd.drift" +pidfile="${_ntp_default_dir}/${name}.pid" + load_rc_config $name -ntpd_precmd() +can_run_nonroot() { - rc_flags="-c ${ntpd_config} ${ntpd_flags}" - - if checkyesno ntpd_sync_on_start; then - rc_flags="-g $rc_flags" + # If the admin set what uid to use, we don't change it. + if [ -n "${ntpd_user}" ]; then + return 1 fi - ntpd_init_leapfile + # If the admin set any command line options involving files, we + # may not be able to access them as user ntpd. + case "${rc_flags}" in + *-f* | *--driftfile* | *-i* | *--jaildir* | \ + *-k* | *--keyfile* | *-l* | *--logfile* | \ + *-p* | *--pidfile* | *-s* | *--statsdir* ) + return 1;; + esac - if [ ! -f $ntp_db_leapfile ]; then - ntpd_fetch_leapfile + # If the admin set any options in ntp.conf involving files, + # we may not be able to access them as user ntpd. + local fileopts="^[ \t]*crypto|^[ \t]*driftfile|^[ \t]*key|^[ \t]*logfile|^[ \t]*statsdir" + grep -E -q "${fileopts}" "${ntpd_config}" && return 1 + + # Try to set up the the MAC ntpd policy so ntpd can run with reduced + # privileges. Detect whether MAC is compiled into the kernel, load + # the policy module if not already present, then check whether the + # policy has been disabled via tunable or sysctl. + [ -n "$(sysctl -qn security.mac.version)" ] || return 1 + sysctl -qn security.mac.ntpd >/dev/null || kldload -qn mac_ntpd || return 1 + [ "$(sysctl -qn security.mac.ntpd.enabled)" == "1" ] || return 1 + + # On older existing systems, the ntp dir may by owned by root, change + # it to ntpd to give the daemon create/write access to the driftfile. + if [ "$(stat -f %u ${_ntp_default_dir})" = "0" ]; then + chown ntpd:ntpd "${_ntp_default_dir}" || return 1 + chmod 0755 "${_ntp_default_dir}" || return 1 + logger -s -t "rc.d/ntpd" -p daemon.notice \ + "${_ntp_default_dir} updated to owner ntpd:ntpd, mode 0755" fi - if [ -z "$ntpd_chrootdir" ]; then - return 0; + # If the driftfile exists in the standard location for older existing + # systems, move it into the ntp dir and fix the ownership if we can. + if [ -f "${_ntp_old_driftfile}" ] && [ ! -L "${_ntp_old_driftfile}" ]; then + mv "${_ntp_old_driftfile}" "${_ntp_default_driftfile}" && + chown ntpd:ntpd "${_ntp_default_driftfile}" || return 1 + logger -s -t "rc.d/ntpd" -p daemon.notice \ + "${_ntp_default_driftfile} updated to owner ntpd:ntpd" + logger -s -t "rc.d/ntpd" -p daemon.notice \ + "${_ntp_old_driftfile} moved to ${_ntp_default_driftfile}" fi +} - # If running in a chroot cage, ensure that the appropriate files - # exist inside the cage, as well as helper symlinks into the cage - # from outside. - # - # As this is called after the is_running and required_dir checks - # are made in run_rc_command(), we can safely assume ${ntpd_chrootdir} - # exists and ntpd isn't running at this point (unless forcestart - # is used). - # - if [ ! -c "${ntpd_chrootdir}/dev/clockctl" ]; then - rm -f "${ntpd_chrootdir}/dev/clockctl" - ( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" ) +ntpd_precmd() +{ + local driftopt + + # If we can run as a non-root user, switch uid to ntpd and use the + # new default location for the driftfile inside the ntpd-owned dir. + # Otherwise, figure out what to do about the driftfile option. If set + # by the admin, we don't add the option. If the file exists in the old + # default location we use that, else we use the new default location. + if can_run_nonroot; then + _user="ntpd" + driftopt="-f ${_ntp_default_driftfile}" + elif [ -z "${rc_flags##*-f*}" ] || + [ -z "${rc_flags##*--driftfile*}" ] || + grep -q "^[ \t]*driftfile" "${ntpd_config}"; then + driftopt="" # admin set the option, we don't need to add it. + elif [ -f "${_ntp_old_driftfile}" ]; then + driftopt="-f ${_ntp_old_driftfile}" + else + driftopt="-f ${_ntp_default_driftfile}" fi - ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift - ln -fs "${ntpd_chrootdir}${_ntp_tmp_leapfile}" ${_ntp_tmp_leapfile} - # Change run_rc_commands()'s internal copy of $ntpd_flags - # - rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags" + # Set command_args based on the various config vars. + command_args="-p ${pidfile} -c ${ntpd_config} ${driftopt}" + if checkyesno ntpd_sync_on_start; then + command_args="${command_args} -g" + fi + + # Make sure the leapfile is ready to use. + ntpd_init_leapfile + if [ ! -f "${ntp_db_leapfile}" ]; then + ntpd_fetch_leapfile + fi } current_ntp_ts() { From owner-svn-src-head@freebsd.org Fri Jul 20 14:23:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14D8310474E5; Fri, 20 Jul 2018 14:23:03 +0000 (UTC) (envelope-from ian@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 AD2137E9A9; Fri, 20 Jul 2018 14:23:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88B08115DE; Fri, 20 Jul 2018 14:23:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KEN2kX002421; Fri, 20 Jul 2018 14:23:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KEN2E5002419; Fri, 20 Jul 2018 14:23:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807201423.w6KEN2E5002419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 20 Jul 2018 14:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336548 - in head/share/man: man4 man5 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/share/man: man4 man5 X-SVN-Commit-Revision: 336548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 14:23:03 -0000 Author: ian Date: Fri Jul 20 14:23:01 2018 New Revision: 336548 URL: https://svnweb.freebsd.org/changeset/base/336548 Log: Support installing manpages for multiple or alternate architecture(s). Some section-4 manpages are architecture-specific, and the build process currently generates only the pages for the MACHINE_CPUARCH being built. man(1) supports a '-m' option to find manpages belonging to an arbitrary architecture other than the MACHINE_[CPU]ARCH, but we have no way to generate and install alternate-arch pages right now. This change adds a new make.conf variable, MAN_ARCH, which can be a list of one or more MACHINE_ARCH or MACHINE_CPUARCH values. All arch-specific manpages that exist for the named arches will be installed. If unset, it continues the behavior of installing just the MACHINE_CPUARCH being built. Differential Revision: https://reviews.freebsd.org/D16198 Modified: head/share/man/man4/Makefile head/share/man/man5/make.conf.5 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Jul 20 13:59:29 2018 (r336547) +++ head/share/man/man4/Makefile Fri Jul 20 14:23:01 2018 (r336548) @@ -868,9 +868,18 @@ _nvd.4= nvd.4 _nvme.4= nvme.4 .endif -.if exists(${.CURDIR}/man4.${MACHINE_CPUARCH}) -SUBDIR= man4.${MACHINE_CPUARCH} +.if empty(MAN_ARCH) +__arches= ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH} +.elif ${MAN_ARCH} == "all" +__arches= ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E} +.else +__arches= ${MAN_ARCH} .endif +.for __arch in ${__arches:O:u} +.if exists(${.CURDIR}/man4.${__arch}) +SUBDIR+= man4.${__arch} +.endif +.endfor .if ${MK_BLUETOOTH} != "no" MAN+= ng_bluetooth.4 Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Fri Jul 20 13:59:29 2018 (r336547) +++ head/share/man/man5/make.conf.5 Fri Jul 20 14:23:01 2018 (r336548) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2017 +.Dd July 20, 2018 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -399,6 +399,14 @@ Set this to disable assertions and statistics gatherin .Xr malloc 3 . It also defaults the A and J runtime options to off. Disabled by default on -CURRENT. +.It Va MAN_ARCH +.Pq Vt str +Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values +for which section 4 man pages will be installed. +The special value +.Sq all +installs all available architectures. +The default is the MACHINE and MACHINE_ARCH being built. .It Va MODULES_WITH_WORLD .Pq Vt bool Set to build modules with the system instead of the kernel. From owner-svn-src-head@freebsd.org Fri Jul 20 14:32:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF3E1047AB1; Fri, 20 Jul 2018 14:32:37 +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.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 2B03D7F6D7; Fri, 20 Jul 2018 14:32:37 +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 0C8F711796; Fri, 20 Jul 2018 14:32:37 +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 w6KEWa4Z007790; Fri, 20 Jul 2018 14:32:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KEWaA6007789; Fri, 20 Jul 2018 14:32:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201807201432.w6KEWaA6007789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 20 Jul 2018 14:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336549 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 336549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 14:32:37 -0000 Author: trasz Date: Fri Jul 20 14:32:36 2018 New Revision: 336549 URL: https://svnweb.freebsd.org/changeset/base/336549 Log: Document kernel/signal/crashdump devd(8) notification. Discussed with: kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16323 Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Fri Jul 20 14:23:01 2018 (r336548) +++ head/sbin/devd/devd.conf.5 Fri Jul 20 14:32:36 2018 (r336549) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd July 18, 2018 +.Dd July 20, 2018 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -259,6 +259,10 @@ CIS-product. CIS-vendor. .It Li class Device class. +.It Li comm +Executable name (kernel). +.It Li core +Path to core file (kernel). .It Li device Device ID. .It Li devclass @@ -496,11 +500,22 @@ Events related to the kernel. .Bl -tag -width ".Sy Subsystem" -compact .It Sy Subsystem .It Li power -Information about the state of the system. .Bl -tag -width ".li resume" -compact .It Sy Type .It Li resume Notification that the system has woken from the suspended state. +.El +.El +.Pp +.It Li kernel +More events related to the kernel. +.Bl -tag -width ".Sy Subsystem" -compact +.It Sy Subsystem +.It Li signal +.Bl -tag -width ".li resume" -compact +.It Sy Type +.It Li coredump +Notification that a process has crashed and dumped core. .El .El .Pp From owner-svn-src-head@freebsd.org Fri Jul 20 15:32:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5DB110495D4; Fri, 20 Jul 2018 15:32:21 +0000 (UTC) (envelope-from tuexen@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 7830581510; Fri, 20 Jul 2018 15:32:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4092E1213C; Fri, 20 Jul 2018 15:32:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KFWLZV037231; Fri, 20 Jul 2018 15:32:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KFWKMP037229; Fri, 20 Jul 2018 15:32:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807201532.w6KFWKMP037229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 20 Jul 2018 15:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336551 - in head: share/man/man4 sys/netinet sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head: share/man/man4 sys/netinet sys/netinet6 X-SVN-Commit-Revision: 336551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 15:32:22 -0000 Author: tuexen Date: Fri Jul 20 15:32:20 2018 New Revision: 336551 URL: https://svnweb.freebsd.org/changeset/base/336551 Log: Add missing dtrace probes for received UDP packets. Fire UDP receive probes when a packet is received and there is no endpoint consuming it. Fire the probe also if the TTL of the received packet is smaller than the minimum required by the endpoint. Clarify also in the man page, when the probe fires. Reviewed by: dteske@, markj@, rrs@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16046 Modified: head/share/man/man4/dtrace_udp.4 head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/share/man/man4/dtrace_udp.4 ============================================================================== --- head/share/man/man4/dtrace_udp.4 Fri Jul 20 15:31:51 2018 (r336550) +++ head/share/man/man4/dtrace_udp.4 Fri Jul 20 15:32:20 2018 (r336551) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2015 +.Dd July 20, 2018 .Dt DTRACE_UDP 4 .Os .Sh NAME @@ -45,7 +45,11 @@ The .Fn udp:::send probe fires whenever the kernel prepares to transmit a UDP packet, and the .Fn udp:::receive -probe fires whenever the kernel receives a UDP packet. +probe fires whenever the kernel receives a UDP packet, unless +the UDP header is incomplete, +the destination port is 0, +the length field is invalid, +or the checksum is wrong. The arguments to these probes can be used to obtain detailed information about the IP and UDP headers of the corresponding packet. .Sh ARGUMENTS Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Jul 20 15:31:51 2018 (r336550) +++ head/sys/netinet/udp_usrreq.c Fri Jul 20 15:32:20 2018 (r336551) @@ -685,6 +685,7 @@ udp_input(struct mbuf **mp, int *offp, int proto) inet_ntoa_r(ip->ip_dst, dst), ntohs(uh->uh_dport), inet_ntoa_r(ip->ip_src, src), ntohs(uh->uh_sport)); } + UDP_PROBE(receive, NULL, NULL, ip, NULL, uh); UDPSTAT_INC(udps_noport); if (m->m_flags & (M_BCAST | M_MCAST)) { UDPSTAT_INC(udps_noportbcast); @@ -704,6 +705,7 @@ udp_input(struct mbuf **mp, int *offp, int proto) */ INP_RLOCK_ASSERT(inp); if (inp->inp_ip_minttl && inp->inp_ip_minttl > ip->ip_ttl) { + UDP_PROBE(receive, NULL, inp, ip, inp, uh); INP_RUNLOCK(inp); m_freem(m); return (IPPROTO_DONE); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Jul 20 15:31:51 2018 (r336550) +++ head/sys/netinet6/udp6_usrreq.c Fri Jul 20 15:32:20 2018 (r336551) @@ -483,6 +483,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto) ip6_sprintf(ip6bufs, &ip6->ip6_src), ntohs(uh->uh_sport)); } + UDP_PROBE(receive, NULL, NULL, ip6, NULL, uh); UDPSTAT_INC(udps_noport); if (m->m_flags & M_MCAST) { printf("UDP6: M_MCAST is set in a unicast packet.\n"); From owner-svn-src-head@freebsd.org Fri Jul 20 15:37:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A262C10498A5; Fri, 20 Jul 2018 15:37:30 +0000 (UTC) (envelope-from tuexen@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 41BBB818DA; Fri, 20 Jul 2018 15:37:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F09812179; Fri, 20 Jul 2018 15:37:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KFbU7H039479; Fri, 20 Jul 2018 15:37:30 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KFbTS4039477; Fri, 20 Jul 2018 15:37:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807201537.w6KFbTS4039477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 20 Jul 2018 15:37:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336552 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip X-SVN-Commit-Revision: 336552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 15:37:31 -0000 Author: tuexen Date: Fri Jul 20 15:37:29 2018 New Revision: 336552 URL: https://svnweb.freebsd.org/changeset/base/336552 Log: Test that the dtrace UDP receive probe fires. This test ensures that the fix committed in https://svnweb.freebsd.org/changeset/base/336551 actually works. Reviewed by: dteske@, markj@, rrs@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16046 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh Fri Jul 20 15:32:20 2018 (r336551) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh Fri Jul 20 15:37:29 2018 (r336552) @@ -25,7 +25,7 @@ # # -# Test ip:::{send,receive} of IPv4 UDP to a local address. +# Test {ip,udp}:::{send,receive} of IPv4 UDP to a local address. # # This may fail due to: # @@ -42,11 +42,11 @@ # 1 x ip:::send (UDP sent to UDP port 33434) # 1 x udp:::send (UDP sent to UDP port 33434) # 1 x ip:::receive (UDP received) +# 1 x udp:::receive (UDP received) # -# No udp:::receive event is expected since the UDP packet elicts -# an ICMP PORT_UNREACHABLE response rather than a UDP packet, and locally -# the echo request UDP packet only reaches IP, so the udp:::receive probe -# is not triggered by it. +# A udp:::receive event is expected even if the received UDP packet +# elicits an ICMP PORT_UNREACHABLE message since there is no UDP +# socket for receiving the packet. # if (( $# != 1 )); then @@ -77,7 +77,7 @@ EOPERL $dtrace -c 'perl test.pl' -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local"/ +{ + udpreceive++; +} + END { printf("Minimum UDP events seen\n\n"); printf("ip:::send - %s\n", ipsend >= 1 ? "yes" : "no"); printf("ip:::receive - %s\n", ipreceive >= 1 ? "yes" : "no"); printf("udp:::send - %s\n", udpsend >= 1 ? "yes" : "no"); + printf("udp:::receive - %s\n", udpreceive >= 1 ? "yes" : "no"); } EODTRACE Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out Fri Jul 20 15:32:20 2018 (r336551) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out Fri Jul 20 15:37:29 2018 (r336552) @@ -3,4 +3,5 @@ Minimum UDP events seen ip:::send - yes ip:::receive - yes udp:::send - yes +udp:::receive - yes From owner-svn-src-head@freebsd.org Fri Jul 20 16:06:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A574104A8BD; Fri, 20 Jul 2018 16:06:45 +0000 (UTC) (envelope-from ian@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 B1A3A8287F; Fri, 20 Jul 2018 16:06:44 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D2C112659; Fri, 20 Jul 2018 16:06:44 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KG6ieP054350; Fri, 20 Jul 2018 16:06:44 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KG6i1p054349; Fri, 20 Jul 2018 16:06:44 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807201606.w6KG6i1p054349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 20 Jul 2018 16:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336553 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 336553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 16:06:45 -0000 Author: ian Date: Fri Jul 20 16:06:44 2018 New Revision: 336553 URL: https://svnweb.freebsd.org/changeset/base/336553 Log: Apply some late-arriving markup suggestions from the phab review, and add a paragraph that mentions the possibility of starting ntpd as a non-root user rather than starting it as root and using its '-u' option to drop root privs after startup. Differential Revision: https://reviews.freebsd.org/D16281 Modified: head/share/man/man4/mac_ntpd.4 Modified: head/share/man/man4/mac_ntpd.4 ============================================================================== --- head/share/man/man4/mac_ntpd.4 Fri Jul 20 15:37:29 2018 (r336552) +++ head/share/man/man4/mac_ntpd.4 Fri Jul 20 16:06:44 2018 (r336553) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2018 +.Dd July 20, 2018 .Dt MAC_NTPD 4 .Os .Sh NAME @@ -45,8 +45,9 @@ place the following line in your kernel configuration .Pp and in .Xr loader.conf 5 : -.Pp -.Dl "mac_ntpd_load=""YES""" +.Bd -literal -offset indent +mac_ntpd_load="YES" +.Ed .Sh DESCRIPTION The .Nm @@ -58,30 +59,28 @@ system time, and to (re-)bind to the privileged NTP po When .Xr ntpd 8 is started with -.Sq -u\ +.Sq Fl u Ar [:group] on the command line, it performs all initializations requiring root privileges, then drops root privileges by switching to the given user id. From that point on, the only privileges it requires are the ability to manipulate system time, and the ability to re-bind a UDP socket to the NTP port (port 123) after a network interface change. -By default, -.Fx -starts -.Xr ntpd 8 -with -.Sq -u\ ntpd:ntpd -on the command line, if the mac_ntpd policy is available to grant -the required privileges. .Pp +With the +.Nm +policy active, it may also be possible to start ntpd as a non-root user, +because the default ntpd options don't require any additional root +privileges beyond those granted by the policy. +.Pp .Ss Privileges Granted The exact set of kernel privileges granted to any process running with the configured uid is: .Bl -inset -compact -offset indent -.It PRIV_ADJTIME -.It PRIV_CLOCK_SETTIME -.It PRIV_NTP_ADJTIME -.It PRIV_NETINET_RESERVEDPORT -.It PRIV_NETINET_REUSEPORT +.It Dv PRIV_ADJTIME +.It Dv PRIV_CLOCK_SETTIME +.It Dv PRIV_NTP_ADJTIME +.It Dv PRIV_NETINET_RESERVEDPORT +.It Dv PRIV_NETINET_REUSEPORT .El .Pp .Ss Runtime Configuration From owner-svn-src-head@freebsd.org Fri Jul 20 16:08:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00019104A98D; Fri, 20 Jul 2018 16:08:14 +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 A15E8829F4; Fri, 20 Jul 2018 16:08:14 +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 824D01265C; Fri, 20 Jul 2018 16:08: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 w6KG8E4R054458; Fri, 20 Jul 2018 16:08:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KG8E6L054457; Fri, 20 Jul 2018 16:08:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807201608.w6KG8E6L054457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 20 Jul 2018 16:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336554 - head/sys/dev/vt/hw/ofwfb X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/vt/hw/ofwfb X-SVN-Commit-Revision: 336554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 16:08:15 -0000 Author: jhibbits Date: Fri Jul 20 16:08:14 2018 New Revision: 336554 URL: https://svnweb.freebsd.org/changeset/base/336554 Log: vt/ofwfb: Check that /chosen/stdout is valid before using it in initialization The FDT implementation of OF_instance_to_package() backend checks the cross-reference to get the node. On failure, this returns the input handle unchanged. In the case of ofwfb attachment, if /chosen/stdout property does not exist, sc->sc_handle is either garbage or 0, which then gets propagated to node. This will prevent "screen" from being used, resulting in not properly attaching. Correct this by matching the code in ofwfb_probe(). Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Fri Jul 20 16:06:44 2018 (r336553) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Fri Jul 20 16:08:14 2018 (r336554) @@ -370,9 +370,11 @@ ofwfb_init(struct vt_device *vd) /* Initialize softc */ vd->vd_softc = sc = &ofwfb_conssoftc; + node = -1; chosen = OF_finddevice("/chosen"); - OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t)); - node = OF_instance_to_package(sc->sc_handle); + if (OF_getprop(chosen, "stdout", &sc->sc_handle, + sizeof(ihandle_t)) == sizeof(ihandle_t)) + node = OF_instance_to_package(sc->sc_handle); if (node == -1) { /* * The "/chosen/stdout" does not exist try From owner-svn-src-head@freebsd.org Fri Jul 20 16:18:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93193104AE75; Fri, 20 Jul 2018 16:18:25 +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 3A99F83027; Fri, 20 Jul 2018 16:18:25 +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 1BC1512807; Fri, 20 Jul 2018 16:18:25 +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 w6KGIOLM059744; Fri, 20 Jul 2018 16:18:24 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KGIO8q059743; Fri, 20 Jul 2018 16:18:24 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807201618.w6KGIO8q059743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 20 Jul 2018 16:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336555 - head/sys/dev/vt/hw/ofwfb X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/vt/hw/ofwfb X-SVN-Commit-Revision: 336555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 16:18:25 -0000 Author: jhibbits Date: Fri Jul 20 16:18:24 2018 New Revision: 336555 URL: https://svnweb.freebsd.org/changeset/base/336555 Log: vt/ofwfb: Fix brain-o from r336514, use the correct form of /chosen/stdout-path /chosen/stdout-path is a string, not ihandle. Treat it as such. With this, ofwfb now starts correctly on a POWER9 system when launched from the local console (not serial). Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Fri Jul 20 16:08:14 2018 (r336554) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Fri Jul 20 16:18:24 2018 (r336555) @@ -92,7 +92,7 @@ ofwfb_probe(struct vt_device *vd) { phandle_t chosen, node; ihandle_t stdout; - char type[64]; + char buf[64]; chosen = OF_finddevice("/chosen"); if (chosen == -1) @@ -103,9 +103,8 @@ ofwfb_probe(struct vt_device *vd) sizeof(stdout)) node = OF_instance_to_package(stdout); if (node == -1) - if (OF_getprop(chosen, "stdout-path", &stdout, sizeof(stdout)) == - sizeof(stdout)) - node = OF_instance_to_package(stdout); + if (OF_getprop(chosen, "stdout-path", buf, sizeof(buf)) > 0) + node = OF_finddevice(buf); if (node == -1) { /* * The "/chosen/stdout" does not exist try @@ -113,8 +112,8 @@ ofwfb_probe(struct vt_device *vd) */ node = OF_finddevice("screen"); } - OF_getprop(node, "device_type", type, sizeof(type)); - if (strcmp(type, "display") != 0) + OF_getprop(node, "device_type", buf, sizeof(buf)); + if (strcmp(buf, "display") != 0) return (CN_DEAD); /* Looks OK... */ @@ -355,7 +354,7 @@ static int ofwfb_init(struct vt_device *vd) { struct ofwfb_softc *sc; - char type[64]; + char buf[64]; phandle_t chosen; phandle_t node; uint32_t depth, height, width, stride; @@ -375,6 +374,13 @@ ofwfb_init(struct vt_device *vd) if (OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t)) == sizeof(ihandle_t)) node = OF_instance_to_package(sc->sc_handle); + if (node == -1) + /* Try "/chosen/stdout-path" now */ + if (OF_getprop(chosen, "stdout-path", buf, sizeof(buf)) > 0) { + node = OF_finddevice(buf); + if (node != -1) + sc->sc_handle = OF_open(buf); + } if (node == -1) { /* * The "/chosen/stdout" does not exist try @@ -383,8 +389,8 @@ ofwfb_init(struct vt_device *vd) node = OF_finddevice("screen"); sc->sc_handle = OF_open("screen"); } - OF_getprop(node, "device_type", type, sizeof(type)); - if (strcmp(type, "display") != 0) + OF_getprop(node, "device_type", buf, sizeof(buf)); + if (strcmp(buf, "display") != 0) return (CN_DEAD); /* Keep track of the OF node */ From owner-svn-src-head@freebsd.org Fri Jul 20 16:31:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6B1D104B332; Fri, 20 Jul 2018 16:31: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.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 6887D83804; Fri, 20 Jul 2018 16:31: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 4992D129D0; Fri, 20 Jul 2018 16:31: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 w6KGV9un065208; Fri, 20 Jul 2018 16:31:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KGV9Ne065207; Fri, 20 Jul 2018 16:31:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807201631.w6KGV9Ne065207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 20 Jul 2018 16:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336556 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 336556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 16:31:09 -0000 Author: markj Date: Fri Jul 20 16:31:08 2018 New Revision: 336556 URL: https://svnweb.freebsd.org/changeset/base/336556 Log: Initialize the L3 page's wire count correctly after a L2 entry demotion. Reviewed by: alc MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16303 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Fri Jul 20 16:18:24 2018 (r336555) +++ head/sys/arm64/arm64/pmap.c Fri Jul 20 16:31:08 2018 (r336556) @@ -4784,6 +4784,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ * If the page table page is new, initialize it. */ if (ml3->wire_count == 1) { + ml3->wire_count = NL3PG; for (i = 0; i < Ln_ENTRIES; i++) { l3[i] = newl3 | phys; phys += L3_SIZE; From owner-svn-src-head@freebsd.org Fri Jul 20 16:31:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3DC0104B363; Fri, 20 Jul 2018 16:31:25 +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 A11DA83931; Fri, 20 Jul 2018 16:31:25 +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 824FC129E9; Fri, 20 Jul 2018 16:31:25 +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 w6KGVPLv066050; Fri, 20 Jul 2018 16:31:25 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KGVPBQ066049; Fri, 20 Jul 2018 16:31:25 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201807201631.w6KGVPBQ066049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 20 Jul 2018 16:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336557 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 336557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 16:31:26 -0000 Author: alc Date: Fri Jul 20 16:31:25 2018 New Revision: 336557 URL: https://svnweb.freebsd.org/changeset/base/336557 Log: Annotate a parameter as unused. X-MFC with: r336288 Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Jul 20 16:31:08 2018 (r336556) +++ head/sys/i386/i386/pmap.c Fri Jul 20 16:31:25 2018 (r336557) @@ -1081,7 +1081,7 @@ pmap_cache_bits(int mode, boolean_t is_pde) } bool -pmap_ps_enabled(pmap_t pmap) +pmap_ps_enabled(pmap_t pmap __unused) { return (pg_ps_enabled); From owner-svn-src-head@freebsd.org Fri Jul 20 16:37:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A91FF104B68B; Fri, 20 Jul 2018 16:37:06 +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 3BD7783CF0; Fri, 20 Jul 2018 16:37:06 +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 EFBCD12B43; Fri, 20 Jul 2018 16:37:05 +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 w6KGb5AB069932; Fri, 20 Jul 2018 16:37:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KGb5kM069928; Fri, 20 Jul 2018 16:37:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807201637.w6KGb5kM069928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 20 Jul 2018 16:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336558 - in head/sys: arm64/arm64 arm64/include vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: arm64/arm64 arm64/include vm X-SVN-Commit-Revision: 336558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 16:37:07 -0000 Author: markj Date: Fri Jul 20 16:37:04 2018 New Revision: 336558 URL: https://svnweb.freebsd.org/changeset/base/336558 Log: Add support for pmap_enter(psind = 1) to the arm64 pmap. See the commit log messages for r321378 and r336288 for descriptions of this functionality. Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D16303 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/param.h head/sys/arm64/include/pmap.h head/sys/vm/vm_fault.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Fri Jul 20 16:31:25 2018 (r336557) +++ head/sys/arm64/arm64/pmap.c Fri Jul 20 16:37:04 2018 (r336558) @@ -277,6 +277,12 @@ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEA static struct mtx pv_chunks_mutex; static struct rwlock pv_list_locks[NPV_LIST_LOCKS]; +/* + * Internal flags for pmap_enter()'s helper functions. + */ +#define PMAP_ENTER_NORECLAIM 0x1000000 /* Don't reclaim PV entries. */ +#define PMAP_ENTER_NOREPLACE 0x2000000 /* Don't replace mappings. */ + static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); @@ -293,6 +299,8 @@ static pt_entry_t *pmap_demote_l2_locked(pmap_t pmap, static pt_entry_t *pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); +static int pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, + u_int flags, vm_page_t m, struct rwlock **lockp); static int pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, pd_entry_t l1e, struct spglist *free, struct rwlock **lockp); static int pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_t sva, @@ -468,8 +476,8 @@ pmap_pte(pmap_t pmap, vm_offset_t va, int *level) return (l3); } -static inline bool -pmap_superpages_enabled(void) +bool +pmap_ps_enabled(pmap_t pmap __unused) { return (superpages_enabled != 0); @@ -894,6 +902,11 @@ pmap_init(void) * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.superpages_enabled", &superpages_enabled); + if (superpages_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = L2_SIZE; + } /* * Initialize the pv chunk list mutex. @@ -932,6 +945,10 @@ static u_long pmap_l2_demotions; SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, demotions, CTLFLAG_RD, &pmap_l2_demotions, 0, "2MB page demotions"); +static u_long pmap_l2_mappings; +SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, mappings, CTLFLAG_RD, + &pmap_l2_mappings, 0, "2MB page mappings"); + static u_long pmap_l2_p_failures; SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, p_failures, CTLFLAG_RD, &pmap_l2_p_failures, 0, "2MB page promotion failures"); @@ -1588,6 +1605,29 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, str } static vm_page_t +pmap_alloc_l2(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) +{ + pd_entry_t *l1; + vm_page_t l2pg; + vm_pindex_t l2pindex; + +retry: + l1 = pmap_l1(pmap, va); + if (l1 != NULL && (pmap_load(l1) & ATTR_DESCR_MASK) == L1_TABLE) { + /* Add a reference to the L2 page. */ + l2pg = PHYS_TO_VM_PAGE(pmap_load(l1) & ~ATTR_MASK); + l2pg->wire_count++; + } else { + /* Allocate a L2 page. */ + l2pindex = pmap_l2_pindex(va) >> Ln_ENTRIES_SHIFT; + l2pg = _pmap_alloc_l3(pmap, NUL2E + l2pindex, lockp); + if (l2pg == NULL && lockp != NULL) + goto retry; + } + return (l2pg); +} + +static vm_page_t pmap_alloc_l3(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) { vm_pindex_t ptepindex; @@ -1652,7 +1692,6 @@ retry: return (m); } - /*************************************************** * Pmap allocation/deallocation routines. ***************************************************/ @@ -2324,6 +2363,33 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, } /* + * Create the PV entry for a 2MB page mapping. Always returns true unless the + * flag PMAP_ENTER_NORECLAIM is specified. If that flag is specified, returns + * false if the PV entry cannot be allocated without resorting to reclamation. + */ +static bool +pmap_pv_insert_l2(pmap_t pmap, vm_offset_t va, pd_entry_t l2e, u_int flags, + struct rwlock **lockp) +{ + struct md_page *pvh; + pv_entry_t pv; + vm_paddr_t pa; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + /* Pass NULL instead of the lock pointer to disable reclamation. */ + if ((pv = get_pv_entry(pmap, (flags & PMAP_ENTER_NORECLAIM) != 0 ? + NULL : lockp)) == NULL) + return (false); + pv->pv_va = va; + pa = l2e & ~ATTR_MASK; + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); + pvh = pa_to_pvh(pa); + TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_next); + pvh->pv_gen++; + return (true); +} + +/* * pmap_remove_l2: do the things to unmap a level 2 superpage in a process */ static int @@ -2338,6 +2404,8 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((sva & L2_OFFSET) == 0, ("pmap_remove_l2: sva is not aligned")); old_l2 = pmap_load_clear(l2); + KASSERT((old_l2 & ATTR_DESCR_MASK) == L2_BLOCK, + ("pmap_remove_l2: L2e %lx is not a block mapping", old_l2)); pmap_invalidate_range(pmap, sva, sva + L2_SIZE); if (old_l2 & ATTR_SW_WIRED) pmap->pm_stats.wired_count -= L2_SIZE / PAGE_SIZE; @@ -2364,7 +2432,7 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ if (ml3 != NULL) { pmap_resident_count_dec(pmap, 1); KASSERT(ml3->wire_count == NL3PG, - ("pmap_remove_pages: l3 page wire count error")); + ("pmap_remove_l2: l3 page wire count error")); ml3->wire_count = 1; vm_page_unwire_noq(ml3); pmap_add_delayed_free_list(ml3, free, FALSE); @@ -2902,7 +2970,7 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset */ int pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - u_int flags, int8_t psind __unused) + u_int flags, int8_t psind) { struct rwlock *lock; pd_entry_t *pde; @@ -2912,7 +2980,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v vm_paddr_t opa, pa, l1_pa, l2_pa, l3_pa; vm_page_t mpte, om, l1_m, l2_m, l3_m; boolean_t nosleep; - int lvl; + int lvl, rv; va = trunc_page(va); if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) @@ -2933,10 +3001,17 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v CTR2(KTR_PMAP, "pmap_enter: %.16lx -> %.16lx", va, pa); - mpte = NULL; - lock = NULL; + mpte = NULL; PMAP_LOCK(pmap); + if (psind == 1) { + /* Assert the required virtual and physical alignment. */ + KASSERT((va & L2_OFFSET) == 0, ("pmap_enter: va unaligned")); + KASSERT(m->psind > 0, ("pmap_enter: m->psind < psind")); + rv = pmap_enter_l2(pmap, va, (new_l3 & ~L3_PAGE) | L2_BLOCK, + flags, m, &lock); + goto out; + } pde = pmap_pde(pmap, va, &lvl); if (pde != NULL && lvl == 1) { @@ -3184,16 +3259,160 @@ validate: #if VM_NRESERVLEVEL > 0 if (pmap != pmap_kernel() && (mpte == NULL || mpte->wire_count == NL3PG) && - pmap_superpages_enabled() && + pmap_ps_enabled(pmap) && (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) { pmap_promote_l2(pmap, pde, va, &lock); } #endif + rv = KERN_SUCCESS; +out: if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); + return (rv); +} + +/* + * Tries to create a read- and/or execute-only 2MB page mapping. Returns true + * if successful. Returns false if (1) a page table page cannot be allocated + * without sleeping, (2) a mapping already exists at the specified virtual + * address, or (3) a PV entry cannot be allocated without reclaiming another + * PV entry. + */ +static bool +pmap_enter_2mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + struct rwlock **lockp) +{ + pd_entry_t new_l2; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + + new_l2 = (pd_entry_t)(VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | + ATTR_IDX(m->md.pv_memattr) | ATTR_AP(ATTR_AP_RO) | L2_BLOCK); + if ((m->oflags & VPO_UNMANAGED) == 0) + new_l2 |= ATTR_SW_MANAGED; + if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == DEVICE_MEMORY) + new_l2 |= ATTR_XN; + if (va < VM_MAXUSER_ADDRESS) + new_l2 |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN; + return (pmap_enter_l2(pmap, va, new_l2, PMAP_ENTER_NOSLEEP | + PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, NULL, lockp) == + KERN_SUCCESS); +} + +/* + * Tries to create the specified 2MB page mapping. Returns KERN_SUCCESS if + * the mapping was created, and either KERN_FAILURE or KERN_RESOURCE_SHORTAGE + * otherwise. Returns KERN_FAILURE if PMAP_ENTER_NOREPLACE was specified and + * a mapping already exists at the specified virtual address. Returns + * KERN_RESOURCE_SHORTAGE if PMAP_ENTER_NOSLEEP was specified and a page table + * page allocation failed. Returns KERN_RESOURCE_SHORTAGE if + * PMAP_ENTER_NORECLAIM was specified and a PV entry allocation failed. + * + * The parameter "m" is only used when creating a managed, writeable mapping. + */ +static int +pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, + vm_page_t m, struct rwlock **lockp) +{ + struct spglist free; + pd_entry_t *l2, *l3, old_l2; + vm_offset_t sva; + vm_page_t l2pg, mt; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + + if ((l2pg = pmap_alloc_l2(pmap, va, (flags & PMAP_ENTER_NOSLEEP) != 0 ? + NULL : lockp)) == NULL) { + CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p", + va, pmap); + return (KERN_RESOURCE_SHORTAGE); + } + + l2 = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(l2pg)); + l2 = &l2[pmap_l2_index(va)]; + if ((old_l2 = pmap_load(l2)) != 0) { + KASSERT(l2pg->wire_count > 1, + ("pmap_enter_l2: l2pg's wire count is too low")); + if ((flags & PMAP_ENTER_NOREPLACE) != 0) { + l2pg->wire_count--; + CTR2(KTR_PMAP, + "pmap_enter_l2: failure for va %#lx in pmap %p", + va, pmap); + return (KERN_FAILURE); + } + SLIST_INIT(&free); + if ((old_l2 & ATTR_DESCR_MASK) == L2_BLOCK) + (void)pmap_remove_l2(pmap, l2, va, + pmap_load(pmap_l1(pmap, va)), &free, lockp); + else + for (sva = va; sva < va + L2_SIZE; sva += PAGE_SIZE) { + l3 = pmap_l2_to_l3(l2, sva); + if (pmap_l3_valid(pmap_load(l3)) && + pmap_remove_l3(pmap, l3, sva, old_l2, &free, + lockp) != 0) + break; + } + vm_page_free_pages_toq(&free, true); + if (va >= VM_MAXUSER_ADDRESS) { + mt = PHYS_TO_VM_PAGE(pmap_load(l2) & ~ATTR_MASK); + if (pmap_insert_pt_page(pmap, mt)) { + /* + * XXX Currently, this can't happen bacuse + * we do not perform pmap_enter(psind == 1) + * on the kernel pmap. + */ + panic("pmap_enter_l2: trie insert failed"); + } + } else + KASSERT(pmap_load(l2) == 0, + ("pmap_enter_l2: non-zero L2 entry %p", l2)); + } + + if ((new_l2 & ATTR_SW_MANAGED) != 0) { + /* + * Abort this mapping if its PV entry could not be created. + */ + if (!pmap_pv_insert_l2(pmap, va, new_l2, flags, lockp)) { + SLIST_INIT(&free); + if (pmap_unwire_l3(pmap, va, l2pg, &free)) { + /* + * Although "va" is not mapped, paging-structure + * caches could nonetheless have entries that + * refer to the freed page table pages. + * Invalidate those entries. + */ + pmap_invalidate_page(pmap, va); + vm_page_free_pages_toq(&free, true); + } + CTR2(KTR_PMAP, + "pmap_enter_l2: failure for va %#lx in pmap %p", + va, pmap); + return (KERN_RESOURCE_SHORTAGE); + } + if ((new_l2 & ATTR_AP_RW_BIT) == ATTR_AP(ATTR_AP_RW)) + for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++) + vm_page_aflag_set(mt, PGA_WRITEABLE); + } + + /* + * Increment counters. + */ + if ((new_l2 & ATTR_SW_WIRED) != 0) + pmap->pm_stats.wired_count += L2_SIZE / PAGE_SIZE; + pmap->pm_stats.resident_count += L2_SIZE / PAGE_SIZE; + + /* + * Map the superpage. + */ + (void)pmap_load_store(l2, new_l2); + + atomic_add_long(&pmap_l2_mappings, 1); + CTR2(KTR_PMAP, "pmap_enter_l2: success for va %#lx in pmap %p", + va, pmap); + return (KERN_SUCCESS); } @@ -3227,7 +3446,13 @@ pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_o PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); - mpte = pmap_enter_quick_locked(pmap, va, m, prot, mpte, &lock); + if ((va & L2_OFFSET) == 0 && va + L2_SIZE <= end && + m->psind == 1 && pmap_ps_enabled(pmap) && + pmap_enter_2mpage(pmap, va, m, prot, &lock)) + m = &m[L2_SIZE / PAGE_SIZE - 1]; + else + mpte = pmap_enter_quick_locked(pmap, va, m, prot, mpte, + &lock); m = TAILQ_NEXT(m, listq); } if (lock != NULL) Modified: head/sys/arm64/include/param.h ============================================================================== --- head/sys/arm64/include/param.h Fri Jul 20 16:31:25 2018 (r336557) +++ head/sys/arm64/include/param.h Fri Jul 20 16:37:04 2018 (r336558) @@ -95,7 +95,7 @@ #define PAGE_SIZE_64K (1 << PAGE_SHIFT_64K) #define PAGE_MASK_64K (PAGE_SIZE_64K - 1) -#define MAXPAGESIZES 1 /* maximum number of supported page sizes */ +#define MAXPAGESIZES 2 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */ Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Fri Jul 20 16:31:25 2018 (r336557) +++ head/sys/arm64/include/pmap.h Fri Jul 20 16:37:04 2018 (r336558) @@ -152,6 +152,7 @@ vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); void pmap_kremove_device(vm_offset_t, vm_size_t); void *pmap_mapdev_attr(vm_offset_t pa, vm_size_t size, vm_memattr_t ma); +bool pmap_ps_enabled(pmap_t pmap); void *pmap_mapdev(vm_offset_t, vm_size_t); void *pmap_mapbios(vm_paddr_t, vm_size_t); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Jul 20 16:31:25 2018 (r336557) +++ head/sys/vm/vm_fault.c Fri Jul 20 16:37:04 2018 (r336558) @@ -270,7 +270,8 @@ vm_fault_soft_fast(struct faultstate *fs, vm_offset_t int fault_type, int fault_flags, boolean_t wired, vm_page_t *m_hold) { vm_page_t m, m_map; -#if (defined(__amd64__) || defined(__i386__)) && VM_NRESERVLEVEL > 0 +#if (defined(__amd64__) || defined(__i386__) || defined(__aarch64__)) && \ + VM_NRESERVLEVEL > 0 vm_page_t m_super; int flags; #endif @@ -284,7 +285,8 @@ vm_fault_soft_fast(struct faultstate *fs, vm_offset_t return (KERN_FAILURE); m_map = m; psind = 0; -#if (defined(__amd64__) || defined(__i386__)) && VM_NRESERVLEVEL > 0 +#if (defined(__amd64__) || defined(__i386__) || defined(__aarch64__)) && \ + VM_NRESERVLEVEL > 0 if ((m->flags & PG_FICTITIOUS) == 0 && (m_super = vm_reserv_to_superpage(m)) != NULL && rounddown2(vaddr, pagesizes[m_super->psind]) >= fs->entry->start && @@ -460,7 +462,7 @@ vm_fault_populate(struct faultstate *fs, vm_prot_t pro pidx <= pager_last; pidx += npages, m = vm_page_next(&m[npages - 1])) { vaddr = fs->entry->start + IDX_TO_OFF(pidx) - fs->entry->offset; -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__) psind = m->psind; if (psind > 0 && ((vaddr & (pagesizes[psind] - 1)) != 0 || pidx + OFF_TO_IDX(pagesizes[psind]) - 1 > pager_last || From owner-svn-src-head@freebsd.org Fri Jul 20 16:56:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C333104BE51; Fri, 20 Jul 2018 16:56:48 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0A0584749; Fri, 20 Jul 2018 16:56:47 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.4] (c-71-198-162-232.hsd1.ca.comcast.net [71.198.162.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 839A210B22; Fri, 20 Jul 2018 16:56:46 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.f.0.180709 Date: Fri, 20 Jul 2018 09:56:42 -0700 Subject: Re: svn commit: r336526 - head From: Ravi Pokala To: Ian Lepore , , , Message-ID: Thread-Topic: svn commit: r336526 - head References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> In-Reply-To: <201807200044.w6K0i4QQ079894@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 16:56:48 -0000 Hi Ian, -----Original Message----- From: on behalf of Ian Lepore Date: 2018-07-19, Thursday at 17:44 To: , , Subject: svn commit: r336526 - head > Author: ian > Date: Fri Jul 20 00:44:04 2018 > New Revision: 336526 > URL: https://svnweb.freebsd.org/changeset/base/336526 > > Log: > Add ntpd to the list of users/groups to check before installing. > > Modified: > head/Makefile.inc1 When trying to installworld: ERROR: Required ntpd user is missing, see /usr/src/UPDATING. But there is no UPDATING entry about this. (Also, shouldn't it be ${SRCTOP}/UPDATING?) Thanks, Ravi (rpokala@) From owner-svn-src-head@freebsd.org Fri Jul 20 17:24:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A172104CB46; Fri, 20 Jul 2018 17:24:46 +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 E376E85843; Fri, 20 Jul 2018 17:24:45 +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 C076213352; Fri, 20 Jul 2018 17:24:45 +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 w6KHOjom095247; Fri, 20 Jul 2018 17:24:45 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KHOj94095246; Fri, 20 Jul 2018 17:24:45 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201807201724.w6KHOj94095246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Fri, 20 Jul 2018 17:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336559 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 336559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 17:24:46 -0000 Author: shurd Date: Fri Jul 20 17:24:45 2018 New Revision: 336559 URL: https://svnweb.freebsd.org/changeset/base/336559 Log: Improve netmap TX handling when TX IRQs are not used/supported Use the timer to poll for TX completions when there are outstanding TX slots. Track when the last driver timer was called to prevent overcalling it. Also clean up some kring vs NIC ring usage. Reviewed by: marius, Johannes Lundberg Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16300 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Fri Jul 20 16:37:04 2018 (r336558) +++ head/sys/net/iflib.c Fri Jul 20 17:24:45 2018 (r336559) @@ -146,6 +146,7 @@ typedef struct iflib_fl *iflib_fl_t; struct iflib_ctx; static void iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid); +static void iflib_timer(void *arg); typedef struct iflib_filter_info { driver_filter_t *ifi_filter; @@ -356,6 +357,7 @@ struct iflib_txq { uint64_t ift_map_failed; uint64_t ift_txd_encap_efbig; uint64_t ift_pullups; + uint64_t ift_last_timer_tick; struct mtx ift_mtx; struct mtx ift_db_mtx; @@ -916,7 +918,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; struct netmap_ring *ring = kring->ring; - u_int nm_i; /* index into the netmap ring */ + u_int nm_i; /* index into the netmap kring */ u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; @@ -939,7 +941,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl /* * First part: process new packets to send. - * nm_i is the current index in the netmap ring, + * nm_i is the current index in the netmap kring, * nic_i is the corresponding index in the NIC ring. * * If we have packets to send (nm_i != head) @@ -959,7 +961,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl * to prefetch the next slot and txr entry. */ - nm_i = netmap_idx_n2k(kring, kring->nr_hwcur); + nm_i = kring->nr_hwcur; if (nm_i != head) { /* we have new packets to send */ pkt_info_zero(&pi); pi.ipi_segs = txq->ift_segs; @@ -1012,7 +1014,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl nm_i = nm_next(nm_i, lim); nic_i = nm_next(nic_i, lim); } - kring->nr_hwcur = head; + kring->nr_hwcur = nm_i; /* synchronize the NIC ring */ if (txq->ift_sds.ifsd_map) @@ -1031,19 +1033,18 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl * minimal delay, then trigger the tx handler which will spin in the * group task queue. */ - if (kring->nr_hwtail != nm_prev(head, lim)) { + if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) { if (iflib_tx_credits_update(ctx, txq)) { /* some tx completed, increment avail */ nic_i = txq->ift_cidx_processed; kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), lim); } - else { - if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ)) { - DELAY(1); - GROUPTASK_ENQUEUE(&ctx->ifc_txqs[txq->ift_id].ift_task); - } - } } + if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ)) + if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) { + callout_reset_on(&txq->ift_timer, hz < 2000 ? 1 : hz / 1000, + iflib_timer, txq, txq->ift_timer.c_cpu); + } return (0); } @@ -1069,7 +1070,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl uint32_t nic_i; /* index into the NIC ring */ u_int i, n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = netmap_idx_n2k(kring, kring->rhead); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; struct if_rxd_info ri; @@ -1134,7 +1135,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl iflib_rx_miss_bufs += n; } fl->ifl_cidx = nic_i; - kring->nr_hwtail = netmap_idx_k2n(kring, nm_i); + kring->nr_hwtail = nm_i; } kring->nr_kflags &= ~NKR_PENDINTR; } @@ -1148,7 +1149,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl * nm_i == (nic_i + kring->nkr_hwofs) % ring_size */ /* XXX not sure how this will work with multiple free lists */ - nm_i = netmap_idx_n2k(kring, kring->nr_hwcur); + nm_i = kring->nr_hwcur; return (netmap_fl_refill(rxq, kring, nm_i, false)); } @@ -1234,6 +1235,25 @@ iflib_netmap_rxq_init(if_ctx_t ctx, iflib_rxq_t rxq) netmap_fl_refill(rxq, kring, nm_i, true); } +static void +iflib_netmap_timer_adjust(if_ctx_t ctx, uint16_t txqid, uint32_t *reset_on) +{ + struct netmap_kring *kring; + + kring = NA(ctx->ifc_ifp)->tx_rings[txqid]; + + if (kring->nr_hwcur != nm_next(kring->nr_hwtail, kring->nkr_num_slots - 1)) { + if (ctx->isc_txd_credits_update(ctx->ifc_softc, txqid, false)) + netmap_tx_irq(ctx->ifc_ifp, txqid); + if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ)) { + if (hz < 2000) + *reset_on = 1; + else + *reset_on = hz / 1000; + } + } +} + #define iflib_netmap_detach(ifp) netmap_detach(ifp) #else @@ -1244,6 +1264,7 @@ iflib_netmap_rxq_init(if_ctx_t ctx, iflib_rxq_t rxq) #define iflib_netmap_attach(ctx) (0) #define netmap_rx_irq(ifp, qid, budget) (0) #define netmap_tx_irq(ifp, qid) do {} while (0) +#define iflib_netmap_timer_adjust(ctx, txqid, reset_on) #endif @@ -2196,6 +2217,8 @@ iflib_timer(void *arg) iflib_txq_t txq = arg; if_ctx_t ctx = txq->ift_ctx; if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; + uint64_t this_tick = ticks; + uint32_t reset_on = hz / 2; if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) return; @@ -2204,22 +2227,29 @@ iflib_timer(void *arg) ** can be done without the lock because its RO ** and the HUNG state will be static if set. */ - IFDI_TIMER(ctx, txq->ift_id); - if ((txq->ift_qstatus == IFLIB_QUEUE_HUNG) && - ((txq->ift_cleaned_prev == txq->ift_cleaned) || - (sctx->isc_pause_frames == 0))) - goto hung; + if (this_tick - txq->ift_last_timer_tick >= hz / 2) { + txq->ift_last_timer_tick = this_tick; + IFDI_TIMER(ctx, txq->ift_id); + if ((txq->ift_qstatus == IFLIB_QUEUE_HUNG) && + ((txq->ift_cleaned_prev == txq->ift_cleaned) || + (sctx->isc_pause_frames == 0))) + goto hung; - if (ifmp_ring_is_stalled(txq->ift_br)) - txq->ift_qstatus = IFLIB_QUEUE_HUNG; - txq->ift_cleaned_prev = txq->ift_cleaned; + if (ifmp_ring_is_stalled(txq->ift_br)) + txq->ift_qstatus = IFLIB_QUEUE_HUNG; + txq->ift_cleaned_prev = txq->ift_cleaned; + } +#ifdef DEV_NETMAP + if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) + iflib_netmap_timer_adjust(ctx, txq->ift_id, &reset_on); +#endif /* handle any laggards */ if (txq->ift_db_pending) GROUPTASK_ENQUEUE(&txq->ift_task); sctx->isc_pause_frames = 0; if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) - callout_reset_on(&txq->ift_timer, hz/2, iflib_timer, txq, txq->ift_timer.c_cpu); + callout_reset_on(&txq->ift_timer, reset_on, iflib_timer, txq, txq->ift_timer.c_cpu); return; hung: device_printf(ctx->ifc_dev, "TX(%d) desc avail = %d, pidx = %d\n", @@ -3733,10 +3763,6 @@ _task_fn_tx(void *context) if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) return; if (if_getcapenable(ifp) & IFCAP_NETMAP) { - /* - * If there are no available credits, and TX IRQs are not in use, - * re-schedule the task immediately. - */ if (ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, false)) netmap_tx_irq(ifp, txq->ift_id); IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id); @@ -3808,6 +3834,7 @@ _task_fn_admin(void *context) iflib_txq_t txq; int i; bool oactive, running, do_reset, do_watchdog; + uint32_t reset_on = hz / 2; STATE_LOCK(ctx); running = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING); @@ -3832,8 +3859,14 @@ _task_fn_admin(void *context) IFDI_WATCHDOG_RESET(ctx); } IFDI_UPDATE_ADMIN_STATUS(ctx); - for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++) - callout_reset_on(&txq->ift_timer, hz/2, iflib_timer, txq, txq->ift_timer.c_cpu); + for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++) { +#ifdef DEV_NETMAP + reset_on = hz / 2; + if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) + iflib_netmap_timer_adjust(ctx, txq->ift_id, &reset_on); +#endif + callout_reset_on(&txq->ift_timer, reset_on, iflib_timer, txq, txq->ift_timer.c_cpu); + } IFDI_LINK_INTR_ENABLE(ctx); if (do_reset) iflib_if_init_locked(ctx); From owner-svn-src-head@freebsd.org Fri Jul 20 17:38:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8DDC104D068 for ; Fri, 20 Jul 2018 17:38:26 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 6A76285F6E for ; Fri, 20 Jul 2018 17:38:26 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: b34f5463-8c43-11e8-904b-1d2e466b3c59 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 outbound2.ore.mailhop.org (Halon) with ESMTPSA id b34f5463-8c43-11e8-904b-1d2e466b3c59; Fri, 20 Jul 2018 17:38:24 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6KHcNeC006286; Fri, 20 Jul 2018 11:38:23 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532108303.1344.57.camel@freebsd.org> Subject: Re: svn commit: r336526 - head From: Ian Lepore To: Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 20 Jul 2018 11:38:23 -0600 In-Reply-To: References: <201807200044.w6K0i4QQ079894@repo.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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 17:38:27 -0000 On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: > Hi Ian, > > -----Original Message----- > From: on behalf of Ian Lepore > Date: 2018-07-19, Thursday at 17:44 > To: , , > Subject: svn commit: r336526 - head > > > > > Author: ian > > Date: Fri Jul 20 00:44:04 2018 > > New Revision: 336526 > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > Log: > >   Add ntpd to the list of users/groups to check before installing. > > > > Modified: > >   head/Makefile.inc1 > When trying to installworld: > >     ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > But there is no UPDATING entry about this. (Also, shouldn't it be ${SRCTOP}/UPDATING?) > > Thanks, > > Ravi (rpokala@) I wondered about that too, when I accidentally stumbled across the CHECK_UIDS thing and realized I should add ntpd to it. I searched in UPDATING for some of the other things in the CHECK_UIDS list to see what had been said about such changes in the past, even searching through old-old svn history, and found nothing. I finally settled on the thought that the reference to UPDATING was to the stuff at the bottom that never changes. In particular to the section around line 1595 that documents the instalkernel, reboot, mergemaster, installworld sequence. The mergemaster part should take care of the new userid, I guess. -- Ian From owner-svn-src-head@freebsd.org Fri Jul 20 17:45:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EC68104D40A; Fri, 20 Jul 2018 17:45:28 +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 C5033864F8; Fri, 20 Jul 2018 17:45:27 +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 A6FA8136AF; Fri, 20 Jul 2018 17:45:27 +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 w6KHjRFf005864; Fri, 20 Jul 2018 17:45:27 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KHjRPT005861; Fri, 20 Jul 2018 17:45:27 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201807201745.w6KHjRPT005861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Fri, 20 Jul 2018 17:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336560 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 336560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 17:45:28 -0000 Author: shurd Date: Fri Jul 20 17:45:26 2018 New Revision: 336560 URL: https://svnweb.freebsd.org/changeset/base/336560 Log: Add knob to control tx ring abdication. r323954 changed the mp ring behaviour when 64-bit atomics were available to abdicate the TX ring rather than having one become a consumer thereby running to completion on TX. The consumer of the mp ring was then triggered in the tx task rather than blocking the TX call. While this significantly lowered the number of RX drops in small-packet forwarding, it also negatively impacts TX performance. With this change, the default behaviour is reverted, causing one TX ring to become a consumer during the enqueue call. A new sysctl, dev.X.Y.iflib.tx_abdicate is added to control this behaviour. Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16302 Modified: head/sys/net/iflib.c head/sys/net/mp_ring.c head/sys/net/mp_ring.h Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Fri Jul 20 17:24:45 2018 (r336559) +++ head/sys/net/iflib.c Fri Jul 20 17:45:26 2018 (r336560) @@ -197,6 +197,7 @@ struct iflib_ctx { uint16_t ifc_sysctl_nrxqs; uint16_t ifc_sysctl_qs_eq_override; uint16_t ifc_sysctl_rx_budget; + uint16_t ifc_sysctl_tx_abdicate; qidx_t ifc_sysctl_ntxds[8]; qidx_t ifc_sysctl_nrxds[8]; @@ -3756,6 +3757,7 @@ _task_fn_tx(void *context) iflib_txq_t txq = context; if_ctx_t ctx = txq->ift_ctx; struct ifnet *ifp = ctx->ifc_ifp; + int abdicate = ctx->ifc_sysctl_tx_abdicate; #ifdef IFLIB_DIAGNOSTICS txq->ift_cpu_exec_count[curcpu]++; @@ -3769,7 +3771,14 @@ _task_fn_tx(void *context) return; } if (txq->ift_db_pending) - ifmp_ring_enqueue(txq->ift_br, (void **)&txq, 1, TX_BATCH_SIZE); + ifmp_ring_enqueue(txq->ift_br, (void **)&txq, 1, TX_BATCH_SIZE, abdicate); + else if (!abdicate) + ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); + /* + * When abdicating, we always need to check drainage, not just when we don't enqueue + */ + 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); @@ -3940,6 +3949,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) iflib_txq_t txq; int err, qidx; + int abdicate = ctx->ifc_sysctl_tx_abdicate; if (__predict_false((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || !LINK_ACTIVE(ctx))) { DBG_COUNTER_INC(tx_frees); @@ -3991,10 +4001,13 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) } #endif DBG_COUNTER_INC(tx_seen); - err = ifmp_ring_enqueue(txq->ift_br, (void **)&m, 1, TX_BATCH_SIZE); + err = ifmp_ring_enqueue(txq->ift_br, (void **)&m, 1, TX_BATCH_SIZE, abdicate); - GROUPTASK_ENQUEUE(&txq->ift_task); - if (err) { + if (abdicate) + GROUPTASK_ENQUEUE(&txq->ift_task); + if (err) { + if (!abdicate) + GROUPTASK_ENQUEUE(&txq->ift_task); /* support forthcoming later */ #ifdef DRIVER_BACKPRESSURE txq->ift_closed = TRUE; @@ -6200,6 +6213,9 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "rx_budget", CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, "set the rx budget"); + SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "tx_abdicate", + CTLFLAG_RWTUN, &ctx->ifc_sysctl_tx_abdicate, 0, + "cause tx to abdicate instead of running to completion"); /* XXX change for per-queue sizes */ SYSCTL_ADD_PROC(ctx_list, oid_list, OID_AUTO, "override_ntxds", Modified: head/sys/net/mp_ring.c ============================================================================== --- head/sys/net/mp_ring.c Fri Jul 20 17:24:45 2018 (r336559) +++ head/sys/net/mp_ring.c Fri Jul 20 17:45:26 2018 (r336560) @@ -327,7 +327,7 @@ ifmp_ring_free(struct ifmp_ring *r) */ #ifdef NO_64BIT_ATOMICS int -ifmp_ring_enqueue(struct ifmp_ring *r, void **items, int n, int budget) +ifmp_ring_enqueue(struct ifmp_ring *r, void **items, int n, int budget, int abdicate) { union ring_state os, ns; uint16_t pidx_start, pidx_stop; @@ -380,16 +380,24 @@ ifmp_ring_enqueue(struct ifmp_ring *r, void **items, i */ os.state = ns.state = r->state; ns.pidx_tail = pidx_stop; - ns.flags = BUSY; + if (abdicate) { + if (os.flags == IDLE) + ns.flags = ABDICATED; + } + else { + ns.flags = BUSY; + } r->state = ns.state; counter_u64_add(r->enqueues, n); - /* - * Turn into a consumer if some other thread isn't active as a consumer - * already. - */ - if (os.flags != BUSY) - drain_ring_locked(r, ns, os.flags, budget); + if (!abdicate) { + /* + * Turn into a consumer if some other thread isn't active as a consumer + * already. + */ + if (os.flags != BUSY) + drain_ring_locked(r, ns, os.flags, budget); + } mtx_unlock(&r->lock); return (0); @@ -397,7 +405,7 @@ ifmp_ring_enqueue(struct ifmp_ring *r, void **items, i #else int -ifmp_ring_enqueue(struct ifmp_ring *r, void **items, int n, int budget) +ifmp_ring_enqueue(struct ifmp_ring *r, void **items, int n, int budget, int abdicate) { union ring_state os, ns; uint16_t pidx_start, pidx_stop; @@ -455,11 +463,25 @@ ifmp_ring_enqueue(struct ifmp_ring *r, void **items, i do { os.state = ns.state = r->state; ns.pidx_tail = pidx_stop; - if (os.flags == IDLE) - ns.flags = ABDICATED; + if (abdicate) { + if (os.flags == IDLE) + ns.flags = ABDICATED; + } + else { + ns.flags = BUSY; + } } while (atomic_cmpset_rel_64(&r->state, os.state, ns.state) == 0); critical_exit(); counter_u64_add(r->enqueues, n); + + if (!abdicate) { + /* + * Turn into a consumer if some other thread isn't active as a consumer + * already. + */ + if (os.flags != BUSY) + drain_ring_lockless(r, ns, os.flags, budget); + } return (0); } Modified: head/sys/net/mp_ring.h ============================================================================== --- head/sys/net/mp_ring.h Fri Jul 20 17:24:45 2018 (r336559) +++ head/sys/net/mp_ring.h Fri Jul 20 17:45:26 2018 (r336560) @@ -63,7 +63,7 @@ struct ifmp_ring { int ifmp_ring_alloc(struct ifmp_ring **, int, void *, mp_ring_drain_t, mp_ring_can_drain_t, struct malloc_type *, int); void ifmp_ring_free(struct ifmp_ring *); -int ifmp_ring_enqueue(struct ifmp_ring *, void **, int, int); +int ifmp_ring_enqueue(struct ifmp_ring *, void **, int, int, int); void ifmp_ring_check_drainage(struct ifmp_ring *, int); void ifmp_ring_reset_stats(struct ifmp_ring *); int ifmp_ring_is_idle(struct ifmp_ring *); From owner-svn-src-head@freebsd.org Fri Jul 20 17:45:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DB63104D435 for ; Fri, 20 Jul 2018 17:45:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B223D865FD for ; Fri, 20 Jul 2018 17:45:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id q20-v6so15648203ith.0 for ; Fri, 20 Jul 2018 10:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=gOit3VWlGnYcXhUME2DyRtPS/86JpM4yQtUvITDVNIc=; b=bdj5V6yQ5DXOb9M3qYJ5RffqCPtnNywuVLZbQNqgeKmnBMrzh2Rh5gxBOM6Lm+ooB4 iAdN2OgB2ksWaBeFbkf9dVJpu8zEzo/RMxnVB2XqHFr6PamFS+MBSggnszFQXwLYqMXE VXQOUsSnTVjQMbphF1QVYkvbStLzlaUyZSSmlK7C+fEoxT0jY77t/OE/yye/n1WxNaKh L6gjFKIeXKqu4pAFg8VBdEfBWPD6P3Uuzi1jV4ymDxI9EXgSrArVMWlg8B7L2u0cqSd/ 0teDX2RLQnYkEh95atMHdnhsh3ZPf292wn3SR64es0yVu7O8+jDh7m+kfZ5p6zEiR9FF LMoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=gOit3VWlGnYcXhUME2DyRtPS/86JpM4yQtUvITDVNIc=; b=qGVVMTQ9qWlHN8MtYfNpdgHhYGUj3Gyeym9fv+9HhMBpK2/MNwqwSMZesbPB3kQSTS 5XjfbLxFRvpOqbqjR3HRG7XyQFbnYUlr5zq4wXsjYLrCjPKCm5iISFypyZKV/uXRJAPw iJwXa/SmomYmHoxBck4XGQqvjuDCEtTctHxRgL/XSERXpG5vx7mebOO0+pIEeCFSaKEC 3By9fdOew94PMWRc7lvGnzZgOxWS19HbpHr8Ck0t9y4SiH5CUR1ZP9Gf8dCkFa7OnFp3 X5Yh4QY4PcJGyuWeiK3KmxzMjpIJUR+DGttVU00N9eTbpXwiJdTyEwBX82Cqh4xj6xUR 3NHA== X-Gm-Message-State: AOUpUlEiyLvR/IcZnFb+V5djyPKVxmtxZphScWJncMiYBkt72VOhP2gK odgXex9pCBZJ1Gc45Ji0ODa88GJ6ZoWT6wbq4DbH0cO035w= X-Google-Smtp-Source: AAOMgpfXX/7CSROS61gqVqwphFHiFLSycMg1YzSJ1monGPqyFG5C1VKslw/F3FGJm6WVFnwiK+CcywdWsOdb+bVk9Rg= X-Received: by 2002:a24:ad28:: with SMTP id c40-v6mr2684901itf.36.1532108737073; Fri, 20 Jul 2018 10:45:37 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:4485:0:0:0:0:0 with HTTP; Fri, 20 Jul 2018 10:45:36 -0700 (PDT) X-Originating-IP: [63.237.121.26] In-Reply-To: <1532108303.1344.57.camel@freebsd.org> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <1532108303.1344.57.camel@freebsd.org> From: Warner Losh Date: Fri, 20 Jul 2018 11:45:36 -0600 X-Google-Sender-Auth: HGTdA5xANE1tZX4CCw5aaJ8tgyw Message-ID: Subject: Re: svn commit: r336526 - head To: Ian Lepore Cc: Ravi Pokala , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 17:45:38 -0000 On Fri, Jul 20, 2018 at 11:38 AM, Ian Lepore wrote: > On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: > > Hi Ian, > > > > -----Original Message----- > > From: on behalf of Ian Lepore > > Date: 2018-07-19, Thursday at 17:44 > > To: , , > > Subject: svn commit: r336526 - head > > > > > > > > Author: ian > > > Date: Fri Jul 20 00:44:04 2018 > > > New Revision: 336526 > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > > Log: > > > Add ntpd to the list of users/groups to check before installing. > > > > > > Modified: > > > head/Makefile.inc1 > > When trying to installworld: > > > > ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > > > But there is no UPDATING entry about this. (Also, shouldn't it be > ${SRCTOP}/UPDATING?) > > > > Thanks, > > > > Ravi (rpokala@) > > I wondered about that too, when I accidentally stumbled across the > CHECK_UIDS thing and realized I should add ntpd to it. I searched in > UPDATING for some of the other things in the CHECK_UIDS list to see > what had been said about such changes in the past, even searching > through old-old svn history, and found nothing. > > I finally settled on the thought that the reference to UPDATING was to > the stuff at the bottom that never changes. In particular to the > section around line 1595 that documents the instalkernel, reboot, > mergemaster, installworld sequence. The mergemaster part should take > care of the new userid, I guess. > It should. While what you say is true, it's also been true that in the past people have often listed new userid's in the UPDATING text at the top to give people more info about whether or not it's safe to skip mergemaster and/or make alternative plans if it isn't and they don't use mergemaster :) Warner From owner-svn-src-head@freebsd.org Fri Jul 20 17:46:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C8FA104D4FB; Fri, 20 Jul 2018 17:46:56 +0000 (UTC) (envelope-from lwhsu@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 3F84E86831; Fri, 20 Jul 2018 17:46:56 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21679136C4; Fri, 20 Jul 2018 17:46:56 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KHktRp005965; Fri, 20 Jul 2018 17:46:55 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KHktJ4005964; Fri, 20 Jul 2018 17:46:55 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201807201746.w6KHktJ4005964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 20 Jul 2018 17:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336561 - head/sys/modules/spigen X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/sys/modules/spigen X-SVN-Commit-Revision: 336561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 17:46:56 -0000 Author: lwhsu (ports committer) Date: Fri Jul 20 17:46:55 2018 New Revision: 336561 URL: https://svnweb.freebsd.org/changeset/base/336561 Log: Fix `make` in sys/modules/spigen Reviewed by: ian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16368 Modified: head/sys/modules/spigen/Makefile Modified: head/sys/modules/spigen/Makefile ============================================================================== --- head/sys/modules/spigen/Makefile Fri Jul 20 17:45:26 2018 (r336560) +++ head/sys/modules/spigen/Makefile Fri Jul 20 17:46:55 2018 (r336561) @@ -9,6 +9,7 @@ SRCS+= \ bus_if.h \ device_if.h \ opt_platform.h \ + opt_spi.h \ spibus_if.h \ .if !empty(OPT_FDT) From owner-svn-src-head@freebsd.org Fri Jul 20 17:53:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9084E104D954; Fri, 20 Jul 2018 17:53:29 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FCFD86E56; Fri, 20 Jul 2018 17:53:29 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.4] (c-71-198-162-232.hsd1.ca.comcast.net [71.198.162.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 824B411139; Fri, 20 Jul 2018 17:53:28 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.f.0.180709 Date: Fri, 20 Jul 2018 10:53:25 -0700 Subject: Re: svn commit: r336526 - head From: Ravi Pokala To: Ian Lepore , , , , Will Andrews Message-ID: <67239C31-11DA-43E0-B282-5AE894C2B0CB@panasas.com> Thread-Topic: svn commit: r336526 - head References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <1532108303.1344.57.camel@freebsd.org> In-Reply-To: <1532108303.1344.57.camel@freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 17:53:29 -0000 -----Original Message----- From: on behalf of Ian Lepore Date: 2018-07-20, Friday at 10:38 To: Ravi Pokala , , , Subject: Re: svn commit: r336526 - head > On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: >> Hi Ian, >> >> -----Original Message----- >> From: on behalf of Ian Lepore >> Date: 2018-07-19, Thursday at 17:44 >> To: , , >> Subject: svn commit: r336526 - head >> >>> >>> Author: ian >>> Date: Fri Jul 20 00:44:04 2018 >>> New Revision: 336526 >>> URL: https://svnweb.freebsd.org/changeset/base/336526 >>> >>> Log: >>> Add ntpd to the list of users/groups to check before installing. >>> >>> Modified: >>> head/Makefile.inc1 >> When trying to installworld: >> >> ERROR: Required ntpd user is missing, see /usr/src/UPDATING. >> >> But there is no UPDATING entry about this. (Also, shouldn't it be ${SRCTOP}/UPDATING?) >> >> Thanks, >> >> Ravi (rpokala@) > > I wondered about that too, when I accidentally stumbled across the > CHECK_UIDS thing and realized I should add ntpd to it. I searched in > UPDATING for some of the other things in the CHECK_UIDS list to see > what had been said about such changes in the past, even searching > through old-old svn history, and found nothing. > > I finally settled on the thought that the reference to UPDATING was to > the stuff at the bottom that never changes. In particular to the > section around line 1595 that documents the instalkernel, reboot, > mergemaster, installworld sequence. The mergemaster part should take > care of the new userid, I guess. > > -- Ian Interesting. I was attempting the install via the `beinstall.sh' script. CCing will@, since he wrote it. Thanks, Ravi (rpokala@) From owner-svn-src-head@freebsd.org Fri Jul 20 18:02:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE464104DCD8; Fri, 20 Jul 2018 18:02:53 +0000 (UTC) (envelope-from ian@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 98D6E87384; Fri, 20 Jul 2018 18:02:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79B8813A05; Fri, 20 Jul 2018 18:02:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KI2rZ8015809; Fri, 20 Jul 2018 18:02:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KI2rtH015808; Fri, 20 Jul 2018 18:02:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807201802.w6KI2rtH015808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 20 Jul 2018 18:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336562 - head X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 18:02:54 -0000 Author: ian Date: Fri Jul 20 18:02:52 2018 New Revision: 336562 URL: https://svnweb.freebsd.org/changeset/base/336562 Log: Add a note about the new 'ntpd' userid, and the fact that rc.d/ntpd now automatically runs the daemon as that user if it can. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jul 20 17:46:55 2018 (r336561) +++ head/UPDATING Fri Jul 20 18:02:52 2018 (r336562) @@ -38,6 +38,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: in place from zfsloader to loader to allow a smooth transition until the boot blocks can be updated. +20180719: + New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster + or take steps to update /etc/passwd before doing installworld on + existing systems. Also, rc.d/ntpd now starts ntpd(8) as user ntpd + if the new mac_ntpd(4) policy is available, unless ntpd_flags or + the ntp config file contain options that change file/dir locations. + When such options (e.g., "statsdir" or "crypto") are used, ntpd can + still be run as non-root by setting ntpd_user=ntpd in rc.conf, after + taking steps to ensure that all required files/dirs are accessible + by the ntpd user. + 20180717: Big endian arm support has been removed. From owner-svn-src-head@freebsd.org Fri Jul 20 18:27:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DC80104E821; Fri, 20 Jul 2018 18:27:32 +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 10C978869F; Fri, 20 Jul 2018 18:27:32 +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 E606313D3F; Fri, 20 Jul 2018 18:27:31 +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 w6KIRV1Q026304; Fri, 20 Jul 2018 18:27:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KIRU1N026298; Fri, 20 Jul 2018 18:27:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201807201827.w6KIRU1N026298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 20 Jul 2018 18:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336563 - in head/lib/msun: . ld80 man src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/lib/msun: . ld80 man src X-SVN-Commit-Revision: 336563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 18:27:32 -0000 Author: dim Date: Fri Jul 20 18:27:30 2018 New Revision: 336563 URL: https://svnweb.freebsd.org/changeset/base/336563 Log: Recommit r336497: Fix powl, cpow, cpowf, and cpowl imports from OpenBSD This is a follow-up to r336299. * lib/msun/Makefile: . Remove polevll.c * lib/msun/ld80/e_powl.c: . Copy contents of polevll.c to here. This is the only consumer of these functions. Make functions 'static inline'. . Make reducl a 'static inline' function. * lib/msun/man/exp.3: . Remove BUGS section that no longer applies. * lib/msun/src/math_private.h: . Remove prototypes of __p1evll() and __polevll() * lib/msun/src/s_cpow.c: * lib/msun/src/s_cpowf.c: * lib/msun/src/s_cpowl.c . Include math_private.h. . Use the CMPLX macro from either C99 or math_private.h (depends on compiler support) instead of the problematic use of complex I. Submitted by: Steve Kargl PR: 229876 MFC after: 1 week Deleted: head/lib/msun/src/polevll.c Modified: head/lib/msun/Makefile head/lib/msun/ld80/e_powl.c head/lib/msun/man/exp.3 head/lib/msun/src/math_private.h head/lib/msun/src/s_cpow.c head/lib/msun/src/s_cpowf.c head/lib/msun/src/s_cpowl.c Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Fri Jul 20 18:02:52 2018 (r336562) +++ head/lib/msun/Makefile Fri Jul 20 18:27:30 2018 (r336563) @@ -56,7 +56,6 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ imprecise.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ - polevll.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c s_clog.c s_clogf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ Modified: head/lib/msun/ld80/e_powl.c ============================================================================== --- head/lib/msun/ld80/e_powl.c Fri Jul 20 18:02:52 2018 (r336562) +++ head/lib/msun/ld80/e_powl.c Fri Jul 20 18:27:30 2018 (r336563) @@ -14,6 +14,52 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "math_private.h" + +/* + * Polynomial evaluator: + * P[0] x^n + P[1] x^(n-1) + ... + P[n] + */ +static inline long double +__polevll(long double x, long double *PP, int n) +{ + long double y; + long double *P; + + P = PP; + y = *P++; + do { + y = y * x + *P++; + } while (--n); + + return (y); +} + +/* + * Polynomial evaluator: + * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n] + */ +static inline long double +__p1evll(long double x, long double *PP, int n) +{ + long double y; + long double *P; + + P = PP; + n -= 1; + y = x + *P++; + do { + y = y * x + *P++; + } while (--n); + + return (y); +} + /* powl.c * * Power function, long double precision @@ -467,7 +513,7 @@ return( z ); /* Find a multiple of 1/NXT that is within 1/NXT of x. */ -static long double +static inline long double reducl(long double x) { long double t; Modified: head/lib/msun/man/exp.3 ============================================================================== --- head/lib/msun/man/exp.3 Fri Jul 20 18:02:52 2018 (r336562) +++ head/lib/msun/man/exp.3 Fri Jul 20 18:27:30 2018 (r336563) @@ -180,16 +180,9 @@ If 0**0 = 1, then then \*(Na**0 = 1 too because x**0 = 1 for all finite and infinite x, i.e., independently of x. .El -.Sh BUGS -To conform with newer C/C++ standards, a stub implementation for -.Nm powl -was committed to the math library, where -.Nm powl -is mapped to -.Nm pow . -Thus, the numerical accuracy is at most that of the 53-bit double -precision implementation. .Sh SEE ALSO +.Xr clog 3 +.Xr cpow 3 .Xr fenv 3 , .Xr ldexp 3 , .Xr log 3 , Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Fri Jul 20 18:02:52 2018 (r336562) +++ head/lib/msun/src/math_private.h Fri Jul 20 18:27:30 2018 (r336563) @@ -914,7 +914,4 @@ long double __kernel_sinl(long double, long double, in long double __kernel_cosl(long double, long double); long double __kernel_tanl(long double, long double, int); -long double __p1evll(long double, void *, int); -long double __polevll(long double, void *, int); - #endif /* !_MATH_PRIVATE_H_ */ Modified: head/lib/msun/src/s_cpow.c ============================================================================== --- head/lib/msun/src/s_cpow.c Fri Jul 20 18:02:52 2018 (r336562) +++ head/lib/msun/src/s_cpow.c Fri Jul 20 18:27:30 2018 (r336563) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include "math_private.h" double complex cpow(double complex a, double complex z) @@ -60,7 +61,7 @@ cpow(double complex a, double complex z) y = cimag (z); absa = cabs (a); if (absa == 0.0) { - return (0.0 + 0.0 * I); + return (CMPLX(0.0, 0.0)); } arga = carg (a); r = pow (absa, x); @@ -69,6 +70,6 @@ cpow(double complex a, double complex z) r = r * exp (-y * arga); theta = theta + y * log (absa); } - w = r * cos (theta) + (r * sin (theta)) * I; + w = CMPLX(r * cos (theta), r * sin (theta)); return (w); } Modified: head/lib/msun/src/s_cpowf.c ============================================================================== --- head/lib/msun/src/s_cpowf.c Fri Jul 20 18:02:52 2018 (r336562) +++ head/lib/msun/src/s_cpowf.c Fri Jul 20 18:27:30 2018 (r336563) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "math_private.h" float complex cpowf(float complex a, float complex z) @@ -59,7 +60,7 @@ cpowf(float complex a, float complex z) y = cimagf(z); absa = cabsf (a); if (absa == 0.0f) { - return (0.0f + 0.0f * I); + return (CMPLXF(0.0f, 0.0f)); } arga = cargf (a); r = powf (absa, x); @@ -68,6 +69,6 @@ cpowf(float complex a, float complex z) r = r * expf (-y * arga); theta = theta + y * logf (absa); } - w = r * cosf (theta) + (r * sinf (theta)) * I; + w = CMPLXF(r * cosf (theta), r * sinf (theta)); return (w); } Modified: head/lib/msun/src/s_cpowl.c ============================================================================== --- head/lib/msun/src/s_cpowl.c Fri Jul 20 18:02:52 2018 (r336562) +++ head/lib/msun/src/s_cpowl.c Fri Jul 20 18:27:30 2018 (r336563) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "math_private.h" long double complex cpowl(long double complex a, long double complex z) @@ -59,7 +60,7 @@ cpowl(long double complex a, long double complex z) y = cimagl(z); absa = cabsl(a); if (absa == 0.0L) { - return (0.0L + 0.0L * I); + return (CMPLXL(0.0L, 0.0L)); } arga = cargl(a); r = powl(absa, x); @@ -68,6 +69,6 @@ cpowl(long double complex a, long double complex z) r = r * expl(-y * arga); theta = theta + y * logl(absa); } - w = r * cosl(theta) + (r * sinl(theta)) * I; + w = CMPLXL(r * cosl(theta), r * sinl(theta)); return (w); } From owner-svn-src-head@freebsd.org Fri Jul 20 18:41:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47F97104ECD0; Fri, 20 Jul 2018 18:41:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B955D88E7A; Fri, 20 Jul 2018 18:41:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg1-x533.google.com with SMTP id n7-v6so7559626pgq.4; Fri, 20 Jul 2018 11:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=3igkdKRAsRUaNIxnosgvl5+Dk928d8311qsDLBskHZM=; b=AirSGIGYEnvvcVcrtYCguATBKFVusTyC6xBVf3d90gInvb0tvw+YjCt7qsLbL3TxRO SBXL1Jswjm90+dSL1/+bw6DgiRI0xSnn0qAh3YBoXjRa2FmV//fc2cVVE9xTwReuXF3j KGdrE/8qVB3IlNNp49cmyyI5m/XQCDb3VXeWmQD+1M7ye9CnOzefpGvwURGBKKn2EFm3 STWcB7V5ploviW1RZUpwVSKNV6a9jTB4s3psOxGvfWU+btAJFSh+MFZ4nYkRvSBiKJo6 iNeGICaJ2QLchpl/bkqAYRet0n77Ara8Qzd2rNGHvfjG7BLj0mnGSQKxLfncQF8ESCcg /X8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=3igkdKRAsRUaNIxnosgvl5+Dk928d8311qsDLBskHZM=; b=ZsP7ly59caWaEj7V8SerVY010AWD84t2OjNkN+5DIZ53UN9eBNw43Bf4bMJlerwHze Rz54hNWtYVl5r1LdbDWZsErSGGMyt+SW+XBdxZyhSCOFjQIS1KA9UgOS/yA6wYPKQWPh 6ES6soKVe9cx+NZ6kXI/b/Hfyti0gGljy73c5GWL+xQ08e0hAHVSI/SNm62wl2UrEeEY KL1NWKkeIRBQJhBo0yW3vsIFa1phBcciRyHzXvaxzB4R+Mn1EPKY8IXk/NcpGb121gfN Up1K0dPpBH93qhTmMoEawklDHiDskL5GCeaiNQ9PmlYAQKQbBCVdEztCOdmBEBTQ3JIw qrIQ== X-Gm-Message-State: AOUpUlEv7gRJNVsHKYykEKsTdJmPP4QNpKIPWvDoptINB6O3wcIqyIU+ 6tLb3k+jeyLzhf3zn+oo0PUaAg9KZWo= X-Google-Smtp-Source: AAOMgpdfMdTHk/UF6QVvYQExcut5PeVRI8u80O62QSVDs5ykofH5l3+JUaEfVctLUKgrKlYhwdYgfA== X-Received: by 2002:a63:2dc1:: with SMTP id t184-v6mr3130796pgt.62.1532112060323; Fri, 20 Jul 2018 11:41:00 -0700 (PDT) Received: from raichu (toroon0560w-lp130-03-174-88-72-141.dsl.bell.ca. [174.88.72.141]) by smtp.gmail.com with ESMTPSA id s73-v6sm4298401pfi.154.2018.07.20.11.40.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 11:40:59 -0700 (PDT) Sender: Mark Johnston Date: Fri, 20 Jul 2018 14:40:56 -0400 From: Mark Johnston To: Ian Lepore Cc: Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336526 - head Message-ID: <20180720184056.GB36161@raichu> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <1532108303.1344.57.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1532108303.1344.57.camel@freebsd.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 18:41:02 -0000 On Fri, Jul 20, 2018 at 11:38:23AM -0600, Ian Lepore wrote: > On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: > > Hi Ian, > > > > -----Original Message----- > > From: on behalf of Ian Lepore > > Date: 2018-07-19, Thursday at 17:44 > > To: , , > > Subject: svn commit: r336526 - head > > > > > > > > Author: ian > > > Date: Fri Jul 20 00:44:04 2018 > > > New Revision: 336526 > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > > Log: > > >   Add ntpd to the list of users/groups to check before installing. > > > > > > Modified: > > >   head/Makefile.inc1 > > When trying to installworld: > > > >     ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > > > But there is no UPDATING entry about this. (Also, shouldn't it be ${SRCTOP}/UPDATING?) > > > > Thanks, > > > > Ravi (rpokala@) > > I wondered about that too, when I accidentally stumbled across the > CHECK_UIDS thing and realized I should add ntpd to it. I searched in > UPDATING for some of the other things in the CHECK_UIDS list to see > what had been said about such changes in the past, even searching > through old-old svn history, and found nothing. > > I finally settled on the thought that the reference to UPDATING was to > the stuff at the bottom that never changes. In particular to the > section around line 1595 that documents the instalkernel, reboot, > mergemaster, installworld sequence. The mergemaster part should take > care of the new userid, I guess. I thought it would too, but it's bombing out for me: *** Creating the temporary root environment in /var/tmp/temproot *** /var/tmp/temproot ready for use *** Creating and populating directory structure in /var/tmp/temproot mtree: unknown user `ntpd' mtree: failed at line 49 of the specification *** FATAL ERROR: Cannot 'cd' to /home/mark/src/freebsd-dev and install files to the temproot environment I see that line 49 of BSD.var.dist references the new uids, so I guess there's a chicken and egg problem here? From owner-svn-src-head@freebsd.org Fri Jul 20 18:59:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7898B104F43A; Fri, 20 Jul 2018 18:59:49 +0000 (UTC) (envelope-from asomers@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 28F5F8967F; Fri, 20 Jul 2018 18:59:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F28B314201; Fri, 20 Jul 2018 18:59:48 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KIxm3N041468; Fri, 20 Jul 2018 18:59:48 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KIxmoZ041467; Fri, 20 Jul 2018 18:59:48 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807201859.w6KIxmoZ041467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 20 Jul 2018 18:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336564 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 336564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 18:59:49 -0000 Author: asomers Date: Fri Jul 20 18:59:48 2018 New Revision: 336564 URL: https://svnweb.freebsd.org/changeset/base/336564 Log: Separate the audit(4) tests for auditon(2)'s individual commands auditon(2) is an ioctl-like syscall with several different variants, each of which has a distinct audit event. Write separate audit(4) tests for each variant. Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16255 Modified: head/tests/sys/audit/administrative.c Modified: head/tests/sys/audit/administrative.c ============================================================================== --- head/tests/sys/audit/administrative.c Fri Jul 20 18:27:30 2018 (r336563) +++ head/tests/sys/audit/administrative.c Fri Jul 20 18:59:48 2018 (r336564) @@ -369,57 +369,6 @@ ATF_TC_CLEANUP(auditctl_failure, tc) } -ATF_TC_WITH_CLEANUP(auditon_success); -ATF_TC_HEAD(auditon_success, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " - "auditon(2) call"); -} - -ATF_TC_BODY(auditon_success, tc) -{ - pid = getpid(); - au_evclass_map_t evclass; - snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,success", pid); - - /* Initialize evclass to get the event-class mapping for auditon(2) */ - evclass.ec_number = AUE_AUDITON; - evclass.ec_class = 0; - FILE *pipefd = setup(fds, auclass); - ATF_REQUIRE_EQ(0, auditon(A_GETCLASS, &evclass, sizeof(&evclass))); - check_audit(fds, adregex, pipefd); -} - -ATF_TC_CLEANUP(auditon_success, tc) -{ - cleanup(); -} - - -ATF_TC_WITH_CLEANUP(auditon_failure); -ATF_TC_HEAD(auditon_failure, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " - "auditon(2) call"); -} - -ATF_TC_BODY(auditon_failure, tc) -{ - pid = getpid(); - snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,failure", pid); - - FILE *pipefd = setup(fds, auclass); - /* Failure reason: Invalid au_evclass_map_t structure */ - ATF_REQUIRE_EQ(-1, auditon(A_GETCLASS, NULL, 0)); - check_audit(fds, adregex, pipefd); -} - -ATF_TC_CLEANUP(auditon_failure, tc) -{ - cleanup(); -} - - ATF_TC_WITH_CLEANUP(acct_success); ATF_TC_HEAD(acct_success, tc) { @@ -791,6 +740,507 @@ ATF_TC_CLEANUP(setaudit_addr_failure, tc) } +ATF_TC_WITH_CLEANUP(auditon_getpolicy_success); +ATF_TC_HEAD(auditon_getpolicy_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_GETPOLICY"); +} + +ATF_TC_BODY(auditon_getpolicy_success, tc) +{ + int aupolicy; + pid = getpid(); + snprintf(adregex, sizeof(adregex), "GPOLICY command.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_GETPOLICY, &aupolicy, sizeof(aupolicy))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getpolicy_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getpolicy_failure); +ATF_TC_HEAD(auditon_getpolicy_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETPOLICY"); +} + +ATF_TC_BODY(auditon_getpolicy_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "GPOLICY command.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid argument */ + ATF_REQUIRE_EQ(-1, auditon(A_GETPOLICY, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getpolicy_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setpolicy_success); +ATF_TC_HEAD(auditon_setpolicy_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_SETPOLICY"); +} + +ATF_TC_BODY(auditon_setpolicy_success, tc) +{ + int aupolicy; + pid = getpid(); + snprintf(adregex, sizeof(adregex), "SPOLICY command.*%d.*success", pid); + + /* Retrieve the current auditing policy, to be used with A_SETPOLICY */ + ATF_REQUIRE_EQ(0, auditon(A_GETPOLICY, &aupolicy, sizeof(aupolicy))); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_SETPOLICY, &aupolicy, sizeof(aupolicy))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setpolicy_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setpolicy_failure); +ATF_TC_HEAD(auditon_setpolicy_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETPOLICY"); +} + +ATF_TC_BODY(auditon_setpolicy_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "SPOLICY command.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid argument */ + ATF_REQUIRE_EQ(-1, auditon(A_SETPOLICY, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setpolicy_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getkmask_success); +ATF_TC_HEAD(auditon_getkmask_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_GETKMASK"); +} + +ATF_TC_BODY(auditon_getkmask_success, tc) +{ + pid = getpid(); + au_mask_t evmask; + snprintf(adregex, sizeof(adregex), "get kernel mask.*%d.*success", pid); + + bzero(&evmask, sizeof(evmask)); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_GETKMASK, &evmask, sizeof(evmask))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getkmask_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getkmask_failure); +ATF_TC_HEAD(auditon_getkmask_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETKMASK"); +} + +ATF_TC_BODY(auditon_getkmask_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "get kernel mask.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid au_mask_t structure */ + ATF_REQUIRE_EQ(-1, auditon(A_GETKMASK, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getkmask_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setkmask_success); +ATF_TC_HEAD(auditon_setkmask_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_SETKMASK"); +} + +ATF_TC_BODY(auditon_setkmask_success, tc) +{ + pid = getpid(); + au_mask_t evmask; + snprintf(adregex, sizeof(adregex), "set kernel mask.*%d.*success", pid); + + /* Retrieve the current audit mask to be used with A_SETKMASK */ + bzero(&evmask, sizeof(evmask)); + ATF_REQUIRE_EQ(0, auditon(A_GETKMASK, &evmask, sizeof(evmask))); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_SETKMASK, &evmask, sizeof(evmask))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setkmask_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setkmask_failure); +ATF_TC_HEAD(auditon_setkmask_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETKMASK"); +} + +ATF_TC_BODY(auditon_setkmask_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "set kernel mask.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid au_mask_t structure */ + ATF_REQUIRE_EQ(-1, auditon(A_SETKMASK, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setkmask_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getqctrl_success); +ATF_TC_HEAD(auditon_getqctrl_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_GETQCTRL"); +} + +ATF_TC_BODY(auditon_getqctrl_success, tc) +{ + pid = getpid(); + au_qctrl_t evqctrl; + snprintf(adregex, sizeof(adregex), "GQCTRL command.*%d.*success", pid); + + bzero(&evqctrl, sizeof(evqctrl)); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_GETQCTRL, &evqctrl, sizeof(evqctrl))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getqctrl_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getqctrl_failure); +ATF_TC_HEAD(auditon_getqctrl_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETQCTRL"); +} + +ATF_TC_BODY(auditon_getqctrl_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "GQCTRL command.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid au_qctrl_t structure */ + ATF_REQUIRE_EQ(-1, auditon(A_GETQCTRL, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getqctrl_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setqctrl_success); +ATF_TC_HEAD(auditon_setqctrl_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_SETKMASK"); +} + +ATF_TC_BODY(auditon_setqctrl_success, tc) +{ + pid = getpid(); + au_qctrl_t evqctrl; + snprintf(adregex, sizeof(adregex), "SQCTRL command.*%d.*success", pid); + + /* Retrieve the current audit mask to be used with A_SETQCTRL */ + bzero(&evqctrl, sizeof(evqctrl)); + ATF_REQUIRE_EQ(0, auditon(A_GETQCTRL, &evqctrl, sizeof(evqctrl))); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_SETQCTRL, &evqctrl, sizeof(evqctrl))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setqctrl_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setqctrl_failure); +ATF_TC_HEAD(auditon_setqctrl_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETKMASK"); +} + +ATF_TC_BODY(auditon_setqctrl_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "SQCTRL command.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid au_qctrl_t structure */ + ATF_REQUIRE_EQ(-1, auditon(A_SETQCTRL, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setqctrl_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getclass_success); +ATF_TC_HEAD(auditon_getclass_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_GETCLASS"); +} + +ATF_TC_BODY(auditon_getclass_success, tc) +{ + pid = getpid(); + au_evclass_map_t evclass; + snprintf(adregex, sizeof(adregex), "get event class.*%d.*success", pid); + + /* Initialize evclass to get the event-class mapping for auditon(2) */ + evclass.ec_number = AUE_AUDITON; + evclass.ec_class = 0; + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_GETCLASS, &evclass, sizeof(evclass))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getclass_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getclass_failure); +ATF_TC_HEAD(auditon_getclass_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETCLASS"); +} + +ATF_TC_BODY(auditon_getclass_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "get event class.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid au_evclass_map_t structure */ + ATF_REQUIRE_EQ(-1, auditon(A_GETCLASS, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getclass_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setclass_success); +ATF_TC_HEAD(auditon_setclass_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_SETCLASS"); +} + +ATF_TC_BODY(auditon_setclass_success, tc) +{ + pid = getpid(); + au_evclass_map_t evclass; + snprintf(adregex, sizeof(adregex), "set event class.*%d.*success", pid); + + /* Initialize evclass and get the event-class mapping for auditon(2) */ + evclass.ec_number = AUE_AUDITON; + evclass.ec_class = 0; + ATF_REQUIRE_EQ(0, auditon(A_GETCLASS, &evclass, sizeof(evclass))); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_SETCLASS, &evclass, sizeof(evclass))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setclass_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setclass_failure); +ATF_TC_HEAD(auditon_setclass_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETCLASS"); +} + +ATF_TC_BODY(auditon_setclass_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "set event class.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid au_evclass_map_t structure */ + ATF_REQUIRE_EQ(-1, auditon(A_SETCLASS, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setclass_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getcond_success); +ATF_TC_HEAD(auditon_getcond_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_GETCOND"); +} + +ATF_TC_BODY(auditon_getcond_success, tc) +{ + int auditcond; + pid = getpid(); + snprintf(adregex, sizeof(adregex), "get audit state.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_GETCOND, &auditcond, sizeof(auditcond))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getcond_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getcond_failure); +ATF_TC_HEAD(auditon_getcond_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETCOND"); +} + +ATF_TC_BODY(auditon_getcond_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "get audit state.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid argument */ + ATF_REQUIRE_EQ(-1, auditon(A_GETCOND, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getcond_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setcond_success); +ATF_TC_HEAD(auditon_setcond_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call for cmd: A_SETCOND"); +} + +ATF_TC_BODY(auditon_setcond_success, tc) +{ + int auditcond = AUC_AUDITING; + pid = getpid(); + snprintf(adregex, sizeof(adregex), "set audit state.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + /* At this point auditd is running, so the audit state is AUC_AUDITING */ + ATF_REQUIRE_EQ(0, auditon(A_SETCOND, &auditcond, sizeof(auditcond))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setcond_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setcond_failure); +ATF_TC_HEAD(auditon_setcond_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETCOND"); +} + +ATF_TC_BODY(auditon_setcond_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "set audit state.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid argument */ + ATF_REQUIRE_EQ(-1, auditon(A_SETCOND, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setcond_failure, tc) +{ + cleanup(); +} + + /* * Audit of reboot(2) cannot be tested in normal conditions as we don't want * to reboot the system while running the tests @@ -958,11 +1408,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nfs_getfh_failure); ATF_TP_ADD_TC(tp, acct_success); ATF_TP_ADD_TC(tp, acct_failure); - ATF_TP_ADD_TC(tp, auditctl_success); ATF_TP_ADD_TC(tp, auditctl_failure); - ATF_TP_ADD_TC(tp, auditon_success); - ATF_TP_ADD_TC(tp, auditon_failure); ATF_TP_ADD_TC(tp, getauid_success); ATF_TP_ADD_TC(tp, getauid_failure); @@ -978,6 +1425,31 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, getaudit_addr_failure); ATF_TP_ADD_TC(tp, setaudit_addr_success); ATF_TP_ADD_TC(tp, setaudit_addr_failure); + + ATF_TP_ADD_TC(tp, auditon_getpolicy_success); + ATF_TP_ADD_TC(tp, auditon_getpolicy_failure); + ATF_TP_ADD_TC(tp, auditon_setpolicy_success); + ATF_TP_ADD_TC(tp, auditon_setpolicy_failure); + + ATF_TP_ADD_TC(tp, auditon_getkmask_success); + ATF_TP_ADD_TC(tp, auditon_getkmask_failure); + ATF_TP_ADD_TC(tp, auditon_setkmask_success); + ATF_TP_ADD_TC(tp, auditon_setkmask_failure); + + ATF_TP_ADD_TC(tp, auditon_getqctrl_success); + ATF_TP_ADD_TC(tp, auditon_getqctrl_failure); + ATF_TP_ADD_TC(tp, auditon_setqctrl_success); + ATF_TP_ADD_TC(tp, auditon_setqctrl_failure); + + ATF_TP_ADD_TC(tp, auditon_getclass_success); + ATF_TP_ADD_TC(tp, auditon_getclass_failure); + ATF_TP_ADD_TC(tp, auditon_setclass_success); + ATF_TP_ADD_TC(tp, auditon_setclass_failure); + + ATF_TP_ADD_TC(tp, auditon_getcond_success); + ATF_TP_ADD_TC(tp, auditon_getcond_failure); + ATF_TP_ADD_TC(tp, auditon_setcond_success); + ATF_TP_ADD_TC(tp, auditon_setcond_failure); ATF_TP_ADD_TC(tp, reboot_failure); ATF_TP_ADD_TC(tp, quotactl_failure); From owner-svn-src-head@freebsd.org Fri Jul 20 19:32:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE8FB10505FB; Fri, 20 Jul 2018 19:32:52 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A42C18A7FA; Fri, 20 Jul 2018 19:32:52 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1129) id 9C6CB15FEA; Fri, 20 Jul 2018 19:32:52 +0000 (UTC) Date: Fri, 20 Jul 2018 19:32:52 +0000 From: Li-Wen Hsu To: Mark Johnston Cc: Ian Lepore , Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336526 - head Message-ID: <20180720193252.GA8863@freefall.freebsd.org> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <1532108303.1344.57.camel@freebsd.org> <20180720184056.GB36161@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180720184056.GB36161@raichu> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 19:32:53 -0000 On Fri, Jul 20, 2018 at 14:40:56 -0400, Mark Johnston wrote: > On Fri, Jul 20, 2018 at 11:38:23AM -0600, Ian Lepore wrote: > > On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: > > > Hi Ian, > > > > > > -----Original Message----- > > > From: on behalf of Ian Lepore > > > Date: 2018-07-19, Thursday at 17:44 > > > To: , , > > > Subject: svn commit: r336526 - head > > > > > > > > > > > Author: ian > > > > Date: Fri Jul 20 00:44:04 2018 > > > > New Revision: 336526 > > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > > > > Log: > > > >   Add ntpd to the list of users/groups to check before installing. > > > > > > > > Modified: > > > >   head/Makefile.inc1 > > > When trying to installworld: > > > > > >     ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > > > > > But there is no UPDATING entry about this. (Also, shouldn't it be ${SRCTOP}/UPDATING?) > > > > > > Thanks, > > > > > > Ravi (rpokala@) > > > > I wondered about that too, when I accidentally stumbled across the > > CHECK_UIDS thing and realized I should add ntpd to it. I searched in > > UPDATING for some of the other things in the CHECK_UIDS list to see > > what had been said about such changes in the past, even searching > > through old-old svn history, and found nothing. > > > > I finally settled on the thought that the reference to UPDATING was to > > the stuff at the bottom that never changes. In particular to the > > section around line 1595 that documents the instalkernel, reboot, > > mergemaster, installworld sequence. The mergemaster part should take > > care of the new userid, I guess. > > I thought it would too, but it's bombing out for me: > > *** Creating the temporary root environment in /var/tmp/temproot > *** /var/tmp/temproot ready for use > *** Creating and populating directory structure in /var/tmp/temproot > > mtree: unknown user `ntpd' > mtree: failed at line 49 of the specification > > *** FATAL ERROR: Cannot 'cd' to /home/mark/src/freebsd-dev and install files to > the temproot environment > > I see that line 49 of BSD.var.dist references the new uids, so I guess > there's a chicken and egg problem here? I thought we should use mergemaster or etcupdate with -p for "pre-world" mode. Li-Wen -- Li-Wen Hsu https://lwhsu.org From owner-svn-src-head@freebsd.org Fri Jul 20 19:39:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D50E310507E3; Fri, 20 Jul 2018 19:39:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6528AACC; Fri, 20 Jul 2018 19:39:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg1-x536.google.com with SMTP id r1-v6so7667853pgp.11; Fri, 20 Jul 2018 12:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=kspm0ihzbuJZDILuL78ON9ekVU1LPgBzRnark71XeIs=; b=WcF8nr/CdfhTUpLQwRxdS+X64pI1UssgLUURNppfBa38FkXMCtGvCiexxZ6hPdsKdi sg5DoScqyvBHewav+C9BnAi989z/aSXD27UO9QliFnp1tXgsMoaJY1WQ5XQnZxXqPgy4 faDj9OM8UJwferp2rUk26kq/qmBornWW3fIusLTMFOnQUmJyYtqc5eWHmt5HMSbmnl1B j6aMze/1SugkGQg/h6h2PjWtbRM051ziNbCe7RduSvncV0BHStCRPjrS/c3d+OZXLHFJ j4Rw52+vkfl56w/yzwqR/eGBOX0gkF3gxjF09OiShLGyQrtponGoYdTT4K4FQoNuTkvo bXvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=kspm0ihzbuJZDILuL78ON9ekVU1LPgBzRnark71XeIs=; b=e2KZd9Qophl3ZsjTT7bBy2dk6EuzY07dfzgc7qCORDT598TUCFNj1KCzvrjWDbTu+v 7aCJGUePxn0uo78kAkI/a/SkRQCaa86B+Wynx9YIJdODWhadc8etZtbHy3FfrzLiBWTz Zg28CWyDROj1pfUTU+NYAbLYptmz/aa18BsScgosxb0Mqkgt/y9z14Ol1X90WqogXvYT bTSGOIWLgek0GLXjqO/m80gKyUyhV8pCxVZ+zbT9py8S3HKO9vlnXCMGBs3wFw/epdnk sG/A+PEhYGElcDvotPHzLCAavDODfXJoYtn5zI+61SvQf0lz6nyhcbIzcT/3MYRiwfTu dF/w== X-Gm-Message-State: AOUpUlEm9rFulAO43IBppuGuOUW1RjFSirhhWcqnnSOQQk/o9zBWwEIt uIQPLZ6bnSxCZTaTAaOZKClUxwIyOo0= X-Google-Smtp-Source: AAOMgpeJ2sgsz+ol8Cj0VErfPfrAdSN9Suf2yVrg5DjNiWeJCCcnwuU3YS6PU9WXYJCqAhsrZvw8XQ== X-Received: by 2002:a63:af14:: with SMTP id w20-v6mr3357029pge.47.1532115551880; Fri, 20 Jul 2018 12:39:11 -0700 (PDT) Received: from raichu (toroon0560w-lp130-03-174-88-72-141.dsl.bell.ca. [174.88.72.141]) by smtp.gmail.com with ESMTPSA id r19-v6sm3947135pgo.68.2018.07.20.12.39.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 12:39:11 -0700 (PDT) Sender: Mark Johnston Date: Fri, 20 Jul 2018 15:39:05 -0400 From: Mark Johnston To: Li-Wen Hsu Cc: Ian Lepore , Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336526 - head Message-ID: <20180720193905.GA19337@raichu> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <1532108303.1344.57.camel@freebsd.org> <20180720184056.GB36161@raichu> <20180720193252.GA8863@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180720193252.GA8863@freefall.freebsd.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 19:39:14 -0000 On Fri, Jul 20, 2018 at 07:32:52PM +0000, Li-Wen Hsu wrote: > On Fri, Jul 20, 2018 at 14:40:56 -0400, Mark Johnston wrote: > > On Fri, Jul 20, 2018 at 11:38:23AM -0600, Ian Lepore wrote: > > > On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: > > > > Hi Ian, > > > > > > > > -----Original Message----- > > > > From: on behalf of Ian Lepore > > > > Date: 2018-07-19, Thursday at 17:44 > > > > To: , , > > > > Subject: svn commit: r336526 - head > > > > > > > > > > > > > > Author: ian > > > > > Date: Fri Jul 20 00:44:04 2018 > > > > > New Revision: 336526 > > > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > > > > > > Log: > > > > >   Add ntpd to the list of users/groups to check before installing. > > > > > > > > > > Modified: > > > > >   head/Makefile.inc1 > > > > When trying to installworld: > > > > > > > >     ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > > > > > > > But there is no UPDATING entry about this. (Also, shouldn't it be ${SRCTOP}/UPDATING?) > > > > > > > > Thanks, > > > > > > > > Ravi (rpokala@) > > > > > > I wondered about that too, when I accidentally stumbled across the > > > CHECK_UIDS thing and realized I should add ntpd to it. I searched in > > > UPDATING for some of the other things in the CHECK_UIDS list to see > > > what had been said about such changes in the past, even searching > > > through old-old svn history, and found nothing. > > > > > > I finally settled on the thought that the reference to UPDATING was to > > > the stuff at the bottom that never changes. In particular to the > > > section around line 1595 that documents the instalkernel, reboot, > > > mergemaster, installworld sequence. The mergemaster part should take > > > care of the new userid, I guess. > > > > I thought it would too, but it's bombing out for me: > > > > *** Creating the temporary root environment in /var/tmp/temproot > > *** /var/tmp/temproot ready for use > > *** Creating and populating directory structure in /var/tmp/temproot > > > > mtree: unknown user `ntpd' > > mtree: failed at line 49 of the specification > > > > *** FATAL ERROR: Cannot 'cd' to /home/mark/src/freebsd-dev and install files to > > the temproot environment > > > > I see that line 49 of BSD.var.dist references the new uids, so I guess > > there's a chicken and egg problem here? > > I thought we should use mergemaster or etcupdate with -p for "pre-world" > mode. Oops, I'd forgotten about that flag. That fixes it for me, thanks. From owner-svn-src-head@freebsd.org Fri Jul 20 21:35:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABD271053359; Fri, 20 Jul 2018 21:35:32 +0000 (UTC) (envelope-from asomers@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 4E9858E30C; Fri, 20 Jul 2018 21:35:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A26015BEC; Fri, 20 Jul 2018 21:35:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KLZVgd023175; Fri, 20 Jul 2018 21:35:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KLZVtU023172; Fri, 20 Jul 2018 21:35:31 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807202135.w6KLZVtU023172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 20 Jul 2018 21:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336565 - in head: etc/defaults sys/fs/fuse usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: etc/defaults sys/fs/fuse usr.sbin/jail X-SVN-Commit-Revision: 336565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 21:35:32 -0000 Author: asomers Date: Fri Jul 20 21:35:31 2018 New Revision: 336565 URL: https://svnweb.freebsd.org/changeset/base/336565 Log: Allow mounting FUSE filesystems in jails Reviewed by: jamie MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16371 Modified: head/etc/defaults/devfs.rules head/sys/fs/fuse/fuse_main.c head/usr.sbin/jail/jail.8 Modified: head/etc/defaults/devfs.rules ============================================================================== --- head/etc/defaults/devfs.rules Fri Jul 20 18:59:48 2018 (r336564) +++ head/etc/defaults/devfs.rules Fri Jul 20 21:35:31 2018 (r336565) @@ -84,4 +84,5 @@ add path stderr unhide add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login +add path fuse unhide add path zfs unhide Modified: head/sys/fs/fuse/fuse_main.c ============================================================================== --- head/sys/fs/fuse/fuse_main.c Fri Jul 20 18:59:48 2018 (r336564) +++ head/sys/fs/fuse/fuse_main.c Fri Jul 20 21:35:31 2018 (r336565) @@ -91,7 +91,7 @@ static struct vfsconf fuse_vfsconf = { .vfc_name = "fusefs", .vfc_vfsops = &fuse_vfsops, .vfc_typenum = -1, - .vfc_flags = VFCF_SYNTHETIC + .vfc_flags = VFCF_JAIL | VFCF_SYNTHETIC }; SYSCTL_INT(_vfs_fuse, OID_AUTO, kernelabi_major, CTLFLAG_RD, Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Fri Jul 20 18:59:48 2018 (r336564) +++ head/usr.sbin/jail/jail.8 Fri Jul 20 21:35:31 2018 (r336565) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 4, 2018 +.Dd July 20, 2018 .Dt JAIL 8 .Os .Sh NAME @@ -575,6 +575,14 @@ Module-specific parameters include: .It Va allow.mount.fdescfs privileged users inside the jail will be able to mount and unmount the fdescfs file system. +This permission is effective only together with +.Va allow.mount +and only when +.Va enforce_statfs +is set to a value lower than 2. +.It Va allow.mount.fusefs +privileged users inside the jail will be able to mount and unmount +fuse-based file systems. This permission is effective only together with .Va allow.mount and only when From owner-svn-src-head@freebsd.org Fri Jul 20 22:37:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F03C1025BDD; Fri, 20 Jul 2018 22:37:26 +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 1E5358FBB5; Fri, 20 Jul 2018 22:37:26 +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 EEFEB16594; Fri, 20 Jul 2018 22:37:25 +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 w6KMbPqS053828; Fri, 20 Jul 2018 22:37:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KMbPxb053827; Fri, 20 Jul 2018 22:37:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807202237.w6KMbPxb053827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Jul 2018 22:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336566 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 336566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 22:37:26 -0000 Author: kib Date: Fri Jul 20 22:37:25 2018 New Revision: 336566 URL: https://svnweb.freebsd.org/changeset/base/336566 Log: Regenerate src.conf.5 after several accumulated changes. The larger is the removal of arm/armeb architecture. Also noted is the addition of WITHOUT_SERVICESDB and default change for WITH_CXX. Sponsored by: Mellanox Technologies Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Jul 20 21:35:31 2018 (r336565) +++ head/share/man/man5/src.conf.5 Fri Jul 20 22:37:25 2018 (r336566) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 27, 2018 +.Dd July 21, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -161,7 +161,7 @@ Set to build and install binutils (as, ld, and objdump of the normal system build. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP Set to not build binutils (as, ld, and objdump) as part of the bootstrap process. @@ -177,7 +177,7 @@ Set build binutils (as, ld, and objdump) as part of the bootstrap process. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_BLACKLIST Set this if you do not want to build .Xr blacklistd 8 @@ -358,7 +358,7 @@ is set explicitly) Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_CLANG_BOOTSTRAP Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. @@ -371,7 +371,7 @@ mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mi Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. .It Va WITH_CLANG_EXTRAS Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CLANG_FULL @@ -385,7 +385,7 @@ Set to build the ARCMigrate, Rewriter and StaticAnalyz Clang C/C++ compiler. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_CLANG_IS_CC Set to install the GCC compiler as .Pa /usr/bin/cc , @@ -403,7 +403,7 @@ and .Pa /usr/bin/cpp . .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. .It Va WITHOUT_CPP Set to not build .Xr cpp 1 . @@ -470,7 +470,7 @@ Set to not build .Xr cxgbetool 8 .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. +arm/arm, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_CXGBETOOL Set to build .Xr cxgbetool 8 @@ -485,9 +485,6 @@ It will also prevent building of .Xr gperf 1 and .Xr devd 8 . -.Pp -This is a default setting on -riscv/riscv64 and riscv/riscv64sf. When set, it enforces these options: .Pp .Bl -item -compact @@ -506,13 +503,6 @@ When set, it enforces these options: .It .Va WITHOUT_TESTS .El -.It Va WITH_CXX -Set to build -.Xr c++ 1 -and related libraries. -.Pp -This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_DEBUG_FILES Set to avoid building or installing standalone debug files for each executable binary and shared library. @@ -653,7 +643,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP Set to not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) @@ -709,7 +699,7 @@ Set to not build games. Set to not build and install gcc and g++ as part of the normal build process. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_GCC Set to build and install gcc and g++. .Pp @@ -722,7 +712,7 @@ unless an alternative compiler is provided via XCC. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_GCC_BOOTSTRAP Set to build gcc and g++ as part of the bootstrap process. .Pp @@ -743,7 +733,7 @@ Set to build .Xr gdb 1 . .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_GDB_LIBEXEC Set to install .Xr gdb 1 @@ -751,7 +741,7 @@ into .Pa /usr/bin . .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7 and sparc64/sparc64. +arm/arm, arm/armv6, arm/armv7 and sparc64/sparc64. .It Va WITH_GDB_LIBEXEC Set to install .Xr gdb 1 @@ -770,13 +760,13 @@ Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. .It Va WITH_GNUCXX Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITHOUT_GNU_DIFF Set to not build GNU .Xr diff 1 @@ -798,7 +788,7 @@ Set to build the BSD licensed version of the device tr than the GPLed one from elinux.org. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. .It Va WITH_GPL_DTC Set to build the GPL'd version of the device tree compiler from elinux.org, instead of the BSD licensed one. @@ -993,12 +983,12 @@ riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. Set to build LLVM's lld linker. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLDB Set to not build the LLDB debugger. .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +arm/arm, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLDB Set to build the LLDB debugger. .Pp @@ -1011,7 +1001,7 @@ To be able to build the system, either Binutils or LLD enabled unless an alternate linker is provided via XLD. .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +arm/arm, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLD_BOOTSTRAP Set to build the LLD linker during the bootstrap phase of the build. .Pp @@ -1021,7 +1011,7 @@ amd64/amd64 and arm64/aarch64. Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +arm/arm, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLD_IS_LD Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. .Pp @@ -1040,12 +1030,12 @@ Set to build the tool. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_LIBUNWIND Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +arm/arm, arm/armv6, arm/armv7, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITH_LLVM_LIBUNWIND Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). .Pp @@ -1066,7 +1056,7 @@ The option should be used rather than this in most cases. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_ALL Set to only build the required LLVM target support. This option is preferred to specific target support options. @@ -1103,7 +1093,7 @@ This option is always applied to the bootstrap compile LLVM is used. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_ARM Set to not build LLVM target support for ARM. The @@ -1119,7 +1109,7 @@ The option should be used rather than this in most cases. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_MIPS Set to not build LLVM target support for MIPS. The @@ -1135,7 +1125,7 @@ The option should be used rather than this in most cases. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_POWERPC Set to not build LLVM target support for PowerPC. The @@ -1151,7 +1141,7 @@ The option should be used rather than this in most cases. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_SPARC Set to not build LLVM target support for SPARC. The @@ -1167,7 +1157,7 @@ The option should be used rather than this in most cases. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_X86 Set to not build LLVM target support for X86. The @@ -1183,22 +1173,19 @@ The option should be used rather than this in most cases. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +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, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITH_LOADER_FIREWIRE -Enable firewire support in /boot/loader and /boot/zfsloader on x86. -This option is a nop on all other platforms. +Enable firewire support in /boot/loader on x86. This option is a nop +on all other platforms. .It Va WITHOUT_LOADER_GELI Disable inclusion of GELI crypto support in the boot chain binaries. -.Pp -This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LOADER_LUA Set to build LUA bindings for the boot loader. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, 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, riscv/riscv64 and riscv/riscv64sf. +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, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_LOADER_OFW Set to build openfirmware bootloader components. .Pp @@ -1213,7 +1200,7 @@ amd64/amd64, arm64/aarch64, i386/i386, riscv/riscv64, Set to build ubldr. .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +arm/arm, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LOCALES Set to not build localization files; see .Xr locale 1 . @@ -1343,7 +1330,7 @@ Set to not build .Xr mlx5tool 8 .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. +arm/arm, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_MLX5TOOL Set to build .Xr mlx5tool 8 @@ -1496,13 +1483,13 @@ Set to not build profiled libraries for use with .Xr gprof 8 . .Pp This is a default setting on -mips/mips64el, mips/mips64, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. +mips/mips64el, mips/mips64, mips/mips64elhf and mips/mips64hf. .It Va WITH_PROFILE Set to build profiled libraries for use with .Xr gprof 8 . .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mipsn32, mips/mipselhf, mips/mipshf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mipsn32, mips/mipselhf, mips/mipshf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITHOUT_QUOTAS Set to not build .Xr quota 1 @@ -1546,6 +1533,9 @@ with warmstart support. Set to not build .Xr sendmail 8 and related programs. +.It Va WITHOUT_SERVICESDB +Set to not install +.Pa /var/db/services.db . .It Va WITHOUT_SETUID_LOGIN Set this to disable the installation of .Xr login 1 @@ -1586,7 +1576,7 @@ mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mi Set to build world with propolice stack smashing protection. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_STAGING Enable staging of files to a stage tree. This can be best thought of as auto-install to @@ -1696,9 +1686,6 @@ See .Xr tests 7 for more details. This also disables the build of all test-related dependencies, including ATF. -.Pp -This is a default setting on -riscv/riscv64 and riscv/riscv64sf. When set, it enforces these options: .Pp .Bl -item -compact @@ -1716,9 +1703,6 @@ is set explicitly) .El .It Va WITHOUT_TESTS_SUPPORT Set to disables the build of all test-related dependencies, including ATF. -.Pp -This is a default setting on -riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_TEXTPROC Set to not build programs used for text processing. From owner-svn-src-head@freebsd.org Fri Jul 20 22:50:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC9A410262E1; Fri, 20 Jul 2018 22:50:22 +0000 (UTC) (envelope-from 0mp@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 8EE1470232; Fri, 20 Jul 2018 22:50:22 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C0DE16742; Fri, 20 Jul 2018 22:50:22 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KMoMRg058851; Fri, 20 Jul 2018 22:50:22 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KMoM0m058850; Fri, 20 Jul 2018 22:50:22 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201807202250.w6KMoM0m058850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Fri, 20 Jul 2018 22:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336567 - head/usr.sbin/binmiscctl X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.sbin/binmiscctl X-SVN-Commit-Revision: 336567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 22:50:23 -0000 Author: 0mp (ports committer) Date: Fri Jul 20 22:50:21 2018 New Revision: 336567 URL: https://svnweb.freebsd.org/changeset/base/336567 Log: Improve the binmiscctl manual page - Use "Fl -" instead of "Cm --" for long options. - Sort options alphabetically. - Pet "mandoc -Tlint". - Clean up the description of the "--interpreter" option. - Clean up the description of the first example in the examples section. - Use ".Bd -literal -offset indent" for all example code blocks for consistency. - Use "Nm" instead of "Cm binmiscctl". - Indent all examples for consistency. Reviewed by: allanjude Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D15589 Modified: head/usr.sbin/binmiscctl/binmiscctl.8 Modified: head/usr.sbin/binmiscctl/binmiscctl.8 ============================================================================== --- head/usr.sbin/binmiscctl/binmiscctl.8 Fri Jul 20 22:37:25 2018 (r336566) +++ head/usr.sbin/binmiscctl/binmiscctl.8 Fri Jul 20 22:50:21 2018 (r336567) @@ -27,7 +27,7 @@ .\" .\" Support for miscellaneous binary image activators .\" -.Dd December 30, 2014 +.Dd July 21, 2018 .Dt BINMISCCTL 8 .Os .Sh NAME @@ -37,29 +37,29 @@ .Nm .Cm add .Ar name -.Cm --interpreter +.Fl -interpreter .Ar path -.Cm --magic +.Fl -magic .Ar magic -.Cm --size +.Fl -size .Ar size -.Op Cm --mask Ar mask -.Op Cm --offset Ar offset -.Op Cm --set-enabled +.Op Fl -mask Ar mask +.Op Fl -offset Ar offset +.Op Fl -set-enabled .Nm -.Cm remove -.Ar name -.Nm .Cm disable .Ar name .Nm .Cm enable .Ar name .Nm +.Cm list +.Nm .Cm lookup .Ar name .Nm -.Cm list +.Cm remove +.Ar name .Sh DESCRIPTION The .Nm @@ -78,22 +78,23 @@ Operation must be one of the following: .It Xo .Cm add .Ar name -.Cm --interpreter +.Fl -interpreter .Ar path -.Cm --magic +.Fl -magic .Ar magic -.Cm --size +.Fl -size .Ar size -.Op Cm --mask Ar mask -.Op Cm --offset Ar offset -.Op Cm --set-enabled +.Op Fl -mask Ar mask +.Op Fl -offset Ar offset +.Op Fl -set-enabled .Xc Add a new activator entry in the kernel. You must specify a unique -.Ar name, -interpreter path and its arguments -.Ar path, +.Ar name , +a +.Ar path +to the interpreter, header .Ar magic bytes that uniquely identify a suitable binary for the activator, @@ -103,7 +104,7 @@ of the .Ar magic in bytes. .Pp -Optionally you may specify a +Optionally, you may specify a .Ar mask to do a bitwise AND with the header bytes. This effectively allows you to ignore fields in the binary header that @@ -112,14 +113,14 @@ do not uniquely indentify the binary file's type. An .Ar offset may be specified for the magic bytes using the -.Cm --offset +.Fl -offset option. By default the .Ar offset is zero. .Pp To enable the activator entry the -.Cm --set-enabled +.Fl -set-enabled option is used. The activator default state is disabled. .Pp @@ -130,55 +131,69 @@ may also contain arguments for the interpreter includi which gets replaced by the old .Dv argv0 value in the interpreter string. -.It Cm remove Ar name -Remove the activator entry identified with -.Ar name . .It Cm disable Ar name Disable the activator entry identified with .Ar name . .It Cm enable Ar name Enable the activator entry identified with .Ar name . +.It Cm list +Take a snapshot and print all the activator entries currently configured. .It Cm lookup Ar name Look up and print out the activator entry identified with .Ar name . -.It Cm list -Take a snapshot and print all the activator entries currently configured. +.It Cm remove Ar name +Remove the activator entry identified with +.Ar name . .El .Sh EXAMPLES -Add an image activator to run the LLVM interpreter (lli) on bitcode -compiled files: -.Bd -ragged -offset indent -# binmiscctl add llvmbc --interpreter ''/usr/bin/lli --fake-argv0=#a'' ---magic ''BC\\xc0\\xde'' --size 4 --set-enabled -.Ed -.Pp +Add an image activator to run the LLVM interpreter +.Po +.Xr lli 1 +.Pc +on bitcode +compiled files and set its state to enabled. +In this example .Ar #a is replaced with the old .Dv argv0 -value so that 'lli' can fake its -.Dv argv0 . -Set its state to enabled. +value so that +.Xr lli 1 +can fake its +.Dv argv0 : +.Bd -literal -offset indent +# binmiscctl add llvmbc --interpreter ''/usr/bin/lli \e + --fake-argv0=#a'' --magic ''BC\\xc0\\xde'' --size 4 \e + --set-enabled +.Ed .Pp Set the state of the .Ar llvmbc image activator to disabled: -.Dl # binmiscctl disable llvmbc +.Bd -literal -offset indent +# binmiscctl disable llvmbc +.Ed .Pp Set the state of the .Ar llvmbc image activator to enabled: -.Dl # binmiscctl enable llvmbc +.Bd -literal -offset indent +# binmiscctl enable llvmbc +.Ed .Pp Delete the .Ar llvmbc image activator: -.Dl # binmiscctl remove llvmbc +.Bd -literal -offset indent +# binmiscctl remove llvmbc +.Ed .Pp Look up and list the record for the .Ar llvmbc image activator: -.Dl # binmiscctl lookup llvmbc +.Bd -literal -offset indent +# binmiscctl lookup llvmbc +.Ed .Pp Add QEMU bsd-user program as an image activator for ARM AARCH64 binaries: .Bd -literal -offset indent @@ -267,11 +282,10 @@ Add QEMU bsd-user program as an image activator for SP \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e --size 20 --set-enabled .Ed -.Pp .Ss "Create and use an ARMv6 chroot on an AMD64 host" Use an existing source tree to build a chroot host with architecture overrides: -.Bd -literal +.Bd -literal -offset ident D=/path/to/chroot cd /usr/src mkdir -p $D @@ -284,15 +298,17 @@ With from the .Fx Ports Collection, the emulator must be copied into the jail path -specified in the binmiscctl command. +specified in the +.Nm +command. Using the example above: -.Bd -literal +.Bd -literal -offset -ident mkdir $D/usr/local/bin cp /usr/local/bin/qemu-arm-static $D/usr/local/bin .Ed .Pp Now the user can chroot into the environment normally, as root: -.Bd -literal +.Bd -literal -offset -ident chroot $D .Ed .Sh SEE ALSO @@ -301,9 +317,9 @@ chroot $D .Xr jail 8 .Sh HISTORY The -.Cm binmiscctl +.Nm command was added in .Fx 10.1 . It was developed to support the imgact_binmisc kernel module. .Sh AUTHORS -Stacey D Son +.An Stacey D Son Aq Mt sson@FreeBSD.org From owner-svn-src-head@freebsd.org Fri Jul 20 23:12:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDF4B10290FB; Fri, 20 Jul 2018 23:12:46 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3AC70E4A; Fri, 20 Jul 2018 23:12:46 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-lf1-f49.google.com with SMTP id a134-v6so2814209lfe.6; Fri, 20 Jul 2018 16:12:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N4GuE2DAtpnDP4m6NeGHdY/QGceKjf4lI2P5tzAtRzg=; b=HkmXJYmn3wKjdo8BoWQIlnhPCCw+wkUMqsx/neomq68qkgEFJVUl+9BJgXud2uJVlr rcG4l2zzXzwV4ke4KM5oA76caAWmKmFGCxumex0KQdHuHM9LU6INu4pFJ9m5nW0gJZEx qB1/s3QC9BM00i7olhM8hWts1V3KgQAcxxPvNLVXlly50Uhw7YdHD9RW0n5NMKcFNJo/ f01V0Mr1xn9mO4ri4aCczGnLCc9UtF9rT93uBA9ul4fyj5sHbBsWfQXKsLz+qPaYs6GA xVgx6KB/e1dhVdqXhTfFVsfui3HxnXqxQNMfKBfzZghLnK9DvgFTLzgDsQuL4m/5odiX hUvw== X-Gm-Message-State: AOUpUlEWnHGy0aM5oH4n2Zb2oWbOJCtXSCoqZKU8vsdX5bNlyfZ4Y/oA gOLX7jx2iN4dfX4jzrZVCmb1WKx+voOmdA== X-Google-Smtp-Source: AAOMgpclkxG3sxRUrk5Hoh9ls+9HPbHMZ1yoN2Fftc1yFVAVfyglpoJLm670PnhRHISr3jrUQDmyPg== X-Received: by 2002:a19:cc0f:: with SMTP id c15-v6mr2305140lfg.145.1532128358534; Fri, 20 Jul 2018 16:12:38 -0700 (PDT) Received: from e5500 (89-78-36-179.dynamic.chello.pl. [89.78.36.179]) by smtp.gmail.com with ESMTPSA id b22-v6sm568680ljj.93.2018.07.20.16.12.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jul 2018 16:12:38 -0700 (PDT) Date: Sat, 21 Jul 2018 01:12:23 +0200 From: Mateusz Piotrowski <0mp@FreeBSD.org> To: "Piotr P. Stefaniak" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336481 - head/share/misc Message-ID: <20180721011223.5b62360d@e5500> In-Reply-To: <20180719133721.GF53055@freefall.freebsd.org> References: <201807191258.w6JCwAHJ014504@repo.freebsd.org> <20180719133721.GF53055@freefall.freebsd.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; i386-portbld-freebsd11.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 23:12:46 -0000 On Thu, 19 Jul 2018 15:37:21 +0200 "Piotr P. Stefaniak" wrote: >On 2018-07-19 12:58:10, Mateusz Piotrowski wrote: >>Author: 0mp (ports committer) >>Date: Thu Jul 19 12:58:10 2018 >>New Revision: 336481 >>URL: https://svnweb.freebsd.org/changeset/base/336481 >> >>Log: >> Update mentor and mentee information. >> >> Reviewed by: mat (mentor) >> Approved by: mat (mentor) >> Differential Revision: https://reviews.freebsd.org/D16295 >> >>Modified: >> head/share/misc/committers-ports.dot >> >>Modified: head/share/misc/committers-ports.dot >>============================================================================== >>--- head/share/misc/committers-ports.dot Thu Jul 19 12:56:54 2018 (r336480) >>+++ head/share/misc/committers-ports.dot Thu Jul 19 12:58:10 2018 (r336481) >>@@ -40,6 +40,7 @@ node [color=lightblue2, style=filled, bgcolor=black]; >> >> # Current ports committers go here. Try to keep things sorted. >> >>+0mp [label="Mateusz Piotrowski\n0mp@FreeBSD.org\n2018/06/16"] >> ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] >dot(1) doesn't like this. Actually, I am not sure what we should do about it :/ Maybe I could put my username in double quotes. It should be a legal DOT language ID [1] then as fair as I understand. I'll test it out soon. [1]: https://graphviz.gitlab.io/_pages/doc/info/lang.html From owner-svn-src-head@freebsd.org Fri Jul 20 23:49:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 316C7102A22C; Fri, 20 Jul 2018 23:49:59 +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 D684571B83; Fri, 20 Jul 2018 23:49:58 +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 A9879170D0; Fri, 20 Jul 2018 23:49:58 +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 w6KNnwIQ089035; Fri, 20 Jul 2018 23:49:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KNnvXf089032; Fri, 20 Jul 2018 23:49:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807202349.w6KNnvXf089032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Jul 2018 23:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336568 - in head: . lib/ofed/libibverbs lib/ofed/libmlx5 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: . lib/ofed/libibverbs lib/ofed/libmlx5 X-SVN-Commit-Revision: 336568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 23:49:59 -0000 Author: kib Date: Fri Jul 20 23:49:57 2018 New Revision: 336568 URL: https://svnweb.freebsd.org/changeset/base/336568 Log: Move OFED libraries libmlx5.so.1 and libibverbs.so.1 to /lib. The is required because libpcap.so depends on the libraries when OFED is enabled. Reviewed by: bdrewery, hselasky Sponsored by: Mellanox Technologies MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D16230 Modified: head/ObsoleteFiles.inc head/lib/ofed/libibverbs/Makefile head/lib/ofed/libmlx5/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jul 20 22:50:21 2018 (r336567) +++ head/ObsoleteFiles.inc Fri Jul 20 23:49:57 2018 (r336568) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20180721: move of libmlx5.so.1 and libibverbs.so.1 +OLD_LIBS+=usr/lib/libmlx5.so.1 +OLD_LIBS+=usr/lib/libibverbs.so.1 # 20180710: old numa cleanup OLD_FILES+=usr/include/sys/numa.h OLD_FILES+=usr/share/man/man2/numa_getaffinity.2.gz Modified: head/lib/ofed/libibverbs/Makefile ============================================================================== --- head/lib/ofed/libibverbs/Makefile Fri Jul 20 22:50:21 2018 (r336567) +++ head/lib/ofed/libibverbs/Makefile Fri Jul 20 23:49:57 2018 (r336568) @@ -5,7 +5,7 @@ _spath= ${SRCTOP}/contrib/ofed/libibverbs LIB= ibverbs SHLIB_MAJOR= 1 -SHLIBDIR?= /usr/lib +SHLIBDIR?= /lib MK_PROFILE= no VERSION_MAP= ${_spath}/libibverbs.map Modified: head/lib/ofed/libmlx5/Makefile ============================================================================== --- head/lib/ofed/libmlx5/Makefile Fri Jul 20 22:50:21 2018 (r336567) +++ head/lib/ofed/libmlx5/Makefile Fri Jul 20 23:49:57 2018 (r336568) @@ -3,7 +3,7 @@ _spath= ${SRCTOP}/contrib/ofed/libmlx5 .PATH: ${_spath} -SHLIBDIR?= /usr/lib +SHLIBDIR?= /lib LIB= mlx5 SHLIB_MAJOR= 1 MK_PROFILE= no From owner-svn-src-head@freebsd.org Fri Jul 20 23:52:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0B0E102A4C4; Fri, 20 Jul 2018 23:52:12 +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 A5AD971F9C; Fri, 20 Jul 2018 23:52:12 +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 8852817252; Fri, 20 Jul 2018 23:52:12 +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 w6KNqCHY092342; Fri, 20 Jul 2018 23:52:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KNqBqF092338; Fri, 20 Jul 2018 23:52:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807202352.w6KNqBqF092338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Jul 2018 23:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336569 - in head: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags X-SVN-Commit-Revision: 336569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 23:52:13 -0000 Author: kib Date: Fri Jul 20 23:52:11 2018 New Revision: 336569 URL: https://svnweb.freebsd.org/changeset/base/336569 Log: Move mostly useless examples binaries from OFED, as well as the Subnet Manager, under the new option WITH_OFED_EXTRA, disabled by default. Reviewed by: bdrewery, hselasky (previous version) Sponsored by: Mellanox Technologies MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D16230 Added: head/tools/build/options/WITH_OFED_EXTRA (contents, props changed) Modified: head/share/mk/src.opts.mk head/usr.bin/ofed/Makefile head/usr.bin/ofed/infiniband-diags/Makefile Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Jul 20 23:49:57 2018 (r336568) +++ head/share/mk/src.opts.mk Fri Jul 20 23:52:11 2018 (r336569) @@ -199,6 +199,7 @@ __DEFAULT_NO_OPTIONS = \ LOADER_LUA \ NAND \ OFED \ + OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ RPCBIND_WARMSTART_SUPPORT \ @@ -464,6 +465,10 @@ MK_KERBEROS:= no .if ${MK_PF} == "no" MK_AUTHPF:= no +.endif + +.if ${MK_OFED} == "no" +MK_OFED_EXTRA:= no .endif .if ${MK_PORTSNAP} == "no" Added: head/tools/build/options/WITH_OFED_EXTRA ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_OFED_EXTRA Fri Jul 20 23:52:11 2018 (r336569) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build the non-essential components of the +.Dq "OpenFabrics Enterprise Distribution" +Infiniband software stack, mostly examples. Modified: head/usr.bin/ofed/Makefile ============================================================================== --- head/usr.bin/ofed/Makefile Fri Jul 20 23:49:57 2018 (r336568) +++ head/usr.bin/ofed/Makefile Fri Jul 20 23:52:11 2018 (r336569) @@ -1,10 +1,13 @@ # $FreeBSD$ +.include + SUBDIR= \ libibverbs \ librdmacm \ - opensm \ infiniband-diags + +SUBDIR.${MK_OFED_EXTRA}+= opensm SUBDIR_PARALLEL= Modified: head/usr.bin/ofed/infiniband-diags/Makefile ============================================================================== --- head/usr.bin/ofed/infiniband-diags/Makefile Fri Jul 20 23:49:57 2018 (r336568) +++ head/usr.bin/ofed/infiniband-diags/Makefile Fri Jul 20 23:52:11 2018 (r336569) @@ -1,27 +1,33 @@ # $FreeBSD$ +.include + SUBDIR= \ -dump_fts \ -ibaddr \ -ibcacheedit \ -ibccconfig \ -ibccquery \ -iblinkinfo \ -ibmirror \ -ibnetdiscover \ -ibping \ -ibportstate \ -ibqueryerrors \ -ibroute \ -ibstat \ -ibsysstat \ -ibtracert \ -perfquery \ -saquery \ -sminfo \ -smpdump \ -smpquery \ -vendstat + ibstat + +.if ${MK_OFED_EXTRA} != "no" +SUBDIR+= \ + dump_fts \ + ibaddr \ + ibcacheedit \ + ibccconfig \ + ibccquery \ + iblinkinfo \ + ibmirror \ + ibnetdiscover \ + ibping \ + ibportstate \ + ibqueryerrors \ + ibroute \ + ibsysstat \ + ibtracert \ + perfquery \ + saquery \ + sminfo \ + smpdump \ + smpquery \ + vendstat +.endif SUBDIR_PARALLEL= From owner-svn-src-head@freebsd.org Fri Jul 20 23:53:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04C67102A588; Fri, 20 Jul 2018 23:53:21 +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 ACA55721C5; Fri, 20 Jul 2018 23:53:20 +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 8D49617279; Fri, 20 Jul 2018 23:53:20 +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 w6KNrKKi094140; Fri, 20 Jul 2018 23:53:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KNrKx3094139; Fri, 20 Jul 2018 23:53:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807202353.w6KNrKx3094139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Jul 2018 23:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336570 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 23:53:21 -0000 Author: kib Date: Fri Jul 20 23:53:20 2018 New Revision: 336570 URL: https://svnweb.freebsd.org/changeset/base/336570 Log: Enable OFED build (without extras) by default. Reviewed by: bdrewery, hselasky (previous version) Sponsored by: Mellanox Technologies MFC after: 2 weeks Release notes: yes Differential revision: https://reviews.freebsd.org/D16230 Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Jul 20 23:52:11 2018 (r336569) +++ head/share/mk/src.opts.mk Fri Jul 20 23:53:20 2018 (r336570) @@ -146,6 +146,7 @@ __DEFAULT_YES_OPTIONS = \ NLS_CATALOGS \ NS_CACHING \ NTP \ + OFED \ OPENSSL \ PAM \ PC_SYSINSTALL \ @@ -198,7 +199,6 @@ __DEFAULT_NO_OPTIONS = \ LOADER_FORCE_LE \ LOADER_LUA \ NAND \ - OFED \ OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ From owner-svn-src-head@freebsd.org Fri Jul 20 23:55:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7AF9102A897; Fri, 20 Jul 2018 23:55:48 +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 9C0267265E; Fri, 20 Jul 2018 23:55:48 +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 7CCB01727E; Fri, 20 Jul 2018 23:55:48 +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 w6KNtmWC094706; Fri, 20 Jul 2018 23:55:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KNtm8u094705; Fri, 20 Jul 2018 23:55:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807202355.w6KNtm8u094705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Jul 2018 23:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336571 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 336571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 23:55:49 -0000 Author: kib Date: Fri Jul 20 23:55:47 2018 New Revision: 336571 URL: https://svnweb.freebsd.org/changeset/base/336571 Log: Regenerate src.conf.5. Sponsored by: Mellanox Technologies Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Jul 20 23:53:20 2018 (r336570) +++ head/share/man/man5/src.conf.5 Fri Jul 20 23:55:47 2018 (r336571) @@ -1403,6 +1403,10 @@ and related programs. Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. +.It Va WITH_OFED_EXTRA +Set to build the non-essential components of the +.Dq "OpenFabrics Enterprise Distribution" +Infiniband software stack, mostly examples. .It Va WITH_OPENLDAP Enable building openldap support for kerberos. .It Va WITHOUT_OPENSSH From owner-svn-src-head@freebsd.org Sat Jul 21 00:04:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33216102B202; Sat, 21 Jul 2018 00:04:27 +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 B629472CF2; Sat, 21 Jul 2018 00:04:26 +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 w6L04Idw019566; Fri, 20 Jul 2018 17:04:18 -0700 (PDT) (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 w6L04IJZ019565; Fri, 20 Jul 2018 17:04:18 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807210004.w6L04IJZ019565@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336569 - in head: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags In-Reply-To: <201807202352.w6KNqBqF092338@repo.freebsd.org> To: Konstantin Belousov Date: Fri, 20 Jul 2018 17:04:18 -0700 (PDT) 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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 00:04:27 -0000 > Author: kib > Date: Fri Jul 20 23:52:11 2018 > New Revision: 336569 > URL: https://svnweb.freebsd.org/changeset/base/336569 > > Log: > Move mostly useless examples binaries from OFED, as well as the Subnet > Manager, under the new option WITH_OFED_EXTRA, disabled by default. Would it be possible to have opensm broken out seperate from OFED_EXTRA? > Reviewed by: bdrewery, hselasky (previous version) > Sponsored by: Mellanox Technologies > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D16230 > > Added: > head/tools/build/options/WITH_OFED_EXTRA (contents, props changed) > Modified: > head/share/mk/src.opts.mk > head/usr.bin/ofed/Makefile > head/usr.bin/ofed/infiniband-diags/Makefile > > Modified: head/share/mk/src.opts.mk > ============================================================================== > --- head/share/mk/src.opts.mk Fri Jul 20 23:49:57 2018 (r336568) > +++ head/share/mk/src.opts.mk Fri Jul 20 23:52:11 2018 (r336569) > @@ -199,6 +199,7 @@ __DEFAULT_NO_OPTIONS = \ > LOADER_LUA \ > NAND \ > OFED \ > + OFED_EXTRA \ > OPENLDAP \ > REPRODUCIBLE_BUILD \ > RPCBIND_WARMSTART_SUPPORT \ > @@ -464,6 +465,10 @@ MK_KERBEROS:= no > > .if ${MK_PF} == "no" > MK_AUTHPF:= no > +.endif > + > +.if ${MK_OFED} == "no" > +MK_OFED_EXTRA:= no > .endif > > .if ${MK_PORTSNAP} == "no" > > Added: head/tools/build/options/WITH_OFED_EXTRA > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/build/options/WITH_OFED_EXTRA Fri Jul 20 23:52:11 2018 (r336569) > @@ -0,0 +1,4 @@ > +.\" $FreeBSD$ > +Set to build the non-essential components of the > +.Dq "OpenFabrics Enterprise Distribution" > +Infiniband software stack, mostly examples. > > Modified: head/usr.bin/ofed/Makefile > ============================================================================== > --- head/usr.bin/ofed/Makefile Fri Jul 20 23:49:57 2018 (r336568) > +++ head/usr.bin/ofed/Makefile Fri Jul 20 23:52:11 2018 (r336569) > @@ -1,10 +1,13 @@ > # $FreeBSD$ > > +.include > + > SUBDIR= \ > libibverbs \ > librdmacm \ > - opensm \ > infiniband-diags > + > +SUBDIR.${MK_OFED_EXTRA}+= opensm > > SUBDIR_PARALLEL= > > > Modified: head/usr.bin/ofed/infiniband-diags/Makefile > ============================================================================== > --- head/usr.bin/ofed/infiniband-diags/Makefile Fri Jul 20 23:49:57 2018 (r336568) > +++ head/usr.bin/ofed/infiniband-diags/Makefile Fri Jul 20 23:52:11 2018 (r336569) > @@ -1,27 +1,33 @@ > # $FreeBSD$ > > +.include > + > SUBDIR= \ > -dump_fts \ > -ibaddr \ > -ibcacheedit \ > -ibccconfig \ > -ibccquery \ > -iblinkinfo \ > -ibmirror \ > -ibnetdiscover \ > -ibping \ > -ibportstate \ > -ibqueryerrors \ > -ibroute \ > -ibstat \ > -ibsysstat \ > -ibtracert \ > -perfquery \ > -saquery \ > -sminfo \ > -smpdump \ > -smpquery \ > -vendstat > + ibstat > + > +.if ${MK_OFED_EXTRA} != "no" > +SUBDIR+= \ > + dump_fts \ > + ibaddr \ > + ibcacheedit \ > + ibccconfig \ > + ibccquery \ > + iblinkinfo \ > + ibmirror \ > + ibnetdiscover \ > + ibping \ > + ibportstate \ > + ibqueryerrors \ > + ibroute \ > + ibsysstat \ > + ibtracert \ > + perfquery \ > + saquery \ > + sminfo \ > + smpdump \ > + smpquery \ > + vendstat > +.endif > > SUBDIR_PARALLEL= > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Jul 21 00:07:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F6D4102B439; Sat, 21 Jul 2018 00:07:58 +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 DF53D72ED8; Sat, 21 Jul 2018 00:07:57 +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 w6L07o0E026408 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 21 Jul 2018 03:07:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6L07o0E026408 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6L07omc026407; Sat, 21 Jul 2018 03:07:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Jul 2018 03:07:50 +0300 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336569 - in head: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags Message-ID: <20180721000750.GB65334@kib.kiev.ua> References: <201807202352.w6KNqBqF092338@repo.freebsd.org> <201807210004.w6L04IJZ019565@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807210004.w6L04IJZ019565@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 00:07:58 -0000 On Fri, Jul 20, 2018 at 05:04:18PM -0700, Rodney W. Grimes wrote: > > Author: kib > > Date: Fri Jul 20 23:52:11 2018 > > New Revision: 336569 > > URL: https://svnweb.freebsd.org/changeset/base/336569 > > > > Log: > > Move mostly useless examples binaries from OFED, as well as the Subnet > > Manager, under the new option WITH_OFED_EXTRA, disabled by default. > > Would it be possible to have opensm broken out seperate from > OFED_EXTRA? Yes, it can. But, I am curious, do you need it ? Are there anybody running SM on FreeBSD ? From owner-svn-src-head@freebsd.org Sat Jul 21 00:12:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33632102B97E; Sat, 21 Jul 2018 00:12:43 +0000 (UTC) (envelope-from brd@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 D80DD73507; Sat, 21 Jul 2018 00:12:42 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B93CB175CA; Sat, 21 Jul 2018 00:12:42 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6L0Cgcm004887; Sat, 21 Jul 2018 00:12:42 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6L0CgsH004884; Sat, 21 Jul 2018 00:12:42 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807210012.w6L0CgsH004884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 21 Jul 2018 00:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336572 - in head: . etc etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: . etc etc/rc.d X-SVN-Commit-Revision: 336572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 00:12:43 -0000 Author: brd Date: Sat Jul 21 00:12:41 2018 New Revision: 336572 URL: https://svnweb.freebsd.org/changeset/base/336572 Log: Purge some old apmd files Approved by: allanjude Differential Revision: https://reviews.freebsd.org/D16373 Modified: head/ObsoleteFiles.inc head/etc/Makefile head/etc/rc.d/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jul 20 23:55:47 2018 (r336571) +++ head/ObsoleteFiles.inc Sat Jul 21 00:12:41 2018 (r336572) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20180721: Purge some old forgotten apmd files +OLD_FILES+=etc/apmd.conf +OLD_FILES+=etc/rc.d/apmd # 20180721: move of libmlx5.so.1 and libibverbs.so.1 OLD_LIBS+=usr/lib/libmlx5.so.1 OLD_LIBS+=usr/lib/libibverbs.so.1 Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Jul 20 23:55:47 2018 (r336571) +++ head/etc/Makefile Sat Jul 21 00:12:41 2018 (r336572) @@ -76,10 +76,6 @@ BSM_ETC_DIR= ${DESTDIR}/etc/security BIN1+= amd.map .endif -.if ${MK_APM} != "no" -BIN1+= apmd.conf -.endif - .if ${MK_AUTOFS} != "no" BIN1+= auto_master .endif Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Fri Jul 20 23:55:47 2018 (r336571) +++ head/etc/rc.d/Makefile Sat Jul 21 00:12:41 2018 (r336572) @@ -157,7 +157,6 @@ AMDPACKAGE= amd .if ${MK_APM} != "no" FILESGROUPS+= APM APM+= apm -APM+= apmd APMPACKAGE= apm .endif From owner-svn-src-head@freebsd.org Sat Jul 21 00:21:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C8B9102BEB9; Sat, 21 Jul 2018 00:21:48 +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 1D32473A29; Sat, 21 Jul 2018 00:21:47 +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 w6L0LkqZ019649; Fri, 20 Jul 2018 17:21:46 -0700 (PDT) (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 w6L0LkT4019648; Fri, 20 Jul 2018 17:21:46 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807210021.w6L0LkT4019648@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336569 - in head: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags In-Reply-To: <20180721000750.GB65334@kib.kiev.ua> To: Konstantin Belousov Date: Fri, 20 Jul 2018 17:21:46 -0700 (PDT) CC: rgrimes@freebsd.org, 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-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 00:21:48 -0000 > On Fri, Jul 20, 2018 at 05:04:18PM -0700, Rodney W. Grimes wrote: > > > Author: kib > > > Date: Fri Jul 20 23:52:11 2018 > > > New Revision: 336569 > > > URL: https://svnweb.freebsd.org/changeset/base/336569 > > > > > > Log: > > > Move mostly useless examples binaries from OFED, as well as the Subnet > > > Manager, under the new option WITH_OFED_EXTRA, disabled by default. > > > > Would it be possible to have opensm broken out seperate from > > OFED_EXTRA? > > Yes, it can. > > But, I am curious, do you need it ? Are there anybody running SM > on FreeBSD ? Those of us who run Infiniband in test labs as back to back connections or rings without any switch need it. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Jul 21 01:33:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70F89102EF5F; Sat, 21 Jul 2018 01:33:08 +0000 (UTC) (envelope-from rmacklem@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 1E62375D55; Sat, 21 Jul 2018 01:33:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 009E9183D6; Sat, 21 Jul 2018 01:33:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6L1X7nZ045467; Sat, 21 Jul 2018 01:33:07 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6L1X7U3045466; Sat, 21 Jul 2018 01:33:07 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807210133.w6L1X7U3045466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 21 Jul 2018 01:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336573 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 336573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 01:33:08 -0000 Author: rmacklem Date: Sat Jul 21 01:33:07 2018 New Revision: 336573 URL: https://svnweb.freebsd.org/changeset/base/336573 Log: Set CLSET_TIMEOUT on TCP connections to pNFS DSs. Use CLSET_TIMEOUT to set the timeout for connections to DSs instead of specifying a timeout on each RPC. This is done so that SO_SNDTIMEO is set on the TCP socket as well as specifying a time limit when waiting for an RPC reply. Useful if the send queue for the TCP connection has become constipated, due to a failed DS. The choice of lease_duration / 4 is fairly arbitrary, but seems to work ok, with a lower bound of 10sec. For client connections to a DS, set the retry limit to vfs.nfsd.dsretries, which is 2 by default. This patch should only affect pNFS connections to DSs. This patch requires r336542. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Sat Jul 21 00:12:41 2018 (r336572) +++ head/sys/fs/nfs/nfs_commonkrpc.c Sat Jul 21 01:33:07 2018 (r336573) @@ -98,6 +98,7 @@ extern int nfscl_ticks; extern void (*ncl_call_invalcaches)(struct vnode *); extern int nfs_numnfscbd; extern int nfscl_debuglevel; +extern int nfsrv_lease; SVCPOOL *nfscbd_pool; static int nfsrv_gsscallbackson = 0; @@ -105,6 +106,7 @@ static int nfs_bufpackets = 4; static int nfs_reconnects; static int nfs3_jukebox_delay = 10; static int nfs_skip_wcc_data_onerr = 1; +static int nfs_dsretries = 2; SYSCTL_DECL(_vfs_nfs); @@ -116,6 +118,8 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTL "Number of seconds to delay a retry after receiving EJUKEBOX"); SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0, "Disable weak cache consistency checking when server returns an error"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, dsretries, CTLFLAG_RW, &nfs_dsretries, 0, + "Number of retries for a DS RPC before failure"); static void nfs_down(struct nfsmount *, struct thread *, const char *, int, int); @@ -298,6 +302,30 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq retries = INT_MAX; if (NFSHASNFSV4N(nmp)) { if (cred != NULL) { + if (NFSHASSOFT(nmp)) { + /* + * This should be a DS mount. + * Use CLSET_TIMEOUT to set the timeout + * for connections to DSs instead of + * specifying a timeout on each RPC. + * This is done so that SO_SNDTIMEO + * is set on the TCP socket as well + * as specifying a time limit when + * waiting for an RPC reply. Useful + * if the send queue for the TCP + * connection has become constipated, + * due to a failed DS. + * The choice of lease_duration / 4 is + * fairly arbitrary, but seems to work + * ok, with a lower bound of 10sec. + */ + timo.tv_sec = nfsrv_lease / 4; + if (timo.tv_sec < 10) + timo.tv_sec = 10; + timo.tv_usec = 0; + CLNT_CONTROL(client, CLSET_TIMEOUT, + &timo); + } /* * Make sure the nfscbd_pool doesn't get * destroyed while doing this. @@ -325,8 +353,18 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq * not maintain open/lock state and is the * only case where using a "soft" mount is * recommended for NFSv4. + * For mounts from the MDS to DS, this is done + * via mount options, but that is not the case + * here. The retry limit here can be adjusted + * via the sysctl vfs.nfs.dsretries. + * See the comment above w.r.t. timeout. */ - retries = 2; + timo.tv_sec = nfsrv_lease / 4; + if (timo.tv_sec < 10) + timo.tv_sec = 10; + timo.tv_usec = 0; + CLNT_CONTROL(client, CLSET_TIMEOUT, &timo); + retries = nfs_dsretries; } } } else { From owner-svn-src-head@freebsd.org Sat Jul 21 01:56:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AB1010305BE; Sat, 21 Jul 2018 01:56:19 +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 1DC0B76A88; Sat, 21 Jul 2018 01:56:19 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=51308 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fgh85-000Iry-CF; Sat, 21 Jul 2018 01:56:17 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r336481 - head/share/misc From: Devin Teske In-Reply-To: <20180721011223.5b62360d@e5500> Date: Fri, 20 Jul 2018 18:56:15 -0700 Cc: Devin Teske , "Piotr P. Stefaniak" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <72E4ED29-56AB-490B-9329-AF873B082AE0@FreeBSD.org> References: <201807191258.w6JCwAHJ014504@repo.freebsd.org> <20180719133721.GF53055@freefall.freebsd.org> <20180721011223.5b62360d@e5500> To: Mateusz Piotrowski <0mp@FreeBSD.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 01:56:19 -0000 > On Jul 20, 2018, at 4:12 PM, Mateusz Piotrowski <0mp@FreeBSD.org> = wrote: >=20 > On Thu, 19 Jul 2018 15:37:21 +0200 > "Piotr P. Stefaniak" wrote: >=20 >> On 2018-07-19 12:58:10, Mateusz Piotrowski wrote: >>> Author: 0mp (ports committer) >>> Date: Thu Jul 19 12:58:10 2018 >>> New Revision: 336481 >>> URL: https://svnweb.freebsd.org/changeset/base/336481 >>>=20 >>> Log: >>> Update mentor and mentee information. >>>=20 >>> Reviewed by: mat (mentor) >>> Approved by: mat (mentor) >>> Differential Revision: https://reviews.freebsd.org/D16295 >>>=20 >>> Modified: >>> head/share/misc/committers-ports.dot >>>=20 >>> Modified: head/share/misc/committers-ports.dot >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/misc/committers-ports.dot Thu Jul 19 12:56:54 2018 = (r336480) >>> +++ head/share/misc/committers-ports.dot Thu Jul 19 12:58:10 2018 = (r336481) >>> @@ -40,6 +40,7 @@ node [color=3Dlightblue2, style=3Dfilled, = bgcolor=3Dblack]; >>>=20 >>> # Current ports committers go here. Try to keep things sorted. >>>=20 >>> +0mp [label=3D"Mateusz Piotrowski\n0mp@FreeBSD.org\n2018/06/16"] >>> ache [label=3D"Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] =20 >> dot(1) doesn't like this. >=20 > Actually, I am not sure what we should do about it :/ Put double-quotes around "0mp". Illegal: 0mp -> abc Legal: "0mp" -> abc --=20 Devin= From owner-svn-src-head@freebsd.org Sat Jul 21 02:14:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6858910315D2; Sat, 21 Jul 2018 02:14:14 +0000 (UTC) (envelope-from tuexen@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 1529C77589; Sat, 21 Jul 2018 02:14:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA78A18A9F; Sat, 21 Jul 2018 02:14:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6L2ED4g066085; Sat, 21 Jul 2018 02:14:13 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6L2EDFQ066084; Sat, 21 Jul 2018 02:14:13 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807210214.w6L2EDFQ066084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 21 Jul 2018 02:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336574 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 336574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 02:14:14 -0000 Author: tuexen Date: Sat Jul 21 02:14:13 2018 New Revision: 336574 URL: https://svnweb.freebsd.org/changeset/base/336574 Log: Set the IPv4 version in the IP header for UDP and UDPLite. Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sat Jul 21 01:33:07 2018 (r336573) +++ head/sys/netinet/udp_usrreq.c Sat Jul 21 02:14:13 2018 (r336574) @@ -1397,6 +1397,7 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct s */ ui = mtod(m, struct udpiphdr *); bzero(ui->ui_x1, sizeof(ui->ui_x1)); /* XXX still needed? */ + ui->ui_v = IPVERSION << 4; ui->ui_pr = pr; ui->ui_src = laddr; ui->ui_dst = faddr; @@ -1419,8 +1420,7 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct s * the entire UDPLite packet is covered by the checksum. */ cscov_partial = (cscov == 0) ? 0 : 1; - } else - ui->ui_v = IPVERSION << 4; + } /* * Set the Don't Fragment bit in the IP header. From owner-svn-src-head@freebsd.org Sat Jul 21 07:48:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B037103F6F2; Sat, 21 Jul 2018 07:48:06 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98F3480617; Sat, 21 Jul 2018 07:48:05 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1fgmcP-00074J-NB; Sat, 21 Jul 2018 09:47:57 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Ian Lepore" Subject: Re: svn commit: r336562 - head References: <201807201802.w6KI2rtH015808@repo.freebsd.org> Date: Sat, 21 Jul 2018 09:48:01 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201807201802.w6KI2rtH015808@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 788438cbfdc4dc137ce560360a3a99c7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 07:48:06 -0000 On Fri, 20 Jul 2018 20:02:53 +0200, Ian Lepore wrote: > Author: ian > Date: Fri Jul 20 18:02:52 2018 > New Revision: 336562 > URL: https://svnweb.freebsd.org/changeset/base/336562 > > Log: > Add a note about the new 'ntpd' userid, and the fact that rc.d/ntpd now > automatically runs the daemon as that user if it can. Like the work you do hardening the system out-of-the-box. Regards, Ronald. > > Modified: > head/UPDATING > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Fri Jul 20 17:46:55 2018 (r336561) > +++ head/UPDATING Fri Jul 20 18:02:52 2018 (r336562) > @@ -38,6 +38,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > in place from zfsloader to loader to allow a smooth transition > until the boot blocks can be updated. > +20180719: > + New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster > + or take steps to update /etc/passwd before doing installworld on > + existing systems. Also, rc.d/ntpd now starts ntpd(8) as user ntpd > + if the new mac_ntpd(4) policy is available, unless ntpd_flags or > + the ntp config file contain options that change file/dir locations. > + When such options (e.g., "statsdir" or "crypto") are used, ntpd can > + still be run as non-root by setting ntpd_user=ntpd in rc.conf, after > + taking steps to ensure that all required files/dirs are accessible > + by the ntpd user. > + > 20180717: > Big endian arm support has been removed. > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Sat Jul 21 14:20:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CAED104D00C; Sat, 21 Jul 2018 14:20:18 +0000 (UTC) (envelope-from wulf@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 C9CED8B9BD; Sat, 21 Jul 2018 14:20:17 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F11C2012C; Sat, 21 Jul 2018 14:20:17 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LEKHLG035161; Sat, 21 Jul 2018 14:20:17 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LEKHOF035160; Sat, 21 Jul 2018 14:20:17 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201807211420.w6LEKHOF035160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 21 Jul 2018 14:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336577 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 336577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 14:20:18 -0000 Author: wulf Date: Sat Jul 21 14:20:17 2018 New Revision: 336577 URL: https://svnweb.freebsd.org/changeset/base/336577 Log: Raise "Report Count" value limit in HID descriptor parser. This fixes usage/report size calculation of Microsoft`s "Touch Hardware Quality Assurance" certificate blob found in many touchscreens. While here, join several "c->flags = dval" lines in to single line. Reviewed by: hselasky MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16357 Modified: head/sys/dev/usb/usb_hid.c Modified: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Sat Jul 21 07:50:46 2018 (r336576) +++ head/sys/dev/usb/usb_hid.c Sat Jul 21 14:20:17 2018 (r336577) @@ -74,6 +74,7 @@ static uint8_t hid_get_byte(struct hid_data *s, const #define MAXUSAGE 64 #define MAXPUSH 4 #define MAXID 16 +#define MAXLOCCNT 1024 struct hid_pos_data { int32_t rid; @@ -91,10 +92,10 @@ struct hid_data { int32_t usage_last; /* last seen usage */ uint32_t loc_size; /* last seen size */ uint32_t loc_count; /* last seen count */ + uint32_t ncount; /* end usage item count */ + uint32_t icount; /* current usage item count */ uint8_t kindset; /* we have 5 kinds so 8 bits are enough */ uint8_t pushlevel; /* current pushlevel */ - uint8_t ncount; /* end usage item count */ - uint8_t icount; /* current usage item count */ uint8_t nusage; /* end "usages_min/max" index */ uint8_t iusage; /* current "usages_min/max" index */ uint8_t ousage; /* current "usages_min/max" offset */ @@ -347,18 +348,19 @@ hid_get_item(struct hid_data *s, struct hid_item *h) switch (bTag) { case 8: /* Input */ c->kind = hid_input; - c->flags = dval; ret: + c->flags = dval; c->loc.count = s->loc_count; c->loc.size = s->loc_size; if (c->flags & HIO_VARIABLE) { /* range check usage count */ - if (c->loc.count > 255) { + if (c->loc.count > MAXLOCCNT) { DPRINTFN(0, "Number of " - "items(%u) truncated to 255\n", - (unsigned)(c->loc.count)); - s->ncount = 255; + "items(%u) truncated to %u\n", + (unsigned)(c->loc.count), + MAXLOCCNT); + s->ncount = MAXLOCCNT; } else s->ncount = c->loc.count; @@ -374,7 +376,6 @@ hid_get_item(struct hid_data *s, struct hid_item *h) case 9: /* Output */ c->kind = hid_output; - c->flags = dval; goto ret; case 10: /* Collection */ c->kind = hid_collection; @@ -385,7 +386,6 @@ hid_get_item(struct hid_data *s, struct hid_item *h) return (1); case 11: /* Feature */ c->kind = hid_feature; - c->flags = dval; goto ret; case 12: /* End collection */ c->kind = hid_endcollection; From owner-svn-src-head@freebsd.org Sat Jul 21 14:56:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5418D104DDA2; Sat, 21 Jul 2018 14:56:17 +0000 (UTC) (envelope-from gavin@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 E145F8C962; Sat, 21 Jul 2018 14:56:16 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B60842078F; Sat, 21 Jul 2018 14:56:16 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LEuGSj055310; Sat, 21 Jul 2018 14:56:16 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LEuGfT055308; Sat, 21 Jul 2018 14:56:16 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201807211456.w6LEuGfT055308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Sat, 21 Jul 2018 14:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336578 - in head/sys/dev/usb: . wlan X-SVN-Group: head X-SVN-Commit-Author: gavin X-SVN-Commit-Paths: in head/sys/dev/usb: . wlan X-SVN-Commit-Revision: 336578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 14:56:17 -0000 Author: gavin Date: Sat Jul 21 14:56:15 2018 New Revision: 336578 URL: https://svnweb.freebsd.org/changeset/base/336578 Log: run(4): Support the D-Link DWA-125 rev A3 Submitted by: Ali Mashtizadeh MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D16029 Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Jul 21 14:20:17 2018 (r336577) +++ head/sys/dev/usb/usbdevs Sat Jul 21 14:56:15 2018 (r336578) @@ -1704,6 +1704,7 @@ product DLINK DUBE100B1 0x3c05 DUB-E100 rev B1 product DLINK RT2870 0x3c09 RT2870 product DLINK RT3072 0x3c0a RT3072 product DLINK DWA140B3 0x3c15 DWA-140 rev B3 +product DLINK DWA125A3 0x3c19 DWA-125 rev A3 product DLINK DWA160B2 0x3c1a DWA-160 rev B2 product DLINK DWA127 0x3c1b DWA-127 Wireless Adapter product DLINK DWA162 0x3c1f DWA-162 Wireless Adapter Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sat Jul 21 14:20:17 2018 (r336577) +++ head/sys/dev/usb/wlan/if_run.c Sat Jul 21 14:56:15 2018 (r336578) @@ -208,6 +208,7 @@ static const STRUCT_USB_HOST_ID run_devs[] = { RUN_DEV(CYBERTAN, RT2870), RUN_DEV(DLINK, RT2870), RUN_DEV(DLINK, RT3072), + RUN_DEV(DLINK, DWA125A3), RUN_DEV(DLINK, DWA127), RUN_DEV(DLINK, DWA140B3), RUN_DEV(DLINK, DWA160B2), From owner-svn-src-head@freebsd.org Sat Jul 21 16:26:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32971104FE72; Sat, 21 Jul 2018 16:26:01 +0000 (UTC) (envelope-from asomers@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 D33AF8F037; Sat, 21 Jul 2018 16:26:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2340215EE; Sat, 21 Jul 2018 16:26:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LGQ0oB001619; Sat, 21 Jul 2018 16:26:00 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LGQ0qO001618; Sat, 21 Jul 2018 16:26:00 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807211626.w6LGQ0qO001618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 21 Jul 2018 16:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336579 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 336579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 16:26:01 -0000 Author: asomers Date: Sat Jul 21 16:26:00 2018 New Revision: 336579 URL: https://svnweb.freebsd.org/changeset/base/336579 Log: audit(4): add more test cases for auditon(2) auditon(2) is an ioctl-like syscall with several different variants, each of which has a distinct audit event. This commit tests the remaining variants that weren't tested in r336564. Submitted by: aniketp MFC after: 2 weeks X-MFC-With: 336564 Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16381 Modified: head/tests/sys/audit/administrative.c Modified: head/tests/sys/audit/administrative.c ============================================================================== --- head/tests/sys/audit/administrative.c Sat Jul 21 14:56:15 2018 (r336578) +++ head/tests/sys/audit/administrative.c Sat Jul 21 16:26:00 2018 (r336579) @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -48,6 +49,8 @@ static pid_t pid; static int filedesc; +/* Default argument for handling ENOSYS in auditon(2) functions */ +static int auditon_def = 0; static mode_t mode = 0777; static struct pollfd fds[1]; static char adregex[80]; @@ -739,7 +742,64 @@ ATF_TC_CLEANUP(setaudit_addr_failure, tc) cleanup(); } +/* + * Note: The test-case uses A_GETFSIZE as the command argument but since it is + * not an independent audit event, it will be used to check the default mode + * auditing of auditon(2) system call. + * + * Please See: sys/security/audit/audit_bsm_klib.c + * function(): au_event_t auditon_command_event() :: case A_GETFSIZE: + */ +ATF_TC_WITH_CLEANUP(auditon_default_success); +ATF_TC_HEAD(auditon_default_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call"); +} +ATF_TC_BODY(auditon_default_success, tc) +{ + au_fstat_t fsize_arg; + bzero(&fsize_arg, sizeof(au_fstat_t)); + + pid = getpid(); + snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_GETFSIZE, &fsize_arg, sizeof(fsize_arg))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_default_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_default_failure); +ATF_TC_HEAD(auditon_default_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call"); +} + +ATF_TC_BODY(auditon_default_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid argument */ + ATF_REQUIRE_EQ(-1, auditon(A_GETFSIZE, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_default_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(auditon_getpolicy_success); ATF_TC_HEAD(auditon_getpolicy_success, tc) { @@ -1240,7 +1300,161 @@ ATF_TC_CLEANUP(auditon_setcond_failure, tc) cleanup(); } +/* + * Following test-cases for auditon(2) are all in failure mode only as although + * auditable, they have not been implemented and return ENOSYS whenever called. + * + * Commands: A_GETCWD A_GETCAR A_GETSTAT A_SETSTAT A_SETUMASK A_SETSMASK + */ +ATF_TC_WITH_CLEANUP(auditon_getcwd_failure); +ATF_TC_HEAD(auditon_getcwd_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETCWD"); +} + +ATF_TC_BODY(auditon_getcwd_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "get cwd.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_ERRNO(ENOSYS, auditon(A_GETCWD, &auditon_def, + sizeof(auditon_def)) == -1); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getcwd_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getcar_failure); +ATF_TC_HEAD(auditon_getcar_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETCAR"); +} + +ATF_TC_BODY(auditon_getcar_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "get car.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_ERRNO(ENOSYS, auditon(A_GETCAR, &auditon_def, + sizeof(auditon_def)) == -1); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getcar_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_getstat_failure); +ATF_TC_HEAD(auditon_getstat_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_GETSTAT"); +} + +ATF_TC_BODY(auditon_getstat_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), + "get audit statistics.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_ERRNO(ENOSYS, auditon(A_GETSTAT, &auditon_def, + sizeof(auditon_def)) == -1); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_getstat_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setstat_failure); +ATF_TC_HEAD(auditon_setstat_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETSTAT"); +} + +ATF_TC_BODY(auditon_setstat_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), + "set audit statistics.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_ERRNO(ENOSYS, auditon(A_SETSTAT, &auditon_def, + sizeof(auditon_def)) == -1); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setstat_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setumask_failure); +ATF_TC_HEAD(auditon_setumask_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETUMASK"); +} + +ATF_TC_BODY(auditon_setumask_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), + "set mask per uid.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_ERRNO(ENOSYS, auditon(A_SETUMASK, &auditon_def, + sizeof(auditon_def)) == -1); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setumask_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_setsmask_failure); +ATF_TC_HEAD(auditon_setsmask_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call for cmd: A_SETSMASK"); +} + +ATF_TC_BODY(auditon_setsmask_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), + "set mask per session.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_ERRNO(ENOSYS, auditon(A_SETSMASK, &auditon_def, + sizeof(auditon_def)) == -1); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_setsmask_failure, tc) +{ + cleanup(); +} + + /* * Audit of reboot(2) cannot be tested in normal conditions as we don't want * to reboot the system while running the tests @@ -1426,6 +1640,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, setaudit_addr_success); ATF_TP_ADD_TC(tp, setaudit_addr_failure); + ATF_TP_ADD_TC(tp, auditon_default_success); + ATF_TP_ADD_TC(tp, auditon_default_failure); + ATF_TP_ADD_TC(tp, auditon_getpolicy_success); ATF_TP_ADD_TC(tp, auditon_getpolicy_failure); ATF_TP_ADD_TC(tp, auditon_setpolicy_success); @@ -1450,6 +1667,13 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, auditon_getcond_failure); ATF_TP_ADD_TC(tp, auditon_setcond_success); ATF_TP_ADD_TC(tp, auditon_setcond_failure); + + ATF_TP_ADD_TC(tp, auditon_getcwd_failure); + ATF_TP_ADD_TC(tp, auditon_getcar_failure); + ATF_TP_ADD_TC(tp, auditon_getstat_failure); + ATF_TP_ADD_TC(tp, auditon_setstat_failure); + ATF_TP_ADD_TC(tp, auditon_setumask_failure); + ATF_TP_ADD_TC(tp, auditon_setsmask_failure); ATF_TP_ADD_TC(tp, reboot_failure); ATF_TP_ADD_TC(tp, quotactl_failure); From owner-svn-src-head@freebsd.org Sat Jul 21 16:34:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE29D1050108; Sat, 21 Jul 2018 16:34:39 +0000 (UTC) (envelope-from asomers@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 888138F4A6; Sat, 21 Jul 2018 16:34:39 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6462A21799; Sat, 21 Jul 2018 16:34:39 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LGYdsK006786; Sat, 21 Jul 2018 16:34:39 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LGYcrL006784; Sat, 21 Jul 2018 16:34:38 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807211634.w6LGYcrL006784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 21 Jul 2018 16:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336580 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 336580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 16:34:40 -0000 Author: asomers Date: Sat Jul 21 16:34:38 2018 New Revision: 336580 URL: https://svnweb.freebsd.org/changeset/base/336580 Log: audit(4): add test cases for chflagsat(2), lgetfh(2), setfib(2) These three syscalls aren't currently audited correctly, so the tests are marked as expected failures. PR: 228374 Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16379 Modified: head/tests/sys/audit/file-attribute-access.c head/tests/sys/audit/file-attribute-modify.c head/tests/sys/audit/network.c Modified: head/tests/sys/audit/file-attribute-access.c ============================================================================== --- head/tests/sys/audit/file-attribute-access.c Sat Jul 21 16:26:00 2018 (r336579) +++ head/tests/sys/audit/file-attribute-access.c Sat Jul 21 16:34:38 2018 (r336580) @@ -374,6 +374,57 @@ ATF_TC_CLEANUP(getfsstat_failure, tc) } +ATF_TC_WITH_CLEANUP(lgetfh_success); +ATF_TC_HEAD(lgetfh_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "lgetfh(2) call"); +} + +ATF_TC_BODY(lgetfh_success, tc) +{ + /* BSM conversion requested for unknown event 43061 */ + atf_tc_expect_fail("PR 228374: lgetfh(2) does not get audited in success mode"); + + /* Symbolic link needs to exist to get a file-handle */ + ATF_REQUIRE_EQ(0, symlink("symlink", path)); + const char *regex = "lgetfh.*return,success"; + FILE *pipefd = setup(fds, "fa"); + ATF_REQUIRE_EQ(0, lgetfh(path, &fht)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(lgetfh_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(lgetfh_failure); +ATF_TC_HEAD(lgetfh_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "lgetfh(2) call"); +} + +ATF_TC_BODY(lgetfh_failure, tc) +{ + /* BSM conversion requested for unknown event 43061 */ + atf_tc_expect_fail("PR 228374: lgetfh(2) does not get audited in failure mode"); + + const char *regex = "lgetfh.*return,failure"; + FILE *pipefd = setup(fds, "fa"); + /* Failure reason: symbolic link does not exist */ + ATF_REQUIRE_EQ(-1, lgetfh(errpath, &fht)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(lgetfh_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(fhopen_success); ATF_TC_HEAD(fhopen_success, tc) { @@ -1155,6 +1206,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, getfsstat_success); ATF_TP_ADD_TC(tp, getfsstat_failure); + ATF_TP_ADD_TC(tp, lgetfh_success); + ATF_TP_ADD_TC(tp, lgetfh_failure); ATF_TP_ADD_TC(tp, fhopen_success); ATF_TP_ADD_TC(tp, fhopen_failure); ATF_TP_ADD_TC(tp, fhstat_success); Modified: head/tests/sys/audit/file-attribute-modify.c ============================================================================== --- head/tests/sys/audit/file-attribute-modify.c Sat Jul 21 16:26:00 2018 (r336579) +++ head/tests/sys/audit/file-attribute-modify.c Sat Jul 21 16:34:38 2018 (r336580) @@ -692,6 +692,56 @@ ATF_TC_CLEANUP(lchflags_failure, tc) } +ATF_TC_WITH_CLEANUP(chflagsat_success); +ATF_TC_HEAD(chflagsat_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "chflagsat(2) call"); +} + +ATF_TC_BODY(chflagsat_success, tc) +{ + /* BSM conversion requested for unknown event 43209 */ + atf_tc_expect_fail("PR 228374: chflagsat(2) does not get audited in success mode"); + + /* File needs to exist to call chflagsat(2) */ + ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, chflagsat(AT_FDCWD, path, SF_IMMUTABLE, 0)); + check_audit(fds, successreg, pipefd); + close(filedesc); +} + +ATF_TC_CLEANUP(chflagsat_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(chflagsat_failure); +ATF_TC_HEAD(chflagsat_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "chflagsat(2) call"); +} + +ATF_TC_BODY(chflagsat_failure, tc) +{ + /* BSM conversion requested for unknown event 43209 */ + atf_tc_expect_fail("PR 228374: chflagsat(2) does not get audited in failure mode"); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: file does not exist */ + ATF_REQUIRE_EQ(-1, chflagsat(AT_FDCWD, errpath, SF_IMMUTABLE, 0)); + check_audit(fds, failurereg, pipefd); +} + +ATF_TC_CLEANUP(chflagsat_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(utimes_success); ATF_TC_HEAD(utimes_success, tc) { @@ -1303,6 +1353,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, fchflags_failure); ATF_TP_ADD_TC(tp, lchflags_success); ATF_TP_ADD_TC(tp, lchflags_failure); + ATF_TP_ADD_TC(tp, chflagsat_success); + ATF_TP_ADD_TC(tp, chflagsat_failure); ATF_TP_ADD_TC(tp, utimes_success); ATF_TP_ADD_TC(tp, utimes_failure); Modified: head/tests/sys/audit/network.c ============================================================================== --- head/tests/sys/audit/network.c Sat Jul 21 16:26:00 2018 (r336579) +++ head/tests/sys/audit/network.c Sat Jul 21 16:34:38 2018 (r336580) @@ -1088,6 +1088,58 @@ ATF_TC_CLEANUP(sendfile_failure, tc) } +ATF_TC_WITH_CLEANUP(setfib_success); +ATF_TC_HEAD(setfib_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setfib(2) call"); +} + +ATF_TC_BODY(setfib_success, tc) +{ + /* BSM conversion requested for unknown event 43228 */ + atf_tc_expect_fail("PR 228374: setfib(2) does not get audited in success mode"); + + pid = getpid(); + snprintf(extregex, sizeof(extregex), "setfib.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, setfib(0)); + check_audit(fds, extregex, pipefd); +} + +ATF_TC_CLEANUP(setfib_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setfib_failure); +ATF_TC_HEAD(setfib_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "setfib(2) call"); +} + +ATF_TC_BODY(setfib_failure, tc) +{ + /* BSM conversion requested for unknown event 43228 */ + atf_tc_expect_fail("PR 228374: setfib(2) does not get audited in failure mode"); + + pid = getpid(); + snprintf(extregex, sizeof(extregex), "setfib.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, setfib(-1)); + check_audit(fds, extregex, pipefd); +} + +ATF_TC_CLEANUP(setfib_failure, tc) +{ + cleanup(); +} + + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, socket_success); @@ -1130,6 +1182,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, shutdown_failure); ATF_TP_ADD_TC(tp, sendfile_success); ATF_TP_ADD_TC(tp, sendfile_failure); + ATF_TP_ADD_TC(tp, setfib_success); + ATF_TP_ADD_TC(tp, setfib_failure); return (atf_no_error()); } From owner-svn-src-head@freebsd.org Sat Jul 21 16:41:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05D211050221; Sat, 21 Jul 2018 16:41:52 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56A078F890; Sat, 21 Jul 2018 16:41:51 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-x241.google.com with SMTP id j19-v6so13534535ljc.7; Sat, 21 Jul 2018 09:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/pC/1KMOzoeqg6MW7sfbMXFBzbF3/e9rFlh5sdCCohU=; b=MOVTxi1WA65C/Z8PDotRAQV8pDxkx461U9aI3UeNMPly6roDe6dqivLqVvohhZFlL4 Uwstsw0RxxFXjI3cqdd0eaoqhggFhQ0wtv8Y6VmA/zHTaDm9IHmfNwNkA4a17g0/Tq+K JDsUi0/ija0z/bRE4LYT0Qs7oLPhK2IrFXZfnw4m6Gud30LagepvxZIjR8WhDML20irr Y3JMd9e/2cU3DGqPGSr0rAu7K6uuEK/PSIS8D0veZj9yWNiiE1RAKL0eeW4B+U/C8POJ YGN06OJdCkZ5oO0Rj3DjHgLAsQtHT9pTV+o2NSciRSwld2NhMhIpmjBnH+lzfhctRKUI lpiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=/pC/1KMOzoeqg6MW7sfbMXFBzbF3/e9rFlh5sdCCohU=; b=rtKmN4p41e2cVRWhJA5z4e8FwI8BZwrWPsqZPWGLulkL7pPSkALZiqIEnYe0YlpnFG UBUUJgCkntvQffVSIlS9H8MZcivgjnLw3IO+ZbdHOr/ugc22/Ct6eDQZovPB7t+K9mUF KcJXOnExaMBDbi9iB+YcmBZkr8A4x77NP+tUHLP58sP0m2GaQhHlb1FVcrLq6zS+MTv/ 7wfkjahl/buVrNLFE2K96QjMLbDK1jwcUTxgo/aQgX++dY+ig043IBJq4+VcYrHlF72s /4jB2iNfymYe3M75WJCSoIIi7ziv+SYQAzE90vBWkq79x+gQAT7CnYyUwx5vQkM/gMU9 8DDQ== X-Gm-Message-State: AOUpUlHgcYYQ76VrawfOtgI1qOYtKaNHbA4rHTdfHCNiKzIksRMWVZPH OyQB+bPMgyhvcu6QVO0ct1LTKLn0N5vQgYi8wyVmcZ7N X-Google-Smtp-Source: AAOMgpetiylPYppwEMO7JX01lh+rdLiQbO182J88mCh8qGsPIEl/fayftR/ifZhqW0yv4MGbAOzu//Dk3zt9kQCi+zk= X-Received: by 2002:a2e:2d0a:: with SMTP id t10-v6mr3152571ljt.8.1532191309609; Sat, 21 Jul 2018 09:41:49 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:7851:0:0:0:0:0 with HTTP; Sat, 21 Jul 2018 09:41:48 -0700 (PDT) In-Reply-To: <201806261807.w5QI7Hod072088@repo.freebsd.org> References: <201806261807.w5QI7Hod072088@repo.freebsd.org> From: Alan Somers Date: Sat, 21 Jul 2018 10:41:48 -0600 X-Google-Sender-Auth: sXgYzhbE0egvw9-2QJySHI2q8ZE Message-ID: Subject: Re: svn commit: r335673 - in head: etc/defaults etc/rc.d lib/geom/eli share/man/man5 To: Ben Woods Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 16:41:52 -0000 On Tue, Jun 26, 2018 at 12:07 PM, Ben Woods wrote: > Author: woodsb02 (ports committer) > Date: Tue Jun 26 18:07:16 2018 > New Revision: 335673 > URL: https://svnweb.freebsd.org/changeset/base/335673 > > Log: > geli attach multiple providers > > Allow attaching of multiple geli providers at once if they use same > passphrase and keyfiles. > > This is helpful when the providers being attached are not used for boot, > and therefore the existing code to first try the cached password when > tasting the providers during boot does not apply. > > Multiple providers with the same passphrase and keyfiles can be attached > at the same time during system start-up by adding the following to > rc.conf: > geli_groups="storage backup" > geli_storage_flags="-k /etc/geli/storage.keys" > geli_storage_devices="ada0 ada1" > geli_backup_flags="-j /etc/geli/backup.passfile -k > /etc/geli/backup.keys" > geli_backup_devices="ada2 ada3" > > Reviewed by: wblock, delphij, jilles > Approved by: sobomax (src), bcr (doc) > Differential Revision: https://reviews.freebsd.org/D12644 > > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/geli > head/lib/geom/eli/geli.8 > head/lib/geom/eli/geom_eli.c > head/share/man/man5/rc.conf.5 > It looks like this change is causing several of geli's tests to fail in CI. Could you please take a look? The failure mode is that "geli attach" exits 0 when it should fail instead. https://ci.freebsd.org/job/FreeBSD-head-amd64-test/lastCompletedBuild/testReport/ From owner-svn-src-head@freebsd.org Sat Jul 21 17:13:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF6661050F44; Sat, 21 Jul 2018 17:13:40 +0000 (UTC) (envelope-from brd@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 60F5F7086C; Sat, 21 Jul 2018 17:13:40 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41FCD21E10; Sat, 21 Jul 2018 17:13:40 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LHDeNu026924; Sat, 21 Jul 2018 17:13:40 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LHDd3A026921; Sat, 21 Jul 2018 17:13:39 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807211713.w6LHDd3A026921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 21 Jul 2018 17:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336581 - in head: . etc etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: . etc etc/rc.d X-SVN-Commit-Revision: 336581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 17:13:40 -0000 Author: brd Date: Sat Jul 21 17:13:39 2018 New Revision: 336581 URL: https://svnweb.freebsd.org/changeset/base/336581 Log: Revert r336572 and wrap them in machine checks so they are only installed on i386. Approved by: allanjude (mentor), imp Differential Revision: https://reviews.freebsd.org/D16380 Modified: head/ObsoleteFiles.inc head/etc/Makefile head/etc/rc.d/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Jul 21 16:34:38 2018 (r336580) +++ head/ObsoleteFiles.inc Sat Jul 21 17:13:39 2018 (r336581) @@ -38,9 +38,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20180721: Purge some old forgotten apmd files -OLD_FILES+=etc/apmd.conf -OLD_FILES+=etc/rc.d/apmd # 20180721: move of libmlx5.so.1 and libibverbs.so.1 OLD_LIBS+=usr/lib/libmlx5.so.1 OLD_LIBS+=usr/lib/libibverbs.so.1 Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Jul 21 16:34:38 2018 (r336580) +++ head/etc/Makefile Sat Jul 21 17:13:39 2018 (r336581) @@ -76,6 +76,12 @@ BSM_ETC_DIR= ${DESTDIR}/etc/security BIN1+= amd.map .endif +.if ${MACHINE} == "i386" +.if ${MK_APM} != "no" +BIN1+= apmd.conf +.endif +.endif + .if ${MK_AUTOFS} != "no" BIN1+= auto_master .endif Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sat Jul 21 16:34:38 2018 (r336580) +++ head/etc/rc.d/Makefile Sat Jul 21 17:13:39 2018 (r336581) @@ -157,6 +157,9 @@ AMDPACKAGE= amd .if ${MK_APM} != "no" FILESGROUPS+= APM APM+= apm +.if ${MACHINE} == "i386" +APM+= apmd +.endif APMPACKAGE= apm .endif From owner-svn-src-head@freebsd.org Sat Jul 21 17:24:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD0061051490; Sat, 21 Jul 2018 17:24:15 +0000 (UTC) (envelope-from asomers@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 5BB4B70FD1; Sat, 21 Jul 2018 17:24:15 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D44321FA3; Sat, 21 Jul 2018 17:24:15 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LHOF8v031818; Sat, 21 Jul 2018 17:24:15 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LHOFvF031817; Sat, 21 Jul 2018 17:24:15 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807211724.w6LHOFvF031817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 21 Jul 2018 17:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336582 - head/usr.sbin/makefs/tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.sbin/makefs/tests X-SVN-Commit-Revision: 336582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 17:24:15 -0000 Author: asomers Date: Sat Jul 21 17:24:14 2018 New Revision: 336582 URL: https://svnweb.freebsd.org/changeset/base/336582 Log: makefs(8): add test case for PR 229929 Fix two failing makefs test cases by adding "-M 1m", which was already used for every other FFS test case. Add a new test case for the underlying issue: with no -M, -m, or -s options, makefs can underestimate image size. PR: 229929 Reported by: Jenkins MFC after: 2 weeks Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Sat Jul 21 17:13:39 2018 (r336581) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Sat Jul 21 17:24:14 2018 (r336582) @@ -53,6 +53,29 @@ check_ffs_image_contents() check_image_contents "$@" } +# With no -M, -m, or -s options, makefs should autocalculate the image size +atf_test_case autocalculate_image_size cleanup +autocalculate_image_size_body() +{ + atf_expect_fail "PR 229929 makefs(8) can underestimate image size" + create_test_inputs + + atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR + + cd $TEST_INPUTS_DIR + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE + cd - + + mount_image + check_ffs_image_contents +} +autocalculate_image_size_cleanup() +{ + common_cleanup +} + atf_test_case D_flag cleanup D_flag_body() { @@ -109,7 +132,7 @@ from_mtree_spec_file_body() cd $TEST_INPUTS_DIR atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE + $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE cd - mount_image @@ -132,7 +155,7 @@ from_multiple_dirs_body() touch $test_inputs_dir2/multiple_dirs_test_file atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 + $MAKEFS -M 1m $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 mount_image check_image_contents -d $test_inputs_dir2 @@ -224,6 +247,8 @@ o_flag_version_2_cleanup() atf_init_test_cases() { + + atf_add_test_case autocalculate_image_size atf_add_test_case D_flag atf_add_test_case F_flag From owner-svn-src-head@freebsd.org Sat Jul 21 18:54:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44990102931F; Sat, 21 Jul 2018 18:54:25 +0000 (UTC) (envelope-from ian@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 DD1C973AD7; Sat, 21 Jul 2018 18:54:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA16E22E34; Sat, 21 Jul 2018 18:54:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LIsOLa077955; Sat, 21 Jul 2018 18:54:24 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LIsOLE077953; Sat, 21 Jul 2018 18:54:24 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807211854.w6LIsOLE077953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 21 Jul 2018 18:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336583 - head/sys/arm/conf X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/conf X-SVN-Commit-Revision: 336583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 18:54:25 -0000 Author: ian Date: Sat Jul 21 18:54:24 2018 New Revision: 336583 URL: https://svnweb.freebsd.org/changeset/base/336583 Log: Add option MAC to armv6 and armv7 kernels by default, it needs to be compiled-in to allow loading policy modules at runtime. Modified: head/sys/arm/conf/std.armv6 head/sys/arm/conf/std.armv7 Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Sat Jul 21 17:24:14 2018 (r336582) +++ head/sys/arm/conf/std.armv6 Sat Jul 21 18:54:24 2018 (r336583) @@ -41,6 +41,7 @@ options KBD_INSTALL_CDEV # install a CDEV entry in /d options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options VFP # Enable floating point hardware support +options MAC # Support for Mandatory Access Control (MAC) options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 Modified: head/sys/arm/conf/std.armv7 ============================================================================== --- head/sys/arm/conf/std.armv7 Sat Jul 21 17:24:14 2018 (r336582) +++ head/sys/arm/conf/std.armv7 Sat Jul 21 18:54:24 2018 (r336583) @@ -41,6 +41,7 @@ options KBD_INSTALL_CDEV # install a CDEV entry in /d options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options VFP # Enable floating point hardware support +options MAC # Support for Mandatory Access Control (MAC) options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 From owner-svn-src-head@freebsd.org Sat Jul 21 19:09:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00A981029988; Sat, 21 Jul 2018 19:09:30 +0000 (UTC) (envelope-from 0mp@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 94EFC7429B; Sat, 21 Jul 2018 19:09:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7054822FFA; Sat, 21 Jul 2018 19:09:29 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LJ9TF1083076; Sat, 21 Jul 2018 19:09:29 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LJ9Toi083075; Sat, 21 Jul 2018 19:09:29 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201807211909.w6LJ9Toi083075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 21 Jul 2018 19:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336584 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 336584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 19:09:30 -0000 Author: 0mp (ports committer) Date: Sat Jul 21 19:09:29 2018 New Revision: 336584 URL: https://svnweb.freebsd.org/changeset/base/336584 Log: Mention the Linux compatibility layer instead of the Linux emulator in the BUGS section. linux(4) explicitly states that it is not an emulator. While here, pet mandoc and igor. Reviewed by: mat (mentor), rpokala Approved by: manpages (rpokala), mat (mentor) Differential Revision: https://reviews.freebsd.org/D16375 Modified: head/share/man/man5/sysctl.conf.5 Modified: head/share/man/man5/sysctl.conf.5 ============================================================================== --- head/share/man/man5/sysctl.conf.5 Sat Jul 21 18:54:24 2018 (r336583) +++ head/share/man/man5/sysctl.conf.5 Sat Jul 21 19:09:29 2018 (r336584) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 1999 +.Dd July 21, 2018 .Dt SYSCTL.CONF 5 .Os .Sh NAME @@ -37,9 +37,9 @@ file is read in when the system goes into multi-user m settings for the kernel. The .Pa /etc/sysctl.conf -is in the format of the +file is in the format of the .Xr sysctl 8 -command, i.e.\& +command, i.e., .Bd -literal -offset indent sysctl_mib=value .Ed @@ -62,7 +62,7 @@ To turn off logging of programs that exit due to fatal a configuration like .Bd -literal -offset indent # Configure logging. -kern.logsigexit=0 # Do not log fatal signal exits (e.g. sig 11) +kern.logsigexit=0 # Do not log fatal signal exits (e.g., sig 11) .Ed .Sh SEE ALSO .Xr rc.conf 5 , @@ -78,7 +78,11 @@ If loadable kernel modules are used to introduce addit functionality and sysctls to manage that functionality, .Nm may be processed too early in the boot process to set those sysctls. -For example, sysctls to manage the linux emulator cannot be set in +For example, sysctls to manage the Linux compatibility layer +.Po +.Xr linux 4 +.Pc +cannot be set in .Nm -if the linux emulator is loaded as a module rather than +if the Linux compatibility layer is loaded as a module rather than compiled into the kernel. From owner-svn-src-head@freebsd.org Sat Jul 21 19:16:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D6B61029DE6; Sat, 21 Jul 2018 19:16:39 +0000 (UTC) (envelope-from 0mp@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 F2F06748C6; Sat, 21 Jul 2018 19:16:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA01C231B3; Sat, 21 Jul 2018 19:16:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LJGcRX088067; Sat, 21 Jul 2018 19:16:38 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LJGcv9088066; Sat, 21 Jul 2018 19:16:38 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201807211916.w6LJGcv9088066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 21 Jul 2018 19:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336585 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 336585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 19:16:39 -0000 Author: 0mp (ports committer) Date: Sat Jul 21 19:16:38 2018 New Revision: 336585 URL: https://svnweb.freebsd.org/changeset/base/336585 Log: Use the correct DOT language syntax for an ID with a leading digit (0mp). It turns out that my username (0mp) is not a valid ID in the DOT language because it starts with a digit. The easiest way to fix it is to put my username in double quotes. Reported by: pstef Reviewed by: krion (mentor) Approved by: krion (mentor) Differential Revision: https://reviews.freebsd.org/D16372 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sat Jul 21 19:09:29 2018 (r336584) +++ head/share/misc/committers-ports.dot Sat Jul 21 19:16:38 2018 (r336585) @@ -40,7 +40,7 @@ node [color=lightblue2, style=filled, bgcolor=black]; # Current ports committers go here. Try to keep things sorted. -0mp [label="Mateusz Piotrowski\n0mp@FreeBSD.org\n2018/06/16"] +"0mp" [label="Mateusz Piotrowski\n0mp@FreeBSD.org\n2018/06/16"] ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] acm [label="Jose Alonso Cardenas Marquez\nacm@FreeBSD.org\n2006/07/18"] adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16"] @@ -481,7 +481,7 @@ koobs -> kami koobs -> woodsb02 koobs -> xmj -krion -> 0mp +krion -> "0mp" krion -> brooks krion -> miwi krion -> novel @@ -527,7 +527,7 @@ makc -> bf makc -> jhale makc -> rakuco -mat -> 0mp +mat -> "0mp" mat -> bmah mat -> dteske mat -> dvl From owner-svn-src-head@freebsd.org Sat Jul 21 19:28:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB334102A409; Sat, 21 Jul 2018 19:28:08 +0000 (UTC) (envelope-from asomers@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 6C85D74E23; Sat, 21 Jul 2018 19:28:08 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 482722334B; Sat, 21 Jul 2018 19:28:08 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LJS8Lc093001; Sat, 21 Jul 2018 19:28:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LJS7IG092999; Sat, 21 Jul 2018 19:28:07 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807211928.w6LJS7IG092999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 21 Jul 2018 19:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336586 - head/tests/sys/netipsec/tunnel X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/netipsec/tunnel X-SVN-Commit-Revision: 336586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 19:28:09 -0000 Author: asomers Date: Sat Jul 21 19:28:07 2018 New Revision: 336586 URL: https://svnweb.freebsd.org/changeset/base/336586 Log: Clear expected failures for aesni_aes_gcm tests These tests were fixed by r335584 PR: 228094 PR: 201447 MFC after: 2 weeks X-MFC-With: 335584 Modified: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh Modified: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh Sat Jul 21 19:16:38 2018 (r336585) +++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh Sat Jul 21 19:28:07 2018 (r336586) @@ -34,7 +34,6 @@ v6_body() # load AESNI module if not already kldstat -q -n aesni || kldload aesni - atf_expect_fail "PR 201447" ist_test 6 aes-gcm-16 "12345678901234567890" } Modified: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh Sat Jul 21 19:16:38 2018 (r336585) +++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh Sat Jul 21 19:28:07 2018 (r336586) @@ -34,7 +34,6 @@ v6_body() # load AESNI module if not already kldstat -q -n aesni || kldload aesni - atf_expect_fail "PR 201447" ist_test 6 aes-gcm-16 "123456789012345678901234567890123456" } From owner-svn-src-head@freebsd.org Sat Jul 21 19:48:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 181D3102AA99; Sat, 21 Jul 2018 19:48:33 +0000 (UTC) (envelope-from asomers@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 A8F8D756B1; Sat, 21 Jul 2018 19:48:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DCD323683; Sat, 21 Jul 2018 19:48:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LJmW3Q003450; Sat, 21 Jul 2018 19:48:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LJmWOv003449; Sat, 21 Jul 2018 19:48:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807211948.w6LJmWOv003449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 21 Jul 2018 19:48:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336587 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 336587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 19:48:33 -0000 Author: asomers Date: Sat Jul 21 19:48:31 2018 New Revision: 336587 URL: https://svnweb.freebsd.org/changeset/base/336587 Log: tftpd(8): when completing an WRQ, flush the file before acknowleding receipt tftpd(8) should flush a newly written file to disk before ACKing the final DATA packet. Otherwise there is a narrow race window when a subsequent read may not see the file. This is somewhat related to r330710, but the race window is much smaller. Hopefully this will fix the intermittent tests in Jenkins. Reported by: Jenkins MFC after: 2 weeks Modified: head/libexec/tftpd/tftp-transfer.c Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Sat Jul 21 19:28:07 2018 (r336586) +++ head/libexec/tftpd/tftp-transfer.c Sat Jul 21 19:48:31 2018 (r336587) @@ -279,6 +279,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st send_error(peer, ENOSPACE); goto abort; } + if (n_data != segsize) + write_close(); } send_ack: @@ -303,8 +305,6 @@ send_ack: } gettimeofday(&(ts->tstop), NULL); } while (n_data == segsize); - - write_close(); /* Don't do late packet management for the client implementation */ if (acting_as_client) From owner-svn-src-head@freebsd.org Sat Jul 21 20:14:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 071A0102B4F5; Sat, 21 Jul 2018 20:14:02 +0000 (UTC) (envelope-from asomers@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 A888676442; Sat, 21 Jul 2018 20:14:01 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89BFD23B56; Sat, 21 Jul 2018 20:14:01 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LKE1oE018821; Sat, 21 Jul 2018 20:14:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LKE1xG018820; Sat, 21 Jul 2018 20:14:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807212014.w6LKE1xG018820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 21 Jul 2018 20:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336588 - head/tests/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/fs/tmpfs X-SVN-Commit-Revision: 336588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 20:14:02 -0000 Author: asomers Date: Sat Jul 21 20:14:01 2018 New Revision: 336588 URL: https://svnweb.freebsd.org/changeset/base/336588 Log: Fix sys.fs.tmpfs.mknod_test.{char, block} by reverting r321967 In r321967 ngie "fixed" these tests by changing their expectations to match the device numbers produced by the new ino64 code. But it wasn't the tests that were broken, it was the kernel. bde fixed the kernel in r335053. Reported by: Jenkins MFC after: Never (only applies to >= 12) Modified: head/tests/sys/fs/tmpfs/Makefile Modified: head/tests/sys/fs/tmpfs/Makefile ============================================================================== --- head/tests/sys/fs/tmpfs/Makefile Sat Jul 21 19:48:31 2018 (r336587) +++ head/tests/sys/fs/tmpfs/Makefile Sat Jul 21 20:14:01 2018 (r336588) @@ -41,13 +41,7 @@ ${PACKAGE}FILESDIR= ${TESTSDIR} PROGS+= h_tools BINDIR.h_tools= ${TESTSDIR} -# NOTE: dev_t is represented by 64-bits after r321920 (it was 16-bits -# previously). -# -# The old hardcoded values assume the 16-bit layout for .st_rdev . ATF_TESTS_SH_SED_mknod_test= \ - -e '/$${st_rdev} -eq 512/s/512/8589934592/g' \ - -e '/$${st_rdev} -eq 514/s/514/8589934594/g' \ -e 's,mknod pipe p,mkfifo pipe,g' \ -e 's,mknod dir/pipe p,mkfifo dir/pipe,g' From owner-svn-src-head@freebsd.org Sat Jul 21 21:26:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18BA6102D0B8; Sat, 21 Jul 2018 21:26:40 +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 AF3077863D; Sat, 21 Jul 2018 21:26:39 +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 8146C24697; Sat, 21 Jul 2018 21:26:39 +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 w6LLQdFr054798; Sat, 21 Jul 2018 21:26:39 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LLQd8Y054797; Sat, 21 Jul 2018 21:26:39 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201807212126.w6LLQd8Y054797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 21 Jul 2018 21:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336589 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 336589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 21:26:40 -0000 Author: alc Date: Sat Jul 21 21:26:38 2018 New Revision: 336589 URL: https://svnweb.freebsd.org/changeset/base/336589 Log: Eliminate a comment that doesn't apply to this pmap implementation. Coalesce the variable definitions for PV entry management. MFC after: 3 weeks Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sat Jul 21 20:14:01 2018 (r336588) +++ head/sys/arm64/arm64/pmap.c Sat Jul 21 21:26:38 2018 (r336589) @@ -242,9 +242,10 @@ vm_offset_t kernel_vm_end = 0; /* * Data for the pv entry allocation mechanism. - * Updates to pv_invl_gen are protected by the pv_list_locks[] - * elements, but reads are not. */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); +static struct mtx pv_chunks_mutex; +static struct rwlock pv_list_locks[NPV_LIST_LOCKS]; static struct md_page *pv_table; static struct md_page pv_dummy; @@ -269,13 +270,6 @@ static int superpages_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, superpages_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &superpages_enabled, 0, "Are large page mappings enabled?"); - -/* - * Data for the pv entry allocation mechanism - */ -static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); -static struct mtx pv_chunks_mutex; -static struct rwlock pv_list_locks[NPV_LIST_LOCKS]; /* * Internal flags for pmap_enter()'s helper functions. From owner-svn-src-head@freebsd.org Sat Jul 21 21:34:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22352102D426; Sat, 21 Jul 2018 21:34:11 +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 C7E8E78FB2; Sat, 21 Jul 2018 21:34:10 +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 8EA6224843; Sat, 21 Jul 2018 21:34:10 +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 w6LLYA6a059974; Sat, 21 Jul 2018 21:34:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LLYAe8059973; Sat, 21 Jul 2018 21:34:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201807212134.w6LLYAe8059973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 21 Jul 2018 21:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336590 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 336590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 21:34:11 -0000 Author: mav Date: Sat Jul 21 21:34:10 2018 New Revision: 336590 URL: https://svnweb.freebsd.org/changeset/base/336590 Log: Stop further SCSI recovery attempts after one has failed. We've got a set of probably damaged hard disks, reporting 0x04,0x02 ("Logical unit not ready, initializing command required") in response to READ CAPACITY(16), where attempts to use START STOP UNIT for recovery results in 0x44,0x00 ("Internal target failure") after ~1 second delay. As result of all recovery retries, device open attempt took ~3 seconds before finally reporting to GEOM that device is opened, but has no media. If the open was for writing and since it hasn't formally failed, following close triggered GEOM retaste, opening device few more times with respective delays. This change reduces whole time of this cycle from ~12 seconds to ~3 by giving up on recovery after the first failure. Reviewed by: ken MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Sat Jul 21 21:26:38 2018 (r336589) +++ head/sys/cam/cam_periph.c Sat Jul 21 21:34:10 2018 (r336590) @@ -1309,7 +1309,7 @@ camperiphdone(struct cam_periph *periph, union ccb *do union ccb *saved_ccb; cam_status status; struct scsi_start_stop_unit *scsi_cmd; - int error_code, sense_key, asc, ascq; + int error = 0, error_code, sense_key, asc, ascq; scsi_cmd = (struct scsi_start_stop_unit *) &done_ccb->csio.cdb_io.cdb_bytes; @@ -1341,8 +1341,9 @@ camperiphdone(struct cam_periph *periph, union ccb *do goto out; } } - if (cam_periph_error(done_ccb, - 0, SF_RETRY_UA | SF_NO_PRINT) == ERESTART) + error = cam_periph_error(done_ccb, 0, + SF_RETRY_UA | SF_NO_PRINT); + if (error == ERESTART) goto out; if (done_ccb->ccb_h.status & CAM_DEV_QFRZN) { cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0); @@ -1361,14 +1362,21 @@ camperiphdone(struct cam_periph *periph, union ccb *do } /* - * Perform the final retry with the original CCB so that final - * error processing is performed by the owner of the CCB. + * After recovery action(s) completed, return to the original CCB. + * If the recovery CCB has failed, considering its own possible + * retries and recovery, assume we are back in state where we have + * been originally, but without recovery hopes left. In such case, + * after the final attempt below, we cancel any further retries, + * blocking by that also any new recovery attempts for this CCB, + * and the result will be the final one returned to the CCB owher. */ saved_ccb = (union ccb *)done_ccb->ccb_h.saved_ccb_ptr; bcopy(saved_ccb, done_ccb, sizeof(*done_ccb)); xpt_free_ccb(saved_ccb); if (done_ccb->ccb_h.cbfcnp != camperiphdone) periph->flags &= ~CAM_PERIPH_RECOVERY_INPROG; + if (error != 0) + done_ccb->ccb_h.retry_count = 0; xpt_action(done_ccb); out: From owner-svn-src-head@freebsd.org Sat Jul 21 22:10:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 889B5102E014; Sat, 21 Jul 2018 22:10:29 +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 3E29879E2E; Sat, 21 Jul 2018 22:10:29 +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 1ABEF24D5F; Sat, 21 Jul 2018 22:10:29 +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 w6LMASnC075678; Sat, 21 Jul 2018 22:10:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LMASae075677; Sat, 21 Jul 2018 22:10:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807212210.w6LMASae075677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 21 Jul 2018 22:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336591 - head/lib/libproc/tests X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libproc/tests X-SVN-Commit-Revision: 336591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 22:10:29 -0000 Author: markj Date: Sat Jul 21 22:10:28 2018 New Revision: 336591 URL: https://svnweb.freebsd.org/changeset/base/336591 Log: Disable optimization of the libproc test program. Dead code elimination may remove symbols that are required by the tests. Reported by: Jenkins, via asomers MFC after: 1 week Modified: head/lib/libproc/tests/Makefile Modified: head/lib/libproc/tests/Makefile ============================================================================== --- head/lib/libproc/tests/Makefile Sat Jul 21 21:34:10 2018 (r336590) +++ head/lib/libproc/tests/Makefile Sat Jul 21 22:10:28 2018 (r336591) @@ -12,5 +12,6 @@ LIBADD= elf proc rtld_db util # Ensure that symbols aren't stripped from the test program, as they're needed # for testing symbol lookup. STRIP= +CFLAGS.target_prog.c+= -O0 .include From owner-svn-src-head@freebsd.org Sat Jul 21 22:15:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A97102E395; Sat, 21 Jul 2018 22:15:49 +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 BA1D47A2C0; Sat, 21 Jul 2018 22:15:48 +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 8D30C24EEB; Sat, 21 Jul 2018 22:15:48 +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 w6LMFm9T080538; Sat, 21 Jul 2018 22:15:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LMFmee080537; Sat, 21 Jul 2018 22:15:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807212215.w6LMFmee080537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 21 Jul 2018 22:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336592 - head/lib/libproc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libproc X-SVN-Commit-Revision: 336592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 22:15:49 -0000 Author: markj Date: Sat Jul 21 22:15:48 2018 New Revision: 336592 URL: https://svnweb.freebsd.org/changeset/base/336592 Log: Take the mapping's segment offset into account when resolving symbols. Reported by: Jenkins, via asomers MFC after: 2 weeks Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Sat Jul 21 22:10:28 2018 (r336591) +++ head/lib/libproc/proc_sym.c Sat Jul 21 22:15:48 2018 (r336592) @@ -520,7 +520,8 @@ proc_addr2sym(struct proc_handle *p, uintptr_t addr, c } file = mapping->file; - off = file->ehdr.e_type == ET_DYN ? mapping->map.pr_vaddr : 0; + off = file->ehdr.e_type == ET_DYN ? + mapping->map.pr_vaddr - mapping->map.pr_offset : 0; if (addr < off) return (ENOENT); addr -= off; @@ -623,7 +624,8 @@ proc_name2sym(struct proc_handle *p, const char *objec } file = mapping->file; - off = file->ehdr.e_type == ET_DYN ? mapping->map.pr_vaddr : 0; + off = file->ehdr.e_type == ET_DYN ? + mapping->map.pr_vaddr - mapping->map.pr_offset : 0; error = lookup_symbol_by_name(file->elf, &file->dynsymtab, symbol, symcopy, si); From owner-svn-src-head@freebsd.org Sat Jul 21 22:54:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12F09102F443; Sat, 21 Jul 2018 22:54:45 +0000 (UTC) (envelope-from cperciva@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 A7B547B349; Sat, 21 Jul 2018 22:54:44 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 831BE25558; Sat, 21 Jul 2018 22:54:44 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LMsigV000890; Sat, 21 Jul 2018 22:54:44 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LMsi3v000889; Sat, 21 Jul 2018 22:54:44 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201807212254.w6LMsi3v000889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 21 Jul 2018 22:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336593 - head/release X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 336593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 22:54:45 -0000 Author: cperciva Date: Sat Jul 21 22:54:43 2018 New Revision: 336593 URL: https://svnweb.freebsd.org/changeset/base/336593 Log: Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch and revision number announced in SNS notifications about new EC2 AMIs. While I'm here, incorporate that information into the AMI "description" fields, since it's more useful than simply echoing the information already provided via the AMI "name". Approved by: gjb Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Sat Jul 21 22:15:48 2018 (r336592) +++ head/release/Makefile.ec2 Sat Jul 21 22:54:43 2018 (r336593) @@ -5,6 +5,19 @@ # Makefile for creating an EC2 AMI from a disk image. # +# Figure out where SVN is +.if !defined(SVN_CMD) || empty(SVN_CMD) +. for _P in /usr/bin /usr/local/bin +. for _S in svn svnlite +. if exists(${_P}/${_S}) +SVN_CMD= ${_P}/${_S} +. endif +. endfor +. endfor +.endif +EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' +EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} + .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" AMINAMESUFFIX!= date +-%Y-%m-%d .endif @@ -13,8 +26,6 @@ PUBLISH= --public .endif .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) EC2SNSREL= ${REVISION}-${BRANCH} -EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' -EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} .endif @@ -60,7 +71,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} From owner-svn-src-head@freebsd.org Sat Jul 21 23:54:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23C2410307D7; Sat, 21 Jul 2018 23:54:41 +0000 (UTC) (envelope-from asomers@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 B99D37CF23; Sat, 21 Jul 2018 23:54:40 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9581025EE4; Sat, 21 Jul 2018 23:54:40 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6LNseEB030885; Sat, 21 Jul 2018 23:54:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6LNsexk030884; Sat, 21 Jul 2018 23:54:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807212354.w6LNsexk030884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 21 Jul 2018 23:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336594 - head/contrib/netbsd-tests/fs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/contrib/netbsd-tests/fs X-SVN-Commit-Revision: 336594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2018 23:54:41 -0000 Author: asomers Date: Sat Jul 21 23:54:40 2018 New Revision: 336594 URL: https://svnweb.freebsd.org/changeset/base/336594 Log: Fix tmpfs detection in the sys/fs/tmpfs tests This code was originally written for NetBSD. r306031 tried to adapt it to FreeBSD, but didn't correctly handle the case that tmpfs was available, but not already loaded. Fix the logic to load the module if necessary. The tmpfs tests shouldn't be skipped anymore. Also, fix a comment that was dislocated by r306031. Reported by: Jenkins MFC after: 2 weeks Modified: head/contrib/netbsd-tests/fs/h_funcs.subr Modified: head/contrib/netbsd-tests/fs/h_funcs.subr ============================================================================== --- head/contrib/netbsd-tests/fs/h_funcs.subr Sat Jul 21 22:54:43 2018 (r336593) +++ head/contrib/netbsd-tests/fs/h_funcs.subr Sat Jul 21 23:54:40 2018 (r336594) @@ -43,17 +43,17 @@ require_fs() { atf_require_prog mount_${name} atf_require_prog umount - # if we have autoloadable modules, just assume the file system - atf_require_prog sysctl # Begin FreeBSD if true; then - if kldstat -m ${name}; then + if kldload -n ${name}; then found=yes else found=no fi else # End FreeBSD + # if we have autoloadable modules, just assume the file system + atf_require_prog sysctl autoload=$(sysctl -n kern.module.autoload) [ "${autoload}" = "1" ] && return 0