process.c (e71d47dc2a6c9a1ec83f015c7c3dd87b635ffcda) | process.c (3033cd4307681c60db6d08f398a64484b36e0b0f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * PARISC Architecture-dependent parts of process handling 4 * based on the work for i386 5 * 6 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org> 7 * Copyright (C) 2000 Martin K Petersen <mkp at mkp.net> 8 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org> --- 264 unchanged lines hidden (view full) --- 273 if (task_is_running(p)) 274 return 0; 275 ip = info.ip; 276 if (!in_sched_functions(ip)) 277 return ip; 278 } while (count++ < MAX_UNWIND_ENTRIES); 279 return 0; 280} | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * PARISC Architecture-dependent parts of process handling 4 * based on the work for i386 5 * 6 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org> 7 * Copyright (C) 2000 Martin K Petersen <mkp at mkp.net> 8 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org> --- 264 unchanged lines hidden (view full) --- 273 if (task_is_running(p)) 274 return 0; 275 ip = info.ip; 276 if (!in_sched_functions(ip)) 277 return ip; 278 } while (count++ < MAX_UNWIND_ENTRIES); 279 return 0; 280} |
281 282static inline unsigned long brk_rnd(void) 283{ 284 return (get_random_u32() & BRK_RND_MASK) << PAGE_SHIFT; 285} 286 287unsigned long arch_randomize_brk(struct mm_struct *mm) 288{ 289 unsigned long ret = PAGE_ALIGN(mm->brk + brk_rnd()); 290 291 if (ret < mm->brk) 292 return mm->brk; 293 return ret; 294} | |