Adding Simple System Call in Linux Kernel

Sdílet
Vložit
  • čas přidán 19. 05. 2024
  • In this video I will add a hello world system call to the Linux kernel code and also show how it can be used from user mode.
    Kernel Docs: www.kernel.org/doc/html/lates...
    Online Kernel Code Viewer: elixir.bootlin.com/linux/late...
  • Věda a technologie

Komentáře • 45

  • @madisonhanberry6019
    @madisonhanberry6019 Před 4 měsíci +22

    Do the programming overlords know that you're giving us all this forbidden knowledge?

  • @moritzrank01
    @moritzrank01 Před 4 měsíci +45

    These videos are top notch, really enjoying the short digestable deep dives

  • @andreasproteus1465
    @andreasproteus1465 Před 4 měsíci +28

    Excellent.
    Short and to the point.
    And no narcissistic talking head.

  • @r3v0lv3rz
    @r3v0lv3rz Před 4 měsíci +4

    Consistent. Clear. Straight to the point. Love your work.

  • @shubhamrasal8930
    @shubhamrasal8930 Před 4 měsíci +8

    Really cool. I always wondered how syscalls work.

  • @boddz_
    @boddz_ Před 4 měsíci +2

    Your content is brilliant mate. Keep it up throughout the new year.

  • @teldrah
    @teldrah Před 4 měsíci +3

    Theae videos are insanely good, keep it up. I learned so much already.

  • @liquidmobius
    @liquidmobius Před 4 měsíci +1

    happy new years, nir! thanks for the upload

  • @john.darksoul
    @john.darksoul Před 4 měsíci +1

    Neat!
    I like how you have to edit three different files to add a single system call :D

  • @DavidEngelen
    @DavidEngelen Před 4 měsíci

    Thanks for also explaining all the commands

  • @ThousandsOfPk
    @ThousandsOfPk Před 4 měsíci +1

    Awesome video - would love a productionized version once your happy with it

  • @JeersNX
    @JeersNX Před 4 měsíci

    This is perfectm thanks for being straight-forward.

  • @pavfrang
    @pavfrang Před 4 měsíci +2

    Wow, thanks that is phenomenal!

  • @frzen
    @frzen Před 4 měsíci

    I really enjoy these videos thanks

  • @waldmensch2010
    @waldmensch2010 Před 4 měsíci

    for me as noob in programing, nice to see how it works

  • @oPatrickVico
    @oPatrickVico Před 4 měsíci

    Awesome! Thanks for the video

  • @MillaGamer
    @MillaGamer Před 4 měsíci

    Nice, happy new yaer from Brazil!

  • @DeVibe.
    @DeVibe. Před 8 dny

    Awesome!

  • @mfaathirarsa
    @mfaathirarsa Před 4 měsíci +1

    yo mate i like your setup
    what wm are you using? and do you have any config or dotfiles?

    • @nirlichtman
      @nirlichtman  Před 4 měsíci

      Thanks! I am using a port of Suckless dwm for Windows
      The setup information is in the welcome link in the channel description (including my vimrc config file)

    • @mfaathirarsa
      @mfaathirarsa Před 4 měsíci

      @@nirlichtman thx mate, i love your videos
      i've started pursuing os development and your video really helps because they are concise and easy to understand, do you have any recommended resources?

    • @nirlichtman
      @nirlichtman  Před 4 měsíci

      @@mfaathirarsa Thanks! What kind of os dev? You mean programming user mode on Linux/Windows, kernel level programming or bare metal?

    • @mfaathirarsa
      @mfaathirarsa Před 4 měsíci

      @@nirlichtman bare metal would be best because I'm trying to learn osdev from scratch, for now my resource is the osdev wiki

    • @nirlichtman
      @nirlichtman  Před 4 měsíci

      @@mfaathirarsa osdev is good from what i remember, also i would recommend checking out serenity os which is a work in progress os written in c++, the creator of this project also has a youtube channel in which he documents development of certain parts. Also i recommend learning how Linux/Windows boots up, it is very interesting and you can find a bunch of youtube videos about this, and also additional information on the linux kernel docs

  • @JeersNX
    @JeersNX Před 4 měsíci

    Now i'm remembering "548" forever

  • @Abhishek-pp8ck
    @Abhishek-pp8ck Před 4 měsíci +3

    Thanks!, can we call syscall through a single C program(file)?

    • @nirlichtman
      @nirlichtman  Před 4 měsíci +5

      Yes, you can call custom system calls (which don't have wrappers) from C using the syscall function, checkout "man 2 syscall" for more info

    • @TaschenRechner22
      @TaschenRechner22 Před 4 měsíci +3

      @@nirlichtman I think glibc provides C wrappers for many of the syscalls, right? Could you make a video showing how to add a syscall wrapper in glibc for your syscall? Glibc has some gnarly source code, so it would be cool to see how one grapples with that to add new syscall wrappers.

  • @paliszarok
    @paliszarok Před 4 měsíci

    Awesome. Could you make a video about gdb?

  • @guilherme5094
    @guilherme5094 Před 4 měsíci

    👍Great!

  • @TunifyBasic
    @TunifyBasic Před 4 měsíci +1

    what about services/pidfiles(lockfiles)/daemons idk much about this.

  • @spxnr
    @spxnr Před 4 měsíci

    Nice. I’m noob, why would it be useful to make a custom system call in the kernel? Wouldn’t the program in user mode be able to do anything with the current system calls?

    • @int32_
      @int32_ Před 4 měsíci

      you don't need to add a syscall most of the time, but if you're already adding features to the kernel, you might want to add a syscall to use that feature from userspace

  • @kinershah464
    @kinershah464 Před 17 hodinami

    Nice video, very informative. I am curious to know what is ramfs and cpio? What is newc?

    • @nirlichtman
      @nirlichtman  Před 8 hodinami +1

      Thanks! Checkout my video about making a minimal Linux distro for more information about these questions

  • @angelcaru
    @angelcaru Před 10 dny +1

    SYS_leftpad when?

  • @justlyx_0772
    @justlyx_0772 Před 4 měsíci +1

    How is it possible to use windows with i3 as in the video?

    • @nirlichtman
      @nirlichtman  Před 4 měsíci +1

      I am using a port of Suckless dwm for Windows, more information in the welcome link on my channel

    • @justlyx_0772
      @justlyx_0772 Před 4 měsíci +1

      @@nirlichtman oh, I didn't know it was possible for windows, the video is awesome by the way keep that great content up!

  • @ahmedsaed26
    @ahmedsaed26 Před 4 měsíci

    Amazing Content!

  • @electrolyteorb
    @electrolyteorb Před 3 dny

    Just casually adding syscalls to kernel... Yeah seems about right

  • @mzakyr42
    @mzakyr42 Před 4 měsíci

    still waiting the linux graphical.
    hey how can i make a libc like gnu or musl

  • @daniel01045
    @daniel01045 Před 4 měsíci

    מפתיע שאין לך מבטא ישראלי כבד. מקנא

    • @nirlichtman
      @nirlichtman  Před 4 měsíci

      תודה :) מארה"ב במקור