<kazinsal>
also jesus christ mother nature will you stop with this wind? my power's gone out three times so far today
<geist>
yeah right?
<geist>
it's windy here too, though not that bad
<mjg>
so i just bought a cologne at an internet shop i have never used before
<mjg>
only after that i ran into some reviews claiming it sells *fake* products
<mjg>
most reviews are positive, but that may be fakes as well
<mjg>
now i'm genuinely curious :d
zid has quit [Ping timeout: 264 seconds]
<geist>
well, i guess if it doesn't smell terrible then <shrug>
<geist>
i mean it's just chemicals
<geist>
shouldn't pay more than a few bucks for it anyway
<mjg>
if someone told you a computer is a computer, what's the big deal
<mjg>
what would you say
<geist>
well, like i said if it smells right then it performs as expected
<geist>
it'd be like buying a perfect gucci bag rip off that you can't tell the diff
<mjg>
given that people claim it's fake i'm assuming it does not
<geist>
yah, that's the test
vinleod has joined #osdev
vdamewood has quit [Ping timeout: 256 seconds]
<geist>
So question: i have 22GB of toolchain tarballs sitting on my web server
<geist>
if i were to try to find another place for that to go with my github project one strategy is to create a repo with them
<geist>
but really 22GB is ridiculous. Obviously if you did a shallow check out that’d help (andi only keep the current ones on the main branch)
<geist>
but lots of folks might not know that
<geist>
can still fetch directly from github for that
<geist>
another strategyis toload it into AWS or something, and have direct references to it
<geist>
though would need to compute what the rate is for that
<geist>
also re: git i wonder if github actually has limits to the size of things you can load into it like that
<geist>
also there’s git LFS, but i dont think that’s a thing that most folks knowhow to use, and all it really does is cause the client to load it from somewhere else, so it still has to be hosted
<geist>
i dont *need* to move it, it just seems a little wasteful to pay for a whole hosted VM more or less just to serve these files
<geist>
and probably more secure/etc to put it somewhere else
zid has joined #osdev
cow321 has joined #osdev
m3a has quit [Ping timeout: 264 seconds]
<adder>
If I have a structure like: struct idt_ptr { uint16_t limit; uintptr_t base; }, and am calling an assembly routine passing in idt_load((uintptr_t)&idt_ptr)) (where idt_ptr is an instance of the said struct), and then in asm, `lidt 4(%esp)`, is this expected to work or am I being stupid somewhere along the way?
<adder>
I'm seeing a weird limit, definitely not what I passed in.
<adder>
The struct is packed.
m3a has joined #osdev
lentement has joined #osdev
netbsduser has joined #osdev
vinleod has quit [Quit: Life beckons]
Matt|home has joined #osdev
navi has quit [Quit: WeeChat 4.1.2]
netbsduser has quit [Ping timeout: 268 seconds]
lentement has quit [Remote host closed the connection]
netbsduser has joined #osdev
<adder>
Now I seem to be getting interrupt 20.
<adder>
Is this what I want to look at? check_exception old: 0xffffffff new 0x6
lentement has joined #osdev
lentement has quit [Ping timeout: 256 seconds]
netbsduser has quit [Ping timeout: 256 seconds]
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
lentement has joined #osdev
xFCFFDFFFFEFFFAF has joined #osdev
sbalmos has quit [Ping timeout: 260 seconds]
sbalmos has joined #osdev
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
netbsduser has joined #osdev
lentement has quit [Remote host closed the connection]
netbsduser has quit [Ping timeout: 260 seconds]
lentement has joined #osdev
lentement has quit [Ping timeout: 256 seconds]
elderK has quit [Quit: WeeChat 4.1.1]
lentement has joined #osdev
<adder>
I'm out of ideas. I'm getting 0xd somehow.
lentement has quit [Remote host closed the connection]
netbsduser has quit [Ping timeout: 255 seconds]
lentement has joined #osdev
lentement has quit [Remote host closed the connection]
<adder>
So, I just mapped 0 through 31 to a routine printing its number. First thing I see is 8, then a bunch of 13s. I'm not seeing that an 8 could be just a masked IRQ0.
<adder>
s/not/now/
ski has joined #osdev
<geist>
adder: from your description the lidt should work (if you're 32bit)
<kazinsal>
geist: re the toolchain tarballs, S3 pricing is about two cents a gig for storage and nine cents a gig for S3->internet transfers (first 100 gig of S3->internet per month is free)
<kazinsal>
(we're getting big into AWS at work so I've been fiddling with pricing stuff a lot lately)
<geist>
i haven't looked into it but i guess the way a file maps to a URL is sane, or is it just random uuid?
<kazinsal>
yeah, it's sane
<kazinsal>
it stores the original object name etc
<geist>
as much as i dont mind linode i just dont particularly see why i should keep paying $20 for it when i dont really use it for much anymore but this
<kazinsal>
if you configure the S3 bucket as a static web endpoint you get something like bucket-name.s3-website.region.amazonaws.com/object-name
<kazinsal>
not sure what the TLS support is like though
<kazinsal>
you miiiiight need to front it with amazon cloudfront
<kazinsal>
and use the rest API endpoint for the S3 bucket
netbsduser has joined #osdev
<kazinsal>
but cloudfront is functionally free -- think it's something like 1 TB out/month at no cost
<geist>
kk
Matt|home has quit [Ping timeout: 268 seconds]
Matt|home has joined #osdev
<adder>
geist: Yeah, it seems to be loaded, the limit seems correct, but as soon as I enable interrupts, I'm greeted with an eight then thirteens.
<adder>
So I'm wondering what are the chances that this is just irq0, since I haven't reprogrammed the interrupt controller yet.
<geist>
one way to validate that it's loaded right is to look at what the cpu thinks. since you're in qemu, at the console do `info registers`
<geist>
it should show you the hidden registers it loaded with lidt
<geist>
and yes it very much could be irq 0
<geist>
you need to at least hard disable the PIC
netbsduser has quit [Ping timeout: 264 seconds]
<adder>
This is what I see when I run it with -d int: IDT= 00100e80 000007ff
<geist>
are you enabling interrupts?
<adder>
Yes.
<geist>
ie, sti?
<adder>
Yep.
<geist>
ah then that's probably it (irq 0)
<geist>
if it fires the instant you enable interrupts, then there was probably an exteranl irq waiting
<geist>
all the subsequent 13s are irrelevant after the 8 fires
<adder>
Great. Then I know what I need to figure out.
<adder>
Thanks, geist.
bliminse has quit [Quit: leaving]
<geist>
adder: yah you're getting close!
bliminse has joined #osdev
Brnocrist has quit [Ping timeout: 264 seconds]
Brnocrist has joined #osdev
GeDaMo has joined #osdev
netbsduser has joined #osdev
heat has joined #osdev
netbsduser has quit [Ping timeout: 260 seconds]
<heat>
hah
<heat>
well, the GPFs mean that your handlers or your IDT are borked
<heat>
but yes, don't sti yet
<heat>
actually sounds like its just your handlers taht are borked, or you'd get a double fault instead of two GPFs
<sham1>
At least the GPF handler seems intact in that
gbowne1 has quit [Quit: Leaving]
<heat>
adder, your handlers (in your interrupt branch) are completely broken and you disregarded everything i said
<heat>
wonderful
vdamewood has joined #osdev
ski has quit [Ping timeout: 264 seconds]
netbsduser has joined #osdev
<adder>
heat: Oh yeah?
<adder>
I did not intend to.
<adder>
Let me scroll back to see what you said.
* vdamewood
subtracts from adder.
<geist>
heat: yeah but i suspect the 8 is still an irq0, then it just goes off in the weeds because handlers are borked
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
pretty_dumm_guy has joined #osdev
vinleod has joined #osdev
vdamewood has quit [Ping timeout: 256 seconds]
vinleod is now known as vdamewood
netbsduser has quit [Ping timeout: 272 seconds]
<adder>
heat?
<heat_>
yes
gog has joined #osdev
<adder>
It seems like I'm not crashing anymore.
<heat_>
gog bazel
<adder>
I'm jumping to _common, cld there, push some registers, and call dispatch_interrupt, then iretl.
<adder>
Then in dispatch_interrupt I'm trying to print out int_no, but it seems like I'm in an infinite loop.
<bslsk05>
github.com: kernel/boot/interrupt.S at interrupt · NukedOne/kernel · GitHub
<heat_>
you need to popal
<heat_>
after call dispatch_interrupt
<heat_>
you also need to pop the error code
<sham1>
Honestly, I don't like this sort of common dispatch style
zxrom has quit [Quit: Leaving]
<heat_>
so "popal; add $4, %rsp"
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
<heat_>
also your argument passing doesn't match your dispatch_interrupt(struct registers *regs) signature
<heat_>
hth
<heat_>
sham1, eh, it's the best you can do with the x86 ISR scheme
<heat_>
other archs give you a handful of entry points and a int_no register or so
<Ermine>
nuked kernal
<sham1>
Well my point is more that is there actual use in actually collapsing all of the exceptions into a common hadler
<sham1>
handler*
<heat_>
yes
<heat_>
interrupt handling usually deals with IRQ numbers, so you need to collapse into a irq_handlers[int_no](); anyway
<heat_>
trap handling less so, but you don't lose a lot by collapsing, and you probably win in performance
<sham1>
I meant exceptions specifically, because of course with more "proper" interrupts you of course need to dispatch a lot of them given that many devices can share an interrupt line
<heat_>
instead of having 32 large handlers in completely separate codepaths you collapse the large bits into one heavily used codepath (with the inevitable 32 tiny handlers due to x86 suckage)
<gog>
hi
<heat_>
gog bazel
<gog>
bazel
<heat_>
gog have you voted for our election yet
<gog>
i vote against the election
<heat_>
fasc gog
<gog>
no elections
<heat_>
i'd vote for a gog dictatorship ngl
<sham1>
who wouldn't
<GeDaMo>
Gog emperor of Dune
<heat_>
gog atreides
<gog>
she who controls the spice controls the universe
<heat_>
i've never watched or read dune
<GeDaMo>
The fourth book in the series is called God Emperor of Dune
<gog>
leto II was the god-emperor
<kazinsal>
first two books are good hard scifi
<kazinsal>
second two books are good hard politics
<kazinsal>
third two books are weirdly horny
<gog>
weird hard
<kazinsal>
:hmmyes: but also :goodness:
zhiayang has quit [Ping timeout: 268 seconds]
zhiayang_ has joined #osdev
<gog>
i'm just here for the butlerian jihad
<gog>
we will make war on the thinking machines
zhiayang_ is now known as zhiayang
<sham1>
God damn ChatGPT
<GeDaMo>
Can a mentat run Crysis? :|
<gog>
a mentat can draw crysis frame by frame
<gog>
so technically yes
<gog>
but their latency is very high
Matt|home has quit [Quit: Leaving]
<sham1>
Aaaa, I'll have to start interviewing possible summer trainees tomorrow
<gog>
also what's the performance impact of iptables chain growth
<gog>
maybe i should just ban every /24 that tries to ssh root into my server
<heat_>
i dont know if iptables is PESSIMAL or if it SCALES
<heat_>
i think there are two iptables backends and one uses eBPF
<heat_>
nftables
<gog>
hmm
<gog>
guess i'll find out
<gog>
i'm outright banning hosts that try root ssh for 6 months
<heat_>
give me ssh root into your server and i'll look into it for you
<kazinsal>
I've got a pf table for blackholing any traffic that fails five ssh attempts in a row
<sham1>
> pf
<sham1>
How dare you use PESSIMAL OpenBSD tech
<gog>
i have that but it's 3 in a row and an exponential increase in ban time for non-root fails
<gog>
for root fails it's immediate, 6 months
<gog>
not that one is more threatening than the other because i don't permit root login anyway
<gog>
it's just satisfying
<adder>
heat, can you check?
<heat_>
yeah give me your credit card info and i'll check anything you want
<kazinsal>
reminds me I need to do a refresh of my network and a subsequent refresh of my diagram
<kazinsal>
shit is deeply unhinged atm
<adder>
heat, it's still looping but there are no exceptions. I did what you told me to.
<heat_>
did you push your changes?
<adder>
Yep.
<heat_>
what's looping and how?
<kazinsal>
one of these days I'll write a troubleshooting course for low level shit
<adder>
My computer fan turns on.
<kazinsal>
there's methodologies for this kinda thing but it generally takes people a decade before they figure out how to really work through problems, and that's a great opportunity for a quick two hour course
<heat_>
<heat_> also your argument passing doesn't match your dispatch_interrupt(struct registers *regs) signature
<heat_>
also i was off by 4, you need to add $8, %esp instead, because of the interrupt number
<adder>
Yeah, I'm all messed up. I wanted to just leave the two fields on the stack without pushing any registers, but seems like I forgot to throw pushal out.
<adder>
Do I need to push %esp into %eax and then push %eax to call this fn?
<heat_>
whay
AptRock327 has joined #osdev
<heat_>
what
<heat_>
you need to push a pointer to the stack, so esp
<adder>
Does misaligned mean I pushed something and didn't pop it off?
<GeDaMo>
Misaligned means the address of the stack pointer is not a required multiple
<GeDaMo>
E.g. multiple of 4 or 16 depending on context
<kof673>
yeah but....how much does the book cost, and how much to take the test, and ..... needs more enterprise!
<gog>
err sorry yeah i mean you have more on the stack thatn you should
<gog>
not misalgned
<zid>
misaligned is also a fine word there
<zid>
it just isn't necessarily what jumps to mind, because it's impossible to do with a C compiler
<gog>
use clang
<zid>
stack misaligned vs stack pointer misaligned, imo
<zid>
to be really pedanteric
Celelibi has quit [Ping timeout: 256 seconds]
lentement has joined #osdev
<adder>
This is wild. I've never made less progress in longer timeframe. :) So, I'll start with 8 bytes, then push 7 4-byte wide registers, and then push %esp, for the total of 40 bytes. Then, upon return from dispatch_interrupt, I'll pop %esp (-4), pop the registers (-28), and add 8 to %esp.
<adder>
And I'm back to step 1 after 24 hours of going in circles. check_exception old: 0x8 new 0xd
lentement has quit [Ping timeout: 268 seconds]
Celelibi has joined #osdev
zxrom has joined #osdev
<gog>
the push before dispatch_interrupt is a function argument, right? why would you pop it into esp after returning
<adder>
So it's either an exception or as if the handler is not called at all.
xFCFFDFFFFEFFFAF has joined #osdev
<adder>
Oh I didn't realize I was doing that.
<gog>
that's what you said just now right
<adder>
Yes, right, but I didn't realize pop %esp had that semantics.
<gog>
unless i misunderstood
<adder>
FWIW, add $4, %esp is also an exception.
<gog>
oh ok then
goliath has joined #osdev
<gog>
heat_: dua lipa
ski has joined #osdev
ski has quit [Ping timeout: 260 seconds]
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
xFCFFDFFFFEFFFAF has joined #osdev
lentement has joined #osdev
Turn_Left has joined #osdev
lentement has quit [Remote host closed the connection]
lentement has joined #osdev
ski has joined #osdev
Left_Turn has quit [Ping timeout: 255 seconds]
<heat_>
dialip
<heat_>
dulip send msg i am rich handsom man portugal yes
<gog>
send msg i am beautiful woman iceland
<gog>
i am poor tho
<gog>
sned money
<mjg>
i was about to send you $2, but i noticed a chocolate bar and bought one
<mjg>
i fugred i'm goinna send the bar
<mjg>
but i ate it before it landed in the box
<mjg>
is just the wrapper ok?
<gog>
yes
<zid>
GIB MONI PLS BRASIL #1
<zid>
OR I REPORT U
m3a has quit [Ping timeout: 268 seconds]
* vdamewood
gib gog fishy
m3a has joined #osdev
lentement has quit [Remote host closed the connection]
<bslsk05>
'All Your Base Are Belong To Us' by zuchini (00:04:21)
<sham1>
Oh I have
<sham1>
But yeah, always nice to go back
<geist>
iirc it was a bunch of fark.com posts put together. i remember there was a weekly photoshop thread on fark.com at the time that was *hilarious*
<geist>
it's still around i think, but not nearly as popular as it used to be
<sham1>
Speaking of feeling old, I have to interview a bunch of potential summer trainees at our job. It was weird seeing people born after 2000 being in the list of candidates
<kazinsal>
yeah, my first time interviewing graduates from the program I did (and got hired out of) was weird
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
heat has quit [Remote host closed the connection]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
spare has quit [Remote host closed the connection]