Lecture 23 - Graphics Wrap-up, Buffer Overflows, System Calls Flashcards

1
Q

GTK+

A
  • GIMP toolkit
  • multi-platform tools for creating graphical user interfaces (GUIs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

security

A
  • the way that you write your software can make a difference in how secure it is
  • ex. we’ve used strcpy() when copying data into a buffer array of limited size
  • not doing so could cause your program to be vulnerable to buffer overflows
  • if your software is trusted by the system, others can use buffer overflows to break in
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Address Space Layout Randomization

A
  • ASLR changes the addresses of many things every time a program executes
  • harder to exploit certain vulnerabilities
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

kernel invocation/what causes the switch to kernel mode?

A
  • system calls
  • page faults
  • signals
  • hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

system calls

A
  • system calls are the interface between processes and the OS kernel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Stack layout

A
  • *envp/argv
  • argc, argv, envp
  • return address
  • main’s frame pointer
  • main’s automatic variables
  • func1’s arguments
  • return address
  • func1’s frame pointer
  • func1’s automatic variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

system call types

A
  • process management (create, terminate, execute, wait, etc.)
  • file management (create file, delete, open, close, read write, getattr, setattr, etc.)
  • device management (ioctl, read, write, etc.)
  • information management (getpid, alarm, sleep, etc.)
  • communication - between processes (pipe, shmget, mmap, etc.)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

open() system call

A
  • in open (const char *pathname, int flags[, mode_t mode])
  • flags include
  • access mode (O_RDONLY), O_WRONLY, O_RDRWR) - required
  • file creation flags (O_CLOEXEC, O_CREAT, O_TRUNC, etc) - optional
  • file status flags (O_APPEND, O_SYNC, O_NONBLOCK, etc)
  • mode is your usual file creation mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

close() system class

A
  • int close (int fd)
  • decrements the reference count for the appropriate open file object
  • object is reclaimed (if reference count == 0)
  • returns -1 on error and sets error
  • failing to close() fds results in a file descriptor leak
  • arguably worse than a memory leak
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

using assembly language in C

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly