Lines Matching refs:ac
434 static void fill_ac(acct_t *ac) in fill_ac() argument
445 memset(ac, 0, sizeof(acct_t)); in fill_ac()
447 ac->ac_version = ACCT_VERSION | ACCT_BYTEORDER; in fill_ac()
448 strscpy(ac->ac_comm, current->comm, sizeof(ac->ac_comm)); in fill_ac()
456 ac->ac_etime = encode_float(elapsed); in fill_ac()
458 ac->ac_etime = encode_comp_t(elapsed < (unsigned long) -1l ? in fill_ac()
466 ac->ac_etime_hi = etime >> 16; in fill_ac()
467 ac->ac_etime_lo = (u16) etime; in fill_ac()
472 ac->ac_btime = clamp_t(time64_t, btime, 0, U32_MAX); in fill_ac()
474 ac->ac_ahz = AHZ; in fill_ac()
479 ac->ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0; in fill_ac()
480 ac->ac_utime = encode_comp_t(nsec_to_AHZ(pacct->ac_utime)); in fill_ac()
481 ac->ac_stime = encode_comp_t(nsec_to_AHZ(pacct->ac_stime)); in fill_ac()
482 ac->ac_flag = pacct->ac_flag; in fill_ac()
483 ac->ac_mem = encode_comp_t(pacct->ac_mem); in fill_ac()
484 ac->ac_minflt = encode_comp_t(pacct->ac_minflt); in fill_ac()
485 ac->ac_majflt = encode_comp_t(pacct->ac_majflt); in fill_ac()
486 ac->ac_exitcode = pacct->ac_exitcode; in fill_ac()
494 acct_t ac; in do_acct_process() local
514 fill_ac(&ac); in do_acct_process()
516 ac.ac_uid = from_kuid_munged(file->f_cred->user_ns, orig_cred->uid); in do_acct_process()
517 ac.ac_gid = from_kgid_munged(file->f_cred->user_ns, orig_cred->gid); in do_acct_process()
520 ac.ac_uid16 = ac.ac_uid; in do_acct_process()
521 ac.ac_gid16 = ac.ac_gid; in do_acct_process()
526 ac.ac_pid = task_tgid_nr_ns(current, ns); in do_acct_process()
528 ac.ac_ppid = task_tgid_nr_ns(rcu_dereference(current->real_parent), in do_acct_process()
540 __kernel_write(file, &ac, sizeof(acct_t), &pos); in do_acct_process()