* [9front] kbdfs broken after new kernel build
@ 2020-12-22 8:04 umbraticus
2020-12-22 8:25 ` umbraticus
0 siblings, 1 reply; 8+ messages in thread
From: umbraticus @ 2020-12-22 8:04 UTC (permalink / raw)
To: 9front
After recent changes (last working kernel was built 9 Dec),
this function breaks kbdfs:
fn focus{
echo unhide >/dev/wctl >[2]/dev/null
echo current >/dev/wctl
if(test -f /dev/kbdin)
echo -n >/dev/kbdin
}
Debugging without being able to type is kinda difficult...
broke(1) hangs and lstk gives me this:
/proc/83/text:amd64 plan 9 executable
<stdin>:1: (error) setproc: open /proc/83/mem: '/proc/83/mem' permission denied
/sys/lib/acid/port
/sys/lib/acid/amd64
acid: <stdin>:2: (error) indir: can't translate address 0x90
acid:
umbraticus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9front] kbdfs broken after new kernel build
2020-12-22 8:04 [9front] kbdfs broken after new kernel build umbraticus
@ 2020-12-22 8:25 ` umbraticus
2020-12-22 9:04 ` umbraticus
0 siblings, 1 reply; 8+ messages in thread
From: umbraticus @ 2020-12-22 8:25 UTC (permalink / raw)
To: 9front
hmm, this doesn't look right:
---w------- M 36 '' '' 0 Jan 1 1970 /dev/kbin
umbraticus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9front] kbdfs broken after new kernel build
2020-12-22 8:25 ` umbraticus
@ 2020-12-22 9:04 ` umbraticus
2020-12-22 9:23 ` umbraticus
2020-12-22 15:38 ` cinap_lenrek
0 siblings, 2 replies; 8+ messages in thread
From: umbraticus @ 2020-12-22 9:04 UTC (permalink / raw)
To: 9front
; ls -l /dev | grep ''''''
--rw------- M 36 '' '' 0 Jan 1 1970 /dev/cons
--rw------- M 36 '' '' 0 Jan 1 1970 /dev/consctl
--rw------- M 36 '' '' 0 Jan 1 1970 /dev/kbd
---w------- M 36 '' '' 0 Jan 1 1970 /dev/kbdin
---w------- M 36 '' '' 0 Jan 1 1970 /dev/kbin
--rw------- M 36 '' '' 0 Jan 1 1970 /dev/kbmap
test -f /dev/kbin (or kbdin or kbmap) is enough to do it.
I guess it has something to do with this change:
changeset: 8204:306d3bc0a697
parent: 8202:4b461532e737
user: cinap_lenrek@felloff.net
date: Mon Dec 21 22:03:46 2020 +0100
summary: kernel: make addbroken() static, remove misleading Proc* argument
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9front] kbdfs broken after new kernel build
2020-12-22 9:04 ` umbraticus
@ 2020-12-22 9:23 ` umbraticus
2020-12-22 12:57 ` boehm.igor
2020-12-22 15:38 ` cinap_lenrek
1 sibling, 1 reply; 8+ messages in thread
From: umbraticus @ 2020-12-22 9:23 UTC (permalink / raw)
To: 9front
err, rather, this change:
changeset: 8191:8eefeaac58c7
user: cinap_lenrek@felloff.net
date: Sat Dec 19 15:52:41 2020 +0100
summary: aux/kbdfs: use getuser() from libc
can confirm that hg revert -r 8a74c22c68dd kbdfs.c fixes the problem.
umbraticus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9front] kbdfs broken after new kernel build
2020-12-22 9:23 ` umbraticus
@ 2020-12-22 12:57 ` boehm.igor
2020-12-22 15:37 ` cinap_lenrek
0 siblings, 1 reply; 8+ messages in thread
From: boehm.igor @ 2020-12-22 12:57 UTC (permalink / raw)
To: 9front
The diff has added a static variable 'user' to the fillstat() function:
1.6 char *mntpt = "/dev";
1.7+char *user;
...
1.37 static int
1.38 fillstat(ulong qid, Dir *d)
1.39 {
1.40+ static char *user;
^^^^^^^^^^^^^^^^^^
1.41 struct Qtab *t;
1.42
1.43 memset(d, 0, sizeof *d);
1.44- d->uid = getauser();
1.45- d->gid = getauser();
1.46+ d->uid = d->gid = user;
The function static variable user shadows the global user variable and is not being initialised:
kbdfs.c:107 char *user;
...
kbdfs.c:1257 static int
kbdfs.c:1258 fillstat(ulong qid, Dir *d)
kbdfs.c:1259 {
kbdfs.c:1260 static char *user;
^^^^^^^^^^^^^^^^^^
kbdfs.c:1261 struct Qtab *t;
kbdfs.c:1262
kbdfs.c:1263 memset(d, 0, sizeof *d);
kbdfs.c:1264 d->uid = d->gid = user;
^^^^^^^^^^^^^^^^^^^^^^^
Maybe line 'kbdfs.c:1260' is the culprit?
Cheers,
Igor
> err, rather, this change:
>
> changeset: 8191:8eefeaac58c7
> user: cinap_lenrek@felloff.net
> date: Sat Dec 19 15:52:41 2020 +0100
> summary: aux/kbdfs: use getuser() from libc
>
> can confirm that hg revert -r 8a74c22c68dd kbdfs.c fixes the problem.
>
> umbraticus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9front] kbdfs broken after new kernel build
2020-12-22 9:04 ` umbraticus
2020-12-22 9:23 ` umbraticus
@ 2020-12-22 15:38 ` cinap_lenrek
1 sibling, 0 replies; 8+ messages in thread
From: cinap_lenrek @ 2020-12-22 15:38 UTC (permalink / raw)
To: 9front
no.
--
cinap
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-22 18:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 8:04 [9front] kbdfs broken after new kernel build umbraticus
2020-12-22 8:25 ` umbraticus
2020-12-22 9:04 ` umbraticus
2020-12-22 9:23 ` umbraticus
2020-12-22 12:57 ` boehm.igor
2020-12-22 15:37 ` cinap_lenrek
2020-12-22 18:19 ` umbraticus
2020-12-22 15:38 ` cinap_lenrek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).