- For more information about how the guard pages are used in the kernel to detect stacko check out this article from the kernel docs docs.kernel.org/mm/vmalloced-kernel-stacks.html - In this video I demonstrate with x64, but on other architectures (like ARM for example) this may work differently
@vantavoids
28 күн бұрын
im so glad to not be the only one that has the kind of intrusive thoughts that makes you wanna stack overflow a kernel
@SPimentaTV
28 күн бұрын
😂
@havok6051
28 күн бұрын
It's funny how the man addresses a very specific programming "prank" that only people familiar with IT can understand, yet he still explains that you should press Enter to opt out of an option in the GUI. :)
@DimDima09
29 күн бұрын
Hi! what will happen if you remove die() or other interruption in kernel code? what would happen on StackOverflow?
@BenjaminWheeler0510
29 күн бұрын
I imagine it would just go “off into the weeds” since it has no way to handle an unrecoverable error
@Ed.E
29 күн бұрын
@@BenjaminWheeler0510technically it could keep going but it’s likely memory corruption would cause either an infinite loop or a number of CPU exceptions
@gwentarinokripperinolkjdsf683
28 күн бұрын
If you remove the handler for CPU exceptions, they generate a double fault, if you remove that, or the code for it is unreachable (for instance, you get a segmentation fault when trying to reach that code) then it will generate a triple fault and reboot your machine
@jackkendall6420
27 күн бұрын
It'll get removed as a duplicate by a moderator.
@ayyyylmao-rg3ik
29 күн бұрын
Thank you for showing so many interesting stuff on your channel, a peak into the inner workings of things is always great.
@AntonioDoesMetal
29 күн бұрын
Such a fun video, I’ve never really thought too much about kernel issues like this. It’s very easy to forget it even exists and has to follow the same rules when developing user mode software
@Hans_Magnusson
27 күн бұрын
Yep, redirection to the serial port is a good one. Used it when I fixed a NIC driver for SCO UNIX way back in the good old days. Just capture the output to a file and you have an excellent source of information without cluttering your console. I redirected the debug messages only…
@user-br6ku7jj6n
29 күн бұрын
I love your videos, straight to the point
@Maric18
29 күн бұрын
lol i was kind of expecting an angry linus mail about people doing like mid tier coding advice in merge requests to the kernel like stack overflow
@Nunya58294
29 күн бұрын
It makes me happy to see new comers try this stuff out; It's how you learn and become better at programming, etc
@ABCABC-sw8mh
29 күн бұрын
Nice vid, looked similar vid a few weeks ago. Simple, good understandable, short, nice vid Thanks Nir
@vikenemesh
28 күн бұрын
Didn't expect to be taken on such a journey in 5 minutes! Thanks for showing how easy qemu is, this might stir some inspiration for potential kernel hackers, I guess!
@BenjaminWheeler0510
29 күн бұрын
I’d be interested about what the convention is for kernel dev. I presume kernel maintainers generally avoid recursion?
@pachinger
29 күн бұрын
Same thought here… also, does that mean kernel code is always free of any warnings?
@Ed.E
29 күн бұрын
@@pachingeryes, though the rules are set up so any irrelevant warnings may be changed to notes or discarded
@paulstelian97
28 күн бұрын
Generally no recursion, though in some situations you do get some (btrfs for example uses up a lot of stack space)
@kpjVideo
28 күн бұрын
Another excellent video! Keep up the content man this is great stuff
@salsaman
28 күн бұрын
but what does die() do ? - Potentially the most interesting part here.Maybe we need another video - "What happens when the Linux kernel dies ?"
@roz1
28 күн бұрын
Hi @Nir Licthman this is a wonderful video... Can u make a sereis on the linux kernel internals the code walk through and steps that the kernel takes from start to finish
@nirlichtman
28 күн бұрын
Yes I plan on also making videos about the boot process focusing on a specific subsystem each time
@roz1
28 күн бұрын
@@nirlichtman Thank you so much ❤️ That would mean a lot to all of the people here .... Again Thank you
@justinnamilee
27 күн бұрын
Oh, fun! Some useful QEMU tips, too.
@Jifaxin
25 күн бұрын
you have already made a video about creating windows for X11 and Windows. Will there be a Wayland?
@starc0w
28 күн бұрын
Very interessting, thanks! ❤
@Alex-kj9rc
5 күн бұрын
Great video!
@diminuendos_
23 күн бұрын
Thanks! Can you pls share how to setup qemu on windows and development environment for linux kernel to try out these examples?
@nirlichtman
22 күн бұрын
Added setup information to my welcome link on my channel :)
@bhaveshverma8629
27 күн бұрын
How do you know in depth knowledge about these things. I wonder i can learn that too. But these things are very much complicated and goes over my head. I am just a normal web back developer.Really your videos are very good.
@Onyx-it8gk
28 күн бұрын
Can you make a small Linux distro with the Rust coreutils?!!!
@nihil75
28 күн бұрын
Exactly what I wanted to ask / watch!!!! 🥰
@UltimatePerfection
27 күн бұрын
I would love to know what Linus would say about this change 😂
@aviinl1
29 күн бұрын
curious what happens if you comment out that call to `die` and `panic`
@Ed.E
29 күн бұрын
Memory corruption, CPU memory exceptions
@leonardotry
21 күн бұрын
Now what if you remove the stack guard handler and allow it to "really" overflow? how would that system crash look? :D
@Rametesaima
17 күн бұрын
Random question. @5:08 ... how did get the list of files in the bottom split so you could move between them in the upper split in vim?
@nirlichtman
17 күн бұрын
Checkout the video about project files search on my playlist "Vim Tips"
@Rametesaima
17 күн бұрын
@@nirlichtman Much appreciated 🙂
@zeteya
27 күн бұрын
How did you compile the kernel so fast? Normally it takes 30mins or so right?
@SkySumisu
26 күн бұрын
He divided it into eight distinct processes.
@nirlichtman
26 күн бұрын
I already ran make before, so when I started make again it only built according to the changes in the source I made
@angelffg
29 күн бұрын
Good video!!!! Nir, I have a question please: I run this program on Windows and Linux, on Linux it takes less than 1 second and on Windows it takes almost 2 minutes. Why does that happen? #include #define MAX 1000000 int main(int argc, char *argv) { int i; for(i=1;i
@fderty4
23 күн бұрын
when I encounter a stack overflow, I ask for advice on stackoverflow 😏
@pingu0b
29 күн бұрын
Are you using WSL in the video ?
@SpiderUnderUrBed_Alt
28 күн бұрын
He is
@pingu0b
28 күн бұрын
@@SpiderUnderUrBed_Alt thanks. i just had a doubt cuz it looked a bit different then usual wsl
@A5A5A5A5h
29 күн бұрын
Try make a video where you disable the ISR(Interrupt service routine) in charge to manage division by zero, then try to run such division in user space and see what happens.
@paulstelian97
29 күн бұрын
Well obviously the CPU can't handle it so the ISR is triggered. So it depends on _how_ you remove it. Remove the code in it? Handler does nothing, you have a CPU bound infinite loop that the scheduler can still deal with. Remove it from the ISR table? Kernel panic (double fault -- invalid ISR entry). You can also try to not change the kernel and register a signal handler for SIGFPU in the userspace, and if you do nothing in that you're gonna again have the infinite loop.
@iDontProgramInCpp
26 күн бұрын
The CPU will fail to call the division error interrupt causing a general protection fault or double fault (don't remember which)
@paulstelian97
26 күн бұрын
@@iDontProgramInCpp If an IRQ handler is invalid then the double fault shall be called. If the double fault handler is also invalid a triple fault, which leads to an immediate CPU core/thread reset, occurs.
@A5A5A5A5h
23 күн бұрын
@@paulstelian97That’s sounds like a reasonable way to reboot your machine when you don’t have an ACPI driver 😁
@paulstelian97
22 күн бұрын
@@A5A5A5A5h Except it doesn’t really reboot the whole machine. Only a single CPU core is affected. In HT, only one thread is affected.
@ChandrashekarCN
19 күн бұрын
💖💖💖💖
@bramfran4326
29 күн бұрын
cool !
@weathercontrol0
28 күн бұрын
Kernel_innit
@energy-tunes
2 сағат бұрын
What do tou do for work
@BenjaminWheeler0510
29 күн бұрын
Kernel panic attack :(((
@simetrii76
29 күн бұрын
noooo :(
@zawadhyaa
29 күн бұрын
Next video create a kernel module from scratch but something interesting, like a kernel mod to put a camera filiter or a voice filter or a custom keyboard mapping something like that would be really fun
@Nunya58294
29 күн бұрын
It's actually possible I had found an article on it. You can make a module without needing the kernel sources
@zawadhyaa
28 күн бұрын
@@Nunya58294 no that I know, my focus was on the second part
@ProSureStrings
29 күн бұрын
hi!
@nihil75
28 күн бұрын
Thanks! fun to look at something so familiar in a new way. But I have to say... "Works on Linux kernel, builds on Windows..." 🤣
@vlc-cosplayer
21 күн бұрын
The rudest StackOverflow user would still be no match for Linus at his most polit-- wait, it's not that kind of stack overflow?
@Paolog_
29 күн бұрын
the only problem that we can't solve when beeing root
Пікірлер: 70