Path: blob/master/arch/mn10300/kernel/kernel_execve.S
10817 views
/* MN10300 In-kernel program execution1*2* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/10#include <linux/linkage.h>11#include <asm/unistd.h>1213###############################################################################14#15# Do a system call from kernel instead of calling sys_execve so we end up with16# proper pt_regs.17#18# int kernel_execve(const char *filename, char *const argv[],19# char *const envp[])20#21# On entry: D0/D1/8(SP): arguments to function22# On return: D0: syscall return.23#24###############################################################################25.globl kernel_execve26.type kernel_execve,@function27kernel_execve:28mov a3,a129mov d0,a030mov (12,sp),a331mov +__NR_execve,d032syscall 033mov a1,a334rets3536.size kernel_execve,.-kernel_execve373839