Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Apr 2020 16:13:22 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360155 - head/sys/sys
Message-ID:  <202004211613.03LGDMoV062521@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Tue Apr 21 16:13:22 2020
New Revision: 360155
URL: https://svnweb.freebsd.org/changeset/base/360155

Log:
  kevent32: fix the split of data into data1/data2
  
  The current situation results in intermittent breakage if data gets split up
  with the sign bit set on the data1 half of it, as PAIR32TO64 will then:
  data1 | (data2 << 32) -> resulting in data1 getting sign-extended when it's
  implicitly widened and clobbering the result. AFAICT, there's no compelling
  reason for these to be signed.
  
  This was most exposed by flakiness in the kqueue timer tests under compat32
  after the ABSTIME test got switched over to using a better clock and
  microseconds.
  
  Reviewed by:	kib
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D24518

Modified:
  head/sys/sys/event.h

Modified: head/sys/sys/event.h
==============================================================================
--- head/sys/sys/event.h	Tue Apr 21 16:01:44 2020	(r360154)
+++ head/sys/sys/event.h	Tue Apr 21 16:13:22 2020	(r360155)
@@ -111,7 +111,7 @@ struct kevent32 {
 #ifndef __amd64__
 	uint32_t	pad0;
 #endif
-	int32_t		data1, data2;
+	uint32_t	data1, data2;
 	uint32_t	udata;		/* opaque user data identifier */
 #ifndef __amd64__
 	uint32_t	pad1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004211613.03LGDMoV062521>