Advertisement
Guest User

Murder Drones | Master Door Transcript

a guest
Jan 16th, 2022
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.59 KB | None | 0 0
  1.    STRUCT GROUP_INFO INIT_GROUPS = {
  2.       .USAGE = ATOMIC_INIT(2) };
  3.  
  4. STRUCT GROUP_INFO
  5. *GROUPS_ALLOC(INT GIDSETSIZE){
  6.  
  7.    STRUCT GROUP_INFO *GROUP_INFO;
  8.  
  9.    INT NBLOCKS;
  10.    
  11.    INT I;
  12.  
  13. --CODE INVALID--
  14. -------------------------------------
  15. -------------------------------------
  16.  
  17. --ADMIN MASTER CODE--
  18. -------------------------------------
  19. -------------------------------------
  20.  
  21.    GROUP_INFO =
  22. KMALLOC(SIZEOF(*GROUP_INFO);
  23.  
  24.    IF (!GROUP_INFO)
  25.  
  26.       RETURN NULL
  27.  
  28.    GROUP_INFO->NGROUPS = GIDSETSIZE;
  29.  
  30.    GROUP_INFO->NBLOCKS = NBLOCKS;
  31.  
  32.    ATOMIC_SET(&GROUP_INFO->USAGE,
  33. 1);
  34.  
  35. IF (GIDSETSIZE <= NGROUPS_SMALL)
  36.  
  37.       GROUP_INFO-<BLOCKS[0] =
  38. GROUP_INFO->SMALL_BLOCK;
  39.  
  40.    ELSE {
  41.  
  42.       FOR (I = 0; I < NBLOCKS; I++) {
  43.  
  44.          GID_T *B;
  45.  
  46.          B = (VOID
  47. *)__GET_FREE_PAGE(GFP_USER);
  48.  
  49.          IF (!B)
  50.  
  51.             GOTO
  52. OUT_UNDO_PARTIAL_ALLOC;
  53.       }
  54.  
  55.    }
  56.  
  57. /*
  58. Original: https://hackertyper.com/
  59. Gist: https://gist.github.com/Alir3z4/3880228
  60.  
  61. Complain:
  62.     Line 13 - 15 have invalid syntax
  63.     Line 17 - 19 have invalid syntax
  64.     Line 22 have invalid syntax ( Glitch didn't copy the whole line, smh )
  65.    
  66.     Glitch replaced
  67.     ```
  68.         nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK;
  69.  
  70.     \/* Make sure we always allocate at least one indirect block pointer *\/
  71.  
  72.     nblocks = nblocks ? : 1;
  73.     ```
  74.     from the hackertyper with
  75.     ```
  76.     --CODE INVALID--
  77.     -------------------------------------
  78.     -------------------------------------
  79.     ```
  80.     ( come on man, glitch, just copy all of them :( )
  81.  
  82. Transcript by: @hayper1919
  83. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement