logs archiveIRC Archive / Undernet / #asm / 2006 / February / 2 / 1
tiocsti
hmm
lemon: {1} ./bpftest
buffer length = 32768
select returned 1
FD_ISSET returned 8
lemon: {2}
sorry dbtid, seems to work ok on netbsd
do you want my sample program?
to verify it working on openbsd
http://sparky.insomnia.org/~brian/bpftest.c change the strcpy to reflect the interface on your system
__exe
(Action) slaps Ashe`
Toro
dam,n
leona was here
and i missed her
:(((
lonetron_
if an error is print out to the standard out is there any way to figure out wich process generated it for unix/freebsd?
any kind of command or programming concept to get list of processes recently to write out to the stdout?
neonfreon
you'd have to modify the kernel to do it probably
lonetron_
alright im of to invent the first computer program to freeze off planter warts
__exe
Toro but, but, Leona is a girl.
You like guys.
Toro
leona s still hot
__exe
She's nice.
For all the joy you brought to my life (??)
Buu. I have to do some php coding. I actually hate php, but I promissed a friend I'd help him with his project.
Brb.
         

dbtid
tiocsti: thanks; i'll try that.
Toro
gwgwgwg¨
need to put the vodka back into the freezer
dbtid
tiocsti: ok, under openbsd, it doesn't work, no matter what interface I use (lo0 or fxp0)
so it's definitely some difference between netbsd and openbsd
EwIck
yo
dbtid
hey
tiocsti
dbtid, did you see my msgs before
dbtid
yes, i just responded
tiocsti
what did you say
dbtid
so it's definitely some difference between netbsd and openbsd
tiocsti: ok, under openbsd, it doesn't work, no matter what interface I use (lo0 or fxp0)
tiocsti
so my program failed under openbsd? ok
dbtid
yeah, it did
tiocsti
does openbsd have the same sorta code in bpf.c?
dbtid
i had to change the headers a bit; needed an extra one
let me look
regarding the events?
tiocsti
yeah
revents variable
as far as i can tell, in netbsd it is basically always returning true for writes
dbtid
int bpfpoll () has int revents;
revents = events & (POLLIN | POLLRDNORM);
if (revents == 0)
return (0); /* only support reading */
tiocsti
well thats not good
dbtid
nothing about select(2)
tiocsti
thats why it doesnt work
dbtid
ok.
is select built on top of poll?
tiocsti
select and poll use the same swcdev entrypoint (the one for poll)
         

dbtid
ok, which both point to bpfpoll.
tiocsti
yeah
dbtid
ok.
tiocsti
only thing i can tell you is to just assume you can always write
dbtid
well, i can't do that in the code :/
tiocsti
in netbsd, even with the select, thats the assumption you're working under
since it doesnt check anything
that, or you can fix bpf.c
is that possible?
dbtid
i suppose i could rewrite his code with a little BSD specific stuff
oh, *I* can. i don't know if he'll be able to on his host.
tiocsti
it's using bpf, it's already pretty bsd specific aint it?
dbtid
kind of kldgy :)
yes, but your netbsd is different from my openbsd.
but what i can do is rewrite the function that calls select
tiocsti
only in that bpfpoll pretends to support writing in netbsd
dbtid
what does it do in netbsd?
tiocsti
it doesnt really support it though
netbsd basically looks at events
dbtid
i'll have to talk to him about it
tiocsti
if events is for writes, it sets revents to > 0 and returns
basically
dbtid
oh i know what it was
in his code, he mixes files with sockets
tiocsti
netbsd doesnt really support write selects, it always returns true
dbtid
so i can't just willy-nilly set the write bit all the time
interesting: bpfpoll isn't called by anyone, and a
find . -print | xargs grep bpfpoll
only shows me bpf.c
there's no external linkage being done
i wonder how that all works
tiocsti
its indirectly called
dbtid
but SOMEWHERE there has to be a linkage
tiocsti
no, thats the local function name
its assigned to a function pointer
and its called via function pointer
dbtid
yes. and i should see that assignment SOMEWHERE.
tiocsti
the assignment is in bpf.c
dbtid
s->poll = bpfpoll;
i don't see it anywhere
#349> find . -print | xargs grep bpfpoll
./net/bpf.c:int bpfpoll(dev_t, int, struct proc *);
./net/bpf.c:bpfpoll(dev_t dev, int events, struct proc *p)
tiocsti
s->poll is what you should see
dbtid
that's from /usr/src/sys
tiocsti
thats what it's called externally
dbtid
somehow i'm not being clear: somewhere an assignment including the name 'bpfpoll' must be made.
tiocsti
dbtid> s->poll = bpfpoll;
dbtid
and i'm saying: there's no such line of source in all of /usr/src/sys
that's what's weird.
tiocsti
i think there's some code at compile time that manages that
dbtid
ok; that makes sense.
tiocsti
based on the 2 structures (fileops and cdevsw)
dbtid
i will rebuild my kernel
what fun
i haven't done a kernel config on this kernel yet
voider
http://voider.datxos.com/pub/darkseed%20-%20rain.mp3
tiocsti
i think it parses those somehow and adds em to a table
dbtid
so i gotta go to openbsd.org and relearn the kernel build process
tiocsti
nah just edit a kernel config file
run config on it, then make depend and make
its cake
dbtid
i'm just going to use GENERIUUC
GENERIC
tiocsti
yeah that'll be fine
dbtid
yeah, but doesn't it have to be done somewhere special?
not at /usr/src/sys ?
the config has to be done in one place or something weird
tiocsti
config can be done anywhere
the make depend and make install is in its own dir tho
config will tell you where that is
dbtid
um
'config' looks for CONFIG
tiocsti
config GENERIC
dbtid
GENERIC:8: syntax error
GENERIC:8: cannot proceed without machine specifier
tiocsti
well that's odd
dbtid
dbtid# pwd
/usr/src/sys/conf
tiocsti
hmm thats not the right place
dbtid
yeah
i just remembered ;)
gotta be in /usr/src/sys/arch/sparc64/conf
tiocsti
ah yer doing it on a sparc?
dbtid
yeah sparc64
OpenBSD dbtid.homeunix.net 3.7 GENERIC#431 sparc64
got it for free :)
tiocsti
nice
dbtid
3/4 GB of RAM
tiocsti
hmm
dbtid
a few SCSI disks and CDROMs
tiocsti
can you do me a favor
dbtid
sure :)
tiocsti
compile this:
« prev 1 2 3 4 next »