Lines Matching refs:bounds
36 2) That setup code allocates (virtual) space for the "bounds directory",
40 the bounds tables between the time when it populates "bndcfgu" and
47 succeed, and notes the location of the bounds directory. Userspace is
48 expected to keep the bounds directory at that locationWe note it
50 to access the bounds directory register is an expensive operation.
51 4) If the application needs to spill bounds out of the 4 registers, it
52 issues a bndstx instruction. Since the bounds directory is empty at
53 this point, a bounds fault (#BR) is raised, the kernel allocates a
54 bounds table (in the user address space) and makes the relevant entry
55 in the bounds directory point to the new table.
56 5) If the application violates the bounds specified in the bounds registers,
60 pointers, and we attempt to free the associated space in the bounds
71 * allocates virtual space for the bounds directory (malloc() essentially)
74 start managing the bounds directories
78 bounds, like during a buffer overflow.
79 * When bounds are spilled in to an unallocated bounds table, the kernel
81 updates the bounds directory to point to the new table. It keeps
83 * Frees unused bounds tables at the time that the memory they described
95 * new bounds tables (BT) need to be allocated to save bounds.
96 * bounds violation caused by MPX instructions.
100 On-demand kernel allocation of bounds tables
103 MPX only has 4 hardware registers for storing bounds information. If
106 the bounds to be moved between the bounds registers and some new "bounds
111 hardware during both bounds violations or when the tables are not
114 pointing the bounds-directory over to it.
117 the instructions for moving bounds in and out of them are extremely
127 Q: Can virtual space simply be reserved for the bounds tables so that we
129 A: MPX-enabled application will possibly create a lot of bounds tables in
130 process address space to save bounds information. These tables can take
134 1-page structure can require 4 bounds-table pages. An X-GB virtual
135 area needs 4*X GB of virtual space, plus 2GB for the bounds directory.
139 ahead of time. Also, a single process's pre-popualated bounds directory
141 infeasible to prepopulate bounds directories.
143 Q: Can we preallocate bounds table space at the same time memory is
145 bounds tables?
153 Q: Could a bounds fault be handed to userspace and the tables allocated
160 bounds tables that we could think of, we create them on demand in
166 If a #BR is generated due to a bounds violation caused by MPX.
186 field refers to the upper/lower bounds when a #BR is caused.
189 can get violation address and bounds when bounds violations occur.
191 Cleanup unused bounds tables
194 When a BNDSTX instruction attempts to save bounds to a bounds directory
196 no bounds table exists for this entry. In this case the fault handler
197 will allocate a new bounds table on demand.
204 whether one process is MPX enabled. If yes, those bounds tables covered
210 Two new prctl commands are added to enable and disable MPX bounds tables
216 Runtime library in userspace is responsible for allocation of bounds
218 of bounds directory from BNDCFG register.
221 optimization, we have to get the base of bounds directory and save it
230 of bounds tables, it may not create or modify entries in the bounds directory.
232 Certainly users can allocate bounds tables and forcibly point the bounds
234 of bounds entry to have this entry valid. But, the kernel will decline
237 2) Userspace may not take multiple bounds directory entries and point
238 them at the same bounds table.
244 in-use bounds table since it does not recognize sharing.