/arch/sparc/include/asm/ |
D | termios.h | 33 int err; \ 34 err = get_user(tmp, &(termio)->c_iflag); \ 36 err |= get_user(tmp, &(termio)->c_oflag); \ 38 err |= get_user(tmp, &(termio)->c_cflag); \ 40 err |= get_user(tmp, &(termio)->c_lflag); \ 42 err |= copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ 43 err; \ 53 int err; \ 54 err = put_user((termios)->c_iflag, &(termio)->c_iflag); \ 55 err |= put_user((termios)->c_oflag, &(termio)->c_oflag); \ [all …]
|
/arch/nios2/kernel/ |
D | signal.c | 43 int err; in rt_restore_ucontext() local 48 err = __get_user(temp, &uc->uc_mcontext.version); in rt_restore_ucontext() 52 err |= __get_user(regs->r1, &gregs[0]); in rt_restore_ucontext() 53 err |= __get_user(regs->r2, &gregs[1]); in rt_restore_ucontext() 54 err |= __get_user(regs->r3, &gregs[2]); in rt_restore_ucontext() 55 err |= __get_user(regs->r4, &gregs[3]); in rt_restore_ucontext() 56 err |= __get_user(regs->r5, &gregs[4]); in rt_restore_ucontext() 57 err |= __get_user(regs->r6, &gregs[5]); in rt_restore_ucontext() 58 err |= __get_user(regs->r7, &gregs[6]); in rt_restore_ucontext() 59 err |= __get_user(regs->r8, &gregs[7]); in rt_restore_ucontext() [all …]
|
/arch/um/os-Linux/ |
D | file.c | 42 int err; in os_stat_fd() local 44 CATCH_EINTR(err = fstat64(fd, &sbuf)); in os_stat_fd() 45 if (err < 0) in os_stat_fd() 50 return err; in os_stat_fd() 56 int err; in os_stat_file() local 58 CATCH_EINTR(err = stat64(file_name, &sbuf)); in os_stat_file() 59 if (err < 0) in os_stat_file() 64 return err; in os_stat_file() 69 int amode, err; in os_access() local 76 err = access(file, amode); in os_access() [all …]
|
D | umid.c | 31 int len, err; in make_uml_dir() local 36 err = -ENOENT; in make_uml_dir() 41 goto err; in make_uml_dir() 51 err = -ENOMEM; in make_uml_dir() 56 goto err; in make_uml_dir() 63 err = -errno; in make_uml_dir() 70 err: in make_uml_dir() 72 return err; in make_uml_dir() 140 int dead, fd, p, n, err; in is_umdir_used() local 145 err = -E2BIG; in is_umdir_used() [all …]
|
/arch/mips/generic/ |
D | board-sead3.c | 53 int gic_off, cpu_off, uart_off, eth_off, ehci_off, err; in remove_gic() local 67 err = fdt_nop_node(fdt, gic_off); in remove_gic() 68 if (err) { in remove_gic() 70 return err; in remove_gic() 88 err = fdt_setprop_u32(fdt, uart_off, "interrupt-parent", in remove_gic() 90 if (err) { in remove_gic() 92 err); in remove_gic() 93 return err; in remove_gic() 96 err = fdt_setprop_u32(fdt, uart_off, "interrupts", in remove_gic() 98 if (err) { in remove_gic() [all …]
|
/arch/mips/bcm47xx/ |
D | buttons.c | 478 int err; in bcm47xx_buttons_register() local 482 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12); in bcm47xx_buttons_register() 485 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn16); in bcm47xx_buttons_register() 488 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn66u); in bcm47xx_buttons_register() 491 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl300g); in bcm47xx_buttons_register() 494 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl320ge); in bcm47xx_buttons_register() 497 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl330ge); in bcm47xx_buttons_register() 500 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500g); in bcm47xx_buttons_register() 503 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gd); in bcm47xx_buttons_register() 506 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gpv1); in bcm47xx_buttons_register() [all …]
|
/arch/alpha/kernel/ |
D | signal.c | 153 long i, err = __get_user(regs->pc, &sc->sc_pc); in restore_sigcontext() local 159 err |= __get_user(regs->r0, sc->sc_regs+0); in restore_sigcontext() 160 err |= __get_user(regs->r1, sc->sc_regs+1); in restore_sigcontext() 161 err |= __get_user(regs->r2, sc->sc_regs+2); in restore_sigcontext() 162 err |= __get_user(regs->r3, sc->sc_regs+3); in restore_sigcontext() 163 err |= __get_user(regs->r4, sc->sc_regs+4); in restore_sigcontext() 164 err |= __get_user(regs->r5, sc->sc_regs+5); in restore_sigcontext() 165 err |= __get_user(regs->r6, sc->sc_regs+6); in restore_sigcontext() 166 err |= __get_user(regs->r7, sc->sc_regs+7); in restore_sigcontext() 167 err |= __get_user(regs->r8, sc->sc_regs+8); in restore_sigcontext() [all …]
|
/arch/nds32/kernel/ |
D | signal.c | 83 int err; in restore_sigframe() local 85 err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set)); in restore_sigframe() 86 if (err == 0) { in restore_sigframe() 90 __get_user_error(regs->uregs[0], &sf->uc.uc_mcontext.nds32_r0, err); in restore_sigframe() 91 __get_user_error(regs->uregs[1], &sf->uc.uc_mcontext.nds32_r1, err); in restore_sigframe() 92 __get_user_error(regs->uregs[2], &sf->uc.uc_mcontext.nds32_r2, err); in restore_sigframe() 93 __get_user_error(regs->uregs[3], &sf->uc.uc_mcontext.nds32_r3, err); in restore_sigframe() 94 __get_user_error(regs->uregs[4], &sf->uc.uc_mcontext.nds32_r4, err); in restore_sigframe() 95 __get_user_error(regs->uregs[5], &sf->uc.uc_mcontext.nds32_r5, err); in restore_sigframe() 96 __get_user_error(regs->uregs[6], &sf->uc.uc_mcontext.nds32_r6, err); in restore_sigframe() [all …]
|
/arch/sparc/kernel/ |
D | signal_64.c | 51 int err; in sparc64_set_context() local 59 err = __get_user(pc, &((*grp)[MC_PC])); in sparc64_set_context() 60 err |= __get_user(npc, &((*grp)[MC_NPC])); in sparc64_set_context() 61 if (err || ((pc | npc) & 3)) in sparc64_set_context() 81 err |= __get_user(regs->y, &((*grp)[MC_Y])); in sparc64_set_context() 82 err |= __get_user(tstate, &((*grp)[MC_TSTATE])); in sparc64_set_context() 85 err |= __get_user(regs->u_regs[UREG_G1], (&(*grp)[MC_G1])); in sparc64_set_context() 86 err |= __get_user(regs->u_regs[UREG_G2], (&(*grp)[MC_G2])); in sparc64_set_context() 87 err |= __get_user(regs->u_regs[UREG_G3], (&(*grp)[MC_G3])); in sparc64_set_context() 88 err |= __get_user(regs->u_regs[UREG_G4], (&(*grp)[MC_G4])); in sparc64_set_context() [all …]
|
D | sigutil_64.c | 19 int err = 0; in save_fpu_state() local 23 err |= copy_to_user(&fpu->si_float_regs[0], fpregs, in save_fpu_state() 26 err |= copy_to_user(&fpu->si_float_regs[32], fpregs+16, in save_fpu_state() 28 err |= __put_user(current_thread_info()->xfsr[0], &fpu->si_fsr); in save_fpu_state() 29 err |= __put_user(current_thread_info()->gsr[0], &fpu->si_gsr); in save_fpu_state() 30 err |= __put_user(fprs, &fpu->si_fprs); in save_fpu_state() 32 return err; in save_fpu_state() 39 int err; in restore_fpu_state() local 44 err = get_user(fprs, &fpu->si_fprs); in restore_fpu_state() 48 err |= copy_from_user(fpregs, &fpu->si_float_regs[0], in restore_fpu_state() [all …]
|
D | signal_32.c | 83 int err; in do_sigreturn() local 102 err = __get_user(pc, &sf->info.si_regs.pc); in do_sigreturn() 103 err |= __get_user(npc, &sf->info.si_regs.npc); in do_sigreturn() 110 err |= __copy_from_user(regs, &sf->info.si_regs, sizeof(struct pt_regs)); in do_sigreturn() 119 err |= __get_user(fpu_save, &sf->fpu_save); in do_sigreturn() 121 err |= restore_fpu_state(regs, fpu_save); in do_sigreturn() 122 err |= __get_user(rwin_save, &sf->rwin_save); in do_sigreturn() 124 err |= restore_rwin_state(rwin_save); in do_sigreturn() 129 err |= __get_user(set.sig[0], &sf->info.si_mask); in do_sigreturn() 130 err |= __copy_from_user(&set.sig[1], &sf->extramask, in do_sigreturn() [all …]
|
/arch/mips/kernel/ |
D | signal.c | 77 int err = 0; in copy_fp_to_sigcontext() local 81 err |= in copy_fp_to_sigcontext() 85 err |= __put_user(current->thread.fpu.fcr31, csr); in copy_fp_to_sigcontext() 87 return err; in copy_fp_to_sigcontext() 96 int err = 0; in copy_fp_from_sigcontext() local 101 err |= __get_user(fpr_val, &fpregs[i]); in copy_fp_from_sigcontext() 104 err |= __get_user(current->thread.fpu.fcr31, csr); in copy_fp_from_sigcontext() 106 return err; in copy_fp_from_sigcontext() 167 int i, err; in save_msa_extcontext() local 188 err = __put_user(read_msa_csr(), &msa->csr); in save_msa_extcontext() [all …]
|
D | signal_o32.c | 55 int err = 0; in setup_sigcontext32() local 58 err |= __put_user(regs->cp0_epc, &sc->sc_pc); in setup_sigcontext32() 60 err |= __put_user(0, &sc->sc_regs[0]); in setup_sigcontext32() 62 err |= __put_user(regs->regs[i], &sc->sc_regs[i]); in setup_sigcontext32() 64 err |= __put_user(regs->hi, &sc->sc_mdhi); in setup_sigcontext32() 65 err |= __put_user(regs->lo, &sc->sc_mdlo); in setup_sigcontext32() 67 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); in setup_sigcontext32() 68 err |= __put_user(mfhi1(), &sc->sc_hi1); in setup_sigcontext32() 69 err |= __put_user(mflo1(), &sc->sc_lo1); in setup_sigcontext32() 70 err |= __put_user(mfhi2(), &sc->sc_hi2); in setup_sigcontext32() [all …]
|
/arch/unicore32/kernel/ |
D | signal.c | 55 int err; in restore_sigframe() local 57 err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set)); in restore_sigframe() 58 if (err == 0) in restore_sigframe() 61 err |= __get_user(regs->UCreg_00, &sf->uc.uc_mcontext.regs.UCreg_00); in restore_sigframe() 62 err |= __get_user(regs->UCreg_01, &sf->uc.uc_mcontext.regs.UCreg_01); in restore_sigframe() 63 err |= __get_user(regs->UCreg_02, &sf->uc.uc_mcontext.regs.UCreg_02); in restore_sigframe() 64 err |= __get_user(regs->UCreg_03, &sf->uc.uc_mcontext.regs.UCreg_03); in restore_sigframe() 65 err |= __get_user(regs->UCreg_04, &sf->uc.uc_mcontext.regs.UCreg_04); in restore_sigframe() 66 err |= __get_user(regs->UCreg_05, &sf->uc.uc_mcontext.regs.UCreg_05); in restore_sigframe() 67 err |= __get_user(regs->UCreg_06, &sf->uc.uc_mcontext.regs.UCreg_06); in restore_sigframe() [all …]
|
/arch/arm64/kernel/ |
D | signal32.c | 101 int i, err = 0; in compat_preserve_vfp_context() local 111 __put_user_error(magic, &frame->magic, err); in compat_preserve_vfp_context() 112 __put_user_error(size, &frame->size, err); in compat_preserve_vfp_context() 123 __put_user_error(vreg.lo, &frame->ufp.fpregs[i], err); in compat_preserve_vfp_context() 124 __put_user_error(vreg.hi, &frame->ufp.fpregs[i + 1], err); in compat_preserve_vfp_context() 130 __put_user_error(fpscr, &frame->ufp.fpscr, err); in compat_preserve_vfp_context() 137 __put_user_error(fpexc, &frame->ufp_exc.fpexc, err); in compat_preserve_vfp_context() 138 __put_user_error(0, &frame->ufp_exc.fpinst, err); in compat_preserve_vfp_context() 139 __put_user_error(0, &frame->ufp_exc.fpinst2, err); in compat_preserve_vfp_context() 141 return err ? -EFAULT : 0; in compat_preserve_vfp_context() [all …]
|
D | signal.c | 174 int err; in preserve_fpsimd_context() local 177 err = __copy_to_user(ctx->vregs, fpsimd->vregs, sizeof(fpsimd->vregs)); in preserve_fpsimd_context() 178 __put_user_error(fpsimd->fpsr, &ctx->fpsr, err); in preserve_fpsimd_context() 179 __put_user_error(fpsimd->fpcr, &ctx->fpcr, err); in preserve_fpsimd_context() 182 __put_user_error(FPSIMD_MAGIC, &ctx->head.magic, err); in preserve_fpsimd_context() 183 __put_user_error(sizeof(struct fpsimd_context), &ctx->head.size, err); in preserve_fpsimd_context() 185 return err ? -EFAULT : 0; in preserve_fpsimd_context() 192 int err = 0; in restore_fpsimd_context() local 195 __get_user_error(magic, &ctx->head.magic, err); in restore_fpsimd_context() 196 __get_user_error(size, &ctx->head.size, err); in restore_fpsimd_context() [all …]
|
/arch/x86/lib/ |
D | msr-smp.c | 38 int err; in rdmsr_on_cpu() local 44 err = smp_call_function_single(cpu, __rdmsr_on_cpu, &rv, 1); in rdmsr_on_cpu() 48 return err; in rdmsr_on_cpu() 54 int err; in rdmsrl_on_cpu() local 60 err = smp_call_function_single(cpu, __rdmsr_on_cpu, &rv, 1); in rdmsrl_on_cpu() 63 return err; in rdmsrl_on_cpu() 69 int err; in wrmsr_on_cpu() local 77 err = smp_call_function_single(cpu, __wrmsr_on_cpu, &rv, 1); in wrmsr_on_cpu() 79 return err; in wrmsr_on_cpu() 85 int err; in wrmsrl_on_cpu() local [all …]
|
/arch/x86/kernel/ |
D | msr.c | 52 int err = 0; in msr_read() local 59 err = rdmsr_safe_on_cpu(cpu, reg, &data[0], &data[1]); in msr_read() 60 if (err) in msr_read() 63 err = -EFAULT; in msr_read() 70 return bytes ? bytes : err; in msr_read() 80 int err = 0; in msr_write() local 83 err = security_locked_down(LOCKDOWN_MSR); in msr_write() 84 if (err) in msr_write() 85 return err; in msr_write() 92 err = -EFAULT; in msr_write() [all …]
|
/arch/powerpc/kernel/ |
D | signal_64.c | 109 long err = 0; in setup_sigcontext() local 116 err |= __put_user(v_regs, &sc->v_regs); in setup_sigcontext() 122 err |= __copy_to_user(v_regs, &tsk->thread.vr_state, in setup_sigcontext() 138 err |= __put_user(vrsave, (u32 __user *)&v_regs[33]); in setup_sigcontext() 140 err |= __put_user(0, &sc->v_regs); in setup_sigcontext() 144 err |= copy_fpr_to_user(&sc->fp_regs, tsk); in setup_sigcontext() 160 err |= copy_vsx_to_user(v_regs, tsk); in setup_sigcontext() 167 err |= __put_user(&sc->gp_regs, &sc->regs); in setup_sigcontext() 169 err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE); in setup_sigcontext() 170 err |= __put_user(msr, &sc->gp_regs[PT_MSR]); in setup_sigcontext() [all …]
|
/arch/um/drivers/ |
D | slip_user.c | 78 int pid, fds[2], err, output_len; in slip_tramp() local 80 err = os_pipe(fds, 1, 0); in slip_tramp() 81 if (err < 0) { in slip_tramp() 83 -err); in slip_tramp() 87 err = 0; in slip_tramp() 91 err = run_helper(slip_pre_exec, &pe_data, argv); in slip_tramp() 92 if (err < 0) in slip_tramp() 94 pid = err; in slip_tramp() 102 err = -ENOMEM; in slip_tramp() 110 err = helper_wait(pid); in slip_tramp() [all …]
|
/arch/arm/mach-orion5x/ |
D | net2big-setup.c | 122 int err; in net2big_sata_power_init() local 128 err = gpio_request(NET2BIG_GPIO_SATA0_POWER, "SATA0 power status"); in net2big_sata_power_init() 129 if (err == 0) { in net2big_sata_power_init() 130 err = gpio_direction_input(NET2BIG_GPIO_SATA0_POWER); in net2big_sata_power_init() 131 if (err) in net2big_sata_power_init() 134 if (err) { in net2big_sata_power_init() 139 err = gpio_request(NET2BIG_GPIO_SATA1_POWER, "SATA1 power status"); in net2big_sata_power_init() 140 if (err == 0) { in net2big_sata_power_init() 141 err = gpio_direction_input(NET2BIG_GPIO_SATA1_POWER); in net2big_sata_power_init() 142 if (err) in net2big_sata_power_init() [all …]
|
/arch/ia64/kernel/ |
D | signal.c | 47 long err; in restore_sigcontext() local 53 err = __get_user(flags, &sc->sc_flags); in restore_sigcontext() 54 err |= __get_user(nat, &sc->sc_nat); in restore_sigcontext() 55 err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */ in restore_sigcontext() 56 err |= __get_user(cfm, &sc->sc_cfm); in restore_sigcontext() 57 err |= __get_user(um, &sc->sc_um); /* user mask */ in restore_sigcontext() 58 err |= __get_user(rsc, &sc->sc_ar_rsc); in restore_sigcontext() 59 err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat); in restore_sigcontext() 60 err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); in restore_sigcontext() 61 err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); in restore_sigcontext() [all …]
|
/arch/um/os-Linux/skas/ |
D | process.c | 57 int n, status, err; in wait_stub_done() local 67 err = ptrace(PTRACE_CONT, pid, 0, 0); in wait_stub_done() 68 if (err) { in wait_stub_done() 79 err = ptrace_dump_regs(pid); in wait_stub_done() 80 if (err) in wait_stub_done() 82 "errno = %d\n", -err); in wait_stub_done() 93 int err; in get_skas_faultinfo() local 95 err = get_fp_registers(pid, aux_fp_regs); in get_skas_faultinfo() 96 if (err < 0) { in get_skas_faultinfo() 98 err); in get_skas_faultinfo() [all …]
|
/arch/nds32/include/asm/ |
D | uaccess.h | 83 #define __get_user_error(x, ptr, err) \ argument 85 __get_user_check((x), (ptr), (err)); \ 89 #define __get_user_check(x, ptr, err) \ argument 94 __get_user_err((x), __p, (err)); \ 96 (x) = 0; (err) = -EFAULT; \ 100 #define __get_user_err(x, ptr, err) \ argument 106 __get_user_asm("lbi", __gu_val, (ptr), (err)); \ 109 __get_user_asm("lhi", __gu_val, (ptr), (err)); \ 112 __get_user_asm("lwi", __gu_val, (ptr), (err)); \ 115 __get_user_asm_dword(__gu_val, (ptr), (err)); \ [all …]
|
/arch/hexagon/kernel/ |
D | signal.c | 39 int err = 0; in setup_sigcontext() local 41 err |= copy_to_user(&sc->sc_regs.r0, ®s->r00, in setup_sigcontext() 44 err |= __put_user(regs->sa0, &sc->sc_regs.sa0); in setup_sigcontext() 45 err |= __put_user(regs->lc0, &sc->sc_regs.lc0); in setup_sigcontext() 46 err |= __put_user(regs->sa1, &sc->sc_regs.sa1); in setup_sigcontext() 47 err |= __put_user(regs->lc1, &sc->sc_regs.lc1); in setup_sigcontext() 48 err |= __put_user(regs->m0, &sc->sc_regs.m0); in setup_sigcontext() 49 err |= __put_user(regs->m1, &sc->sc_regs.m1); in setup_sigcontext() 50 err |= __put_user(regs->usr, &sc->sc_regs.usr); in setup_sigcontext() 51 err |= __put_user(regs->preds, &sc->sc_regs.p3_0); in setup_sigcontext() [all …]
|