K 10 svn:author V 6 andrew K 8 svn:date V 27 2019-09-16T15:00:11.566608Z K 7 svn:log V 563 MFC r342937: Fix the location of td->td_frame at the top of the kernel stack. In cpu_thread_alloc we would allocate space for the trap frame at the top of the kernel stack. This is just below the pcb, however due to a missing cast the pointer arithmetic would use the pcb size, not the trapframe size. As the pcb is larger than the trapframe this is safe, however later in cpu_fork we include the case leading to the two disagreeing on the location. Fix by using the same arithmetic in both locations. Found by: An early KASAN patch Sponsored by: DARPA, AFRL END