1. 01 Feb, 2008 40 commits
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · cbb51afa
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (24 commits)
        pci: allow multiple calls to pcim_enable_device()
        Blackfin pata-bf54x driver: fix compiling bug - no ata_port struct in struct ata_device any more
        Blackfin pata-bf54x driver: should cover all possible interrupt sources
        Blackfin pata-bf54x driver: Add debug information
        Blackfin pata-bf54x driver: Remove obsolete PM function
        pata_sl82c105: dual channel support
        ata_piix.c: make piix_merge_scr() static
        sata_nv: fix for completion handling
        sata_mv: Remove PCI dependency
        sata_mv ncq Comments and version bump
        sata_mv ncq Remove post internal cmd op
        sata_mv ncq Enable NCQ operation
        sata_mv ncq Introduce per-tag SG tables
        ata_piix: IDE mode SATA patch for Intel ICH10 DeviceID's
        ahci: RAID mode SATA patch for Intel ICH10 DeviceID's
        sata_mv ncq Use DMA memory pools for hardware memory tables
        sata_mv ncq Restrict max sectors to 8-bits on GenII NCQ
        sata_mv ncq Ignore response status LSB on NCQ
        sata_mv ncq Use hqtag instead of ioid
        sata_mv ncq Add want ncq parameter for EDMA configuration
        ...
      cbb51afa
    • Linus Torvalds's avatar
      Merge branch 'audit.b46' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current · dd5f5fed
      Linus Torvalds authored
      * 'audit.b46' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
        [AUDIT] Add uid, gid fields to ANOM_PROMISCUOUS message
        [AUDIT] ratelimit printk messages audit
        [patch 2/2] audit: complement va_copy with va_end()
        [patch 1/2] kernel/audit.c: warning fix
        [AUDIT] create context if auditing was ever enabled
        [AUDIT] clean up audit_receive_msg()
        [AUDIT] make audit=0 really stop audit messages
        [AUDIT] break large execve argument logging into smaller messages
        [AUDIT] include audit type in audit message when using printk
        [AUDIT] do not panic on exclude messages in audit_log_pid_context()
        [AUDIT] Add End of Event record
        [AUDIT] add session id to audit messages
        [AUDIT] collect uid, loginuid, and comm in OBJ_PID records
        [AUDIT] return EINTR not ERESTART*
        [PATCH] get rid of loginuid races
        [PATCH] switch audit_get_loginuid() to task_struct *
      dd5f5fed
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 · 3e01dfce
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
        x86: avoid section mismatch involving arch_register_cpu
        x86: fixes for lookup_address args
        x86: fix sparse warnings in cpu/common.c
        x86: make early_console static in early_printk.c
        x86: remove unneeded round_up
        x86: fix section mismatch warning in kernel/pci-calgary
        x86: fix section mismatch warning in acpi/boot.c
        x86: fix section mismatch warnings when referencing notifiers
        x86: silence section mismatch warning in smpboot_64.c
        x86: fix comments in vmlinux_64.lds
        x86_64: make bootmap_start page align v6
        x86_64: add debug name for early_res
      3e01dfce
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched · 45f37e86
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
        latencytop: Change Kconfig dependency.
        futex: Add bitset conditional wait/wakeup functionality
        futex: Remove warn on in return fixup path
        x86: replace LOCK_PREFIX in futex.h
        tick-sched: add more debug information
        timekeeping: update xtime_cache when time(zone) changes
        hrtimer: fix hrtimer_init_sleeper() users
      45f37e86
    • Klaus Heinrich Kiwi's avatar
      [AUDIT] Add uid, gid fields to ANOM_PROMISCUOUS message · 7759db82
      Klaus Heinrich Kiwi authored
      Changes the ANOM_PROMISCUOUS message to include uid and gid fields,
      making it consistent with other AUDIT_ANOM_ messages and in the
      format the userspace is expecting.
      Signed-off-by: default avatarKlaus Heinrich Kiwi <klausk@br.ibm.com>
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      7759db82
    • Eric Paris's avatar
      [AUDIT] ratelimit printk messages audit · 320f1b1e
      Eric Paris authored
      some printk messages from the audit system can become excessive.  This
      patch ratelimits those messages.  It was found that messages, such as
      the audit backlog lost printk message could flood the logs to the point
      that a machine could take an nmi watchdog hit or otherwise become
      unresponsive.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      320f1b1e
    • Richard Knutsson's avatar
      [patch 2/2] audit: complement va_copy with va_end() · 148b38dc
      Richard Knutsson authored
      Complement va_copy() with va_end().
      Signed-off-by: default avatarRichard Knutsson <ricknu-0@student.ltu.se>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      148b38dc
    • Andrew Morton's avatar
      [patch 1/2] kernel/audit.c: warning fix · ef00be05
      Andrew Morton authored
      kernel/audit.c: In function 'audit_log_start':
      kernel/audit.c:1133: warning: 'serial' may be used uninitialized in this function
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      ef00be05
    • Eric Paris's avatar
      [AUDIT] create context if auditing was ever enabled · b593d384
      Eric Paris authored
      Disabling audit at runtime by auditctl doesn't mean that we can
      stop allocating contexts for new processes; we don't want to miss them
      when that sucker is reenabled.
      
      (based on work from Al Viro in the RHEL kernel series)
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      b593d384
    • Eric Paris's avatar
      [AUDIT] clean up audit_receive_msg() · 50397bd1
      Eric Paris authored
      generally clean up audit_receive_msg() don't free random memory if
      selinux_sid_to_string fails for some reason.  Move generic auditing
      to a helper function
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      50397bd1
    • Eric Paris's avatar
      [AUDIT] make audit=0 really stop audit messages · 1a6b9f23
      Eric Paris authored
      Some audit messages (namely configuration changes) are still emitted even if
      the audit subsystem has been explicitly disabled.  This patch turns those
      messages off as well.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      1a6b9f23
    • Eric Paris's avatar
      [AUDIT] break large execve argument logging into smaller messages · de6bbd1d
      Eric Paris authored
      execve arguments can be quite large.  There is no limit on the number of
      arguments and a 4G limit on the size of an argument.
      
      this patch prints those aruguments in bite sized pieces.  a userspace size
      limitation of 8k was discovered so this keeps messages around 7.5k
      
      single arguments larger than 7.5k in length are split into multiple records
      and can be identified as aX[Y]=
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      de6bbd1d
    • Eric Paris's avatar
      [AUDIT] include audit type in audit message when using printk · e445deb5
      Eric Paris authored
      Currently audit drops the audit type when an audit message goes through
      printk instead of the audit deamon.  This is a minor annoyance in
      that the audit type is no longer part of the message and the information
      the audit type conveys needs to be carried in, or derived from the
      message data.
      
      The attached patch includes the type number as part of the printk.
      Admittedly it isn't the type name that the audit deamon provides but I
      think this is better than dropping the type completely.
      Signed-pff-by: default avatarJohn Johansen <jjohansen@suse.de>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      e445deb5
    • Eric Paris's avatar
      [AUDIT] do not panic on exclude messages in audit_log_pid_context() · 6246ccab
      Eric Paris authored
      If we fail to get an ab in audit_log_pid_context this may be due to an exclude
      rule rather than a memory allocation failure.  If it was due to a memory
      allocation failue we would have already paniced and no need to do it again.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      6246ccab
    • Eric Paris's avatar
      [AUDIT] Add End of Event record · c0641f28
      Eric Paris authored
      This patch adds an end of event record type. It will be sent by the kernel as
      the last record when a multi-record event is triggered. This will aid realtime
      analysis programs since they will now reliably know they have the last record
      to complete an event. The audit daemon filters this and will not write it to
      disk.
      
      Signed-off-by: Steve Grubb <sgrubb redhat com>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      c0641f28
    • Eric Paris's avatar
      [AUDIT] add session id to audit messages · 4746ec5b
      Eric Paris authored
      In order to correlate audit records to an individual login add a session
      id.  This is incremented every time a user logs in and is included in
      almost all messages which currently output the auid.  The field is
      labeled ses=  or oses=
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      4746ec5b
    • Eric Paris's avatar
      [AUDIT] collect uid, loginuid, and comm in OBJ_PID records · c2a7780e
      Eric Paris authored
      Add uid, loginuid, and comm collection to OBJ_PID records.  This just
      gives users a little more information about the task that received a
      signal.  pid is rather meaningless after the fact, and even though comm
      isn't great we can't collect exe reasonably on this code path for
      performance reasons.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      c2a7780e
    • Eric Paris's avatar
      [AUDIT] return EINTR not ERESTART* · f701b75e
      Eric Paris authored
      The syscall exit code will change ERESTART* kernel internal return codes
      to EINTR if it does not restart the syscall.  Since we collect the audit
      info before that point we should fix those in the audit log as well.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      f701b75e
    • Al Viro's avatar
      [PATCH] get rid of loginuid races · bfef93a5
      Al Viro authored
      Keeping loginuid in audit_context is racy and results in messier
      code.  Taken to task_struct, out of the way of ->audit_context
      changes.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      bfef93a5
    • Al Viro's avatar
      [PATCH] switch audit_get_loginuid() to task_struct * · 0c11b942
      Al Viro authored
      all callers pass something->audit_context
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      0c11b942
    • Tejun Heo's avatar
      pci: allow multiple calls to pcim_enable_device() · b95d58ea
      Tejun Heo authored
      There's no reason not to allow multiple calls to pcim_enable_device().
      Calls after the first one can simply be noop.  All PCI resources will
      be released when the initial pcim_enable_device() resource is
      released.
      
      This allows more flexibility to managed PCI users.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      b95d58ea
    • Bryan Wu's avatar
      Blackfin pata-bf54x driver: fix compiling bug - no ata_port struct in struct ata_device any more · 9f24e82d
      Bryan Wu authored
      Cc: Sonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      9f24e82d
    • Sonic Zhang's avatar
    • Sonic Zhang's avatar
    • Sonic Zhang's avatar
      a315acda
    • Alan Cox's avatar
      pata_sl82c105: dual channel support · 92ba5d02
      Alan Cox authored
      Use qc_defer to serialize the two channels
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      92ba5d02
    • Adrian Bunk's avatar
      ata_piix.c: make piix_merge_scr() static · 4a537a55
      Adrian Bunk authored
      piix_merge_scr() can become static.
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      4a537a55
    • Robert Hancock's avatar
      sata_nv: fix for completion handling · a1fe7824
      Robert Hancock authored
      This patch is based on an original patch from Kuan Luo of NVIDIA,
      posted under subject "fixed a bug of adma in rhel4u5 with HDS7250SASUN500G".
      His description follows. I've reworked it a bit to avoid some unnecessary
      repeated checks but it should be functionally identical.
      
      "The patch is to solve the error message "ata1: CPB flags CMD err,
      flags=0x11" when testing HDS7250SASUN500G in rhel4u5.
      I tested this hd in 2.6.24-rc7 which needed to remove the mask in
      blacklist to run the ncq and the same error also showed up.
      
      I traced the  bug and found that the interrupt finished a command (for
      example, tag=0) when the driver got that adma status is
      NV_ADMA_STAT_DONE  and  cpb->resp_flags is NV_CPB_RESP_DONE.
      However, For this hd, the drive maybe didn't clear bit 0 at this moment.
      It meaned the hardware  had not completely finished the command.
      If at the same time  the driver freed the command(tag 0) and sended
      another command (tag 0), the error happened.
      
      The notifier register is 32-bit register containing notifier value.
      Value is bit vector containing one bit per tag number (0-31) in
      corresponding bit positions (bit 0 is for tag 0, etc). When bit is set
      then ADMA indicates that command with corresponding tag number completed
      execution.
      
      So i added the check notifier code. Sometimes i saw that the notifier
      reg set some bits  , but the adma status set NV_ADMA_STAT_CMD_COMPLETE
      ,not NV_ADMA_STAT_DONE. So i added the NV_ADMA_STAT_CMD_COMPLETE check
      code."
      Signed-off-by: default avatarRobert Hancock <hancockr@shaw.ca>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      a1fe7824
    • Saeed Bishara's avatar
      sata_mv: Remove PCI dependency · 7bb3c529
      Saeed Bishara authored
      The integrated SATA controller is connected directly to the SoC's
      internal bus, not via PCI interface. this patch removes the dependency
      on the PCI interface.
      Signed-off-by: default avatarSaeed Bishara <saeed@marvell.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      7bb3c529
    • Alexander van Heukelum's avatar
      x86: avoid section mismatch involving arch_register_cpu · d9874026
      Alexander van Heukelum authored
      Avoid section mismatch involving arch_register_cpu.
      
      Marking arch_register_cpu as __init and removing the export
      for non-hotplug-cpu configurations makes the following warning
      go away:
      
      Section mismatch in reference from the function
      arch_register_cpu() to the function .devinit.text:register_cpu()
      The function  arch_register_cpu() references
      the function __devinit register_cpu().
      This is often because arch_register_cpu lacks a __devinit
      annotation or the annotation of register_cpu is wrong.
      
      The only external user of arch_register_cpu in the tree is
      in drivers/acpi/processor_core.c where it is guarded by
      ACPI_HOTPLUG_CPU (which depends on HOTPLUG_CPU).
      Signed-off-by: default avatarAlexander van Heukelum <heukelum@fastmail.fm>
      CC: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d9874026
    • Harvey Harrison's avatar
      x86: fixes for lookup_address args · 93809be8
      Harvey Harrison authored
      Signedness mismatches in level argument.
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      93809be8
    • Harvey Harrison's avatar
      x86: fix sparse warnings in cpu/common.c · 4a148513
      Harvey Harrison authored
      The casts will always be needed, may as well make them the right
      signedness.  The ebx variables can easily be unsigned, may as well.
      
      arch/x86/kernel/cpu/common.c:261:21: warning: incorrect type in argument 2 (different signedness)
      arch/x86/kernel/cpu/common.c:261:21:    expected unsigned int *eax
      arch/x86/kernel/cpu/common.c:261:21:    got int *<noident>
      arch/x86/kernel/cpu/common.c:262:9: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:262:9:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:262:9:    got int *<noident>
      arch/x86/kernel/cpu/common.c:263:9: warning: incorrect type in argument 4 (different signedness)
      arch/x86/kernel/cpu/common.c:263:9:    expected unsigned int *ecx
      arch/x86/kernel/cpu/common.c:263:9:    got int *<noident>
      arch/x86/kernel/cpu/common.c:264:9: warning: incorrect type in argument 5 (different signedness)
      arch/x86/kernel/cpu/common.c:264:9:    expected unsigned int *edx
      arch/x86/kernel/cpu/common.c:264:9:    got int *<noident>
      arch/x86/kernel/cpu/common.c:293:30: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:293:30:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:293:30:    got int *<noident>
      arch/x86/kernel/cpu/common.c:350:22: warning: incorrect type in argument 2 (different signedness)
      arch/x86/kernel/cpu/common.c:350:22:    expected unsigned int *eax
      arch/x86/kernel/cpu/common.c:350:22:    got int *<noident>
      arch/x86/kernel/cpu/common.c:351:10: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:351:10:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:351:10:    got int *<noident>
      arch/x86/kernel/cpu/common.c:352:10: warning: incorrect type in argument 4 (different signedness)
      arch/x86/kernel/cpu/common.c:352:10:    expected unsigned int *ecx
      arch/x86/kernel/cpu/common.c:352:10:    got int *<noident>
      arch/x86/kernel/cpu/common.c:353:10: warning: incorrect type in argument 5 (different signedness)
      arch/x86/kernel/cpu/common.c:353:10:    expected unsigned int *edx
      arch/x86/kernel/cpu/common.c:353:10:    got int *<noident>
      arch/x86/kernel/cpu/common.c:362:30: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:362:30:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:362:30:    got int *<noident>
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4a148513
    • Harvey Harrison's avatar
      x86: make early_console static in early_printk.c · bb0e1290
      Harvey Harrison authored
      Not necessary to expose it, also fixes sparse warning.
      
      arch/x86/kernel/early_printk.c:196:16: warning: symbol 'early_console' was not declared. Should it be static?
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bb0e1290
    • Yinghai Lu's avatar
      x86: remove unneeded round_up · 9347e0b0
      Yinghai Lu authored
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9347e0b0
    • Sam Ravnborg's avatar
      x86: fix section mismatch warning in kernel/pci-calgary · 31f3dff6
      Sam Ravnborg authored
      Fix following warning:
      WARNING: arch/x86/kernel/built-in.o(.text+0x1eb41): Section mismatch in reference from the function calgary_handle_quirks() to the function .init.text:calgary_set_split_completion_timeout()
      
      calgary_handle_quirks() are only called at
      __init time (in calgary_init_one() via handle_quirks ops).
      So annotate this function and the sister function __init.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      31f3dff6
    • Sam Ravnborg's avatar
      x86: fix section mismatch warning in acpi/boot.c · 009cbadb
      Sam Ravnborg authored
      Fix following warning:
      WARNING: o-x86_64/arch/x86/kernel/built-in.o(.text+0x13d15): Section mismatch in reference from the function acpi_map_lsapic() to the function .cpuinit.text:mp_register_lapic()
      
      The function acpi_map_lsapic() is exported and thus not annotated.
      But the sole user is acpi/processor_core.c in a __cpuinit path.
      So create a small wrapper and put back the annotation thus
      avoiding the warning.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      009cbadb
    • Sam Ravnborg's avatar
      x86: fix section mismatch warnings when referencing notifiers · c72258c7
      Sam Ravnborg authored
      Fix the following warnings:
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0xf8): Section mismatch in reference from the function msr_exit() to the variable .cpuinit.data:msr_class_cpu_notifier
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0x158): Section mismatch in reference from the function cpuid_exit() to the variable .cpuinit.data:cpuid_class_cpu_notifier
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0x171): Section mismatch in reference from the function microcode_exit() to the variable .cpuinit.data:mc_cpu_notifier
      
      In all three cases there were a function annotated __exit
      that referenced a variable annotated __cpuinitdata.
      
      The fix was to replace the annotation of the notifier
      with __refdata to tell modpost that the reference to
      a _cpuinit function in the notifier are OK.
      The unregister call that references the notifier
      variable will simple delete the function pointer
      so there is no problem ignoring the reference.
      
      Note: This looks like another case where __cpuinit
      has been used as replacement for proper use
      of CONFIG_HOTPLUG_CPU to decide what code are used for
      HOTPLUG_CPU.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c72258c7
    • Sam Ravnborg's avatar
      x86: silence section mismatch warning in smpboot_64.c · 69e97c02
      Sam Ravnborg authored
      Silence the following warning:
      WARNING: o-x86_64/arch/x86/kernel/built-in.o(.text+0x17cd3): Section mismatch in reference from the function remove_cpu_from_maps() to the variable .cpuinit.data:cpu_initialized
      
      remove_cpu:maps() had a single user: __cpu_disable() so
      mark it static and annotate it with __ref to silence the
      warning from modpost.
      
      _cpu_disable() has a single user in kernel/cpu.c:
       => take_cpu_down()
          which again has a single user in the following call:
          => __stop_machine_run(take_cpu_down, &tcd_param, cpu);
      Here a kthread is created.
      
      So maybe the warning is correct and the right fix is to
      remove the __cpuinitdata annotation of cpu_initialized?
      
      Note: The analysis were disturbed by the fact that we had a variable
            with the same name in cpu/common.c - but this is 32 bit only]
      Note: Should smpboot_64 use cpu_clear()?
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      69e97c02
    • Yinghai Lu's avatar
      x86: fix comments in vmlinux_64.lds · 32ed937d
      Yinghai Lu authored
      for bzImage, the vmlinux_64.lds still have s32 bit code, and startup_32
      should be 0. fix the comment.
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      32ed937d
    • Yinghai Lu's avatar
      x86_64: make bootmap_start page align v6 · 24a5da73
      Yinghai Lu authored
      boot oopses when a system has 64 or 128 GB of RAM installed:
      
      Calling initcall 0xffffffff80bc33b6: sctp_init+0x0/0x711()
      BUG: unable to handle kernel NULL pointer dereference at 000000000000005f
      IP: [<ffffffff802bfe55>] proc_register+0xe7/0x10f
      PGD 0
      Oops: 0000 [1] SMP
      CPU 0
      Modules linked in:
      Pid: 1, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #6
      RIP: 0010:[<ffffffff802bfe55>]  [<ffffffff802bfe55>] proc_register+0xe7/0x10f
      RSP: 0000:ffff810824c57e60  EFLAGS: 00010246
      RAX: 000000000000d7d7 RBX: ffff811024c5fa80 RCX: ffff810824c57e08
      RDX: 0000000000000000 RSI: 0000000000000195 RDI: ffffffff80cc2460
      RBP: ffffffffffffffff R08: 0000000000000000 R09: ffff811024c5fa80
      R10: 0000000000000000 R11: 0000000000000002 R12: ffff810824c57e6c
      R13: 0000000000000000 R14: ffff810824c57ee0 R15: 00000006abd25bee
      FS:  0000000000000000(0000) GS:ffffffff80b4d000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 000000000000005f CR3: 0000000000201000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 1, threadinfo ffff810824c56000, task ffff812024c52000)
      Stack:  ffffffff80a57348 0000019500000000 ffff811024c5fa80 0000000000000000
       00000000ffffff97 ffffffff802bfef0 0000000000000000 ffffffffffffffff
       0000000000000000 ffffffff80bc3b4b ffff810824c57ee0 ffffffff80bc34a5
      Call Trace:
       [<ffffffff802bfef0>] ? create_proc_entry+0x73/0x8a
       [<ffffffff80bc3b4b>] ? sctp_snmp_proc_init+0x1c/0x34
       [<ffffffff80bc34a5>] ? sctp_init+0xef/0x711
       [<ffffffff80b976e3>] ? kernel_init+0x175/0x2e1
       [<ffffffff8020ccf8>] ? child_rip+0xa/0x12
       [<ffffffff80b9756e>] ? kernel_init+0x0/0x2e1
       [<ffffffff8020ccee>] ? child_rip+0x0/0x12
      
      Code: 1e 48 83 7b 38 00 75 08 48 c7 43 38 f0 e8 82 80 48 83 7b 30 00 75 08 48 c7 43 30 d0 e9 82 80 48 c7 c7 60 24 cc 80 e8 bd 5a 54 00 <48> 8b 45 60 48 89 6b 58 48 89 5d 60 48 89 43 50 fe 05 f5 25 a0
      RIP  [<ffffffff802bfe55>] proc_register+0xe7/0x10f
       RSP <ffff810824c57e60>
      CR2: 000000000000005f
      ---[ end trace 02c2d78def82877a ]---
      Kernel panic - not syncing: Attempted to kill init!
      
      it turns out some variables near end of bss are corrupted already.
      
      in System.map we have
      ffffffff80d40420 b rsi_table
      ffffffff80d40620 B krb5_seq_lock
      ffffffff80d40628 b i.20437
      ffffffff80d40630 b xprt_rdma_inline_write_padding
      ffffffff80d40638 b sunrpc_table_header
      ffffffff80d40640 b zero
      ffffffff80d40644 b min_memreg
      ffffffff80d40648 b rpcrdma_tk_lock_g
      ffffffff80d40650 B sctp_assocs_id_lock
      ffffffff80d40658 B proc_net_sctp
      ffffffff80d40660 B sctp_assocs_id
      ffffffff80d40680 B sysctl_sctp_mem
      ffffffff80d40690 B sysctl_sctp_rmem
      ffffffff80d406a0 B sysctl_sctp_wmem
      ffffffff80d406b0 b sctp_ctl_socket
      ffffffff80d406b8 b sctp_pf_inet6_specific
      ffffffff80d406c0 b sctp_pf_inet_specific
      ffffffff80d406c8 b sctp_af_v4_specific
      ffffffff80d406d0 b sctp_af_v6_specific
      ffffffff80d406d8 b sctp_rand.33270
      ffffffff80d406dc b sctp_memory_pressure
      ffffffff80d406e0 b sctp_sockets_allocated
      ffffffff80d406e4 b sctp_memory_allocated
      ffffffff80d406e8 b sctp_sysctl_header
      ffffffff80d406f0 b zero
      ffffffff80d406f4 A __bss_stop
      ffffffff80d406f4 A _end
      
      and setup_node_bootmem() will use that page 0xd40000 for bootmap
      Bootmem setup node 0 0000000000000000-0000000828000000
        NODE_DATA [000000000008a485 - 0000000000091484]
        bootmap [0000000000d406f4 -  0000000000e456f3] pages 105
      Bootmem setup node 1 0000000828000000-0000001028000000
        NODE_DATA [0000000828000000 - 0000000828006fff]
        bootmap [0000000828007000 -  0000000828106fff] pages 100
      Bootmem setup node 2 0000001028000000-0000001828000000
        NODE_DATA [0000001028000000 - 0000001028006fff]
        bootmap [0000001028007000 -  0000001028106fff] pages 100
      Bootmem setup node 3 0000001828000000-0000002028000000
        NODE_DATA [0000001828000000 - 0000001828006fff]
        bootmap [0000001828007000 -  0000001828106fff] pages 100
      
      setup_node_bootmem() makes NODE_DATA cacheline aligned,
      and bootmap is page-aligned.
      
      the patch updates find_e820_area() to make sure we can meet
      the alignment constraints.
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      24a5da73