1. 19 Aug, 2009 9 commits
    • Steven Rostedt's avatar
      kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set · de481560
      Steven Rostedt authored
      If CONFIG_IKCONFIG is set but CONFIG_IKCONFIG_PROC is not, then
      gcc will optimize the config.gz out, because nobody uses it.
      
      This patch adds "__used" to the config.gz data to keep it around so that
      code like extract-ikconfig can still find it.
      
      [ Impact: allow extract-ikconfig to find config.gz ]
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      de481560
    • Steven Rostedt's avatar
      kconfig: have extract-ikconfig read ELF files · 6be51ffc
      Steven Rostedt authored
      It would be nice to use extract-ikconfig to find the congfig.gz
      in either vmlinux (not vmlinuz) or configs.ko.
      
      This patch changes the script to also be able to read ELF files directly.
      
      [ Impact: find config.gz in vmlinux and configs.ko ]
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      6be51ffc
    • Steven Rostedt's avatar
      kconfig: add check if end exists in extract-ikconfig · fd3132d5
      Steven Rostedt authored
      Both start and end should be tested for existence before continuing
      to parse the config.gz file.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      fd3132d5
    • Steven Rostedt's avatar
      kconfig: enable CONFIG_IKCONFIG from streamline_config.pl · 744ffcbe
      Steven Rostedt authored
      Ingo Molnar suggested that the streamline_config.pl should enable
      CONFIG_IKCONFIG to keep the current config in the kernel.
      Then we can use scripts/extract-ikconfig to find the current
      modules.
      
      This patch changes streamline_config.pl to check if CONFIG_IKCONFIG
      is not set, and if it is not, it enables it to be a module.
      
      [ Impact: make current config options easier to find ]
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      744ffcbe
    • Steven Rostedt's avatar
      kconfig: do not warn about modules built in · ea2c1894
      Steven Rostedt authored
      The streamline_config.pl finds all the configs that are needed to
      compile the currently loaded modules. After it creates the .config
      file, it tests to make sure all the configs that are needed were
      set.
      
      It only looks at the configs that are modules, it does not look
      at the builtin configs. This causes unnecessary warnings about modules
      not being covered.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      ea2c1894
    • Steven Rostedt's avatar
      kconfig: streamline_config.pl do not stop with no depends · 74398d32
      Steven Rostedt authored
      If a config does not have a prompt, it must be selected.
      streamline_config.pl keeps track of all configs that select other configs.
      If a config that does not have a prompt needs to be set to enable a
      current module, it will include all configs that select it.
      Note, streamline_config.pl does not enable modules that are not already
      enabled. It only keeps enabled those that were enabled and might be
      needed to compile the current modules.
      
      The code to find the selects of a config is after the code that
      adds the depends. But if a config needed selects but had no dependencies,
      it would not be set. Because the code would stop before getting to
      the select.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      74398d32
    • Steven Rostedt's avatar
      kconfig: add make localyesconfig option · 281c9dad
      Steven Rostedt authored
      This adds the option localyesconfig to make. This is similar to
      localmodconfig, but after it removes unnecessary modules it runs
      
        sed -i s/=m/=y/
      
      on the .config file. It then runs "make silentoldconfig" to fix any
      wholes that were created by the conversion of modules to core.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      281c9dad
    • Steven Rostedt's avatar
      kconfig: make localmodconfig to run streamline_config.pl · 03fa25da
      Steven Rostedt authored
      Running the streamline_config.pl script manually can still be confusing
      for some users. This patch adds the localmodconfig option. This will
      automatically run streamline_config.pl on the current .config and
      then run "make silentoldconfig" to fix any wholes that might have been
      created.
      
       $ make localmodconfig
      
      This will remove any module configurations in .config that are not needed
      to compile the modules that are loaded.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      03fa25da
    • Steven Rostedt's avatar
      kconfig: add streamline_config.pl to scripts · dcc60243
      Steven Rostedt authored
      streamline_config.pl is a very powerful tool. For those that install
      a kernel to a new box using the config file from the distribution know that
      it can take forever to compile the kernel.
      
      Making a custom config file that will still boot your box, but bring
      down the compile time of the kernel can be quit painful, and to ask
      someone that reported a bug to do this can be a large burdon since that
      person may not even know how to build a kernel.
      
      This script will perform "lsmod" to find all the modules loaded on the
      current running system. It will read all the Makefiles to map which
      CONFIG enables a module. It will read the Kconfig files to find the
      dependencies and selects that may be needed to support a CONFIG.
      Finally, it reads the .config file and removes any module "=m" that is
      not needed to enable the currently loaded modules. The output goes to
      standard out.
      
      Here's a way to run the script. From the Linux directory that holds
      a distribution .config.
      
       $ scripts/kconfig/streamline_config.pl arch/x86/Kconfig > config-sl
       $ mv .config config-save
       $ mv config-sl .config
       $ make oldconfig
      
      Now you have a .config that will still build all your modules, but also
      take much less time to build the kernel.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      dcc60243
  2. 18 Aug, 2009 18 commits
  3. 17 Aug, 2009 13 commits
    • Linus Torvalds's avatar
      df4ecf15
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · c58afec8
      Linus Torvalds authored
      * 'for-linus' of git://oss.sgi.com/xfs/xfs:
        xfs: fix locking in xfs_iget_cache_hit
      c58afec8
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of... · 52dec22e
      Linus Torvalds authored
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
        security: define round_hint_to_min in !CONFIG_SECURITY
        Security/SELinux: seperate lsm specific mmap_min_addr
        SELinux: call cap_file_mmap in selinux_file_mmap
        Capabilities: move cap_file_mmap to commoncap.c
      52dec22e
    • Eric Paris's avatar
      inotify: start watch descriptor count at 1 · 08e53fcb
      Eric Paris authored
      The inotify_add_watch man page specifies that inotify_add_watch() will
      return a non-negative integer.  However, historically the inotify
      watches started at 1, not at 0.
      
      Turns out that the inotifywait program provided by the inotify-tools
      package doesn't properly handle a 0 watch descriptor.  In 7e790dd5 we
      changed from starting at 1 to starting at 0.  This patch starts at 1,
      just like in previous kernels, but also just like in previous kernels
      it's possible for it to wrap back to 0.  This preserves the kernel
      functionality exactly like it was before the patch (neither method broke
      the spec)
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      08e53fcb
    • Eric Paris's avatar
      inotify: tail drop inotify q_overflow events · cd94c8bb
      Eric Paris authored
      In f44aebcc the tail drop logic of events with no file backing
      (q_overflow and in_ignored) was reversed so IN_IGNORED events would
      never be tail dropped.  This now means that Q_OVERFLOW events are NOT
      tail dropped.  The fix is to not tail drop IN_IGNORED, but to tail drop
      Q_OVERFLOW.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd94c8bb
    • Eric Paris's avatar
      notify: unused event private race · eef3a116
      Eric Paris authored
      inotify decides if private data it passed to get added to an event was
      used by checking list_empty().  But it's possible that the event may
      have been dequeued and the private event removed so it would look empty.
      
      The fix is to use the return code from fsnotify_add_notify_event rather
      than looking at the list.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      eef3a116
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 0f66f96d
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm: (37 commits)
        ARM: 5673/1: U300 fix initsection compile warning
        ARM: Fix broken highmem support
        mx31moboard: invert sdhc ro signal sense
        ARM: S3C24XX: Fix clkout mpx error
        ARM: S3C64XX: serial: Fix a typo in Kconfig
        IXP4xx: Fix IO_SPACE_LIMIT for 2.6.31-rc core PCI changes
        OMAP3: RX51: Updated rx51_defconfig
        OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
        OMAP3: RX51: Define TWL4030 USB transceiver in board file
        OMAP3: Overo: Fix smsc911x platform device resource value
        OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size
        OMAP2/3: DMA errata correction
        OMAP: Fix testing of cpu defines for mach-omap1
        OMAP3: Overo: add missing pen-down GPIO definition
        OMAP: GPIO: clear/restore level/edge detect settings on mask/unmask
        OMAP3: PM: Fix wrong sequence in suspend.
        OMAP: PM: CPUfreq: obey min/max settings of policy
        OMAP2/3/4: UART: allow in-order port traversal
        OMAP2/3/4: UART: Allow per-UART disabling wakeup for serial ports
        OMAP3: Fixed crash bug with serial + suspend
        ...
      0f66f96d
    • Atsushi Nemoto's avatar
      MIPS: Fix HPAGE_SIZE redefinition · 87c62a66
      Atsushi Nemoto authored
      This patch fixes warnings like this:
        CC      fs/proc/meminfo.o
      In file included from /work/linux/include/linux/mmzone.h:20,
                       from /work/linux/include/linux/gfp.h:4,
                       from /work/linux/include/linux/mm.h:8,
                       from /work/linux/fs/proc/meminfo.c:5:
      /work/linux/arch/mips/include/asm/page.h:36:1: warning: "HPAGE_SIZE" redefined
      In file included from /work/linux/fs/proc/meminfo.c:2:
      /work/linux/include/linux/hugetlb.h:107:1: warning: this is the location of the previous definition
      Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Acked-by: default avatarDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      87c62a66
    • Ingo Molnar's avatar
      x86, mce: Don't initialize MCEs on unknown CPUs · e412cd25
      Ingo Molnar authored
      An older test-box started hanging at the following point during
      bootup:
      
       [    0.022996] Mount-cache hash table entries: 512
       [    0.024996] Initializing cgroup subsys debug
       [    0.025996] Initializing cgroup subsys cpuacct
       [    0.026995] Initializing cgroup subsys devices
       [    0.027995] Initializing cgroup subsys freezer
       [    0.028995] mce: CPU supports 5 MCE banks
      
      I've bisected it down to commit 4efc0670 ("x86, mce: use 64bit
      machine check code on 32bit"), which utilizes the MCE code on
      32-bit systems too.
      
      The problem is caused by this detail in my config:
      
        # CONFIG_CPU_SUP_INTEL is not set
      
      This disables the quirks in mce_cpu_quirks() but still enables
      MCE support - which then hangs due to the missing quirk
      workaround needed on this CPU:
      
      	if (c->x86 == 6 && c->x86_model < 0x1A && banks > 0)
      		mce_banks[0].init = 0;
      
      The safe solution is to not initialize MCEs if we dont know on
      what CPU we are running (or if that CPU's support code got
      disabled in the config).
      
      Also be a bit more defensive on 32-bit systems: dont do a
      boot-time dump of pending MCEs not just on the specific system
      that we found a problem with (Pentium-M), but earlier ones as
      well.
      
      Now this problem is probably not common and disabling CPU
      support is rare - but still being more defensive in something
      we turned on for a wide range of CPUs is prudent.
      
      Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      LKML-Reference: Message-ID: <4A88E3E4.40506@jp.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e412cd25
    • Bartlomiej Zolnierkiewicz's avatar
      x86, mce: don't log boot MCEs on Pentium M (model == 13) CPUs · c7f6fa44
      Bartlomiej Zolnierkiewicz authored
      On my legacy Pentium M laptop (Acer Extensa 2900) I get bogus MCE on a cold
      boot with CONFIG_X86_NEW_MCE enabled, i.e. (after decoding it with mcelog):
      
      MCE 0
      HARDWARE ERROR. This is *NOT* a software problem!
      Please contact your hardware vendor
      CPU 0 BANK 1 MCG status:
      MCi status:
      Error overflow
      Uncorrected error
      Error enabled
      Processor context corrupt
      MCA: Data CACHE Level-1 UNKNOWN Error
      STATUS f200000000000195 MCGSTATUS 0
      
      [ The other STATUS values observed: f2000000000001b5 (... UNKNOWN error)
        and f200000000000115 (... READ Error).
      
        To verify that this is not a CONFIG_X86_NEW_MCE bug I also modified
        the CONFIG_X86_OLD_MCE code (which doesn't log any MCEs) to dump
        content of STATUS MSR before it is cleared during initialization. ]
      
      Since the bogus MCE results in a kernel taint (which in turn disables
      lockdep support) don't log boot MCEs on Pentium M (model == 13) CPUs
      by default ("mce=bootlog" boot parameter can be be used to get the old
      behavior).
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Reviewed-by: default avatarAndi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c7f6fa44
    • Christoph Hellwig's avatar
      xfs: fix locking in xfs_iget_cache_hit · bc990f5c
      Christoph Hellwig authored
      The locking in xfs_iget_cache_hit currently has numerous problems:
      
       - we clear the reclaim tag without i_flags_lock which protects
         modifications to it
       - we call inode_init_always which can sleep with pag_ici_lock
         held (this is oss.sgi.com BZ #819)
       - we acquire and drop i_flags_lock a lot and thus provide no
         consistency between the various flags we set/clear under it
      
      This patch fixes all that with a major revamp of the locking in
      the function.  The new version acquires i_flags_lock early and
      only drops it once we need to call into inode_init_always or before
      calling xfs_ilock.
      
      This patch fixes a bug seen in the wild where we race modifying the
      reclaim tag.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarFelix Blyakher <felixb@sgi.com>
      Reviewed-by: default avatarEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: default avatarFelix Blyakher <felixb@sgi.com>
      bc990f5c
    • Eric Paris's avatar
      security: define round_hint_to_min in !CONFIG_SECURITY · 1d995973
      Eric Paris authored
      Fix the header files to define round_hint_to_min() and to define
      mmap_min_addr_handler() in the !CONFIG_SECURITY case.
      
      Built and tested with !CONFIG_SECURITY
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      1d995973
    • Eric Paris's avatar
      Security/SELinux: seperate lsm specific mmap_min_addr · 788084ab
      Eric Paris authored
      Currently SELinux enforcement of controls on the ability to map low memory
      is determined by the mmap_min_addr tunable.  This patch causes SELinux to
      ignore the tunable and instead use a seperate Kconfig option specific to how
      much space the LSM should protect.
      
      The tunable will now only control the need for CAP_SYS_RAWIO and SELinux
      permissions will always protect the amount of low memory designated by
      CONFIG_LSM_MMAP_MIN_ADDR.
      
      This allows users who need to disable the mmap_min_addr controls (usual reason
      being they run WINE as a non-root user) to do so and still have SELinux
      controls preventing confined domains (like a web server) from being able to
      map some area of low memory.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      788084ab