From owner-svn-src-all@freebsd.org Fri Apr 21 06:10:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28C3BD46ED4; Fri, 21 Apr 2017 06:10:34 +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 E25F3DAD; Fri, 21 Apr 2017 06:10:33 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2003:cd:6bd7:7400:8f3:efd8:6932:24f0] (p200300CD6BD7740008F3EFD8693224F0.dip0.t-ipconnect.de [IPv6:2003:cd:6bd7:7400:8f3:efd8:6932:24f0]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 3E3AD721E280D; Fri, 21 Apr 2017 08:10:31 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r317208 - head/sys/netinet From: Michael Tuexen In-Reply-To: <20170421131041.G966@besplex.bde.org> Date: Fri, 21 Apr 2017 08:10:30 +0200 Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8BBC38A0-DDBA-4C04-9654-98755B3E4E13@freebsd.org> References: <201704210143.v3L1h99s037727@slippy.cwsent.com> <20170421131041.G966@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.3273) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2017 06:10:34 -0000 > On 21. Apr 2017, at 05:16, Bruce Evans wrote: >=20 > On Thu, 20 Apr 2017, Cy Schubert wrote: >=20 > Please trim quotes. >=20 >> In message <201704201919.v3KJJYko052651@repo.freebsd.org>, Michael = Tuexen >> write >> s: >=20 > [>> ... 5 lines trimmed] >=20 >>> Log: >>> Syncoockies can be used in combination with the syncache. If the = cache >>> overflows, syncookies are used. >=20 > [>> ... 16 lines trimmed] >=20 >>> Modified: head/sys/netinet/tcp_syncache.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/tcp_syncache.c Thu Apr 20 19:14:52 2017 = (r31720 >>> 7) >>> +++ head/sys/netinet/tcp_syncache.c Thu Apr 20 19:19:33 2017 = (r31720 >>> 8) >>> @@ -260,6 +260,7 @@ syncache_init(void) >>> &V_tcp_syncache.hashbase[i].sch_mtx, 0); >>> V_tcp_syncache.hashbase[i].sch_length =3D 0; >>> V_tcp_syncache.hashbase[i].sch_sc =3D &V_tcp_syncache; >>> + V_tcp_syncache.hashbase[i].sch_last_overflow =3D = INT64_MIN; >> ... >> This line produced the following on i386: >>=20 >> /opt/src/svn-current/sys/netinet/tcp_syncache.c:263:50: error: = implicit >> conversion from 'long long' to 'time_t' (aka 'int') changes value = from >> -9223372036854775808 to 0 [-Werror,-Wconstant-conversion] >> V_tcp_syncache.hashbase[i].sch_last_overflow =3D = INT64_MIN; >> ~ = ^~~~~~~~~ >> ./x86/_stdint.h:91:41: note: expanded from macro 'INT64_MIN' >> #define INT64_MIN (-0x7fffffffffffffffLL-1) >> ~~~~~~~~~~~~~~~~~~~~~^~ >>=20 >> Looks like it needs a time_t cast. >=20 > A cast would just break the warning. INT64_MIN has nothing to do with > time_t. The expression (time_t)INT64_MIN would be more obviously = garbage > since in the above it is not clear that sch_last_overflow has a type > unrelated to the constant. Fixed in https://svnweb.freebsd.org/changeset/base/317244 >=20 > INT64_MIN is also broken if time_t is 64 bits but unsigned. Then it = is > converted to half of plus infinity instead of the intended minus = infinity. The patch assumes that time_t is signed, which is true for FreeBSD on = all platforms. Or am I missing a platform? Best regards Michael >=20 > Bruce