summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge with /usr/src/ntfs-2.6.gitAnton Altaparmakov2005-05-0520-131/+272
|\
| * Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitDavid Woodhouse2005-05-05225-3313/+9938
| |\
| | * [PATCH] drivers/base/bus.c: fix iteration in driver_detach()Roman Kagan2005-05-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With 2.6.11 and 2.6.12-rc2 (and perhaps a few versions before) usb drivers for multi-interface devices, which do usb_driver_release_interface() in their disconnect(), make rmmod hang. It turns out to be due to a bug in drivers/base/bus.c:driver_detach(), that iterates over the list of attached devices with list_for_each_safe() under an assumption that device_release_driver() only releases the current device, while it may also call device_release_driver() for other devices on the same list. The following patch fixes it. Please consider applying. Signed-off-by: Roman Kagan <rkagan@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * [PATCH] Hotplug: Make dev->bus checking consistentAlexander Nyberg2005-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier in the same function dev->bus is checked before dereferenced, make consistent although I honestly don't know if dev->bus could ever be NULL Found by the Coverity tool Signed-off-by: Alexander Nyberg <alexn@dsv.su.se> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | [AUDIT] Log correct syscall args for i386 processes on x86_64David Woodhouse2005-05-031-7/+13
| | | | | | | | | | | | | | | | | | | | | The i386 syscall ABI uses different registers. Log those instead of the x86_64 ones. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [PATCH] add new audit data to last skbChris Wright2005-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding more formatted audit data to an skb for delivery to userspace, the kernel will attempt to reuse an skb that has spare room. However, if the audit message has already been fragmented to multiple skb's, the search for spare room in the skb uses the head of the list. This will corrupt the audit message with trailing bytes being placed midway through the stream. Fix is to look at the end of the list. Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitDavid Woodhouse2005-05-03527-5913/+7902
| |\ \
| * | | [AUDIT] Update UML audit-syscall-{entry,exit} calls to new prototypesJeff Dike2005-05-035-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is for -mm only. It should probably be included in git-audit, and should be forwarded to Linus iff git-audit is. It updates the audit-syscall-{entry,exit} calls to current -mm. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | netlink audit warning fixAndrew Morton2005-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scumbags! net/netlink/af_netlink.c: In function `netlink_sendmsg': net/netlink/af_netlink.c:908: warning: implicit declaration of function `audit_get_loginuid' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [AUDIT] LOGIN message credentialsSteve Grubb2005-04-293-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached is a new patch that solves the issue of getting valid credentials into the LOGIN message. The current code was assuming that the audit context had already been copied. This is not always the case for LOGIN messages. To solve the problem, the patch passes the task struct to the function that emits the message where it can get valid credentials. Signed-off-by: Steve Grubb <sgrubb@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [AUDIT] Requeue messages at head of queue, up to audit_backlogChris Wright2005-04-291-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If netlink_unicast() fails, requeue the skb back at the head of the queue it just came from, instead of the tail. And do so unless we've exceeded the audit_backlog limit; not according to some other arbitrary limit. From: Chris Wright <chrisw@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | Add audit uid to netlink credentialsSerge Hallyn2005-04-295-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most audit control messages are sent over netlink.In order to properly log the identity of the sender of audit control messages, we would like to add the loginuid to the netlink_creds structure, as per the attached patch. Signed-off-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | audit: update pointer to userspace tools, remove emacs mode tags2005-04-293-4/+4
| | | |
| * | | mips: warning fix audit_arch()Yoichi Yuasa2005-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | arch/mips/kernel/ptrace.c:305: warning: function declaration isn't a prototype Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [PATCH] fix ia64 syscall auditingAmy Griffis2005-04-292-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached is a patch against David's audit.17 kernel that adds checks for the TIF_SYSCALL_AUDIT thread flag to the ia64 system call and signal handling code paths.The patch enables auditing of system calls set up via fsys_bubble_down, as well as ensuring that audit_syscall_exit() is called on return from sigreturn. Neglecting to check for TIF_SYSCALL_AUDIT at these points results in incorrect information in audit_context, causing frequent system panics when system call auditing is enabled on an ia64 system. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [AUDIT] Avoid using %*.*s format strings.Peter Martuccelli2005-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They don't seem to work correctly (investigation ongoing), but we don't actually need to do it anyway. Patch from Peter Martuccelli <peterm@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [AUDIT] Fix signedness of 'serial' in various routines.Steve Grubb2005-04-293-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached is a patch that corrects a signed/unsigned warning. I also noticed that we needlessly init serial to 0. That only needs to occur if the kernel was compiled without the audit system. -Steve Grubb Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [AUDIT] Don't allow ptrace to fool auditing, log arch of audited syscalls.2005-04-298-58/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were calling ptrace_notify() after auditing the syscall and arguments, but the debugger could have _changed_ them before the syscall was actually invoked. Reorder the calls to fix that. While we're touching ever call to audit_syscall_entry(), we also make it take an extra argument: the architecture of the syscall which was made, because some architectures allow more than one type of syscall. Also add an explicit success/failure flag to audit_syscall_exit(), for the benefit of architectures which return that in a condition register rather than only returning a single register. Change type of syscall return value to 'long' not 'int'. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | namei: add audit_inode to all branches in path_lookupPrasanna Meda2005-04-291-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change is in path_lookup: added a goto to do audit_inode instead of return statement, when emul_lookup_dentry for root is successful.The existing code does audit_inode only when lookup is done in normal root or cwd. Other changes: Some lookup routines are returning zero on success, and some are returning zero on failure. I documented the related function signatures in this code path, so that one can glance over abstract functions without understanding the entire code. Signed-off-by: Prasanna Meda <pmeda@akamai.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | audit_log_untrustedstring() warning fixAndrew Morton2005-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel/audit.c: In function `audit_log_untrustedstring': kernel/audit.c:736: warning: comparison is always false due to limited range of data type Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | AUDIT: Avoid log pollution by untrusted strings.2005-04-293-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We log strings from userspace, such as arguments to open(). These could be formatted to contain \n followed by fake audit log entries. Provide a function for logging such strings, which gives a hex dump when the string contains anything but basic printable ASCII characters. Use it for logging filenames. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | | NTFS: Use MAX_BUF_PER_PAGE instead of variable sized array allocation forAnton Altaparmakov2005-05-052-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | better code generation and one less sparse warning in fs/ntfs/aops.c. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Minor cleanup: Define and use NTFS_MAX_CLUSTER_SIZE constant insteadAnton Altaparmakov2005-05-053-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | of hard coded 0x10000 in fs/ntfs/super.c. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Update attribute definition handling.Anton Altaparmakov2005-05-054-27/+40
| | | | | | | | | | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Some utilities modify the boot sector but do not update the checksum.Anton Altaparmakov2005-05-052-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thus, relax the checking in fs/ntfs/super.c::is_boot_sector_ntfs() to only emit a warning when the checksum is incorrect rather than refusing the mount. Thanks to Bernd Casimir for pointing this problem out. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Remove checks for NULL before calling kfree() since kfree() does theJesper Juhl2005-05-054-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | checking itself. (Jesper Juhl) Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Fix compilation when configured read-only.Anton Altaparmakov2005-05-055-3/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add ifdef NTFS_RW around write specific code if fs/ntfs/runlist.[hc] and fs/ntfs/attrib.[hc]. - Minor bugfix to fs/ntfs/attrib.c::ntfs_attr_make_non_resident() where the runlist was not freed in all error cases. - Add fs/ntfs/runlist.[hc]::ntfs_rl_find_vcn_nolock(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Include linux/swap.h in fs/ntfs/attrib.c for mark_page_accessed().Anton Altaparmakov2005-05-051-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: - Modify ->readpage and ->writepage (fs/ntfs/aops.c) so they detectAnton Altaparmakov2005-05-053-16/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and handle the case where an attribute is converted from resident to non-resident by a concurrent file write. - Reorder some operations when converting an attribute from resident to non-resident (fs/ntfs/attrib.c) so it is safe wrt concurrent ->readpage and ->writepage. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Fix sign of various error return values to be negative inAnton Altaparmakov2005-05-052-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | fs/ntfs/lcnalloc.c. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_make_non_resident().Anton Altaparmakov2005-05-053-0/+303
| | | | | | | | | | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: - Fix bug in fs/ntfs/attrib.c::ntfs_find_vcn_nolock() where afterAnton Altaparmakov2005-05-057-26/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dropping the read lock and taking the write lock we were not checking whether someone else did not already do the work we wanted to do. - Rename ntfs_find_vcn_nolock() to ntfs_attr_find_vcn_nolock(). - Tidy up some comments in fs/ntfs/runlist.c. - Add LCN_ENOMEM and LCN_EIO definitions to fs/ntfs/runlist.h. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_vcn_to_lcn_nolock() used by the newAnton Altaparmakov2005-05-053-3/+95
| | | | | | | | | | | | | | | | | | | | | | | | write code. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Add AT_EA in addition to AT_DATA to whitelist for being allowed to beAnton Altaparmakov2005-05-052-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | non-resident in fs/ntfs/attrib.c::ntfs_attr_can_be_non_resident(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Correct sparse file handling. The compressed values need to beAnton Altaparmakov2005-05-053-97/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | checked and set in the ntfs inode as done for compressed files and the compressed size needs to be used for vfs inode->i_blocks instead of the allocated size, again, as done for compressed files. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Make fs/ntfs/namei.c::ntfs_get_{parent,dentry} static and move theAnton Altaparmakov2005-05-054-36/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | definition of ntfs_export_ops from fs/ntfs/super.c to namei.c. Also, declare ntfs_export_ops in fs/ntfs/ntfs.h. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Fix printk format warnings on ia64. (Randy Dunlap)Randy Dunlap2005-05-056-15/+20
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: - Set the ntfs_inode->allocated_size to the real allocated size in theAnton Altaparmakov2005-05-052-174/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mft record for resident attributes (fs/ntfs/inode.c). - Small readability cleanup to use "a" instead of "ctx->attr" everywhere (fs/ntfs/inode.c). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Fix a nasty runlist merge bug when merging two holes.Anton Altaparmakov2005-05-052-2/+6
| | | | | | | | | | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Change time to u64 in time.h::ntfs2utc() as it otherwise generates aAnton Altaparmakov2005-05-052-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | warning in the do_div() call on sparc32. Thanks to Meelis Roos for the report and analysis of the warning. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: - Split ntfs_map_runlist() into ntfs_map_runlist() and a non-lockingAnton Altaparmakov2005-05-056-113/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | helper ntfs_map_runlist_nolock() which is used by ntfs_map_runlist(). This allows us to map runlist fragments with the runlist lock already held without having to drop and reacquire it around the call. Adapt all callers. - Change ntfs_find_vcn() to ntfs_find_vcn_nolock() which takes a locked runlist. This allows us to find runlist elements with the runlist lock already held without having to drop and reacquire it around the call. Adapt all callers. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Fix a bug in fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress() inAnton Altaparmakov2005-05-052-22/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the creation of the unmapped runlist element for the base attribute extent. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: - Add disable_sparse mount option together with a per volume sparseAnton Altaparmakov2005-05-059-33/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable bit which is set appropriately and a per inode sparse disable bit which is preset on some system file inodes as appropriate. - Enforce that sparse support is disabled on NTFS volumes pre 3.0. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Optimise/reorganise some error handling code in fs/ntfs/aops.c.Anton Altaparmakov2005-05-051-11/+6
| | | | | | | | | | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Fixup the resident attribute resizing code inAnton Altaparmakov2005-05-052-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fs/ntfs/aops.c::ntfs_{prepare,commit}_write()() and re-enable it. It should be safe now. (Famous last words...) Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Fix stupid bug in fs/ntfs/mft.c introduced in last changeset.Anton Altaparmakov2005-05-051-7/+4
| | | | | | | | | | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Repeat a failed ntfs_truncate() in fs/ntfs/aops.c::ntfs_writepage()Anton Altaparmakov2005-05-051-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | and abort if it fails again. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Use i_size_{read,write}() in fs/ntfs/{aops.c,mft.c} and protectAnton Altaparmakov2005-05-053-59/+156
| | | | | | | | | | | | | | | | | | | | | | | | access to the i_size and other size fields using the size_lock. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: Use i_size_read() in fs/ntfs/inode.c once and then use the cached valueAnton Altaparmakov2005-05-052-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | afterwards when reading the size of the bitmap inode. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | | | NTFS: - Use i_size_read() in fs/ntfs/super.c once and then use the cachedAnton Altaparmakov2005-05-052-48/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | value afterwards. Cache the initialized_size in the same way and protect access to the two sizes using the size_lock. - Minor optimization to fs/ntfs/super.c::ntfs_statfs() and its helpers. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>