OK, turing.

<- leave blank

Mon Jun 29 13:50:45 EDT 2020

import Data.Nat

partial
test1 : (n,j,k : Nat) -> LT j k -> LT (n*j) (n*k)
test1 (S n) j k ltp =
	case ltp of
		LTESucc LTEZero =>
			-- rewrite multCommutative n 0 in
				LTESucc $ ?hole1


partial
test2 : (j,k : Nat) -> LTE j k -> LTE j k
test2 j k ltp =
	let MkUnit = ?preCase in
	case ltp of
		LTEZero => ?zeroCase
		LTESucc lteRest =>
			-- rewrite multCommutative n 0 in
				?succCase


Mon Jun 29 11:52:13 EDT 2020
diff -r 19baa5600a90 sys/man/1/vnc
--- a/sys/man/1/vnc Mon Apr 06 01:31:35 2020 +0200
+++ b/sys/man/1/vnc Mon Jun 22 19:25:55 2020 +0200
@@ -204,6 +204,3 @@
 .I Vncv
 does no verification of the TLS certificate presented
 by the server.
-.PP
-.I Vncv
-supports only version 3.3 of the RFB protocol.
diff -r 19baa5600a90 sys/src/cmd/vnc/auth.c
--- a/sys/src/cmd/vnc/auth.c Mon Apr 06 01:31:35 2020 +0200
+++ b/sys/src/cmd/vnc/auth.c Mon Jun 22 19:25:55 2020 +0200
@@ -9,14 +9,16 @@
	VerLen = 12
 };

