Enviar pesquisa
Carregar
Sysprog 16
•
Transferir como ODP, PDF
•
1 gostou
•
1,528 visualizações
Ahmed Mekkawy
Seguir
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 33
Baixar agora
Recomendados
Character drivers
Character drivers
pradeep_tewani
Linux Serial Driver
Linux Serial Driver
艾鍗科技
I2c drivers
I2c drivers
Pradeep Tewani
Linux Timer device driver
Linux Timer device driver
艾鍗科技
Kernel Process Management
Kernel Process Management
pradeep_tewani
Kernel Timing Management
Kernel Timing Management
pradeep_tewani
Linux dma engine
Linux dma engine
pradeep_tewani
Linux PCI device driver
Linux PCI device driver
艾鍗科技
Recomendados
Character drivers
Character drivers
pradeep_tewani
Linux Serial Driver
Linux Serial Driver
艾鍗科技
I2c drivers
I2c drivers
Pradeep Tewani
Linux Timer device driver
Linux Timer device driver
艾鍗科技
Kernel Process Management
Kernel Process Management
pradeep_tewani
Kernel Timing Management
Kernel Timing Management
pradeep_tewani
Linux dma engine
Linux dma engine
pradeep_tewani
Linux PCI device driver
Linux PCI device driver
艾鍗科技
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
Kevin Lo
Audio Drivers
Audio Drivers
Anil Kumar Pugalia
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
RajKumar Rampelli
Arm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
HPC Essentials
HPC Essentials
William Brouwer
Shell Scripting
Shell Scripting
Anil Kumar Pugalia
Threads
Threads
Anil Kumar Pugalia
Network Drivers
Network Drivers
Anil Kumar Pugalia
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
Block Drivers
Block Drivers
Anil Kumar Pugalia
Kernel Timing Management
Kernel Timing Management
SysPlay eLearning Academy for You
Challenges in GPU compilers
Challenges in GPU compilers
AnastasiaStulova
Linux Porting
Linux Porting
Champ Yen
Linux Network Management
Linux Network Management
Anil Kumar Pugalia
Synchronization
Synchronization
Anil Kumar Pugalia
Linux Internals Part - 3
Linux Internals Part - 3
SysPlay eLearning Academy for You
gcc and friends
gcc and friends
Anil Kumar Pugalia
Linux DMA Engine
Linux DMA Engine
SysPlay eLearning Academy for You
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
chiportal
Signals
Signals
Anil Kumar Pugalia
Chapter 3
Chapter 3
lopjuan
Unit 5
Unit 5
siddr
Mais conteúdo relacionado
Mais procurados
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
Kevin Lo
Audio Drivers
Audio Drivers
Anil Kumar Pugalia
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
RajKumar Rampelli
Arm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
HPC Essentials
HPC Essentials
William Brouwer
Shell Scripting
Shell Scripting
Anil Kumar Pugalia
Threads
Threads
Anil Kumar Pugalia
Network Drivers
Network Drivers
Anil Kumar Pugalia
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
Block Drivers
Block Drivers
Anil Kumar Pugalia
Kernel Timing Management
Kernel Timing Management
SysPlay eLearning Academy for You
Challenges in GPU compilers
Challenges in GPU compilers
AnastasiaStulova
Linux Porting
Linux Porting
Champ Yen
Linux Network Management
Linux Network Management
Anil Kumar Pugalia
Synchronization
Synchronization
Anil Kumar Pugalia
Linux Internals Part - 3
Linux Internals Part - 3
SysPlay eLearning Academy for You
gcc and friends
gcc and friends
Anil Kumar Pugalia
Linux DMA Engine
Linux DMA Engine
SysPlay eLearning Academy for You
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
chiportal
Signals
Signals
Anil Kumar Pugalia
Mais procurados
(20)
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
The TCP/IP stack in the FreeBSD kernel COSCUP 2014
Audio Drivers
Audio Drivers
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
Arm device tree and linux device drivers
Arm device tree and linux device drivers
HPC Essentials
HPC Essentials
Shell Scripting
Shell Scripting
Threads
Threads
Network Drivers
Network Drivers
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
Block Drivers
Block Drivers
Kernel Timing Management
Kernel Timing Management
Challenges in GPU compilers
Challenges in GPU compilers
Linux Porting
Linux Porting
Linux Network Management
Linux Network Management
Synchronization
Synchronization
Linux Internals Part - 3
Linux Internals Part - 3
gcc and friends
gcc and friends
Linux DMA Engine
Linux DMA Engine
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
Signals
Signals
Destaque
Chapter 3
Chapter 3
lopjuan
Unit 5
Unit 5
siddr
Unit 7
Unit 7
siddr
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
techbed
Addressing modes of 8051
Addressing modes of 8051
SARITHA REDDY
Addressing modes
Addressing modes
Mahesh Kumar Attri
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
Saumitra Rukmangad
Destaque
(7)
Chapter 3
Chapter 3
Unit 5
Unit 5
Unit 7
Unit 7
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
Addressing modes of 8051
Addressing modes of 8051
Addressing modes
Addressing modes
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
Semelhante a Sysprog 16
Sysprog17
Sysprog17
Ahmed Mekkawy
Introduction to Kernel Programming
Introduction to Kernel Programming
Ahmed Mekkawy
Confraria Security & IT - Lisbon Set 29, 2011
Confraria Security & IT - Lisbon Set 29, 2011
ricardomcm
C Language Unit-5
C Language Unit-5
kasaragadda srinivasrao
Unit5 (2)
Unit5 (2)
mrecedu
Unit 8
Unit 8
siddr
Unit 3
Unit 3
siddr
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
Divye Kapoor
Linux
Linux
keydak11
Unit5 C
Unit5 C
arnold 7490
Programming in C
Programming in C
sujathavvv
Programming in C
Programming in C
eswarisriram
Unit 6
Unit 6
siddr
Char Drivers And Debugging Techniques
Char Drivers And Debugging Techniques
YourHelper1
slides3_077.ppt
slides3_077.ppt
DEEPAK948083
C for Java programmers (part 1)
C for Java programmers (part 1)
Dmitry Zinoviev
The Rust Programming Language: an Overview
The Rust Programming Language: an Overview
Roberto Casadei
FreeBSD and Drivers
FreeBSD and Drivers
Kernel TLV
Sysprog 11
Sysprog 11
Ahmed Mekkawy
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdf
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdf
ajay1317
Semelhante a Sysprog 16
(20)
Sysprog17
Sysprog17
Introduction to Kernel Programming
Introduction to Kernel Programming
Confraria Security & IT - Lisbon Set 29, 2011
Confraria Security & IT - Lisbon Set 29, 2011
C Language Unit-5
C Language Unit-5
Unit5 (2)
Unit5 (2)
Unit 8
Unit 8
Unit 3
Unit 3
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
Linux
Linux
Unit5 C
Unit5 C
Programming in C
Programming in C
Programming in C
Programming in C
Unit 6
Unit 6
Char Drivers And Debugging Techniques
Char Drivers And Debugging Techniques
slides3_077.ppt
slides3_077.ppt
C for Java programmers (part 1)
C for Java programmers (part 1)
The Rust Programming Language: an Overview
The Rust Programming Language: an Overview
FreeBSD and Drivers
FreeBSD and Drivers
Sysprog 11
Sysprog 11
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdf
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdf
Mais de Ahmed Mekkawy
Encrypted Traffic in Egypt - an attempt to understand
Encrypted Traffic in Egypt - an attempt to understand
Ahmed Mekkawy
Securing Governmental Public Services with Free/Open Source Tools - Egyptian ...
Securing Governmental Public Services with Free/Open Source Tools - Egyptian ...
Ahmed Mekkawy
OpenData for governments
OpenData for governments
Ahmed Mekkawy
Infrastructure as a Code
Infrastructure as a Code
Ahmed Mekkawy
شركة سبيرولا للأنظمة والجمعية المصرية للمصادر المفتوحة
شركة سبيرولا للأنظمة والجمعية المصرية للمصادر المفتوحة
Ahmed Mekkawy
Everything is a Game
Everything is a Game
Ahmed Mekkawy
Why Cloud Computing has to go the FOSS way
Why Cloud Computing has to go the FOSS way
Ahmed Mekkawy
FOSS Enterpreneurship
FOSS Enterpreneurship
Ahmed Mekkawy
Intro to FOSS & using it in development
Intro to FOSS & using it in development
Ahmed Mekkawy
FOSS, history and philosophy
FOSS, history and philosophy
Ahmed Mekkawy
Virtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud Compting
Ahmed Mekkawy
A look at computer security
A look at computer security
Ahmed Mekkawy
Networking in Gnu/Linux
Networking in Gnu/Linux
Ahmed Mekkawy
Foss Movement In Egypt
Foss Movement In Egypt
Ahmed Mekkawy
Sysprog 15
Sysprog 15
Ahmed Mekkawy
Sysprog 9
Sysprog 9
Ahmed Mekkawy
Sysprog 12
Sysprog 12
Ahmed Mekkawy
Sysprog 14
Sysprog 14
Ahmed Mekkawy
Sysprog 7
Sysprog 7
Ahmed Mekkawy
Sysprog 8
Sysprog 8
Ahmed Mekkawy
Mais de Ahmed Mekkawy
(20)
Encrypted Traffic in Egypt - an attempt to understand
Encrypted Traffic in Egypt - an attempt to understand
Securing Governmental Public Services with Free/Open Source Tools - Egyptian ...
Securing Governmental Public Services with Free/Open Source Tools - Egyptian ...
OpenData for governments
OpenData for governments
Infrastructure as a Code
Infrastructure as a Code
شركة سبيرولا للأنظمة والجمعية المصرية للمصادر المفتوحة
شركة سبيرولا للأنظمة والجمعية المصرية للمصادر المفتوحة
Everything is a Game
Everything is a Game
Why Cloud Computing has to go the FOSS way
Why Cloud Computing has to go the FOSS way
FOSS Enterpreneurship
FOSS Enterpreneurship
Intro to FOSS & using it in development
Intro to FOSS & using it in development
FOSS, history and philosophy
FOSS, history and philosophy
Virtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud Compting
A look at computer security
A look at computer security
Networking in Gnu/Linux
Networking in Gnu/Linux
Foss Movement In Egypt
Foss Movement In Egypt
Sysprog 15
Sysprog 15
Sysprog 9
Sysprog 9
Sysprog 12
Sysprog 12
Sysprog 14
Sysprog 14
Sysprog 7
Sysprog 7
Sysprog 8
Sysprog 8
Último
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
null - The Open Security Community
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
Zilliz
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
The Digital Insurer
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Fwdays
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
Zilliz
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
Último
(20)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
Sysprog 16
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
int echo_main(int argc,
char **argv) { struct iovec io[argc]; struct iovec *cur_io = io; char *arg; char *p; ... while (1) { int c; cur_io->iov_base = p = arg; ... while ((c = *arg++)) { if (c == eflag) { /* Check for escape seq. */ if (*arg == 'c') { /* '' means cancel newline and ignore all subsequent chars. */ cur_io->iov_len = p - (char*)cur_io->iov_base; cur_io++; goto ret; } ... c = bb_process_escape_sequence( (void*) &arg); } *p++ = c; } arg = *++argv; if (arg) *p++ = ' '; cur_io->iov_len = p - (char*)cur_io->iov_base; cur_io++; if (!arg) break; } ret: return writev(1, io, (cur_io - io)) >= 0; }
15.
16.
17.
18.
#ifdef F_SETLK #ifndef
SEEK_SET #define SEEK_SET 0 #endif struct flock lock_data; lock_data.l_type = F_WRLCK; lock_data.l_whence = SEEK_SET; lock_data.l_start = lock_data.l_len = 0; if (fcntl(pidFd, F_SETLK, &lock_data) == -1) { if (errno == EAGAIN) return oldpid; else return -1; } #else #ifdef LOCK_EX if (flock (pidFd, LOCK_EX|LOCK_NB) == -1) { if (errno == EWOULDBLOCK) return oldpid; else return -1; } #else if (lockf (pidFd, F_TLOCK, 0) == -1) { if (errno == EACCES) return oldpid; else return -1; } #endif #endif }
19.
20.
21.
22.
23.
24.
25.
26.
static pid_list *scan_proc_pids(inode_list
*ilist) { DIR *d; struct dirent *de; pid_t pid; pid_list *plist; xchdir("/proc"); d = opendir("/proc"); if (!d) return NULL; plist = NULL; while ((de = readdir(d)) != NULL) { pid = (pid_t)bb_strtou(de->d_name, NULL, 10); if (errno) continue; if (chdir(de->d_name) < 0) continue; plist = scan_link("cwd", pid, ilist, plist); plist = scan_link("exe", pid, ilist, plist); plist = scan_link("root", pid, ilist, plist); .... } closedir(d); return plist; } static pid_list *scan_link(const char *lname, pid_t pid, inode_list *ilist, pid_list *plist) { ino_t inode; dev_t dev; if (!file_to_dev_inode(lname, &dev, &inode)) return plist; if (search_dev_inode(ilist, dev, inode)) plist = add_pid(plist, pid); return plist; } static int file_to_dev_inode(const char *filename, dev_t *dev, ino_t *inode) { struct stat f_stat; if (stat(filename, &f_stat)) return 0; *inode = f_stat.st_ino; *dev = f_stat.st_dev; return 1; } static int search_dev_inode(inode_list *ilist, dev_t dev, ino_t inode) { while (ilist) { if (ilist->dev == dev) { if (option_mask32 & OPT_MOUNT) return 1; if (ilist->inode == inode) return 1; } ilist = ilist->next; } return 0; }
27.
28.
29.
30.
31.
32.
int inotifyd_main(int argc
UNUSED_PARAM, char **argv) { unsigned mask = IN_ALL_EVENTS; // assume we want all events struct pollfd pfd; char **watched = ++argv; // watched name list const char *args[] = { *argv, NULL, NULL, NULL, NULL }; // open inotify pfd.fd = inotify_init(); if (pfd.fd < 0) bb_perror_msg_and_die("no kernel support"); // setup watched while (*++argv) { char *path = *argv; char *masks = strchr(path, ':'); int wd; // watch descriptor // if mask is specified -> if (masks) { *masks = ''; // split path and mask // convert mask names to mask bitset mask = 0; while (*++masks) { int i = strchr(mask_names, *masks) - mask_names; if (i >= 0) { mask |= (1 << i); } } } // add watch wd = inotify_add_watch(pfd.fd, path, mask); if (wd < 0) { bb_perror_msg_and_die("add watch (%s) failed", path); } } static const char mask_names[] ALIGN1 = "a" // 0x00000001 File was accessed "c" // 0x00000002 File was modified "e" // 0x00000004 Metadata changed "w" // 0x00000008 Writtable file was closed "0" // 0x00000010 Unwrittable file closed "r" // 0x00000020 File was opened "m" // 0x00000040 File was moved from X "y" // 0x00000080 File was moved to Y "n" // 0x00000100 Subfile was created "d" // 0x00000200 Subfile was deleted "D" // 0x00000400 Self was deleted "M" // 0x00000800 Self was moved ; pfd.events = POLLIN; while (!signalled && poll(&pfd, 1, -1) > 0) { ssize_t len; void *buf; struct inotify_event *ie; // read out all pending events xioctl(pfd.fd, FIONREAD, &len); #define eventbuf bb_common_bufsiz1 ie = buf = (len <= sizeof(eventbuf)) ? eventbuf : xmalloc(len); len = full_read(pfd.fd, buf, len); // process events. N.B. events may vary in length while (len > 0) { int i; char events[12]; char *s = events; unsigned m = ie->mask; for (i = 0; i < 12; ++i, m >>= 1) { if (m & 1) { *s++ = mask_names[i]; } } *s = ''; args[1] = events; args[2] = watched[ie->wd]; args[3] = ie->len ? ie->name : NULL; xspawn((char **)args); // next event i = sizeof(struct inotify_event) + ie->len; len -= i; ie = (void*)((char*)ie + i); } if (eventbuf != buf) free(buf); } return EXIT_SUCCESS; }
33.
Baixar agora