1. 28 Jul, 2004 3 commits
    • Sam Ravnborg's avatar
      kbuild: Introduce source symlink in /lib/modules/.../ · e09e5886
      Sam Ravnborg authored
                                                                                                           
      Traditionally when building a kernel the source and the
      output files are mixed.
                                                                                                           
      When building a kernel using the O= syntax to save output
      files in a separate directory a way is needed to locate
      the kernel source.
      The implemented solution is a new symlink 'source' being
      added to /lib/modules/.../
      used to locate source for an installed kernel.
      The original symlink build points to the directory
      containing the output files.
                                                                                                           
      Please note that when the kernel is build with source and
      output files mixed the two symlinks 'build' and 'source'
      will point to the same directory, thus no changes
      compared to before.
                                                                                                           
      Two options was considered:
                                                                                                            a) Adding a new symlink pointing to the output files "object"
              => All external modules have to specify O= to build
              => External modules grepping in .config or .h files
                 in include/asm needs to be updated
              => External modules that do grep in source code and
                 ordinary header files just works
                                                                                                           
      b) Let the build symlink point to the output files and introduce a new
         symlink "source" pointing to the kernel source
              => External module can be build without specifying O=
              => External modules grepping in .config or .h files
                 in include/asm just works
              => External modules that do grep in source code and
                 ordinary header files needs to be updated
                                                                                                           
      Based on the above option b) is considered the least painfull alternative.
                                                                                                           
      So to sum up:
      - If a distro does not use separate output dir => no change
      - If a distro uses separate output dir =>
              - Trivial external module just builds
              - Non-trivial (build-wise) external modules are probarly broken
                                                                                                           
      Without this patch
      - If a distro does not use separate output dir => no change
      - If a distro uses separate output dir =>
              - Trivial external modules had to specify O= to build,
                and the directory being pointed at was not obvious
              - grep in .config or include files in asm/ required
                knowledge where to locate output files
                                                                                                           
      Preferred syntax for building external modules are the following:
      
             make -C /lib/modules/`uname -r`/build M=`pwd`
      
      [Substituting 'M=...' with 'SUBDIRS=... modules' give same effect].
                                                                                                           
      When the kernel is built using separate output directory the above
      invocation of make will invoke the generated Makefile located in the output
      directory - that again will invoke the Makefile located in the kernel
      source tree root.
                                                                                                           
      Patch includes contributions from:
              Andreas Gruenbacher <agruen@suse.de>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      e09e5886
    • Sam Ravnborg's avatar
      kbuild: Create Makefile in output directory if != kernel tree · e321b2ec
      Sam Ravnborg authored
      When building a kernel using the O= syntax to save output
      files in a separate output directory now create a small Makefile in
      that same dir.
      This Makefile allow one to use make in the output directory without
      the hassle of going back to the kernel source tree.
      The O= option is added by this Makefile stub.
      Please note that the Makefile silently overwrite an old one, so changes
      will be lost if modified.
      If there is a need to tweak a Makefile in the output directory it is recommended
      to use the filename 'makefile', which GNU Make will try first.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      e321b2ec
    • Sam Ravnborg's avatar
      drivers: move STANDALONE to drivers/base/Kconfig · 56978bc2
      Sam Ravnborg authored
      Move STANDALONE from init/Kconfig to drivers/base/Kconfig .
      This way, it's besides PREVENT_FIRMWARE_BUILD.
      Signed-off-by: default avatarAdrian Bunk <bunk@fs.tum.de>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      56978bc2
  2. 23 Jul, 2004 5 commits
  3. 21 Jul, 2004 3 commits
  4. 18 Jul, 2004 2 commits
    • Ingo Molnar's avatar
      [PATCH] NX: clean up legacy binary support · 1bb0fa18
      Ingo Molnar authored
      This cleans up legacy x86 binary support by introducing a new
      personality bit: READ_IMPLIES_EXEC, and implements Linus' suggestion to
      add the PROT_EXEC bit on the two affected syscall entry places,
      sys_mprotect() and sys_mmap().  If this bit is set then PROT_READ will
      also add the PROT_EXEC bit - as expected by legacy x86 binaries.  The
      ELF loader will automatically set this bit when it encounters a legacy
      binary.
      
      This approach avoids the problems the previous ->def_flags solution
      caused.  In particular this patch fixes the PROT_NONE problem in a
      cleaner way (http://lkml.org/lkml/2004/7/12/227), and it should fix the
      ia64 PROT_EXEC problem reported by David Mosberger.  Also,
      mprotect(PROT_READ) done by legacy binaries will do the right thing as
      well. 
      
      the details:
      
      - the personality bit is added to the personality mask upon exec(),
        within the ELF loader, but is not cleared (see the exceptions below). 
        This means that if an environment that already has the bit exec()s a
        new-style binary it will still get the old behavior.
      
      - one exception are setuid/setgid binaries: these will reset the
        bit - thus local attackers cannot manually set the bit and circumvent
        NX protection. Legacy setuid binaries will still get the bit through
        the ELF loader. This gives us maximum flexibility in shaping
        compatibility environments.
      
      - selinux also clears the bit when switching SIDs via exec().
      
      - x86 is the only arch making use of READ_IMPLIES_EXEC currently. Other
        arches will have the pre-NX-patch protection setup they always had.
      
      I have booted an old distro [RH 7.2] and two new PT_GNU_STACK distros
      [SuSE 9.2 and FC2] on an NX-capable CPU - they work just fine and all
      the mapping details are right. I've checked the PROT_NONE test-utility
      as well and it works as expected. I have checked various setuid
      scenarios as well involving legacy and new-style binaries.
      
      an improved setarch utility can be used to set the personality bit
      manually:
      
      	http://redhat.com/~mingo/nx-patches/setarch-1.4-3.tar.gz
      
      the new '-X' flag does it, e.g.:
      
      	./setarch -X linux /bin/cat /proc/self/maps
      
      will trigger the old protection layout even on a new distro.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1bb0fa18
    • David Eger's avatar
      [PATCH] pmac_zilog: serial minors taken failure path fix · 4e8688b2
      David Eger authored
      I've tracked down the core issue giving me the oops wrt pmac_zilog.
      
      When you have two serial drivers, (e.g. 8250 and PMAC_ZILOG) they both say
      
      "I want to reserve X ports starting with major TTY_MAJOR and minor 64".
      
      By the time pmac_zilog gets there, the ports it requests are already
      reserved.  Unfortunately, init_pmz() doesn't check for pmz_register()
      failure, and so it merrily goes on to register the half-initialized
      pmac_zilog driver with the power management subsystem.
      
      This path provides a proper failure path.
      
      Also: 
      
      Restore ppc configs now that I know people use AT Keyboards on CHRP and PReP
      machines, and the zilog driver is no longer Oops'ing.
      Signed-off-by: default avatarDavid Eger <eger@havoc.gtf.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4e8688b2
  5. 17 Jul, 2004 4 commits
    • Linus Torvalds's avatar
      Linux 2.6.8-rc2 · d96a9bf5
      Linus Torvalds authored
      Ready for the kernel summit in Ottawa...
      d96a9bf5
    • Linus Torvalds's avatar
      Clean up ptrace child exit case. · a61b6024
      Linus Torvalds authored
      This also fixes it for when the real parent is ignoring
      SIGCHLD - noted by David Mosberger.
      a61b6024
    • Andi Kleen's avatar
      [PATCH] Fix i386 bootup with HIGHMEM+SLAB_DEBUG+NUMA and no real · 6bf1545b
      Andi Kleen authored
      For some reason I booted a NUMA and SLAB_DEBUG i386 kernel on a non
      NUMA 512MB machine.  This caused an oops at bootup in change_page_attr.
      The reason was that highmem_start_start page ended up zero and 
      that triggered the highmem check in change_page_attr when the
      slab debug code would unmap a kernel mapping.
      
      Fix is straightforward: if there is no highmem set highmem_start_page
      to max_low_pfn+1
      6bf1545b
    • Andi Kleen's avatar
      [PATCH] Fix memory corruption at x86-64 SMP bootup · 32f5543d
      Andi Kleen authored
      This fixes a long standing corruption bug in the x86-64 code. The SMP
      trampoline would corrupt page 2, which was sometimes used for other
      data.  This corrupted the ioport/iomem list in some cases and causes
      oopses while read /proc/iomem.
      
      Fix is to check the correct location and don't zero it afterwards
      because it gets reinitialized for the next CPU anyways.
      
      Thanks to Alexander Nyberg for tracking it down.
      32f5543d
  6. 16 Jul, 2004 23 commits