cregit-Linux how code gets into the kernel

Release 4.14 arch/ia64/kernel/sys_ia64.c

Directory: arch/ia64/kernel
// SPDX-License-Identifier: GPL-2.0
/*
 * This file contains various system calls that have different calling
 * conventions on different platforms.
 *
 * Copyright (C) 1999-2000, 2002-2003, 2005 Hewlett-Packard Co
 *      David Mosberger-Tang <davidm@hpl.hp.com>
 */
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/sched/task_stack.h>
#include <linux/shm.h>
#include <linux/file.h>		/* doh, must come after sched.h... */
#include <linux/smp.h>
#include <linux/syscalls.h>
#include <linux/highuid.h>
#include <linux/hugetlb.h>

#include <asm/shmparam.h>
#include <linux/uaccess.h>


unsigned long arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { long map_shared = (flags & MAP_SHARED); unsigned long align_mask = 0; struct mm_struct *mm = current->mm; struct vm_unmapped_area_info info; if (len > RGN_MAP_LIMIT) return -ENOMEM; /* handle fixed mapping: prevent overlap with huge pages */ if (flags & MAP_FIXED) { if (is_hugepage_only_range(mm, addr, len)) return -EINVAL; return addr; } #ifdef CONFIG_HUGETLB_PAGE if (REGION_NUMBER(addr) == RGN_HPAGE) addr = 0; #endif if (!addr) addr = TASK_UNMAPPED_BASE; if (map_shared && (TASK_SIZE > 0xfffffffful)) /* * For 64-bit tasks, align shared segments to 1MB to avoid potential * performance penalty due to virtual aliasing (see ASDM). For 32-bit * tasks, we prefer to avoid exhausting the address space too quickly by * limiting alignment to a single page. */ align_mask = PAGE_MASK & (SHMLBA - 1); info.flags = 0; info.length = len; info.low_limit = addr; info.high_limit = TASK_SIZE; info.align_mask = align_mask; info.align_offset = 0; return vm_unmapped_area(&info); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds4524.59%333.33%
Linus Torvalds (pre-git)4122.40%111.11%
Michel Lespinasse3820.77%111.11%
Benjamin Herrenschmidt2714.75%111.11%
Rohit Seth179.29%111.11%
David Mosberger-Tang147.65%111.11%
Peter Chubb10.55%111.11%
Total183100.00%9100.00%


asmlinkage long ia64_getpriority (int which, int who) { long prio; prio = sys_getpriority(which, who); if (prio >= 0) { force_successful_syscall_return(); prio = 20 - prio; } return prio; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)4295.45%150.00%
David Mosberger-Tang24.55%150.00%
Total44100.00%2100.00%

/* XXX obsolete, but leave it here until the old libc is gone... */
asmlinkage unsigned long sys_getpagesize (void) { return PAGE_SIZE; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)12100.00%1100.00%
Total12100.00%1100.00%


asmlinkage unsigned long ia64_brk (unsigned long brk) { unsigned long retval = sys_brk(brk); force_successful_syscall_return(); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)2284.62%250.00%
David Mosberger-Tang27.69%125.00%
Al Viro27.69%125.00%
Total26100.00%4100.00%

/* * On IA-64, we return the two file descriptors in ret0 and ret1 (r8 * and r9) as this is faster than doing a copy_to_user(). */
asmlinkage long sys_ia64_pipe (void) { struct pt_regs *regs = task_pt_regs(current); int fd[2]; int retval; retval = do_pipe_flags(fd, 0); if (retval) goto out; retval = fd[0]; regs->r9 = fd[1]; out: return retval; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)5585.94%120.00%
David Mosberger-Tang46.25%120.00%
Ulrich Drepper34.69%120.00%
Heiko Carstens11.56%120.00%
Al Viro11.56%120.00%
Total64100.00%5100.00%


int ia64_mmap_check(unsigned long addr, unsigned long len, unsigned long flags) { unsigned long roff; /* * Don't permit mappings into unmapped space, the virtual page table * of a region, or across a region boundary. Note: RGN_MAP_LIMIT is * equal to 2^n-PAGE_SIZE (for some integer n <= 61) and len > 0. */ roff = REGION_OFFSET(addr); if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len))) return -EINVAL; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Kirill Korotaev54100.00%1100.00%
Total54100.00%1100.00%

/* * mmap2() is like mmap() except that the offset is expressed in units * of PAGE_SIZE (instead of bytes). This allows to mmap2() (pieces * of) files that are larger than the address space of the CPU. */
asmlinkage unsigned long sys_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, long pgoff) { addr = sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); if (!IS_ERR((void *) addr)) force_successful_syscall_return(); return addr; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)5995.16%250.00%
David Mosberger-Tang23.23%125.00%
Al Viro11.61%125.00%
Total62100.00%4100.00%


asmlinkage unsigned long sys_mmap (unsigned long addr, unsigned long len, int prot, int flags, int fd, long off) { if (offset_in_page(off) != 0) return -EINVAL; addr = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); if (!IS_ERR((void *) addr)) force_successful_syscall_return(); return addr; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)7192.21%350.00%
David Mosberger-Tang56.49%233.33%
Al Viro11.30%116.67%
Total77100.00%6100.00%


asmlinkage unsigned long ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, unsigned long new_addr) { addr = sys_mremap(addr, old_len, new_len, flags, new_addr); if (!IS_ERR((void *) addr)) force_successful_syscall_return(); return addr; }

Contributors

PersonTokensPropCommitsCommitProp
David Mosberger-Tang5896.67%266.67%
Al Viro23.33%133.33%
Total60100.00%3100.00%

#ifndef CONFIG_PCI
asmlinkage long sys_pciconfig_read (unsigned long bus, unsigned long dfn, unsigned long off, unsigned long len, void *buf) { return -ENOSYS; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)30100.00%1100.00%
Total30100.00%1100.00%


asmlinkage long sys_pciconfig_write (unsigned long bus, unsigned long dfn, unsigned long off, unsigned long len, void *buf) { return -ENOSYS; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)30100.00%1100.00%
Total30100.00%1100.00%

#endif /* CONFIG_PCI */

Overall Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)40157.37%413.33%
David Mosberger-Tang9113.02%620.00%
Kirill Korotaev547.73%13.33%
Linus Torvalds466.58%413.33%
Michel Lespinasse385.44%13.33%
Benjamin Herrenschmidt273.86%13.33%
Rohit Seth172.43%13.33%
Al Viro71.00%413.33%
Ingo Molnar60.86%26.67%
Ulrich Drepper30.43%13.33%
Arun Sharma30.43%13.33%
Andrew Morton30.43%13.33%
Heiko Carstens10.14%13.33%
Greg Kroah-Hartman10.14%13.33%
Peter Chubb10.14%13.33%
Total699100.00%30100.00%
Directory: arch/ia64/kernel
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.