// SPDX-License-Identifier: GPL-2.0 /* windows.c: Routines to deal with register window management * at the C-code level. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
/* Place as many of the user's current register windows * on the stack that we can. Even if the %sp is unaligned * we still copy the window there, the only case that we don't * succeed is if the %sp points to a bum mapping altogether. * setup_frame() and do_sigreturn() use this before shifting * the user stack around. Future instruction and hardware * bug workaround routines will need this functionality as * well.
*/ void synchronize_user_stack(void)
{ struct thread_info *tp = current_thread_info(); int window;
flush_user_windows(); if(!tp->w_saved) return;
/* Ok, there is some dirty work to do. */ for(window = tp->w_saved - 1; window >= 0; window--) { unsignedlong sp = tp->rwbuf_stkptrs[window];
/* Ok, let it rip. */ if (copy_to_user((char __user *) sp, &tp->reg_window[window], sizeof(struct reg_window32))) continue;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.