Lines Matching refs:bounds

42 2) That setup code allocates (virtual) space for the "bounds directory",
46 the bounds tables between the time when it populates "bndcfgu" and
53 succeed, and notes the location of the bounds directory. Userspace is
54 expected to keep the bounds directory at that location. We note it
56 to access the bounds directory register is an expensive operation.
57 4) If the application needs to spill bounds out of the 4 registers, it
58 issues a bndstx instruction. Since the bounds directory is empty at
59 this point, a bounds fault (#BR) is raised, the kernel allocates a
60 bounds table (in the user address space) and makes the relevant entry
61 in the bounds directory point to the new table.
62 5) If the application violates the bounds specified in the bounds registers,
66 pointers, and we attempt to free the associated space in the bounds
77 * allocates virtual space for the bounds directory (malloc() essentially)
80 start managing the bounds directories
84 bounds, like during a buffer overflow.
85 * When bounds are spilled in to an unallocated bounds table, the kernel
87 updates the bounds directory to point to the new table. It keeps
89 * Frees unused bounds tables at the time that the memory they described
102 * new bounds tables (BT) need to be allocated to save bounds.
103 * bounds violation caused by MPX instructions.
107 On-demand kernel allocation of bounds tables
110 MPX only has 4 hardware registers for storing bounds information. If
113 the bounds to be moved between the bounds registers and some new "bounds
118 hardware during both bounds violations or when the tables are not
121 pointing the bounds-directory over to it.
124 the instructions for moving bounds in and out of them are extremely
134 :Q: Can virtual space simply be reserved for the bounds tables so that we
136 :A: MPX-enabled application will possibly create a lot of bounds tables in
137 process address space to save bounds information. These tables can take
141 1-page structure can require 4 bounds-table pages. An X-GB virtual
142 area needs 4*X GB of virtual space, plus 2GB for the bounds directory.
146 ahead of time. Also, a single process's pre-populated bounds directory
148 infeasible to prepopulate bounds directories.
150 :Q: Can we preallocate bounds table space at the same time memory is
152 bounds tables?
160 :Q: Could a bounds fault be handed to userspace and the tables allocated
167 bounds tables that we could think of, we create them on demand in
173 If a #BR is generated due to a bounds violation caused by MPX.
193 field refers to the upper/lower bounds when a #BR is caused.
196 can get violation address and bounds when bounds violations occur.
198 Cleanup unused bounds tables
201 When a BNDSTX instruction attempts to save bounds to a bounds directory
203 no bounds table exists for this entry. In this case the fault handler
204 will allocate a new bounds table on demand.
211 whether one process is MPX enabled. If yes, those bounds tables covered
217 Two new prctl commands are added to enable and disable MPX bounds tables
224 Runtime library in userspace is responsible for allocation of bounds
226 of bounds directory from BNDCFG register.
229 optimization, we have to get the base of bounds directory and save it
238 of bounds tables, it may not create or modify entries in the bounds directory.
240 Certainly users can allocate bounds tables and forcibly point the bounds
242 of bounds entry to have this entry valid. But, the kernel will decline
245 2) Userspace may not take multiple bounds directory entries and point
246 them at the same bounds table.
252 in-use bounds table since it does not recognize sharing.