11 May, 2011

1 commit

  • Create files under /proc//ns/ to allow controlling the
    namespaces of a process.

    This addresses three specific problems that can make namespaces hard to
    work with.
    - Namespaces require a dedicated process to pin them in memory.
    - It is not possible to use a namespace unless you are the child
    of the original creator.
    - Namespaces don't have names that userspace can use to talk about
    them.

    The namespace files under /proc//ns/ can be opened and the
    file descriptor can be used to talk about a specific namespace, and
    to keep the specified namespace alive.

    A namespace can be kept alive by either holding the file descriptor
    open or bind mounting the file someplace else. aka:
    mount --bind /proc/self/ns/net /some/filesystem/path
    mount --bind /proc/self/fd/ /some/filesystem/path

    This allows namespaces to be named with userspace policy.

    It requires additional support to make use of these filedescriptors
    and that will be comming in the following patches.

    Acked-by: Daniel Lezcano
    Signed-off-by: Eric W. Biederman

    Eric W. Biederman
     

14 Jan, 2011

1 commit


17 Nov, 2010

1 commit

  • It allows users to see what consoles are currently known to the system
    and with what flags.

    It is based on Werner's patch, the part about traversing fds was
    removed, the code was moved to kernel/printk.c, where consoles are
    handled and it makes more sense to me.

    Signed-off-by: Jiri Slaby [cleanups]
    Signed-off-by: "Dr. Werner Fink"
    Cc: Al Viro
    Cc: Greg Kroah-Hartman
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

11 Aug, 2010

1 commit


19 Jun, 2009

1 commit

  • Export statistics for softirq in /proc/softirqs and /proc/stat.

    1. /proc/softirqs
    Implement /proc/softirqs which shows the number of softirq
    for each CPU like /proc/interrupts.

    2. /proc/stat
    Add the "softirq" line to /proc/stat.
    This line shows the number of softirq for all cpu.
    The first column is the total of all softirqs and
    each subsequent column is the total for particular softirq.

    [kosaki.motohiro@jp.fujitsu.com: remove redundant for_each_possible_cpu() loop]
    Signed-off-by: Keika Kobayashi
    Reviewed-by: Hiroshi Shimamoto
    Cc: KOSAKI Motohiro
    Cc: Ingo Molnar
    Cc: Eric Dumazet
    Cc: Alexey Dobriyan
    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Keika Kobayashi
     

23 Oct, 2008

11 commits


11 Oct, 2007

1 commit

  • This patch makes /proc/net per network namespace. It modifies the global
    variables proc_net and proc_net_stat to be per network namespace.
    The proc_net file helpers are modified to take a network namespace argument,
    and all of their callers are fixed to pass &init_net for that argument.
    This ensures that all of the /proc/net files are only visible and
    usable in the initial network namespace until the code behind them
    has been updated to be handle multiple network namespaces.

    Making /proc/net per namespace is necessary as at least some files
    in /proc/net depend upon the set of network devices which is per
    network namespace, and even more files in /proc/net have contents
    that are relevant to a single network namespace.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

28 Mar, 2007

1 commit

  • Without attached patch against current -git I get following with
    !PROC_SYSCTL (with EMBEDDED and PROC_FS set):

    CC init/version.o
    LD init/built-in.o
    LD vmlinux
    fs/built-in.o: In function `do_proc_sys_lookup':
    proc_sysctl.c:(.text+0x26583): undefined reference to `sysctl_head_next'
    fs/built-in.o: In function `proc_sys_revalidate':
    proc_sysctl.c:(.text+0x265bb): undefined reference to `sysctl_head_finish'
    fs/built-in.o: In function `proc_sys_readdir':
    proc_sysctl.c:(.text+0x26720): undefined reference to `sysctl_head_next'
    proc_sysctl.c:(.text+0x267d8): undefined reference to `sysctl_head_finish'
    proc_sysctl.c:(.text+0x268e7): undefined reference to `sysctl_head_next'
    proc_sysctl.c:(.text+0x26910): undefined reference to `sysctl_head_finish'
    fs/built-in.o: In function `proc_sys_write':
    proc_sysctl.c:(.text+0x2695d): undefined reference to `sysctl_perm'
    proc_sysctl.c:(.text+0x2699c): undefined reference to `sysctl_head_finish'
    fs/built-in.o: In function `proc_sys_read':
    proc_sysctl.c:(.text+0x269e9): undefined reference to `sysctl_perm'
    proc_sysctl.c:(.text+0x26a25): undefined reference to `sysctl_head_finish'
    fs/built-in.o: In function `proc_sys_permission':
    proc_sysctl.c:(.text+0x26ad1): undefined reference to `sysctl_perm'
    proc_sysctl.c:(.text+0x26adb): undefined reference to `sysctl_head_finish'
    fs/built-in.o: In function `proc_sys_lookup':
    proc_sysctl.c:(.text+0x26b39): undefined reference to `sysctl_head_finish'
    make: *** [vmlinux] Virhe 1

    All those functions are in fs/proc/proc_sysctl.c, which has no CONFIG_
    #define's in it, so the patch makes the compilation of that file to depend
    on CONFIG_PROC_SYSCTL (the simplest choice).

    Acked-by: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mika Kukkonen
     

15 Feb, 2007

1 commit

  • With this change the sysctl inodes can be cached and nothing needs to be done
    when removing a sysctl table.

    For a cost of 2K code we will save about 4K of static tables (when we remove
    de from ctl_table) and 70K in proc_dir_entries that we will not allocate, or
    about half that on a 32bit arch.

    The speed feels about the same, even though we can now cache the sysctl
    dentries :(

    We get the core advantage that we don't need to have a 1 to 1 mapping between
    ctl table entries and proc files. Making it possible to have /proc/sys vary
    depending on the namespace you are in. The currently merged namespaces don't
    have an issue here but the network namespace under /proc/sys/net needs to have
    different directories depending on which network adapters are visible. By
    simply being a cache different directories being visible depending on who you
    are is trivial to implement.

    [akpm@osdl.org: fix uninitialised var]
    [akpm@osdl.org: fix ARM build]
    [bunk@stusta.de: make things static]
    Signed-off-by: Eric W. Biederman
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

08 Dec, 2006

1 commit


26 Jun, 2005

1 commit

  • From: "Vivek Goyal"

    o Support for /proc/vmcore interface. This interface exports elf core image
    either in ELF32 or ELF64 format, depending on the format in which elf headers
    have been stored by crashed kernel.
    o Added support for CONFIG_VMCORE config option.
    o Removed the dependency on /proc/kcore.

    From: "Eric W. Biederman"

    This patch has been refactored to more closely match the prevailing style in
    the affected files. And to clearly indicate the dependency between
    /proc/kcore and proc/vmcore.c

    From: Hariprasad Nellitheertha

    This patch contains the code that provides an ELF format interface to the
    previous kernel's memory post kexec reboot.

    Signed off by Hariprasad Nellitheertha
    Signed-off-by: Eric Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds