kqemu inclusion in kernel
by Christopher Brown
Hi folks,
I've started playing around with virtualization at work and the first thing
I'd like to query is kqemu's lack of inclusion in the Fedora kernel. It was
GPL'd in February and although I realise Axel is packaging kmdl/kmods it
would be good to know if this is being queued up for mainline. If not then
can it be backported for Fedora kernels. If that is not possible then can it
be moved into the default repos to save users (me) bolting on another repo
(no offence Axel).
Please forgive dual list posting but I know DJ reads the kernel list and
might want to comment whereas I'm not sure AT does. And vice versa.
Regards
Chris
16 years, 1 month
spec hacks for vanilla and git-based kernel rpm builds
by Roland McGrath
Here I am again with those hacks to do alternate builds from the kernel
spec file. Can I commit at least the spec parts to rawhide now?
The diff is only this:
--- kernel-2.6.spec 08 Jun 2007 12:55:12 -0700 1.3213
+++ kernel-2.6.spec 08 Jun 2007 12:55:05 -0700
@@ -63,7 +63,8 @@ Summary: The Linux kernel (the core of t
%define sublevel 21
%define kversion 2.6.%{sublevel}
%define rpmversion 2.6.%{sublevel}
-%define release %(R="$Revision: 1.3213 $"; RR="${R##: }"; echo ${RR%%?})%{?dist}%{?buildid}
+%define specrelease %(R="$Revision: 1.3213 $"; RR="${R##: }"; echo ${RR%%?})%{?dist}%{?buildid}
+%define release %{specrelease}
%define make_target bzImage
%define kernel_image x86
@@ -76,6 +77,24 @@ Summary: The Linux kernel (the core of t
%define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
%define hdrarch %_target_cpu
+%if 0%{!?nopatches:1}
+%define nopatches 0
+%endif
+
+%if %{nopatches}
+%define includexen 0
+%define variant -vanilla
+%else
+%define variant_fedora -fedora
+%endif
+
+%define using_upstream_branch 0
+%if 0%{?upstream_branch:1}
+%define using_upstream_branch 1
+%define variant -%{upstream_branch}%{?variant_fedora}
+%define release %{upstream_branch_release}.%{specrelease}
+%endif
+
# if requested, only build base kernel
%if %{with_baseonly}
%define with_smp 0
@@ -248,6 +267,15 @@ Summary: The Linux kernel (the core of t
%define kernel_image vmlinux
%endif
+%if %{nopatches}
+%define with_modsign 0
+# Ignore unknown options in our config-* files.
+# Some options go with patches we're not applying.
+%define oldconfig_target loose_nonint_oldconfig
+%else
+%define oldconfig_target nonint_oldconfig
+%endif
+
# To temporarily exclude an architecture from being built, add it to
# %nobuildarches. Do _NOT_ use the ExclusiveArch: line, because if we
# don't build kernel-headers then the new build system will no longer let
@@ -297,7 +325,7 @@ Summary: The Linux kernel (the core of t
#
%define kernel_prereq fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.9-1
-Name: kernel
+Name: kernel%{?variant}
Group: System Environment/Kernel
License: GPLv2
Version: %{rpmversion}
@@ -332,7 +360,9 @@ BuildPreReq: bzip2, findutils, gzip, m4,
BuildPreReq: gnupg
%endif
BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
+%if %{usesparse}
BuildRequires: sparse >= 0.3
+%endif
BuildConflicts: rhbuildsys(DiskFree) < 500Mb
@@ -380,7 +410,16 @@ Source80: config-rhel-generic
Source81: config-rhel-x86-generic
Source82: config-olpc-generic
+%if %{using_upstream_branch}
+### BRANCH PATCH ###
+%else
+# Here should be only the patches up to the upstream canonical Linus tree.
Patch00: patch-2.6.22-rc4.bz2
+%endif
+
+%if !%{nopatches}
+
+# Patches 10 through 99 are for things that are going upstream really soon.
Patch10: linux-2.6-utrace.patch
Patch20: nouveau-drm.patch
Patch30: linux-2.6-sysrq-c.patch
@@ -849,10 +888,16 @@ ApplyPatch()
patch -p1 -F1 -s < $RPM_SOURCE_DIR/$1
}
+%if %{using_upstream_branch}
+### BRANCH APPLY ###
+%else
# Update to latest upstream.
bzcat $RPM_SOURCE_DIR/patch-2.6.22-rc4.bz2 | patch -p1 -F1 -s
+%endif
+%if !%{nopatches}
+
# Patches 10 through 100 are meant for core subsystem upgrades
# Roland's utrace ptrace replacement.
@@ -895,12 +940,14 @@ ApplyPatch linux-2.6-pmac-zilog.patch
#
# Bugfixes to the core system and patches related to how RPMs are build
#
+%endif
# This patch adds a "make nonint_oldconfig" which is non-interactive and
# also gives a list of missing options at the end. Useful for automated
# builds (as used in the buildsystem).
-ApplyPatch linux-2.6-build-nonintconfig.patch
+ApplyPatch linux-2.6.17-build-nonintconfig.patch
+%if !%{nopatches}
# Exec shield
ApplyPatch linux-2.6-execshield.patch
@@ -1076,6 +1123,7 @@ ApplyPatch linux-2.6-warnings-emptymacro
ApplyPatch linux-2.6-warnings-register.patch
# END OF PATCH APPLICATIONS
+%endif
cp %{SOURCE10} Documentation/
@@ -1098,7 +1146,7 @@ for i in *.config
do
mv $i .config
Arch=`head -1 .config | cut -b 3-`
- make ARCH=$Arch nonint_oldconfig > /dev/null
+ make ARCH=$Arch %{oldconfig_target} > /dev/null
echo "# $Arch" > configs/$i
cat .config >> configs/$i
done
@@ -1184,7 +1232,7 @@ BuildKernel() {
KernelImage=arch/$Arch/boot/bzImage
fi
- make -s ARCH=$Arch nonint_oldconfig > /dev/null
+ make -s ARCH=$Arch %{oldconfig_target} > /dev/null
make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
make -s ARCH=$Arch %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
16 years, 3 months
Rethinking the Ralink wireless driver situation
by Jonathan Underwood
Hi,
In F-7 a decision was made to bundle in the rt2x00 wireless drivers
for Ralink cards. I contend this was a poor decision because, simply
put, they do not work. Not for any ralink chipset device I have tried
(and I've tried several). Upstream rt2x00 developers have also gone on
a 3 month development hiatus. See: http://rt2x00.serialmonkey.com/
But, upstream also maintains what they refer to as enhanced legacy
drivers - basically the open source drivers provided by Ralink but
polished to be more consistent with general use (eg. ripping out the
odd /etc/Wireless configuration tree, and placing firmware in
/lib/firmware). This work *really* well on all devices I have tried
for which rtx00 does not work. It's a hassle for an end user to
install them though, as it involves blacklisting the broken rtx00
modules. Not a big deal, but it wrecks the "out of the box"
experience.
So, please please consider bundling the rt2400, rt2500, rt2470, rt61
and rt73 drivers for F-8 and ditching rt2x00 until they make it into
the upstream kernel.
Jonathan.
16 years, 3 months
Kernel panic on new f7 installation
by Tom Diehl
Hi,
I just installed f7 on a new box. When I tried to boot it after install I got
the following error:
MP-BIOS bug: 8254 Timer not connected to IO-APIC
Kernel Panic Not syncing: IO-APIC + Timer doesn't work! Try using the noapic
kernel parameter.
Passing nooapic to the kernel at boot lets the machine boot.
There are no BIOS updates available for the box.
Is this something I should put into bugzilla or is simply expected on some
machines?
FYI:
[root@tigger2 pts0 ~]# uname -r
2.6.21-1.3228.fc7
[root@tigger2 pts0 ~]#
The box is a Lenovo MTM7387-24U
[root@tigger2 pts0 ~]# lspci -v
00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0
Capabilities: [44] HyperTransport: Slave or Primary Interface
Capabilities: [e0] HyperTransport: MSI Mapping
00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: 66MHz, fast devsel
00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: 66MHz, fast devsel
00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: 66MHz, fast devsel
00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0
00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0
Capabilities: [44] #00 [00fe]
Capabilities: [fc] #00 [0000]
00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: 66MHz, fast devsel
00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: 66MHz, fast devsel
00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Capabilities: [40] Subsystem: Lenovo Unknown device 1017
Capabilities: [48] Power Management version 2
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/1 Enable-
Capabilities: [60] HyperTransport: MSI Mapping
Capabilities: [80] Express Root Port (Slot+) IRQ 0
00:05.0 VGA compatible controller: nVidia Corporation C51G [GeForce 6100] (rev a2) (prog-if 00 [VGA])
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 10
Memory at d1000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at d0000000 (64-bit, non-prefetchable) [size=16M]
[virtual] Expansion ROM at 30000000 [disabled] [size=128K]
Capabilities: [48] Power Management version 2
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0
Capabilities: [44] HyperTransport: Slave or Primary Interface
Capabilities: [e0] HyperTransport: MSI Mapping
00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a3)
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0
00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a3)
Subsystem: Lenovo Unknown device 1017
Flags: 66MHz, fast devsel, IRQ 10
I/O ports at 3040 [size=64]
I/O ports at 3000 [size=64]
Capabilities: [44] Power Management version 2
00:0a.2 RAM memory: nVidia Corporation MCP51 Memory Controller 0 (rev a3)
Subsystem: Lenovo Unknown device 1017
Flags: 66MHz, fast devsel
00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3) (prog-if 10 [OHCI])
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 5
Memory at d2344000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3) (prog-if 20 [EHCI])
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 10
Memory at d2346000 (32-bit, non-prefetchable) [size=256]
Capabilities: [44] Debug port
Capabilities: [80] Power Management version 2
00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev f1) (prog-if 8a [Master SecP PriP])
Subsystem: Unknown device f7aa:1017
Flags: bus master, 66MHz, fast devsel, latency 0
[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [disabled] [size=8]
[virtual] Memory at 000003f0 (type 3, non-prefetchable) [disabled] [size=1]
[virtual] Memory at 00000170 (32-bit, non-prefetchable) [disabled] [size=8]
[virtual] Memory at 00000370 (type 3, non-prefetchable) [disabled] [size=1]
I/O ports at 3080 [size=16]
Capabilities: [44] Power Management version 2
00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev f1) (prog-if 85 [Master SecO PriO])
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 10
I/O ports at 30b0 [size=8]
I/O ports at 30a4 [size=4]
I/O ports at c0b0 [size=8]
I/O ports at c0a4 [size=4]
I/O ports at 3090 [size=16]
Memory at d2345000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
Capabilities: [b0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/2 Enable-
Capabilities: [cc] HyperTransport: MSI Mapping
00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2) (prog-if 01 [Subtractive decode])
Flags: bus master, 66MHz, fast devsel, latency 0
Bus: primary=00, secondary=03, subordinate=03, sec-latency=64
I/O behind bridge: 00004000-00004fff
Memory behind bridge: d2000000-d20fffff
Capabilities: [b8] Subsystem: nVidia Corporation Unknown device cb84
Capabilities: [8c] HyperTransport: MSI Mapping
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 11
Memory at d2340000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [44] Power Management version 2
Capabilities: [50] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/0 Enable-
Capabilities: [6c] HyperTransport: MSI Mapping
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
Flags: fast devsel
Capabilities: [80] HyperTransport: Host or Secondary Interface
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
Flags: fast devsel
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
Flags: fast devsel
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
Flags: fast devsel
Capabilities: [f0] #0f [0010]
03:05.0 Communication controller: Conexant HSF 56k Data/Fax Modem
Subsystem: Conexant Unknown device 2014
Flags: bus master, fast Back2Back, medium devsel, latency 64, IRQ 10
Memory at d2000000 (32-bit, non-prefetchable) [size=64K]
I/O ports at 4000 [size=8]
Capabilities: [40] Power Management version 2
03:08.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet (rev 03)
Subsystem: Lenovo Unknown device 1017
Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 11
Memory at d2010000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [48] Power Management version 2
Capabilities: [50] Vital Product Data
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3 Enable-
[root@tigger2 pts0 ~]#
I am not sure what other info would be useful, so please ask if someone feels
I should provide something else.
Regards,
--
Tom Diehl tdiehl(a)tntechs.com Spamtrap address mtd123(a)tntechs.com
16 years, 3 months
linux-2.6-elf-core-sysctl.patch
by Roland McGrath
Without objection, I will throw this into rawhide. I want to get some
beating on it done before I send it upstream. The related bits that make
it cool may hit rawhide soonish.
If an F7 update got this too but with dump_dso_headers = 0 default, that
would be groovy. It is a no-op when disabled and having the option would
be nice for people wanting to play with the userland tools that like this,
who don't have a rawhide install.
Thanks,
Roland
---
[PATCH] Add sysctl controls on ELF core dump segments, dump first page of DSOs
This adds two sysctl items under fs.binfmt_elf for controlling how memory
segments are dumped in ELF core files. The dump_whole_segments option can
be set to have private file mappings dumped in their entirety.
The dump_dso_headers option is the new default. This dumps the first page
(only) of a read-only private file mapping if it appears to be a mapping of
an ELF file. Including these pages in the core dump may give sufficient
identifying information to associate the original DSO and executable file
images and their debugging information with a core file in a generic way
just from its contents.
Signed-off-by: Roland McGrath <roland(a)redhat.com>
---
fs/binfmt_elf.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 128 insertions(+), 24 deletions(-)
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index fa8ea33..ae63521 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -20,6 +20,7 @@
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/binfmts.h>
+#include <linux/sysctl.h>
#include <linux/string.h>
#include <linux/file.h>
#include <linux/fcntl.h>
@@ -1151,6 +1152,10 @@ out:
* Modelled on fs/exec.c:aout_core_dump()
* Jeremy Fitzhardinge <jeremy(a)sw.oz.au>
*/
+
+static int dump_whole_segments = 0;
+static int dump_dso_headers = 1;
+
/*
* These are the only things you should do on a core-file: use only these
* functions to write out all the necessary info.
@@ -1183,31 +1188,60 @@ static int dump_seek(struct file *file, loff_t off)
}
/*
- * Decide whether a segment is worth dumping; default is yes to be
- * sure (missing info is worse than too much; etc).
- * Personally I'd include everything, and use the coredump limit...
- *
- * I think we should skip something. But I am not sure how. H.J.
+ * Decide what to dump of a segment, part, all or none.
*/
-static int maydump(struct vm_area_struct *vma)
+static unsigned long vma_dump_size(struct vm_area_struct *vma)
{
/* The vma can be set up to tell us the answer directly. */
if (vma->vm_flags & VM_ALWAYSDUMP)
- return 1;
+ goto whole;
/* Do not dump I/O mapped devices or special mappings */
if (vma->vm_flags & (VM_IO | VM_RESERVED))
return 0;
/* Dump shared memory only if mapped from an anonymous file. */
- if (vma->vm_flags & VM_SHARED)
- return vma->vm_file->f_path.dentry->d_inode->i_nlink == 0;
-
- /* If it hasn't been written to, don't write it out */
- if (!vma->anon_vma)
+ if (vma->vm_flags & VM_SHARED) {
+ if (vma->vm_file->f_path.dentry->d_inode->i_nlink == 0)
+ goto whole;
return 0;
+ }
- return 1;
+ /* Dump segments that have been written to. */
+ if (vma->anon_vma)
+ goto whole;
+
+ if (dump_whole_segments)
+ goto whole;
+
+ /*
+ * If this looks like the beginning of a DSO or executable mapping,
+ * check for an ELF header. If we find one, dump the first page to
+ * aid in determining what was mapped here.
+ */
+ if (dump_dso_headers && vma->vm_file != NULL && vma->vm_pgoff == 0) {
+ u32 __user *header = (u32 __user *) vma->vm_start;
+ u32 word;
+ /*
+ * Doing it this way gets the constant folded by GCC.
+ */
+ union {
+ u32 cmp;
+ char elfmag[SELFMAG];
+ } magic;
+ BUILD_BUG_ON(SELFMAG != sizeof word);
+ magic.elfmag[EI_MAG0] = ELFMAG0;
+ magic.elfmag[EI_MAG1] = ELFMAG1;
+ magic.elfmag[EI_MAG2] = ELFMAG2;
+ magic.elfmag[EI_MAG3] = ELFMAG3;
+ if (get_user(word, header) == 0 && word == magic.cmp)
+ return PAGE_SIZE;
+ }
+
+ return 0;
+
+whole:
+ return vma->vm_end - vma->vm_start;
}
/* An ELF note in memory */
@@ -1642,16 +1676,13 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
for (vma = first_vma(current, gate_vma); vma != NULL;
vma = next_vma(vma, gate_vma)) {
struct elf_phdr phdr;
- size_t sz;
-
- sz = vma->vm_end - vma->vm_start;
phdr.p_type = PT_LOAD;
phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0;
- phdr.p_filesz = maydump(vma) ? sz : 0;
- phdr.p_memsz = sz;
+ phdr.p_filesz = vma_dump_size(vma);
+ phdr.p_memsz = vma->vm_end - vma->vm_start;
offset += phdr.p_filesz;
phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
if (vma->vm_flags & VM_WRITE)
@@ -1692,13 +1723,11 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
for (vma = first_vma(current, gate_vma); vma != NULL;
vma = next_vma(vma, gate_vma)) {
unsigned long addr;
+ unsigned long end;
- if (!maydump(vma))
- continue;
+ end = vma->vm_start + vma_dump_size(vma);
- for (addr = vma->vm_start;
- addr < vma->vm_end;
- addr += PAGE_SIZE) {
+ for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
struct page *page;
struct vm_area_struct *vma;
@@ -1756,17 +1785,92 @@ cleanup:
#undef NUM_NOTES
}
+
+static ctl_table elf_core_dump_sysctls[] = {
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "core_dump_whole_segments",
+ .data = &dump_whole_segments,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "core_dump_dso_headers",
+ .data = &dump_dso_headers,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ { .ctl_name = 0 }
+};
+
+static ctl_table binfmt_elf_sysctl_dir[] = {
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "binfmt_elf",
+ .mode = 0555,
+ .child = elf_core_dump_sysctls,
+ },
+ { .ctl_name = 0 }
+};
+
+static ctl_table binfmt_elf_sysctl_root[] = {
+ {
+ .ctl_name = CTL_FS,
+ .procname = "fs",
+ .mode = 0555,
+ .child = binfmt_elf_sysctl_dir,
+ },
+ { .ctl_name = 0 }
+};
+
+static struct ctl_table_header *core_dump_sysctl_table;
+
+static int register_core_dump_sysctl(void)
+{
+ core_dump_sysctl_table = register_sysctl_table(binfmt_elf_sysctl_root);
+ if (core_dump_sysctl_table == NULL)
+ return -ENOMEM;
+ return 0;
+}
+
+static void unregister_core_dump_sysctl(void)
+{
+ unregister_sysctl_table(core_dump_sysctl_table);
+ core_dump_sysctl_table = NULL;
+}
+
+#else
+
+static int register_core_dump_sysctl(void)
+{
+ return 0;
+}
+
+static void unregister_core_dump_sysctl(void)
+{
+}
+
#endif /* USE_ELF_CORE_DUMP */
static int __init init_elf_binfmt(void)
{
- return register_binfmt(&elf_format);
+ int error = register_core_dump_sysctl();
+ if (!error) {
+ error = register_binfmt(&elf_format);
+ if (error)
+ unregister_core_dump_sysctl();
+ }
+ return error;
}
static void __exit exit_elf_binfmt(void)
{
/* Remove the COFF and ELF loaders. */
unregister_binfmt(&elf_format);
+ unregister_core_dump_sysctl();
}
core_initcall(init_elf_binfmt);
--
1.5.2.1
16 years, 3 months
CONFIG_USB_SUSPEND
by Chuck Ebbert
[https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239507]
(In reply to comment #5)
> We can do two things
> 1. Rebuild the RPM carefuly with CONFIG_USB_SUSPEND disabled, but without
> changing anything else, see if that helps, and
I think we need this anyway. There are devices that require quirks
to work with it enabled, and we'll be forever chasing those if we
leave it that way.
16 years, 3 months
Removing atomic.h from Fedora kernel headers
by Chuck Ebbert
Why do we explicitly remove atomic.h from our kernel header package?
>From the Fedora Core 6 kernel spec file:
# glibc provides scsi headers for itself, for now
rm -rf $RPM_BUILD_ROOT/usr/include/scsi
rm -f $RPM_BUILD_ROOT/usr/include/asm*/atomic.h
rm -f $RPM_BUILD_ROOT/usr/include/asm*/io.h
rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h
16 years, 3 months
kmods poll
by Josh Boyer
I'd like to just do a brief poll here just to see how many are yay or
nay for kmods. And I'm not talking about their current implementation
or the other various ways that the idea can be accomplished, but rather
on the idea of having kernel modules as separate packages in general.
If you're against the general idea and want to follow up with reasons
why that's fine. I just want to avoid implementation discussions at the
moment if possible.
josh
16 years, 3 months
rawhide kernel fuzz
by Roland McGrath
Dave disabled utrace because sched-cfs has a line that conflicts. It only
conflicts under -F1, and with default patching (-F2) utrace applies fine
after sched-cfs. This tweak to the spec file's ApplyPatch makes it easy to
make one patch use -F2 when you need it, instead of disabling a patch
because of a conflict that patch resolves just fine.
Thanks,
Roland
--- kernel-2.6.spec 21 Jun 2007 23:20:46 -0700 1.3233
+++ kernel-2.6.spec 21 Jun 2007 23:49:07 -0700
@@ -889,13 +890,15 @@ cd linux-%{kversion}.%{_target_cpu}
patch_command='patch -p1 -F1 -s'
ApplyPatch()
{
- if [ ! -f $RPM_SOURCE_DIR/$1 ]; then
+ local patch=$1
+ shift
+ if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
exit 1;
fi
- case "$1" in
- *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$1" | $patch_command ;;
- *.gz) gunzip < "$RPM_SOURCE_DIR/$1" | $patch_command ;;
- *) $patch_command < "$RPM_SOURCE_DIR/$1" ;;
+ case "$patch" in
+ *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
+ *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
+ *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
esac
}
@@ -914,9 +917,9 @@ ApplyPatch patch-2.6.22-rc5-git4.bz2
ApplyPatch linux-2.6-sched-cfs.patch
# Roland's utrace ptrace replacement.
-#ApplyPatch linux-2.6-utrace.patch
-# setuid /proc/self/maps fix. (dependant on utrace)
-#ApplyPatch linux-2.6-proc-self-maps-fix.patch
+ApplyPatch linux-2.6-utrace.patch -F2
+# setuid /proc/self/maps fix. (dependent on utrace)
+ApplyPatch linux-2.6-proc-self-maps-fix.patch
# Nouveau DRM
#ApplyPatch nouveau-drm.patch
16 years, 3 months
eu-unstrip
by Roland McGrath
There was some complaining here about problems dealing with separate
debuginfo files. In elfutils-0.128, in an f6 and fc7 update near you,
there is now eu-strip. This doesn't improve any non-elfutils tools you
were using that weren't handling separate debuginfo well, but it makes it
easy to recover a unified unstripped file to use them on.
For a good time, try "mkdir foo; eu-unstrip -d foo -a -k".
It is either more or less fun with -m, according to taste.
For other uses you might want -K2.6.21-1.678.fc9 or -K/some/where,
or other options available (see --help).
I hope this is useful on occasion.
Thanks,
Roland
16 years, 3 months