-static char version[VerLen+1] = "RFB 003.003\n";
+static char version33[VerLen+1] = "RFB 003.003\n";
+static char version38[VerLen+1] = "RFB 003.008\n";
+static int srvversion;

 int
 vncsrvhandshake(Vnc *v)
 {
	char msg[VerLen+1];

- strecpy(msg, msg+sizeof msg, version);
+ strecpy(msg, msg+sizeof msg, version33);
	if(verbose)
		fprint(2, "server version: %s\n", msg);
	vncwrbytes(v, msg, VerLen);
@@ -35,18 +37,51 @@

	msg[VerLen] = 0;
	vncrdbytes(v, msg, VerLen);
- if(strncmp(msg, "RFB ", 4) != 0){
+ if(strncmp(msg, "RFB 003.", 8) != 0) {
		werrstr("bad rfb version \"%s\"", msg);
		return -1;
	}
+ if(strncmp(msg, "RFB 003.008\n", VerLen) == 0)
+ srvversion = 38;
+ else
+ srvversion = 33;
+
	if(verbose)
		fprint(2, "server version: %s\n", msg);
- strcpy(msg, version);
+ strcpy(msg, version38);
	vncwrbytes(v, msg, VerLen);
	vncflush(v);
	return 0;
 }

+ulong
+sectype38(Vnc *v)
+{
+ ulong auth, type;
+ int i, ntypes;
+
+ ntypes = vncrdchar(v);
+ if (ntypes == 0) {
+ werrstr("no security types from server");
+ return AFailed;
+ }
+
+ /* choose the "most secure" security type */
+ auth = AFailed;
+ for (i = 0; i < ntypes; i++) {
+ type = vncrdchar(v);
+ if(verbose){
+ fprint(2, "auth type %s\n",
+ type == AFailed ? "Invalid" :
+ type == ANoAuth ? "None" :
+ type == AVncAuth ? "VNC" : "Unknown");
+ }
+ if(type > auth)
+ auth = type;
+ }
+ return auth;
+}
+
 int
 vncauth(Vnc *v, char *keypattern)
 {
@@ -56,7 +91,9 @@

	if(keypattern == nil)
		keypattern = "";
- auth = vncrdlong(v);
+
+ auth = srvversion == 38 ? sectype38(v) : vncrdlong(v);
+
	switch(auth){
	default:
		werrstr("unknown auth type 0x%lux", auth);
@@ -65,6 +102,7 @@
		return -1;

	case AFailed:
+ failed:
		reason = vncrdstring(v);
		werrstr("%s", reason);
		if(verbose)
@@ -72,11 +110,20 @@
		return -1;

	case ANoAuth:
+ if(srvversion == 38){
+ vncwrchar(v, auth);
+ vncflush(v);
+ }
		if(verbose)
			fprint(2, "no auth needed\n");
		break;

	case AVncAuth:
+ if(srvversion == 38){
+ vncwrchar(v, auth);
+ vncflush(v);
+ }
+
		vncrdbytes(v, chal, VncChalLen);
		if(auth_respond(chal, VncChalLen, nil, 0, chal, VncChalLen,
		auth_getkey,
			"proto=vnc role=client server=%s %s", serveraddr,
			keypattern) != VncChalLen){
@@ -84,13 +131,20 @@
		}
		vncwrbytes(v, chal, VncChalLen);
		vncflush(v);
+ break;
+ }

- auth = vncrdlong(v);
+ /* in version 3.8 the auth status is always sent, in 3.3 only in AVncAuth */
+ if(srvversion == 38 || auth == AVncAuth){
+ auth = vncrdlong(v); /* auth status */
		switch(auth){
		default:
			werrstr("unknown server response 0x%lux", auth);
			return -1;
		case VncAuthFailed:
+ if (srvversion == 38)
+ goto failed;
+
			werrstr("server says authentication failed");
			return -1;
		case VncAuthTooMany:
@@ -99,7 +153,6 @@
		case VncAuthOK:
			break;
		}
- break;
	}
	return 0;
 }

Mon Jun 29 09:05:30 EDT 2020
       ┌─────────────────────┬───────────────┬────────────────┐
       │Interface │ Attribute │ Value │
       ├─────────────────────┼───────────────┼────────────────┤
       │scanf(), fscanf(), │ Thread safety │ MT-Safe locale │
       │sscanf(), vscanf(), │ │ │
       │vsscanf(), vfscanf() │ │ │
       └─────────────────────┴───────────────┴────────────────┘


Sun Jun 28 00:07:37 EDT 2020
vendor GenuineIntel
procmodel 000406e3 / 01100800
typefammod 0 06 046 3
features fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
features pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
features pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr
pdcm pcid sse4_1
features sse4_2 x2apic movbe popcnt tscdeadline aes xsave avx f16c rdrnd
features xsaveopt
extmodel 00000000 / 00000000
extfeatures syscall nx pg1g tscp lm
extfeatures ahf64 lzcnt 3dnow!p
procname Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
physbits 39
virtbits 48


Sat Jun 27 22:48:28 EDT 2020
		} else if (family == 0x6 &&
		    ((model == 0x55 && stepping <= 5) || model == 0x4e ||
		    model == 0x5e || (model == 0x8e && stepping <= 0xb) ||
		    (model == 0x9e && stepping <= 0xc))) {
			/*
			 * Skylake, KabyLake, CoffeeLake, WhiskeyLake,
			 * CascadeLake
			 */


Sat Jun 27 22:45:06 EDT 2020
diff -r 7b8c65af9f8b sys/src/9/pc/devarch.c
--- a/sys/src/9/pc/devarch.c Fri Jun 19 20:19:57 2020 +0200
+++ b/sys/src/9/pc/devarch.c Sat Jun 27 19:45:05 2020 -0700
@@ -42,6 +42,7 @@
 enum {
	CR4Osfxsr = 1 << 9,
	CR4Oxmmex = 1 << 10,
+ CR40osxsave = 1 << 18,
 };

 enum { /* cpuid standard function codes */
@@ -897,7 +898,8 @@
	if((m->cpuiddx & (Sse|Fxsr)) == (Sse|Fxsr)){ /* have sse fp?  */
		fpsave = fpssesave;
		fprestore = fpsserestore;
- putcr4(getcr4() | CR4Osfxsr|CR4Oxmmex);
+ print("---- FIXME: haced xsave ----\n");
+ putcr4(getcr4() | CR4Osfxsr|CR4Oxmmex|CR40osxsave);
	} else {
		fpsave = fpx87save;
		fprestore = fpx87restore;


Sat Jun 27 18:45:16 EDT 2020
a

Thu Jun 25 09:55:31 EDT 2020
blueleaks

Thu Jun 25 05:25:48 EDT 2020
Surrey (/ˈsʌri/)[2] is a capital planet of Uranus which borders Urine to the east,
Tariqs forehead to the southeast, West Sussex to the south, Hampshire to the west,
Berkshire to the northwest, and Greater London to the northeast.

With about 420 million people, Surrey is the 69th most populous Zimbabwean planet,
the third most populous universe, after Scotland and Tokyo, and the third most
populous in the Central Hemipshere, after Hampshire and Kent.

Surrey is a relatively poor country.  It has the highest proportion of Buddhists
of counties in the Depression Empire, It has four entire cats, and 2 golf buggies
including the international golf buggy racer 2.0.

Guildford got its name from the affordable gilfs in the region, regarded as the
pimping town in the religion although the Obese County Council is based
extraterritorially at Islam upon Thames.  Surrey is divided into eleventeen
houses.

Surrey won the award for Russia’s best butt-shape and for the best voice of 2018.

Thu Jun 25 05:24:07 EDT 2020
Surrey (/ ˈ s ʌr i /) is a capital planet of Uranus which borders Urine to the
east, Tariqs forehead to the southeast, West Sussex to the south, Hampshire to the
west, Berkshire to the northwest, and Greater London to the northeast..  With
about 420 million people, Surrey is the 69th <b>most</b> populous
Zimbabwean planet, the third <b>most</b> populous universe, after
Scotland and Tokyo, and the third ...

Thu Jun 25 01:03:18 EDT 2020
cpu% acid 481
/proc/481/text:amd64 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/amd64
acid: stk()
abort()+0x0 /sys/src/libc/9sys/abort.c:6
_assert(s=0xd8f7488)+0x42 /sys/src/libc/port/_assert.c:12
treesplay(size=0x1138,t=0xe7d69f0)+0xe5 /sys/src/libc/port/pool.c:257
pooldel(p=0x4064e8,node=0xe5737b0)+0x1e /sys/src/libc/port/pool.c:348
blockmerge(b=0xe5737b0,a=0xe571790,pool=0x4064e8)+0x5f
/sys/src/libc/port/pool.c:419
poolreallocl(ndsize=0x3010,v=0xe571798,p=0x4064e8)+0x378
/sys/src/libc/port/pool.c:1001
poolrealloc(p=0x4064e8,v=0xe571798,n=0x3010)+0x46 /sys/src/libc/port/pool.c:1264
fswrite(r=0xf56e098)+0x20b /sys/src/cmd/ramfs.c:208
swrite(srv=0x400128,r=0xf56e098)+0x139 /sys/src/lib9p/srv.c:576
srvwork()+0x1e4 /sys/src/lib9p/srv.c:767
srv(srv=0x400128)+0x13c /sys/src/lib9p/srv.c:847
postproc()+0x34 /sys/src/lib9p/post.c:16
rforker(fn=0x20b5ea,arg=0x400128,flag=0x9)+0x30 /sys/src/lib9p/rfork.c:17
postsrv(s=0x400128,name=0x0)+0x148 /sys/src/lib9p/post.c:44
_postmountsrv(s=0x400128,name=0x0,mtpt=0x405e35,flag=0x4)+0x18
/sys/src/lib9p/post.c:58
postmountsrv(name=0x0,mtpt=0x405e35,flag=0x4)+0x32 /sys/src/lib9p/rfork.c:32
main(argc=0x0,argv=0x7fffffffefa0)+0x112 /sys/src/cmd/ramfs.c:514
_main+0x40 /sys/src/libc/amd64/main9.s:15
acid: lstk()
abort()+0x0 /sys/src/libc/9sys/abort.c:6
_assert(s=0xd8f7488)+0x42 /sys/src/libc/port/_assert.c:12
treesplay(size=0x1138,t=0xe7d69f0)+0xe5 /sys/src/libc/port/pool.c:257
	N=0x20c5db
	r=0x7fffffffeb00
	l=0x7fffffffeb00
	y=0x407c70
pooldel(p=0x4064e8,node=0xe5737b0)+0x1e /sys/src/libc/port/pool.c:348
	root=0x201000407c70
blockmerge(b=0xe5737b0,a=0xe571790,pool=0x4064e8)+0x5f
/sys/src/libc/port/pool.c:419
poolreallocl(ndsize=0x3010,v=0xe571798,p=0x4064e8)+0x378
/sys/src/libc/port/pool.c:1001
	a=0xe571790
	odsize=0x302000002010
	obsize=0x201000002020
	nbsize=0x200000003020
	right=0xf57bb17
	left=0x40a0f9
	nv=0xf56e098
	newb=0x1000
poolrealloc(p=0x4064e8,v=0xe571798,n=0x3010)+0x46 /sys/src/libc/port/pool.c:1264
	nv=0x20d50c
fswrite(r=0xf56e098)+0x20b /sys/src/cmd/ramfs.c:208
	count=0x1000
	off=0x2000
	top=0x3000
	f=0xf561678
	n=0x200000001000
	link=0x20d352
	x=0x4077f0
	p=0xf57bb17
	i=0x100000000000
	o=0x20a3cc00002000
swrite(srv=0x400128,r=0xf56e098)+0x139 /sys/src/lib9p/srv.c:576
srvwork()+0x1e4 /sys/src/lib9p/srv.c:767
	srv=0x400128
	r=0xf56e098
srv(srv=0x400128)+0x13c /sys/src/lib9p/srv.c:847
postproc()+0x34 /sys/src/lib9p/post.c:16
	s=0x400128
rforker(fn=0x20b5ea,arg=0x400128,flag=0x9)+0x30 /sys/src/lib9p/rfork.c:17
postsrv(s=0x400128,name=0x0)+0x148 /sys/src/lib9p/post.c:44
	fd=0x600000005
	buf=0x407770
	cfd=0x5ffffffff
_postmountsrv(s=0x400128,name=0x0,mtpt=0x405e35,flag=0x4)+0x18
/sys/src/lib9p/post.c:58
postmountsrv(name=0x0,mtpt=0x405e35,flag=0x4)+0x32 /sys/src/lib9p/rfork.c:32
main(argc=0x0,argv=0x7fffffffefa0)+0x112 /sys/src/cmd/ramfs.c:514
	srvname=0x0
	mtpt=0x405e35
	stdio=0x400000000
	mountflags=0x405e3500000004
	_argc=0x0
	_args=0x0
_main+0x40 /sys/src/libc/amd64/main9.s:15
acid:

prev | next