Paul Mackerras [Tue, 24 Aug 2004 16:39:21 +0000 (09:39 -0700)]
[PATCH] ppc64: better handling of H_ENTER failures
This changes the hash insertion routines to return an error instead of
calling panic() when HV refuses to insert a HPTE (the hypervisor call to
set up a hashtable PTE is H_ENTER).
The error is now propagated upstream, and either bad_page_fault() is
called (kernel mode) or a SIGBUS signal is forced (user mode). Some
other panic() cases are also turned into BUG_ON.
Overall, this should provide us with better debugging data if the
problem happens, and avoids errors from userland mapping /dev/mem and
trying to use forbidden IOs (XFree ?) to bring the whole kernel down.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:34:10 +0000 (15:34 -0400)]
[PATCH] 8139too: be sure to progress during rtl8139_rx()
From: Francois Romieu <romieu@fr.zoreil.com>
If the Rx buffer gets corrupted or the FIFO hangs in new interesting ways,
this code prevents the driver from looping in ksoftirqd context without
making any progress.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:34:00 +0000 (15:34 -0400)]
[PATCH] 8139too: Rx fifo/overflow recovery
From: Francois Romieu <romieu@fr.zoreil.com>
This patch allows to update the interrupt status register after an Rx
overflow or a Rx fifo error even when the Rx buffer contains no packet.
The update must be kept in the packet processing loop to prevent an Rx
error storm. As an interesting behavior, the status of the interrupt
status register must not be read early.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:33:39 +0000 (15:33 -0400)]
[PATCH] drivers/net/wan/cycx_x25.c:189: warning: conflicting types for built-in function 'log2'
From: Jesper Juhl <juhl-lkml@dif.dk>
To silence the warning in $subject, rename log2 to cycx_log2 in this file
to remove the clash, so there's no doubt that this file uses it's own
defined log2 function.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:26:50 +0000 (15:26 -0400)]
[PATCH] fix net/hamradio/dmascc with gcc 3.4
From: Adrian Bunk <bunk@fs.tum.de>
drivers/net/hamradio/dmascc.c: In function `scc_isr':
drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining
failed in call to 'z8530_isr': function body not available
drivers/net/hamradio/dmascc.c:969: sorry, unimplemented: called from
here
drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining
failed in call to 'z8530_isr': function body not available
drivers/net/hamradio/dmascc.c:978: sorry, unimplemented: called from
here
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:26:40 +0000 (15:26 -0400)]
[PATCH] sk98lin/skge.c doesn't compile with PROC_FS=n
From: Adrian Bunk <bunk@fs.tum.de>
drivers/net/sk98lin/skge.c: In function `skge_remove_one':
drivers/net/sk98lin/skge.c:5116: warning: implicit declaration of function `remove_proc_entry'
drivers/net/sk98lin/skge.c:5116: `pSkRootDir' undeclared (first use in this function)
drivers/net/sk98lin/skge.c:5116: (Each undeclared identifier is reported only once
drivers/net/sk98lin/skge.c:5116: for each function it appears in.)
drivers/net/sk98lin/skge.c: In function `skge_init':
drivers/net/sk98lin/skge.c:5188: `SK_Root_Dir_entry' undeclared (first use in this function)
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:26:28 +0000 (15:26 -0400)]
[PATCH] via-velocity: more inetaddr_notifier fix
From: Francois Romieu <romieu@fr.zoreil.com>
There is no guarantee that the event which gets passed is associated to a
via-velocity device, thus preventing to dereference dev->priv as if it
always was a struct velocity_info *. The via-velocity devices are kept in
a module private list for comparison.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:26:18 +0000 (15:26 -0400)]
[PATCH] ixgb_main.c: fix inline compile errors
From: Adrian Bunk <bunk@fs.tum.de>
drivers/net/ixgb/ixgb_main.c: In function `ixgb_up':
drivers/net/ixgb/ixgb_main.c:86: sorry, unimplemented: inlining failed
in call to 'ixgb_irq_enable': function body not available
drivers/net/ixgb/ixgb_main.c:234: sorry, unimplemented: called from here
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:26:07 +0000 (15:26 -0400)]
[PATCH] net/tulip/dmfe.c: gcc-3.5 fixes
From: Adrian Bunk <bunk@fs.tum.de>
CC drivers/net/tulip/dmfe.o
drivers/net/tulip/dmfe.c: In function `dmfe_rx_packet':
drivers/net/tulip/dmfe.c:323: sorry, unimplemented: inlining failed in
call to 'cal_CRC': function body not available
drivers/net/tulip/dmfe.c:936: sorry, unimplemented: called from here
make[3]: *** [drivers/net/tulip/dmfe.o] Error 1
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:25:57 +0000 (15:25 -0400)]
[PATCH] net/rrunner.c: gcc-3.5 fixes
From: Adrian Bunk <bunk@fs.tum.de>
CC drivers/net/rrunner.o
drivers/net/rrunner.c: In function `rr_timer':
drivers/net/rrunner.h:846: sorry, unimplemented: inlining failed in call
to 'rr_raz_tx': function body not available
drivers/net/rrunner.c:1155: sorry, unimplemented: called from here
drivers/net/rrunner.h:847: sorry, unimplemented: inlining failed in call
to 'rr_raz_rx': function body not available
drivers/net/rrunner.c:1156: sorry, unimplemented: called from here
make[2]: *** [drivers/net/rrunner.o] Error 1
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:25:47 +0000 (15:25 -0400)]
[PATCH] net/hamachi.c: gcc-3.5 build fixes
From: Adrian Bunk <bunk@fs.tum.de>
CC drivers/net/hamachi.o
drivers/net/hamachi.c: In function `hamachi_interrupt':
drivers/net/hamachi.c:562: sorry, unimplemented: inlining failed in call
to 'hamachi_rx': function body not available
drivers/net/hamachi.c:1402: sorry, unimplemented: called from here
make[2]: *** [drivers/net/hamachi.o] Error 1
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
CC drivers/net/smc9194.o
drivers/net/smc9194.c: In function `smc_interrupt':
drivers/net/smc9194.c:278: sorry, unimplemented: inlining failed in call
to 'smc_rcv': function body not available
drivers/net/smc9194.c:1254: sorry, unimplemented: called from here
drivers/net/smc9194.c:283: sorry, unimplemented: inlining failed in call
to 'smc_tx': function body not available
drivers/net/smc9194.c:1258: sorry, unimplemented: called from here
make[2]: *** [drivers/net/smc9194.o] Error 1
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Andrew Morton [Tue, 24 Aug 2004 19:25:15 +0000 (15:25 -0400)]
[PATCH] e1000 build fix
drivers/net/e1000/e1000_main.c: In function `e1000_up':
drivers/net/e1000/e1000_main.c:136: sorry, unimplemented: inlining failed
in call to 'e1000_irq_enable': function body not available
drivers/net/e1000/e1000_main.c:274: sorry, unimplemented: called from here
Andrew Morton [Tue, 24 Aug 2004 19:25:05 +0000 (15:25 -0400)]
[PATCH] sk98lin procfs fix
From: Christoph Hellwig <hch@infradead.org>
sk98line tries to register a procfile with the interfacename of the struct
net_device. The patch below (ontop of the previous one) makes it work
unless you change the interface name manually, but as Linux explicitly
allows that the interface is fundamentally broken and probably should just
go away.
Alexander Viro [Tue, 24 Aug 2004 05:29:18 +0000 (22:29 -0700)]
[PATCH] /dev/ptmx open() fixes
If tty_open() fails for a normal serial device, we end up doing cleanups
that should only happen for failed open of /dev/ptmx. The results are
not pretty - devpts et.al. end up very confused. That's what gave
problems with ptmx.
This splits ptmx file_operations from the normal case and cleans up both
tty_open() and (new) ptmx_open(). Survived serious beating.
Arjan van de Ven [Tue, 24 Aug 2004 04:45:58 +0000 (21:45 -0700)]
[PATCH] Fix fs/locks.c init order
The patch below fixes an interesting oddity we're seeing with fedora core
development (where we recently started using udev heavily); basically right
now filelock_init() is a module_init(), eg runs late. However that breaks
down because there are earlier /sbin/hotplug callouts, which with udev, do
locking operations. When that happens the kernel oopses because the slabs
for file locks aren't initialized yet.
Solution: initialize this way early. It's only a kmem_cache_create after
all, so can happen early.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ncfpfs seems to update inode times by hand everywhere instead of using
the proper helpers. This means:
- the atime updates in mmap() and read() seems to miss various checks
upodate_atime or one of the wrappers does. Also it doesn't mark the
inode dirty.
- in write() you update mtime and _a_time instead of ctime as expected,
also the usual checks and optimizations are missing.
In addition the fops contain some bogus checks like for a refular file (but
the fops are only used of ISREG files) and inode->i_sb although that is
guranteed to be non-zero.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:50 +0000 (21:44 -0700)]
[PATCH] /dev/random: Remove RNDGETPOOL ioctl
Recently, someone has kvetched that RNDGETPOOL is a "security
vulnerability". Never mind that it is superuser only, and with superuser
privs you could load a nasty kernel module, or read the entropy pool out of
/dev/mem directly, but they are nevertheless still spreading FUD.
In any case, no one is using it (it was there for debugging purposes only),
so we can remove it as dead code.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:39 +0000 (21:44 -0700)]
[PATCH] /dev/random: Use separate entropy store for /dev/urandom
This patch adds a separate pool for use with /dev/urandom. This prevents a
/dev/urandom read from being able to completely drain the entropy in the
/dev/random pool, and also makes it much more difficult for an attacker to
carry out a state extension attack.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:27 +0000 (21:44 -0700)]
[PATCH] /dev/random: Add pool name to entropy store
This adds a pool name to the entropy_store data structure, which simplifies
the debugging code, and makes the code more generic for adding additional
entropy pools.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:18 +0000 (21:44 -0700)]
[PATCH] dev/random: Fix latency in rekeying sequence number
Based on reports from Ingo's Latency Tracer that the TCP sequence number
rekey code is causing latency problems, I've moved the sequence number
rekey to be done out of a workqueue.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hirofumi Ogawa [Tue, 24 Aug 2004 04:43:21 +0000 (21:43 -0700)]
[PATCH] remove read-only/immutable checks from fat_truncate
From: Christoph Hellwig <hch@lst.de>
There's two callers:
- the truncate path via notify_change, ->setattr, vmtruncate. We
already check for permissions here at the upper level
- fat_delete_inode. This one looks bogus to me - even if we delete
an read-only or immutable inode we want to free the space allocated
by it, else you leak disk blocks.
Olaf Kirch [Tue, 24 Aug 2004 04:42:57 +0000 (21:42 -0700)]
[PATCH] /proc/PID/cmdline truncates arguments early
We received a bug report that /proc/PID/cmdline only shows argv[0] if the
total length of all arguments exceeds PAGE_SIZE. The problem is that
proc_pid_cmdline checks for the presence of a NUL byte at the end of the
args list, and assumes that the application did a setproctitle if there's
any other character.
OTOH proc_pid_cmdline will read just the first PAGE_SIZE worth of arguments
at most, and if you have more arguments, it's quite likely that there won't
be a NUL byte at offset PAGE_SIZE-1.
The attached patch fixes this.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Zachary Amsden [Tue, 24 Aug 2004 04:42:46 +0000 (21:42 -0700)]
[PATCH] i386-unbusy-tss cleanup
The TSS no longer needs to be unbusied before loading the task register, since
the set_tss_desc macros set the system gate type to Available IA-32 TSS. This
obscure, uncommented legacy code can now be removed for better readability and
saves 20 bytes of code space.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kurt Garloff [Tue, 24 Aug 2004 04:42:34 +0000 (21:42 -0700)]
[PATCH] fix bio_uncopy_user() mem leak
When using bounce buffers for SG_IO commands with unaligned buffers in
blk_rq_map_user(), we should free the pages from blk_rq_unmap_user() which
calls bio_uncopy_user() for the non-BIO_USER_MAPPED case. That function
failed to free the pages for write requests.
So we leaked pages and you machine would go OOM. Rebooting helped ;-)
This bug was triggered by writing audio CDs (but not on data CDs), as the
audio frames are not aligned well (2352 bytes), so the user pages don't just
get mapped.
Bug was reported by Mathias Homan and debugged by Chris Mason + me. (Jens
is away.)
From: Chris Mason <mason@suse.com>
Fix the leak for real
Signed-off-by: Kurt Garloff <garloff@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
zfcp host adapter changes:
- Use predefined macro to create in_recovery sysfs attributes.
- Add function to check CT_IU response.
- Fix handling of rejected ELS commands.
- Change return value of zfcp_fsf_req_sbal_get to -ERESTARTSYS in some cases.
- Return proper error code if control file upload/download failed.
- Remove dead code.
- Avoid sparse warnings.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
From: Jan Glauber <jan.glauber@de.ibm.com>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
s390 core changes:
- Use copy_siginfo_from_user32 instead of copy_from_user to get the
siginfo structure in sys32_rt_sigqueueinfo.
- Remove prototype for non-existant stop_timers function.
- Regenerate default configuration.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The ramdisk_blocksize option has been broken for quite a while in 2.6.
Making an initrd with a 4K ext2 filesystem impossible to use.
After digging into this, the problem turned out to that rd.c was not
setting the hard sector size. There were a few secondary problems like
i_blkbits was not being set, and the number KiB in uncompressed ext2 images
was not taking into account the block size.
I have also corrected the surrounding comments as they were not just
incorrect but misleading.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Olaf Hering [Tue, 24 Aug 2004 04:41:13 +0000 (21:41 -0700)]
[PATCH] compat_do_execve() fix
For some reasons ls -l /proc/$$/exe doesnt work all time for me,
with 2.6.8.1 on ppc64. Sometimes it does, sometimes not. No pattern.
A few printks show that this check in proc_pid_readlink() triggers
an -EACCES:
James Morris [Tue, 24 Aug 2004 04:40:38 +0000 (21:40 -0700)]
[PATCH] Reduce SELinux kernel memory use on 64-bit systems
The patch below reduces kernel memory used by SELinux policy rules by about
37% on 64-bit systems. This is because the size of struct avtab_node is 40
bytes on 64-bit, and defaults to a size-64 slab.
Creating a slab cache specifically for these structs saves considerable
amounts of kernel memory on 64-bit systems with large rulesets. 'Strict'
policy has over 300k rules, while 'targeted' policy has around 3k rules.
Here's the slabtop output with 64 and 40 byte sized slabs to show the
memory savings, for strict policy:
[PATCH] SELinux: revalidate access to controlling tty
This patch changes the SELinux flush_unauthorized_files function to also
recheck access to the controlling tty and reset it if it is no longer
accessible under the new security context. This patch is relative to the
selinuxfs devnull patch.
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil> Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] SELinux: add null device node to selinuxfs, remove open_devnull
This patch adds a null device node to selinuxfs and replaces the SELinux
open_devnull() code by simply acquiring a reference to this node each time,
based on a comment by Al Viro on lkml (see
http://marc.theaimsgroup.com/?l=linux-kernel&m=108664922032035&w=2).
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil> Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Mahoney [Tue, 24 Aug 2004 04:39:40 +0000 (21:39 -0700)]
[PATCH] Fix access of files up to 4 GB support for ISO9660 filesystems
Since the filesystem doesn't explicitly set s->s_maxbytes, seeks will fail
beyond 2^32-1, due to s->s_maxbytes being set to the default of
MAX_NON_LFS.
Attached is the quick one liner fix.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Mahoney [Tue, 24 Aug 2004 04:39:28 +0000 (21:39 -0700)]
[PATCH] reiserfs: xattr/acl fixes
Here are a few fixes for bugs noticed on reiserfs-list or our own bugzilla.
Attached is a patch that fixes several problems with xattrs/acls:
[SECURITY] Fixes the inode not getting dirtied when mode is set
via setxattr()
[CORRECTNESS] Fixes the inode not getting ctime updated when an xattr is
removed
[DATA] Fixes an issue with dcache hash colliding names in the filesystem
root caused by the d_compare to hide .reiserfs_priv. The bug
can only occur in the filesystem root, which is why we haven't
seen many (any, outside of the suse bugzilla, afaik) reports on
this. The results are that dcache operations on colliding entries
in the fs root will choose the first match rather than the
correct entry.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rusty Russell [Tue, 24 Aug 2004 04:38:43 +0000 (21:38 -0700)]
[PATCH] Move param section out of init area, for export of built-in module params
When exporting the module parameters of built-in modules, we need to access
the respective struct kernel_parameters. Currently, they're freed at init
time, and obviously this can't continue to be done. So, move them out of
__init_begin and __init_end and into RODATA in asm-generic/vmlinux.lds.h.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified) Signed-off-by: Dominik Brodowski <linux@brodo.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Anton Blanchard [Tue, 24 Aug 2004 04:34:08 +0000 (21:34 -0700)]
[PATCH] remove cacheline alignment from inode slabs
Most of the inode slabs are cacheline aligned. This can waste a fair
amount of memory, especially on architectures with large cacheline sizes
(eg 128 bytes).
Alignment has a few advantages. It prevents 2 cpus from accessing 2 data
structures in the same cacheline. Since struct inodes are well over a
cacheline and there are so many of them, there is little chance we will hit
this problem if we remove the alignment.
Alignment also ensures the maximum amount of the data structure is in the
same cacheline (instead of straddling 2 for example). The large size of
struct inode reduces this advantage.
With this patch the inode_cache slab goes from 640 bytes to 544 bytes, and
the number that fits in a 4kB slab goes from 6 to 7 on ppc64. A number of
other inode slabs also see improvements.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Anton Blanchard [Tue, 24 Aug 2004 04:33:55 +0000 (21:33 -0700)]
[PATCH] reduce size of struct dentry on 64bit
Reduce size of struct dentry from 248 to 232 bytes on 64bit.
- Reduce size of qstr by 8 bytes, placing int hash and int len together.
We gain a further 4 byte saving when qstr is used in struct dentry
since qstr goes from 24 to 16 bytes and the next member (d_lru)
requires 8 byte alignment (which means 4 bytes of padding).
- Move d_mounted to the end, since char d_iname[] only requires 1 byte
alignment. This reduces struct dentry by another 4 bytes.
With these changes the number of objects we can fit into a 4kB slab
goes from 16 to 17 on ppc64.
Note the above assumes the architecture naturally aligns types.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Anton Blanchard [Tue, 24 Aug 2004 04:33:43 +0000 (21:33 -0700)]
[PATCH] reduce size of struct buffer_head on 64bit
Reduce size of buffer_head from 96 to 88 bytes on 64bit architectures by
putting b_count and b_size together. b_count will still be in the first 16
bytes on 32bit architectures, so 16 byte cacheline machines shouldnt be
affected.
With this change the number of objects per 4kB slab goes up from 40 to 44
on ppc64.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chris Wright [Tue, 24 Aug 2004 04:33:08 +0000 (21:33 -0700)]
[PATCH] use simple_read_from_buffer in selinuxfs
Use simple_read_from_buffer. This also eliminates page allocation for the
sprintf buffer. Switch to get_zeroed_page instead of open-coding it. Viro
had ack'd this earlier. Still applies w/ the transaction update.
Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chris Wright [Tue, 24 Aug 2004 04:32:57 +0000 (21:32 -0700)]
[PATCH] Fix typos in security/security.c
Fix typos in security/security.c.
From: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
People are mainly concerned with showing off their total bogomips, not
per-cpu bogomips, so turn it into a KERN_DEBUG message for the benefit of
systems with lots of CPUs.
James Morris [Tue, 24 Aug 2004 04:31:13 +0000 (21:31 -0700)]
[PATCH] libfs: move transaction file ops into libfs
Below is an updated version of the patch which moves duplicated
transaction-based file operation code into libfs. Since the last post, the
patch has been through a couple of iterations with Al, who suggested a
number of cleanups including locking and interface simplification.
For filesystem writers, the interface is now much simpler. The
simple_transaction_get() helper should be part of the file op write method.
This safely obtains the transaction request data during write(), allocates
a page for it and stores it there. The data is returned to the caller for
potential further processing, which then makes it available for the next
read() call via simple_transaction_set(). See the selinuxfs and nfsctl
code for examples of use.
Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ben Leslie [Tue, 24 Aug 2004 04:30:39 +0000 (21:30 -0700)]
[PATCH] Use posix headers in sumversion.c
When compiling Linux on Mac OSX I had trouble with scripts/sumversion.c.
It includes <netinet/in.h> to obtain to definitions of htonl and ntohl.
On Mac OSX these are found in <arpa/inet.h>. After checking the POSIX
specification it appears that this is the correct place to get the
definitons for these functions.
Using this header also appears to work on Linux (at least with
Glibc-2.3.2).
It seems clearer to me to go with the POSIX standard than implementing
#if __APPLE__ style macros, but if such an approach is preferred I can
supply patches for that instead.
A patch against 2.6.7 which change <netinet/in.h> -> <arpa/inet.h> is
attached.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>