* [patch 005/127] Cross Memory Attach
From: akpm @ 2011-11-01 0:06 UTC (permalink / raw)
To: torvalds
Cc: akpm, cyeoh, arnd, benh, dhowells, hpa, jmorris, linux-arch,
linux-man, mingo, paulus, tglx, yeohc
From: Christopher Yeoh <cyeoh@au1.ibm.com>
Subject: Cross Memory Attach
The basic idea behind cross memory attach is to allow MPI programs doing
intra-node communication to do a single copy of the message rather than a
double copy of the message via shared memory.
The following patch attempts to achieve this by allowing a destination
process, given an address and size from a source process, to copy memory
directly from the source process into its own address space via a system
call. There is also a symmetrical ability to copy from the current
process's address space into a destination process's address space.
- Use of /proc/pid/mem has been considered, but there are issues with
using it:
- Does not allow for specifying iovecs for both src and dest, assuming
preadv or pwritev was implemented either the area read from or
written to would need to be contiguous.
- Currently mem_read allows only processes who are currently
ptrace'ing the target and are still able to ptrace the target to read
from the target. This check could possibly be moved to the open call,
but its not clear exactly what race this restriction is stopping
(reason appears to have been lost)
- Having to send the fd of /proc/self/mem via SCM_RIGHTS on unix
domain socket is a bit ugly from a userspace point of view,
especially when you may have hundreds if not (eventually) thousands
of processes that all need to do this with each other
- Doesn't allow for some future use of the interface we would like to
consider adding in the future (see below)
- Interestingly reading from /proc/pid/mem currently actually
involves two copies! (But this could be fixed pretty easily)
As mentioned previously use of vmsplice instead was considered, but has
problems. Since you need the reader and writer working co-operatively if
the pipe is not drained then you block. Which requires some wrapping to
do non blocking on the send side or polling on the receive. In all to all
communication it requires ordering otherwise you can deadlock. And in the
example of many MPI tasks writing to one MPI task vmsplice serialises the
copying.
There are some cases of MPI collectives where even a single copy interface
does not get us the performance gain we could. For example in an
MPI_Reduce rather than copy the data from the source we would like to
instead use it directly in a mathops (say the reduce is doing a sum) as
this would save us doing a copy. We don't need to keep a copy of the data
from the source. I haven't implemented this, but I think this interface
could in the future do all this through the use of the flags - eg could
specify the math operation and type and the kernel rather than just
copying the data would apply the specified operation between the source
and destination and store it in the destination.
Although we don't have a "second user" of the interface (though I've had
some nibbles from people who may be interested in using it for intra
process messaging which is not MPI). This interface is something which
hardware vendors are already doing for their custom drivers to implement
fast local communication. And so in addition to this being useful for
OpenMPI it would mean the driver maintainers don't have to fix things up
when the mm changes.
There was some discussion about how much faster a true zero copy would
go. Here's a link back to the email with some testing I did on that:
http://marc.info/?l=linux-mm&m=130105930902915&w=2
There is a basic man page for the proposed interface here:
http://ozlabs.org/~cyeoh/cma/process_vm_readv.txt
This has been implemented for x86 and powerpc, other architecture should
mainly (I think) just need to add syscall numbers for the process_vm_readv
and process_vm_writev. There are 32 bit compatibility versions for
64-bit kernels.
For arch maintainers there are some simple tests to be able to quickly
verify that the syscalls are working correctly here:
http://ozlabs.org/~cyeoh/cma/cma-test-20110718.tgz
Signed-off-by: Chris Yeoh <yeohc@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: <linux-man@vger.kernel.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/include/asm/systbl.h | 2
arch/powerpc/include/asm/unistd.h | 4
arch/x86/ia32/ia32entry.S | 2
arch/x86/include/asm/unistd_32.h | 4
arch/x86/include/asm/unistd_64.h | 4
arch/x86/kernel/syscall_table_32.S | 2
fs/aio.c | 4
fs/compat.c | 7
fs/read_write.c | 8
include/linux/compat.h | 3
include/linux/fs.h | 7
include/linux/syscalls.h | 13
kernel/sys_ni.c | 4
mm/Makefile | 3
mm/process_vm_access.c | 496 +++++++++++++++++++++++++++
security/keys/compat.c | 2
security/keys/keyctl.c | 2
17 files changed, 550 insertions(+), 17 deletions(-)
diff -puN arch/powerpc/include/asm/systbl.h~cross-memory-attach-v3 arch/powerpc/include/asm/systbl.h
--- a/arch/powerpc/include/asm/systbl.h~cross-memory-attach-v3
+++ a/arch/powerpc/include/asm/systbl.h
@@ -354,3 +354,5 @@ COMPAT_SYS_SPU(clock_adjtime)
SYSCALL_SPU(syncfs)
COMPAT_SYS_SPU(sendmmsg)
SYSCALL_SPU(setns)
+COMPAT_SYS(process_vm_readv)
+COMPAT_SYS(process_vm_writev)
diff -puN arch/powerpc/include/asm/unistd.h~cross-memory-attach-v3 arch/powerpc/include/asm/unistd.h
--- a/arch/powerpc/include/asm/unistd.h~cross-memory-attach-v3
+++ a/arch/powerpc/include/asm/unistd.h
@@ -373,10 +373,12 @@
#define __NR_syncfs 348
#define __NR_sendmmsg 349
#define __NR_setns 350
+#define __NR_process_vm_readv 351
+#define __NR_process_vm_writev 352
#ifdef __KERNEL__
-#define __NR_syscalls 351
+#define __NR_syscalls 353
#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
diff -puN arch/x86/ia32/ia32entry.S~cross-memory-attach-v3 arch/x86/ia32/ia32entry.S
--- a/arch/x86/ia32/ia32entry.S~cross-memory-attach-v3
+++ a/arch/x86/ia32/ia32entry.S
@@ -850,4 +850,6 @@ ia32_sys_call_table:
.quad sys_syncfs
.quad compat_sys_sendmmsg /* 345 */
.quad sys_setns
+ .quad compat_sys_process_vm_readv
+ .quad compat_sys_process_vm_writev
ia32_syscall_end:
diff -puN arch/x86/include/asm/unistd_32.h~cross-memory-attach-v3 arch/x86/include/asm/unistd_32.h
--- a/arch/x86/include/asm/unistd_32.h~cross-memory-attach-v3
+++ a/arch/x86/include/asm/unistd_32.h
@@ -352,10 +352,12 @@
#define __NR_syncfs 344
#define __NR_sendmmsg 345
#define __NR_setns 346
+#define __NR_process_vm_readv 347
+#define __NR_process_vm_writev 348
#ifdef __KERNEL__
-#define NR_syscalls 347
+#define NR_syscalls 349
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
diff -puN arch/x86/include/asm/unistd_64.h~cross-memory-attach-v3 arch/x86/include/asm/unistd_64.h
--- a/arch/x86/include/asm/unistd_64.h~cross-memory-attach-v3
+++ a/arch/x86/include/asm/unistd_64.h
@@ -682,6 +682,10 @@ __SYSCALL(__NR_sendmmsg, sys_sendmmsg)
__SYSCALL(__NR_setns, sys_setns)
#define __NR_getcpu 309
__SYSCALL(__NR_getcpu, sys_getcpu)
+#define __NR_process_vm_readv 310
+__SYSCALL(__NR_process_vm_readv, sys_process_vm_readv)
+#define __NR_process_vm_writev 311
+__SYSCALL(__NR_process_vm_writev, sys_process_vm_writev)
#ifndef __NO_STUBS
#define __ARCH_WANT_OLD_READDIR
diff -puN arch/x86/kernel/syscall_table_32.S~cross-memory-attach-v3 arch/x86/kernel/syscall_table_32.S
--- a/arch/x86/kernel/syscall_table_32.S~cross-memory-attach-v3
+++ a/arch/x86/kernel/syscall_table_32.S
@@ -346,3 +346,5 @@ ENTRY(sys_call_table)
.long sys_syncfs
.long sys_sendmmsg /* 345 */
.long sys_setns
+ .long sys_process_vm_readv
+ .long sys_process_vm_writev
diff -puN fs/aio.c~cross-memory-attach-v3 fs/aio.c
--- a/fs/aio.c~cross-memory-attach-v3
+++ a/fs/aio.c
@@ -1387,13 +1387,13 @@ static ssize_t aio_setup_vectored_rw(int
ret = compat_rw_copy_check_uvector(type,
(struct compat_iovec __user *)kiocb->ki_buf,
kiocb->ki_nbytes, 1, &kiocb->ki_inline_vec,
- &kiocb->ki_iovec);
+ &kiocb->ki_iovec, 1);
else
#endif
ret = rw_copy_check_uvector(type,
(struct iovec __user *)kiocb->ki_buf,
kiocb->ki_nbytes, 1, &kiocb->ki_inline_vec,
- &kiocb->ki_iovec);
+ &kiocb->ki_iovec, 1);
if (ret < 0)
goto out;
diff -puN fs/compat.c~cross-memory-attach-v3 fs/compat.c
--- a/fs/compat.c~cross-memory-attach-v3
+++ a/fs/compat.c
@@ -546,7 +546,7 @@ out:
ssize_t compat_rw_copy_check_uvector(int type,
const struct compat_iovec __user *uvector, unsigned long nr_segs,
unsigned long fast_segs, struct iovec *fast_pointer,
- struct iovec **ret_pointer)
+ struct iovec **ret_pointer, int check_access)
{
compat_ssize_t tot_len;
struct iovec *iov = *ret_pointer = fast_pointer;
@@ -593,7 +593,8 @@ ssize_t compat_rw_copy_check_uvector(int
}
if (len < 0) /* size_t not fitting in compat_ssize_t .. */
goto out;
- if (!access_ok(vrfy_dir(type), compat_ptr(buf), len)) {
+ if (check_access &&
+ !access_ok(vrfy_dir(type), compat_ptr(buf), len)) {
ret = -EFAULT;
goto out;
}
@@ -1107,7 +1108,7 @@ static ssize_t compat_do_readv_writev(in
goto out;
tot_len = compat_rw_copy_check_uvector(type, uvector, nr_segs,
- UIO_FASTIOV, iovstack, &iov);
+ UIO_FASTIOV, iovstack, &iov, 1);
if (tot_len == 0) {
ret = 0;
goto out;
diff -puN fs/read_write.c~cross-memory-attach-v3 fs/read_write.c
--- a/fs/read_write.c~cross-memory-attach-v3
+++ a/fs/read_write.c
@@ -633,7 +633,8 @@ ssize_t do_loop_readv_writev(struct file
ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
unsigned long nr_segs, unsigned long fast_segs,
struct iovec *fast_pointer,
- struct iovec **ret_pointer)
+ struct iovec **ret_pointer,
+ int check_access)
{
unsigned long seg;
ssize_t ret;
@@ -689,7 +690,8 @@ ssize_t rw_copy_check_uvector(int type,
ret = -EINVAL;
goto out;
}
- if (unlikely(!access_ok(vrfy_dir(type), buf, len))) {
+ if (check_access
+ && unlikely(!access_ok(vrfy_dir(type), buf, len))) {
ret = -EFAULT;
goto out;
}
@@ -721,7 +723,7 @@ static ssize_t do_readv_writev(int type,
}
ret = rw_copy_check_uvector(type, uvector, nr_segs,
- ARRAY_SIZE(iovstack), iovstack, &iov);
+ ARRAY_SIZE(iovstack), iovstack, &iov, 1);
if (ret <= 0)
goto out;
diff -puN include/linux/compat.h~cross-memory-attach-v3 include/linux/compat.h
--- a/include/linux/compat.h~cross-memory-attach-v3
+++ a/include/linux/compat.h
@@ -547,7 +547,8 @@ extern ssize_t compat_rw_copy_check_uvec
const struct compat_iovec __user *uvector,
unsigned long nr_segs,
unsigned long fast_segs, struct iovec *fast_pointer,
- struct iovec **ret_pointer);
+ struct iovec **ret_pointer,
+ int check_access);
extern void __user *compat_alloc_user_space(unsigned long len);
diff -puN include/linux/fs.h~cross-memory-attach-v3 include/linux/fs.h
--- a/include/linux/fs.h~cross-memory-attach-v3
+++ a/include/linux/fs.h
@@ -1633,9 +1633,10 @@ struct inode_operations {
struct seq_file;
ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
- unsigned long nr_segs, unsigned long fast_segs,
- struct iovec *fast_pointer,
- struct iovec **ret_pointer);
+ unsigned long nr_segs, unsigned long fast_segs,
+ struct iovec *fast_pointer,
+ struct iovec **ret_pointer,
+ int check_access);
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
diff -puN include/linux/syscalls.h~cross-memory-attach-v3 include/linux/syscalls.h
--- a/include/linux/syscalls.h~cross-memory-attach-v3
+++ a/include/linux/syscalls.h
@@ -844,4 +844,17 @@ asmlinkage long sys_open_by_handle_at(in
struct file_handle __user *handle,
int flags);
asmlinkage long sys_setns(int fd, int nstype);
+asmlinkage long sys_process_vm_readv(pid_t pid,
+ const struct iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags);
+asmlinkage long sys_process_vm_writev(pid_t pid,
+ const struct iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags);
+
#endif
diff -puN kernel/sys_ni.c~cross-memory-attach-v3 kernel/sys_ni.c
--- a/kernel/sys_ni.c~cross-memory-attach-v3
+++ a/kernel/sys_ni.c
@@ -145,6 +145,10 @@ cond_syscall(sys_io_submit);
cond_syscall(sys_io_cancel);
cond_syscall(sys_io_getevents);
cond_syscall(sys_syslog);
+cond_syscall(sys_process_vm_readv);
+cond_syscall(sys_process_vm_writev);
+cond_syscall(compat_sys_process_vm_readv);
+cond_syscall(compat_sys_process_vm_writev);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
diff -puN mm/Makefile~cross-memory-attach-v3 mm/Makefile
--- a/mm/Makefile~cross-memory-attach-v3
+++ a/mm/Makefile
@@ -5,7 +5,8 @@
mmu-y := nommu.o
mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \
mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
- vmalloc.o pagewalk.o pgtable-generic.o
+ vmalloc.o pagewalk.o pgtable-generic.o \
+ process_vm_access.o
obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
maccess.o page_alloc.o page-writeback.o \
diff -puN /dev/null mm/process_vm_access.c
--- /dev/null
+++ a/mm/process_vm_access.c
@@ -0,0 +1,496 @@
+/*
+ * linux/mm/process_vm_access.c
+ *
+ * Copyright (C) 2010-2011 Christopher Yeoh <cyeoh@au1.ibm.com>, IBM Corp.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/mm.h>
+#include <linux/uio.h>
+#include <linux/sched.h>
+#include <linux/highmem.h>
+#include <linux/ptrace.h>
+#include <linux/slab.h>
+#include <linux/syscalls.h>
+
+#ifdef CONFIG_COMPAT
+#include <linux/compat.h>
+#endif
+
+/**
+ * process_vm_rw_pages - read/write pages from task specified
+ * @task: task to read/write from
+ * @mm: mm for task
+ * @process_pages: struct pages area that can store at least
+ * nr_pages_to_copy struct page pointers
+ * @pa: address of page in task to start copying from/to
+ * @start_offset: offset in page to start copying from/to
+ * @len: number of bytes to copy
+ * @lvec: iovec array specifying where to copy to/from
+ * @lvec_cnt: number of elements in iovec array
+ * @lvec_current: index in iovec array we are up to
+ * @lvec_offset: offset in bytes from current iovec iov_base we are up to
+ * @vm_write: 0 means copy from, 1 means copy to
+ * @nr_pages_to_copy: number of pages to copy
+ * @bytes_copied: returns number of bytes successfully copied
+ * Returns 0 on success, error code otherwise
+ */
+static int process_vm_rw_pages(struct task_struct *task,
+ struct mm_struct *mm,
+ struct page **process_pages,
+ unsigned long pa,
+ unsigned long start_offset,
+ unsigned long len,
+ const struct iovec *lvec,
+ unsigned long lvec_cnt,
+ unsigned long *lvec_current,
+ size_t *lvec_offset,
+ int vm_write,
+ unsigned int nr_pages_to_copy,
+ ssize_t *bytes_copied)
+{
+ int pages_pinned;
+ void *target_kaddr;
+ int pgs_copied = 0;
+ int j;
+ int ret;
+ ssize_t bytes_to_copy;
+ ssize_t rc = 0;
+
+ *bytes_copied = 0;
+
+ /* Get the pages we're interested in */
+ down_read(&mm->mmap_sem);
+ pages_pinned = get_user_pages(task, mm, pa,
+ nr_pages_to_copy,
+ vm_write, 0, process_pages, NULL);
+ up_read(&mm->mmap_sem);
+
+ if (pages_pinned != nr_pages_to_copy) {
+ rc = -EFAULT;
+ goto end;
+ }
+
+ /* Do the copy for each page */
+ for (pgs_copied = 0;
+ (pgs_copied < nr_pages_to_copy) && (*lvec_current < lvec_cnt);
+ pgs_copied++) {
+ /* Make sure we have a non zero length iovec */
+ while (*lvec_current < lvec_cnt
+ && lvec[*lvec_current].iov_len == 0)
+ (*lvec_current)++;
+ if (*lvec_current == lvec_cnt)
+ break;
+
+ /*
+ * Will copy smallest of:
+ * - bytes remaining in page
+ * - bytes remaining in destination iovec
+ */
+ bytes_to_copy = min_t(ssize_t, PAGE_SIZE - start_offset,
+ len - *bytes_copied);
+ bytes_to_copy = min_t(ssize_t, bytes_to_copy,
+ lvec[*lvec_current].iov_len
+ - *lvec_offset);
+
+ target_kaddr = kmap(process_pages[pgs_copied]) + start_offset;
+
+ if (vm_write)
+ ret = copy_from_user(target_kaddr,
+ lvec[*lvec_current].iov_base
+ + *lvec_offset,
+ bytes_to_copy);
+ else
+ ret = copy_to_user(lvec[*lvec_current].iov_base
+ + *lvec_offset,
+ target_kaddr, bytes_to_copy);
+ kunmap(process_pages[pgs_copied]);
+ if (ret) {
+ *bytes_copied += bytes_to_copy - ret;
+ pgs_copied++;
+ rc = -EFAULT;
+ goto end;
+ }
+ *bytes_copied += bytes_to_copy;
+ *lvec_offset += bytes_to_copy;
+ if (*lvec_offset == lvec[*lvec_current].iov_len) {
+ /*
+ * Need to copy remaining part of page into the
+ * next iovec if there are any bytes left in page
+ */
+ (*lvec_current)++;
+ *lvec_offset = 0;
+ start_offset = (start_offset + bytes_to_copy)
+ % PAGE_SIZE;
+ if (start_offset)
+ pgs_copied--;
+ } else {
+ start_offset = 0;
+ }
+ }
+
+end:
+ if (vm_write) {
+ for (j = 0; j < pages_pinned; j++) {
+ if (j < pgs_copied)
+ set_page_dirty_lock(process_pages[j]);
+ put_page(process_pages[j]);
+ }
+ } else {
+ for (j = 0; j < pages_pinned; j++)
+ put_page(process_pages[j]);
+ }
+
+ return rc;
+}
+
+/* Maximum number of pages kmalloc'd to hold struct page's during copy */
+#define PVM_MAX_KMALLOC_PAGES (PAGE_SIZE * 2)
+
+/**
+ * process_vm_rw_single_vec - read/write pages from task specified
+ * @addr: start memory address of target process
+ * @len: size of area to copy to/from
+ * @lvec: iovec array specifying where to copy to/from locally
+ * @lvec_cnt: number of elements in iovec array
+ * @lvec_current: index in iovec array we are up to
+ * @lvec_offset: offset in bytes from current iovec iov_base we are up to
+ * @process_pages: struct pages area that can store at least
+ * nr_pages_to_copy struct page pointers
+ * @mm: mm for task
+ * @task: task to read/write from
+ * @vm_write: 0 means copy from, 1 means copy to
+ * @bytes_copied: returns number of bytes successfully copied
+ * Returns 0 on success or on failure error code
+ */
+static int process_vm_rw_single_vec(unsigned long addr,
+ unsigned long len,
+ const struct iovec *lvec,
+ unsigned long lvec_cnt,
+ unsigned long *lvec_current,
+ size_t *lvec_offset,
+ struct page **process_pages,
+ struct mm_struct *mm,
+ struct task_struct *task,
+ int vm_write,
+ ssize_t *bytes_copied)
+{
+ unsigned long pa = addr & PAGE_MASK;
+ unsigned long start_offset = addr - pa;
+ unsigned long nr_pages;
+ ssize_t bytes_copied_loop;
+ ssize_t rc = 0;
+ unsigned long nr_pages_copied = 0;
+ unsigned long nr_pages_to_copy;
+ unsigned long max_pages_per_loop = PVM_MAX_KMALLOC_PAGES
+ / sizeof(struct pages *);
+
+ *bytes_copied = 0;
+
+ /* Work out address and page range required */
+ if (len == 0)
+ return 0;
+ nr_pages = (addr + len - 1) / PAGE_SIZE - addr / PAGE_SIZE + 1;
+
+ while ((nr_pages_copied < nr_pages) && (*lvec_current < lvec_cnt)) {
+ nr_pages_to_copy = min(nr_pages - nr_pages_copied,
+ max_pages_per_loop);
+
+ rc = process_vm_rw_pages(task, mm, process_pages, pa,
+ start_offset, len,
+ lvec, lvec_cnt,
+ lvec_current, lvec_offset,
+ vm_write, nr_pages_to_copy,
+ &bytes_copied_loop);
+ start_offset = 0;
+ *bytes_copied += bytes_copied_loop;
+
+ if (rc < 0) {
+ return rc;
+ } else {
+ len -= bytes_copied_loop;
+ nr_pages_copied += nr_pages_to_copy;
+ pa += nr_pages_to_copy * PAGE_SIZE;
+ }
+ }
+
+ return rc;
+}
+
+/* Maximum number of entries for process pages array
+ which lives on stack */
+#define PVM_MAX_PP_ARRAY_COUNT 16
+
+/**
+ * process_vm_rw_core - core of reading/writing pages from task specified
+ * @pid: PID of process to read/write from/to
+ * @lvec: iovec array specifying where to copy to/from locally
+ * @liovcnt: size of lvec array
+ * @rvec: iovec array specifying where to copy to/from in the other process
+ * @riovcnt: size of rvec array
+ * @flags: currently unused
+ * @vm_write: 0 if reading from other process, 1 if writing to other process
+ * Returns the number of bytes read/written or error code. May
+ * return less bytes than expected if an error occurs during the copying
+ * process.
+ */
+static ssize_t process_vm_rw_core(pid_t pid, const struct iovec *lvec,
+ unsigned long liovcnt,
+ const struct iovec *rvec,
+ unsigned long riovcnt,
+ unsigned long flags, int vm_write)
+{
+ struct task_struct *task;
+ struct page *pp_stack[PVM_MAX_PP_ARRAY_COUNT];
+ struct page **process_pages = pp_stack;
+ struct mm_struct *mm;
+ unsigned long i;
+ ssize_t rc = 0;
+ ssize_t bytes_copied_loop;
+ ssize_t bytes_copied = 0;
+ unsigned long nr_pages = 0;
+ unsigned long nr_pages_iov;
+ unsigned long iov_l_curr_idx = 0;
+ size_t iov_l_curr_offset = 0;
+ ssize_t iov_len;
+
+ /*
+ * Work out how many pages of struct pages we're going to need
+ * when eventually calling get_user_pages
+ */
+ for (i = 0; i < riovcnt; i++) {
+ iov_len = rvec[i].iov_len;
+ if (iov_len > 0) {
+ nr_pages_iov = ((unsigned long)rvec[i].iov_base
+ + iov_len)
+ / PAGE_SIZE - (unsigned long)rvec[i].iov_base
+ / PAGE_SIZE + 1;
+ nr_pages = max(nr_pages, nr_pages_iov);
+ }
+ }
+
+ if (nr_pages == 0)
+ return 0;
+
+ if (nr_pages > PVM_MAX_PP_ARRAY_COUNT) {
+ /* For reliability don't try to kmalloc more than
+ 2 pages worth */
+ process_pages = kmalloc(min_t(size_t, PVM_MAX_KMALLOC_PAGES,
+ sizeof(struct pages *)*nr_pages),
+ GFP_KERNEL);
+
+ if (!process_pages)
+ return -ENOMEM;
+ }
+
+ /* Get process information */
+ rcu_read_lock();
+ task = find_task_by_vpid(pid);
+ if (task)
+ get_task_struct(task);
+ rcu_read_unlock();
+ if (!task) {
+ rc = -ESRCH;
+ goto free_proc_pages;
+ }
+
+ task_lock(task);
+ if (__ptrace_may_access(task, PTRACE_MODE_ATTACH)) {
+ task_unlock(task);
+ rc = -EPERM;
+ goto put_task_struct;
+ }
+ mm = task->mm;
+
+ if (!mm || (task->flags & PF_KTHREAD)) {
+ task_unlock(task);
+ rc = -EINVAL;
+ goto put_task_struct;
+ }
+
+ atomic_inc(&mm->mm_users);
+ task_unlock(task);
+
+ for (i = 0; i < riovcnt && iov_l_curr_idx < liovcnt; i++) {
+ rc = process_vm_rw_single_vec(
+ (unsigned long)rvec[i].iov_base, rvec[i].iov_len,
+ lvec, liovcnt, &iov_l_curr_idx, &iov_l_curr_offset,
+ process_pages, mm, task, vm_write, &bytes_copied_loop);
+ bytes_copied += bytes_copied_loop;
+ if (rc != 0) {
+ /* If we have managed to copy any data at all then
+ we return the number of bytes copied. Otherwise
+ we return the error code */
+ if (bytes_copied)
+ rc = bytes_copied;
+ goto put_mm;
+ }
+ }
+
+ rc = bytes_copied;
+put_mm:
+ mmput(mm);
+
+put_task_struct:
+ put_task_struct(task);
+
+free_proc_pages:
+ if (process_pages != pp_stack)
+ kfree(process_pages);
+ return rc;
+}
+
+/**
+ * process_vm_rw - check iovecs before calling core routine
+ * @pid: PID of process to read/write from/to
+ * @lvec: iovec array specifying where to copy to/from locally
+ * @liovcnt: size of lvec array
+ * @rvec: iovec array specifying where to copy to/from in the other process
+ * @riovcnt: size of rvec array
+ * @flags: currently unused
+ * @vm_write: 0 if reading from other process, 1 if writing to other process
+ * Returns the number of bytes read/written or error code. May
+ * return less bytes than expected if an error occurs during the copying
+ * process.
+ */
+static ssize_t process_vm_rw(pid_t pid,
+ const struct iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags, int vm_write)
+{
+ struct iovec iovstack_l[UIO_FASTIOV];
+ struct iovec iovstack_r[UIO_FASTIOV];
+ struct iovec *iov_l = iovstack_l;
+ struct iovec *iov_r = iovstack_r;
+ ssize_t rc;
+
+ if (flags != 0)
+ return -EINVAL;
+
+ /* Check iovecs */
+ if (vm_write)
+ rc = rw_copy_check_uvector(WRITE, lvec, liovcnt, UIO_FASTIOV,
+ iovstack_l, &iov_l, 1);
+ else
+ rc = rw_copy_check_uvector(READ, lvec, liovcnt, UIO_FASTIOV,
+ iovstack_l, &iov_l, 1);
+ if (rc <= 0)
+ goto free_iovecs;
+
+ rc = rw_copy_check_uvector(READ, rvec, riovcnt, UIO_FASTIOV,
+ iovstack_r, &iov_r, 0);
+ if (rc <= 0)
+ goto free_iovecs;
+
+ rc = process_vm_rw_core(pid, iov_l, liovcnt, iov_r, riovcnt, flags,
+ vm_write);
+
+free_iovecs:
+ if (iov_r != iovstack_r)
+ kfree(iov_r);
+ if (iov_l != iovstack_l)
+ kfree(iov_l);
+
+ return rc;
+}
+
+SYSCALL_DEFINE6(process_vm_readv, pid_t, pid, const struct iovec __user *, lvec,
+ unsigned long, liovcnt, const struct iovec __user *, rvec,
+ unsigned long, riovcnt, unsigned long, flags)
+{
+ return process_vm_rw(pid, lvec, liovcnt, rvec, riovcnt, flags, 0);
+}
+
+SYSCALL_DEFINE6(process_vm_writev, pid_t, pid,
+ const struct iovec __user *, lvec,
+ unsigned long, liovcnt, const struct iovec __user *, rvec,
+ unsigned long, riovcnt, unsigned long, flags)
+{
+ return process_vm_rw(pid, lvec, liovcnt, rvec, riovcnt, flags, 1);
+}
+
+#ifdef CONFIG_COMPAT
+
+asmlinkage ssize_t
+compat_process_vm_rw(compat_pid_t pid,
+ const struct compat_iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct compat_iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags, int vm_write)
+{
+ struct iovec iovstack_l[UIO_FASTIOV];
+ struct iovec iovstack_r[UIO_FASTIOV];
+ struct iovec *iov_l = iovstack_l;
+ struct iovec *iov_r = iovstack_r;
+ ssize_t rc = -EFAULT;
+
+ if (flags != 0)
+ return -EINVAL;
+
+ if (!access_ok(VERIFY_READ, lvec, liovcnt * sizeof(*lvec)))
+ goto out;
+
+ if (!access_ok(VERIFY_READ, rvec, riovcnt * sizeof(*rvec)))
+ goto out;
+
+ if (vm_write)
+ rc = compat_rw_copy_check_uvector(WRITE, lvec, liovcnt,
+ UIO_FASTIOV, iovstack_l,
+ &iov_l, 1);
+ else
+ rc = compat_rw_copy_check_uvector(READ, lvec, liovcnt,
+ UIO_FASTIOV, iovstack_l,
+ &iov_l, 1);
+ if (rc <= 0)
+ goto free_iovecs;
+ rc = compat_rw_copy_check_uvector(READ, rvec, riovcnt,
+ UIO_FASTIOV, iovstack_r,
+ &iov_r, 0);
+ if (rc <= 0)
+ goto free_iovecs;
+
+ rc = process_vm_rw_core(pid, iov_l, liovcnt, iov_r, riovcnt, flags,
+ vm_write);
+
+free_iovecs:
+ if (iov_r != iovstack_r)
+ kfree(iov_r);
+ if (iov_l != iovstack_l)
+ kfree(iov_l);
+
+out:
+ return rc;
+}
+
+asmlinkage ssize_t
+compat_sys_process_vm_readv(compat_pid_t pid,
+ const struct compat_iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct compat_iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags)
+{
+ return compat_process_vm_rw(pid, lvec, liovcnt, rvec,
+ riovcnt, flags, 0);
+}
+
+asmlinkage ssize_t
+compat_sys_process_vm_writev(compat_pid_t pid,
+ const struct compat_iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct compat_iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags)
+{
+ return compat_process_vm_rw(pid, lvec, liovcnt, rvec,
+ riovcnt, flags, 1);
+}
+
+#endif
diff -puN security/keys/compat.c~cross-memory-attach-v3 security/keys/compat.c
--- a/security/keys/compat.c~cross-memory-attach-v3
+++ a/security/keys/compat.c
@@ -38,7 +38,7 @@ long compat_keyctl_instantiate_key_iov(
ret = compat_rw_copy_check_uvector(WRITE, _payload_iov, ioc,
ARRAY_SIZE(iovstack),
- iovstack, &iov);
+ iovstack, &iov, 1);
if (ret < 0)
return ret;
if (ret == 0)
diff -puN security/keys/keyctl.c~cross-memory-attach-v3 security/keys/keyctl.c
--- a/security/keys/keyctl.c~cross-memory-attach-v3
+++ a/security/keys/keyctl.c
@@ -1065,7 +1065,7 @@ long keyctl_instantiate_key_iov(key_seri
goto no_payload;
ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc,
- ARRAY_SIZE(iovstack), iovstack, &iov);
+ ARRAY_SIZE(iovstack), iovstack, &iov, 1);
if (ret < 0)
return ret;
if (ret == 0)
_
^ permalink raw reply
* Business Proposal
From: Wen Lee @ 2011-10-31 22:12 UTC (permalink / raw)
I am Mr. Wen Lee director of operations of the Bank Of Taipei Taiwan. I have an
obscured business proposal for you. Reply if interested.
^ permalink raw reply
* [U-Boot] [PATCH v2 3/4] EHCI: adjust for mx5
From: Marek Vasut @ 2011-11-01 0:04 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1320104128-19369-1-git-send-email-fermata7@gmail.com>
> Add macros and structures needed by Efika USB support code.
> Move shared offset and bits definitions into common header file.
>
> Signed-off-by: Jana Rapava <fermata7@gmail.com>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> Cc: Remy Bohmer <linux@bohmer.net>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> ---
> Changes for v2:
> - whitespace and coding style changes (no actual changes)
Do you see the contradiction here ?
M
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Steve French @ 2011-11-01 0:02 UTC (permalink / raw)
To: Tejun Heo
Cc: Rafael J. Wysocki, Jeff Layton, Steve French, linux-kernel,
Oleg Nesterov, linux-pm, linux-cifs, J. Bruce Fields, Neil Brown
In-Reply-To: <20111031235335.GL18855@google.com>
On Mon, Oct 31, 2011 at 6:53 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Mon, Oct 31, 2011 at 06:45:48PM -0500, Steve French wrote:
>> >> Signed-off-by: Tejun Heo <tj@kernel.org>
>> >> Cc: Jeff Layton <jlayton@redhat.com>
>> >> ---
>> >> Neil, Steve, do the network filesystems need a way to indicate "I can
>> >> either be killed or enter freezer"?
>>
>> Probably, yes, but I will defer to Jeff as he has looked
>> more recently at these issues.
>>
>> I can explain cifs state, and disconnect/reconnection of sessions
>> (and smb2 is a little more feature rich in this regard), but will
>> let Jeff explain the more subtle points you are getting at.
>
> Hmmm... I'm getting confused.
>
> For nfs, this really is a non-issue. Either the user wants nointr or
> intr behavior. NFS nointr is rather crazy - it's basically "nothing
> can do anything to tasks which is doing NFS IO until it's complete"
> and really meant to be used for servers sharing filesystems for /usr,
> /home and stuff. It doesn't make whole lot of sense on systems which
> may go suspend and that's why there's intr option.
>
> I suppose the problem is that cifs doesn't know how to do 'intr' yet,
> right? If that really is the problem, the correct long term solution
> would be implementing proper intr behavior and it doesn't make any
> sense to push this type of change to PM core to for short term
> workaround. Just use prepare_to_wait() / schedule() / finish_wait()
> directly w/ INTERRUPTIBLE sleep and don't break out of wait loop on
> signal_pending(). If this should be used in multiple places, write up
> a wait_event_XXX() wrapper. There is absolutely no reason to change
> wakeup condition.
It isn't that simple (among other reasons due to much time waiting
in the socket interface), but since this directly addresses problems
Jeff has spent much time debugging, I would like him to chime in.
--
Thanks,
Steve
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Steve French @ 2011-11-01 0:02 UTC (permalink / raw)
To: Tejun Heo
Cc: Rafael J. Wysocki, Jeff Layton, Steve French,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Oleg Nesterov,
linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA, J. Bruce Fields, Neil Brown
In-Reply-To: <20111031235335.GL18855-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
On Mon, Oct 31, 2011 at 6:53 PM, Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> Hello,
>
> On Mon, Oct 31, 2011 at 06:45:48PM -0500, Steve French wrote:
>> >> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> >> Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> >> ---
>> >> Neil, Steve, do the network filesystems need a way to indicate "I can
>> >> either be killed or enter freezer"?
>>
>> Probably, yes, but I will defer to Jeff as he has looked
>> more recently at these issues.
>>
>> I can explain cifs state, and disconnect/reconnection of sessions
>> (and smb2 is a little more feature rich in this regard), but will
>> let Jeff explain the more subtle points you are getting at.
>
> Hmmm... I'm getting confused.
>
> For nfs, this really is a non-issue. Either the user wants nointr or
> intr behavior. NFS nointr is rather crazy - it's basically "nothing
> can do anything to tasks which is doing NFS IO until it's complete"
> and really meant to be used for servers sharing filesystems for /usr,
> /home and stuff. It doesn't make whole lot of sense on systems which
> may go suspend and that's why there's intr option.
>
> I suppose the problem is that cifs doesn't know how to do 'intr' yet,
> right? If that really is the problem, the correct long term solution
> would be implementing proper intr behavior and it doesn't make any
> sense to push this type of change to PM core to for short term
> workaround. Just use prepare_to_wait() / schedule() / finish_wait()
> directly w/ INTERRUPTIBLE sleep and don't break out of wait loop on
> signal_pending(). If this should be used in multiple places, write up
> a wait_event_XXX() wrapper. There is absolutely no reason to change
> wakeup condition.
It isn't that simple (among other reasons due to much time waiting
in the socket interface), but since this directly addresses problems
Jeff has spent much time debugging, I would like him to chime in.
--
Thanks,
Steve
^ permalink raw reply
* Business Proposal
From: Wen Lee @ 2011-10-31 22:12 UTC (permalink / raw)
I am Mr. Wen Lee director of operations of the Bank Of Taipei Taiwan. I have an
obscured business proposal for you. Reply if interested.
^ permalink raw reply
* Re: [PATCH 1/8] pnfs-obj: Remove redundant EOF from objlayout_io_state
From: Boaz Harrosh @ 2011-10-31 23:59 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Brent Welch, NFS list, open-osd
In-Reply-To: <1320103768.10028.25.camel@lade.trondhjem.org>
On 10/31/2011 04:29 PM, Trond Myklebust wrote:
>> In files-type reads in a "condense" layout. You should be careful
>> because in striping it is common place to have eof on some DSs because
>> of file holes even though there are more bits higher on in the file
>> at other DSs. You should check to return back only the answer from the
>> highest logical read DS. (Or I'm wrong in my interpretation?)
>
> In the close-to-open cache consistency, O_DIRECT database, or file
> locking cases, then either the data has been committed, the file size
> extended and the DSes updated,
I meant in the case all that as happened (Just opened the file) but
any particular DS can return EOF. Example:
I have 3 DSs, with stripe unit of say 1K for example.
The file has been written to 0K..1K and 2K..3K. In dense layout file-size
on DS2 is zero, right? because it was never written too. So if the client
is reading 0K..3K (All file), Will it get eof from DS2?
> or our client must know that the server
> has incomplete information because it is holding cached writes or
> layoutcommits that extend the file. In either case, the meaning of the
> eofs should be obvious.
>
I hope that is taken care of, surly?
> Benny's old pet project of making 'tail -f' work on a log file that is
> being extended by someone else is, OTOH, subject to screwiness. However
> that case can be screwy on ordinary read-through-MDS too.
>
Ye that one was me too. I still think file length can easily be extended
only on commit/layout_commit and not on any random write. So the above can
work. I think there is all that is needed within the protocol for servers that
*want* to support this. With any compliant client. (Ask me if you don't know how,
it involves keeping a shadow length per client up until commit, actually with
pnfs it is easier)
Thanks
Boaz
^ permalink raw reply
* [U-Boot] Porting U-boot
From: hanumant @ 2011-10-31 23:57 UTC (permalink / raw)
To: u-boot
I am trying to port u-boot to multiple soc/boards from an arm vendor.
I would appreciate any input on the following approach
1)The controller instance on various SOC are the same with minor
differences in the fifo size, gpios, clocks.
2)In order to help the porting effort, my idea is to add soc/board
neutral driver header files under the include/asm/ directory.
Possibly creating a vendor directory under there ie
arch/arm/include/asm/($vendor)/
(Different from the soc specific header files arch-$SOC)
3)Implement driver in respective driver category drivers/<$category>
4)Allow the SOC specific files to define the resources for specific
peripherals based on the header files from 2)
Thanks
^ permalink raw reply
* Re: [PATCH 0/8] virtio: console: Fixes, cleanups, stats for bytes transferred
From: Rusty Russell @ 2011-10-31 23:57 UTC (permalink / raw)
To: Amit Shah; +Cc: Juan Quintela, Virtualization List
In-Reply-To: <20111031101940.GC3557@amit-x200.redhat.com>
On Mon, 31 Oct 2011 15:49:40 +0530, Amit Shah <amit.shah@redhat.com> wrote:
> On (Wed) 14 Sep 2011 [13:06:38], Amit Shah wrote:
> > Hello,
> >
> > These patches are mostly cleanups (patches 1, 4, 5, 6, 7). Patches 2
> > and 3 fix cases which will be exposed when S4 support is enabled.
> >
> > Patch 8 adds stats for bytes received, sent and discarded for each
> > port. These are added for debugging data loss issues (rather,
> > pointing out they don't exist). Closing a port while data transfer is
> > ongoing resulted in discarding of any pending data in the vq, which is
> > the expected case. Adding these stats just helps showing there's no
> > data loss, but things are working as they were designed.
> >
> > Please apply.
>
> Hey Rusty,
>
> Can you push this series to Linus for 3.2? Thanks!
Yep, was going to do it yesterday but spent the day chasing console
breakage in lguest, but it's not caused by these.
Thanks,
Rusty.
^ permalink raw reply
* Re: [Qemu-devel] [PATCH] linux-user: add binfmt wrapper for argv[0] handling
From: Alexander Graf @ 2011-10-31 23:55 UTC (permalink / raw)
To: Riku Voipio
Cc: vagrant@debian.org, J.Schauer@email.de, qemu-devel Developers,
Reinhard Max
In-Reply-To: <20111031191659.GA11334@afflict.kos.to>
On 31.10.2011, at 12:16, Riku Voipio <riku.voipio@iki.fi> wrote:
> On Sat, Oct 29, 2011 at 08:08:39PM +0200, Alexander Graf wrote:
>>> When using qemu's linux-user binaries through binfmt, argv[0] gets lost
>>> along the execution because qemu only gets passed in the full file name
>>> to the executable while argv[0] can be something completely different.
>>>
>>> This breaks in some subtile situations, such as the grep and make test
>>> suites.
>>>
>>> This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be
>>> used with binfmt's P flag which passes the full path _and_ argv[0] to
>>> the binfmt handler.
>>>
>>> The binary would be smart enough to be versatile and only exist in the
>>> system once, creating the qemu binary path names from its own argv[0].
>>> However, this seemed like it didn't fit the make system too well, so
>>> we're currently creating a new binary for each target archictecture.
>>>
>>> CC: Reinhard Max <max@suse.de>
>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>
>> Ping?
>
> Last time a wrapper for binfmt was suggested on this list, it was shot down
> since people didn't want to add extra binary to the chroot. But your point
> is valid, without proper argv[0] things break sometimes. For the same reason
> scratchbox has a wrapper binary instead of calling qemu directly...
Yup. And I really don't want to have downstreams diverge because we're not pragmatic enough :).
Alex
>
^ permalink raw reply
* Re: [PATCHv4] virtio-blk: use ida to allocate disk index
From: Rusty Russell @ 2011-10-31 23:55 UTC (permalink / raw)
To: Jens Axboe, Michael S. Tsirkin
Cc: Tejun Heo, Greg Kroah-Hartman, linux-kernel, kvm, virtualization
In-Reply-To: <4EAE48D3.4090504@kernel.dk>
On Mon, 31 Oct 2011 08:05:55 +0100, Jens Axboe <axboe@kernel.dk> wrote:
> On 2011-10-30 20:29, Michael S. Tsirkin wrote:
> > Based on a patch by Mark Wu <dwu@redhat.com>
> >
> > Current index allocation in virtio-blk is based on a monotonically
> > increasing variable "index". This means we'll run out of numbers
> > after a while. It also could cause confusion about the disk
> > name in the case of hot-plugging disks.
> > Change virtio-blk to use ida to allocate index, instead.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >
> > Changes from Mark's versions:
> > use the new ida_simple_get
> > error handling cleanup
> > fix user after free
> >
> > Works fine for me.
> >
> > Jens, could you merge this for 3.2?
> > That is, unless Rusty complains shortly ...
>
> Yep, tentatively added.
Thanks!
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cheers,
Rusty.
^ permalink raw reply
* Re: [git patches] libata updates, GPG signed (but see admin notes)
From: Jeff Garzik @ 2011-10-31 23:55 UTC (permalink / raw)
To: Junio C Hamano
Cc: H. Peter Anvin, Linus Torvalds, git, James Bottomley,
Andrew Morton, linux-ide, LKML
In-Reply-To: <7vzkggok6u.fsf@alter.siamese.dyndns.org>
On 10/31/2011 06:44 PM, Junio C Hamano wrote:
> "H. Peter Anvin"<hpa@zytor.com> writes:
>
>> On 10/31/2011 03:30 PM, Linus Torvalds wrote:
>>>
>>> But if you do the normal "git pull git://git.kernel.org/name/of/repo"
>>> - which is how things happen as a result of a pull request - you won't
>>> get tags at all - you have to ask for them by name or use "--tags" to
>>> get them all.
>>>
>>
>> Didn't realize that... I guess I'm too used to named remotes.
>>
>> If so, just using a tag should be fine, no?
>
> So nobody is worried about this (quoting from my earlier message)?
>
> On the other hand, the consumers of "Linus kernel" may want to say that
> they trust your tree and your tags because they can verify them with your
> GPG signature, but also they can independently verify the lieutenants'
> trees you pulled from are genuine.
>
> A signed emphemeral tag is usable as means to verify authenticity in a
> hop-by-hop fashion, but that does not leave a permanent trail that can be
> used for auditing.
The main worry is Linus ($human_who_pulls) gets
cryptographically-verified data at the time he pulls. Once Linus
republishes his tree (git push), there will be few, if any, wanting to
verify Jeff Garzik's signature.
So no, I don't see that as a _driving_ need in the kernel's case.
And IMO the kernel will be a mix of signed and unsigned content for a
while, possibly forever.
And Linus wrote:
> [ Example gpg-signed small block that the attached patch adds to the
> pull request: ]
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Commit be3fa9125e708348c7baf04ebe9507a72a9d1800
> from git.kernel.org/pub/git
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.18 (GNU/Linux)
>
> iQEcBAEBAgAGBQJOrsILAAoJEHm+PkMAQRiGxZcH/31e0RrBitXUPKxHJajD58yh
> SIEe/7i6E2RUSFva3KybEuFslcR8p8DYzDQTPLejStvnkO8v0lXu9s9R53tvjLMF
> aaQXLOgrOC2RqvzP4F27O972h32YpLBkwIdWQGAhYcUOdKYDZ9RfgEgtdJwSYuL+
> oJ7TjLrtkcILaFmr9nYZC+0Fh7z+84R8kR53v0iBHJQOFfssuMjUWCoj9aEY12t+
> pywXuVk2FsuYvhniCAcyU6Y1K9aXaf6w5iOY2hx/ysXtUBnv92F7lcathxQkvgjO
> fA7/TXEcummOv5KQFc9vckd5Z1gN2ync5jhfnmlT2uiobE6mNdCbOVlCOpsKQkU=
> =l5PG
> -----END PGP SIGNATURE-----
This is my preference for kernel pull requests at the moment. That has
one advantage over Junio's "git pull --require-signature" and signed
commits, notably, the URL is signed.
But in general signed commits would be nice, too. pull-generated merge
requests would need to be signed, potentially introducing an additional
interactive step (GPG passphrase request) into an automated process.
Jeff
^ permalink raw reply
* [folded] lib-bitmapc-quiet-sparse-noise-about-address-space-fix.patch removed from -mm tree
From: akpm @ 2011-10-31 23:53 UTC (permalink / raw)
To: akpm, ak, andy.shevchenko, hartleys, hsweeten, len.brown,
ying.huang, mm-com
The patch titled
Subject: lib-bitmapc-quiet-sparse-noise-about-address-space-fix
has been removed from the -mm tree. Its filename was
lib-bitmapc-quiet-sparse-noise-about-address-space-fix.patch
This patch was dropped because it was folded into lib-bitmapc-quiet-sparse-noise-about-address-space.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: lib-bitmapc-quiet-sparse-noise-about-address-space-fix
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/bitmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN lib/bitmap.c~lib-bitmapc-quiet-sparse-noise-about-address-space-fix lib/bitmap.c
--- a/lib/bitmap.c~lib-bitmapc-quiet-sparse-noise-about-address-space-fix
+++ a/lib/bitmap.c
@@ -419,7 +419,7 @@ int __bitmap_parse(const char *buf, unsi
{
int c, old_c, totaldigits, ndigits, nchunks, nbits;
u32 chunk;
- const char __user __force *ubuf = buf;
+ const char __user __force *ubuf = (const char __user __force *)buf;
bitmap_zero(maskp, nmaskbits);
@@ -596,7 +596,7 @@ static int __bitmap_parselist(const char
{
unsigned a, b;
int c, old_c, totaldigits;
- const char __user __force *ubuf = buf;
+ const char __user __force *ubuf = (const char __user __force *)buf;
int exp_digit, in_range;
totaldigits = c = 0;
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
origin.patch
dma-mapping-fix-sync_single_range_-dma-debugging.patch
include-linux-dmarh-forward-declare-struct-acpi_dmar_header.patch
proc-self-numa_maps-restore-huge-tag-for-hugetlb-vmas.patch
mm-add-comments-to-explain-mm_struct-fields.patch
mm-avoid-null-pointer-access-in-vm_struct-via-proc-vmallocinfo.patch
thp-mremap-support-and-tlb-optimization.patch
mm-neaten-warn_alloc_failed.patch
debug-pagealloc-add-support-for-highmem-pages.patch
mm-add-comment-explaining-task-state-setting-in-bdi_forker_thread-fix.patch
mm-munlock-use-mapcount-to-avoid-terrible-overhead.patch
kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel.patch
treewide-use-__printf-not-__attribute__formatprintf.patch
leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register.patch
drivers-leds-leds-lp5521c-check-if-reset-is-successful.patch
lib-bitmapc-quiet-sparse-noise-about-address-space.patch
llist-return-whether-list-is-empty-before-adding-in-llist_add-fix.patch
checkpatch-add-a-strict-check-for-utf-8-in-commit-logs.patch
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Tejun Heo @ 2011-10-31 23:53 UTC (permalink / raw)
To: Steve French
Cc: Rafael J. Wysocki, Jeff Layton, Steve French, linux-kernel,
Oleg Nesterov, linux-pm, linux-cifs, J. Bruce Fields, Neil Brown
In-Reply-To: <CAH2r5msMiG8MjhYuVv8ehqkBLKc1Av3hi+2q6zwrrXdTTa_+YQ@mail.gmail.com>
Hello,
On Mon, Oct 31, 2011 at 06:45:48PM -0500, Steve French wrote:
> >> Signed-off-by: Tejun Heo <tj@kernel.org>
> >> Cc: Jeff Layton <jlayton@redhat.com>
> >> ---
> >> Neil, Steve, do the network filesystems need a way to indicate "I can
> >> either be killed or enter freezer"?
>
> Probably, yes, but I will defer to Jeff as he has looked
> more recently at these issues.
>
> I can explain cifs state, and disconnect/reconnection of sessions
> (and smb2 is a little more feature rich in this regard), but will
> let Jeff explain the more subtle points you are getting at.
Hmmm... I'm getting confused.
For nfs, this really is a non-issue. Either the user wants nointr or
intr behavior. NFS nointr is rather crazy - it's basically "nothing
can do anything to tasks which is doing NFS IO until it's complete"
and really meant to be used for servers sharing filesystems for /usr,
/home and stuff. It doesn't make whole lot of sense on systems which
may go suspend and that's why there's intr option.
I suppose the problem is that cifs doesn't know how to do 'intr' yet,
right? If that really is the problem, the correct long term solution
would be implementing proper intr behavior and it doesn't make any
sense to push this type of change to PM core to for short term
workaround. Just use prepare_to_wait() / schedule() / finish_wait()
directly w/ INTERRUPTIBLE sleep and don't break out of wait loop on
signal_pending(). If this should be used in multiple places, write up
a wait_event_XXX() wrapper. There is absolutely no reason to change
wakeup condition.
Thank you.
--
tejun
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Tejun Heo @ 2011-10-31 23:53 UTC (permalink / raw)
To: Steve French
Cc: Rafael J. Wysocki, Jeff Layton, Steve French,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Oleg Nesterov,
linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA, J. Bruce Fields, Neil Brown
In-Reply-To: <CAH2r5msMiG8MjhYuVv8ehqkBLKc1Av3hi+2q6zwrrXdTTa_+YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hello,
On Mon, Oct 31, 2011 at 06:45:48PM -0500, Steve French wrote:
> >> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >> Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> >> ---
> >> Neil, Steve, do the network filesystems need a way to indicate "I can
> >> either be killed or enter freezer"?
>
> Probably, yes, but I will defer to Jeff as he has looked
> more recently at these issues.
>
> I can explain cifs state, and disconnect/reconnection of sessions
> (and smb2 is a little more feature rich in this regard), but will
> let Jeff explain the more subtle points you are getting at.
Hmmm... I'm getting confused.
For nfs, this really is a non-issue. Either the user wants nointr or
intr behavior. NFS nointr is rather crazy - it's basically "nothing
can do anything to tasks which is doing NFS IO until it's complete"
and really meant to be used for servers sharing filesystems for /usr,
/home and stuff. It doesn't make whole lot of sense on systems which
may go suspend and that's why there's intr option.
I suppose the problem is that cifs doesn't know how to do 'intr' yet,
right? If that really is the problem, the correct long term solution
would be implementing proper intr behavior and it doesn't make any
sense to push this type of change to PM core to for short term
workaround. Just use prepare_to_wait() / schedule() / finish_wait()
directly w/ INTERRUPTIBLE sleep and don't break out of wait loop on
signal_pending(). If this should be used in multiple places, write up
a wait_event_XXX() wrapper. There is absolutely no reason to change
wakeup condition.
Thank you.
--
tejun
^ permalink raw reply
* [folded] drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix.patch removed from -mm tree
From: akpm @ 2011-10-31 23:53 UTC (permalink / raw)
To: akpm, linus.walleij, naga.radheshy, richard.purdie,
srinidhi.kasagar, mm-commits
The patch titled
Subject: drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix
has been removed from the -mm tree. Its filename was
drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix.patch
This patch was dropped because it was folded into drivers-leds-leds-lp5521c-check-if-reset-is-successful.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix
fix up code comment
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Naga Radhesh <naga.radheshy@stericsson.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Cc: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/leds/leds-lp5521.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff -puN drivers/leds/leds-lp5521.c~drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix drivers/leds/leds-lp5521.c
--- a/drivers/leds/leds-lp5521.c~drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix
+++ a/drivers/leds/leds-lp5521.c
@@ -687,11 +687,10 @@ static int __devinit lp5521_probe(struct
*/
/*
- * Make sure that the chip is reset by reading back
- * r channel current reg. This is a dummy read, otherwise
- * in some platforms, access to R G B channel program
- * execution mode to 'Run' in LP5521_REG_ENABLE register
- * will not have any affect - strange!
+ * Make sure that the chip is reset by reading back the r channel
+ * current reg. This is dummy read is required on some platforms -
+ * otherwise further access to the R G B channels in the
+ * LP5521_REG_ENABLE register will not have any effect - strange!
*/
lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
if (buf != LP5521_REG_R_CURR_DEFAULT) {
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
origin.patch
dma-mapping-fix-sync_single_range_-dma-debugging.patch
include-linux-dmarh-forward-declare-struct-acpi_dmar_header.patch
proc-self-numa_maps-restore-huge-tag-for-hugetlb-vmas.patch
mm-add-comments-to-explain-mm_struct-fields.patch
mm-avoid-null-pointer-access-in-vm_struct-via-proc-vmallocinfo.patch
thp-mremap-support-and-tlb-optimization.patch
mm-neaten-warn_alloc_failed.patch
debug-pagealloc-add-support-for-highmem-pages.patch
mm-add-comment-explaining-task-state-setting-in-bdi_forker_thread-fix.patch
mm-munlock-use-mapcount-to-avoid-terrible-overhead.patch
kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel.patch
treewide-use-__printf-not-__attribute__formatprintf.patch
leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register.patch
drivers-leds-leds-lp5521c-check-if-reset-is-successful.patch
lib-bitmapc-quiet-sparse-noise-about-address-space-fix.patch
llist-return-whether-list-is-empty-before-adding-in-llist_add-fix.patch
checkpatch-add-a-strict-check-for-utf-8-in-commit-logs.patch
^ permalink raw reply
* [folded] leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix.patch removed from -mm tree
From: akpm @ 2011-10-31 23:52 UTC (permalink / raw)
To: akpm, axel.lin, rpurdie, samu.p.onkalo, mm-commits
The patch titled
Subject: leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix
has been removed from the -mm tree. Its filename was
leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix.patch
This patch was dropped because it was folded into leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Andrew Morton <akpm@google.com>
Subject: leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix
remove unneeded "ret |="
Cc: Axel Lin <axel.lin@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/leds/leds-lp5521.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff -puN drivers/leds/leds-lp5521.c~leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix drivers/leds/leds-lp5521.c
--- a/drivers/leds/leds-lp5521.c~leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix
+++ a/drivers/leds/leds-lp5521.c
@@ -182,9 +182,7 @@ static int lp5521_set_engine_mode(struct
engine_state &= ~(engine->engine_mask);
mode &= engine->engine_mask;
engine_state |= mode;
- ret |= lp5521_write(client, LP5521_REG_OP_MODE, engine_state);
^ permalink raw reply
* [folded] revert-treewide-use-__printf-not-__attribute__formatprintf.patch removed from -mm tree
From: akpm @ 2011-10-31 23:51 UTC (permalink / raw)
To: akpm, joe, kirill, mm-commits
The patch titled
Subject: treewide-use-__printf-not-__attribute__formatprintf: revert arch bits
has been removed from the -mm tree. Its filename was
revert-treewide-use-__printf-not-__attribute__formatprintf.patch
This patch was dropped because it was folded into treewide-use-__printf-not-__attribute__formatprintf.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Andrew Morton <akpm@google.com>
Subject: treewide-use-__printf-not-__attribute__formatprintf: revert arch bits
Cc: Joe Perches <joe@perches.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/alpha/boot/misc.c | 3 ++-
arch/alpha/include/asm/console.h | 3 ++-
arch/frv/include/asm/system.h | 2 +-
arch/ia64/include/asm/mca.h | 3 ++-
arch/m68k/include/asm/natfeat.h | 3 ++-
arch/mn10300/include/asm/gdb-stub.h | 5 +++--
arch/powerpc/include/asm/udbg.h | 3 ++-
arch/s390/include/asm/debug.h | 11 +++++++----
arch/um/include/shared/user.h | 8 +++++---
9 files changed, 26 insertions(+), 15 deletions(-)
diff -puN arch/alpha/boot/misc.c~revert-treewide-use-__printf-not-__attribute__formatprintf arch/alpha/boot/misc.c
--- a/arch/alpha/boot/misc.c~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/alpha/boot/misc.c
@@ -25,7 +25,8 @@
#define memzero(s,n) memset ((s),0,(n))
#define puts srm_printk
-extern __printf(1, 2) long srm_printk(const char *, ...);
+extern long srm_printk(const char *, ...)
+ __attribute__ ((format (printf, 1, 2)));
/*
* gzip delarations
diff -puN arch/alpha/include/asm/console.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/alpha/include/asm/console.h
--- a/arch/alpha/include/asm/console.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/alpha/include/asm/console.h
@@ -62,7 +62,8 @@ extern long callback_save_env(void);
extern int srm_fixup(unsigned long new_callback_addr,
unsigned long new_hwrpb_addr);
extern long srm_puts(const char *, long);
-extern __printf(1, 2) long srm_printk(const char *, ...);
+extern long srm_printk(const char *, ...)
+ __attribute__ ((format (printf, 1, 2)));
struct crb_struct;
struct hwrpb_struct;
diff -puN arch/frv/include/asm/system.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/frv/include/asm/system.h
--- a/arch/frv/include/asm/system.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/frv/include/asm/system.h
@@ -52,7 +52,7 @@ do { \
#define set_mb(var, value) \
do { var = (value); barrier(); } while (0)
-extern __printf(1, 2) void die_if_kernel(const char *, ...);
+extern void die_if_kernel(const char *, ...) __attribute__((format(printf, 1, 2)));
extern void free_initmem(void);
#define arch_align_stack(x) (x)
diff -puN arch/ia64/include/asm/mca.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/ia64/include/asm/mca.h
--- a/arch/ia64/include/asm/mca.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/ia64/include/asm/mca.h
@@ -158,7 +158,8 @@ extern int ia64_reg_MCA_extension(int (
extern void ia64_unreg_MCA_extension(void);
extern unsigned long ia64_get_rnat(unsigned long *);
extern void ia64_set_psr_mc(void);
-extern __printf(1, 2) void ia64_mca_printk(const char *fmt, ...);
+extern void ia64_mca_printk(const char * fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
struct ia64_mca_notify_die {
struct ia64_sal_os_state *sos;
diff -puN arch/m68k/include/asm/natfeat.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/m68k/include/asm/natfeat.h
--- a/arch/m68k/include/asm/natfeat.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/m68k/include/asm/natfeat.h
@@ -16,6 +16,7 @@ long nf_call(long id, ...);
void nf_init(void);
void nf_shutdown(void);
-__printf(1, 2) void nfprint(const char *fmt, ...);
+void nfprint(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
# endif /* _NATFEAT_H */
diff -puN arch/mn10300/include/asm/gdb-stub.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/mn10300/include/asm/gdb-stub.h
--- a/arch/mn10300/include/asm/gdb-stub.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/mn10300/include/asm/gdb-stub.h
@@ -145,9 +145,10 @@ extern u8 gdbstub_busy;
extern u8 gdbstub_rx_unget;
#ifdef CONFIG_GDBSTUB_DEBUGGING
-extern __printf(1, 2) void gdbstub_printk(const char *fmt, ...);
+extern void gdbstub_printk(const char *fmt, ...)
+ __attribute__((format(printf, 1, 2)));
#else
-static inline __printf(1, 2)
+static inline __attribute__((format(printf, 1, 2)))
void gdbstub_printk(const char *fmt, ...)
{
}
diff -puN arch/powerpc/include/asm/udbg.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/powerpc/include/asm/udbg.h
--- a/arch/powerpc/include/asm/udbg.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/powerpc/include/asm/udbg.h
@@ -24,7 +24,8 @@ extern int udbg_write(const char *s, int
extern int udbg_read(char *buf, int buflen);
extern void register_early_udbg_console(void);
-extern __printf(1, 2) void udbg_printf(const char *fmt, ...);
+extern void udbg_printf(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
extern void udbg_progress(char *s, unsigned short hex);
extern void udbg_init_uart(void __iomem *comport, unsigned int speed,
diff -puN arch/s390/include/asm/debug.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/s390/include/asm/debug.h
--- a/arch/s390/include/asm/debug.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/s390/include/asm/debug.h
@@ -171,8 +171,10 @@ debug_text_event(debug_info_t* id, int l
* IMPORTANT: Use "%s" in sprintf format strings with care! Only pointers are
* stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details!
*/
-extern __printf(3, 4) debug_entry_t *
-debug_sprintf_event(debug_info_t *id, int level, char *string, ...);
+extern debug_entry_t *
+debug_sprintf_event(debug_info_t* id,int level,char *string,...)
+ __attribute__ ((format(printf, 3, 4)));
+
static inline debug_entry_t*
debug_exception(debug_info_t* id, int level, void* data, int length)
@@ -212,8 +214,9 @@ debug_text_exception(debug_info_t* id, i
* IMPORTANT: Use "%s" in sprintf format strings with care! Only pointers are
* stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details!
*/
-extern __printf(3, 4) debug_entry_t *
-debug_sprintf_exception(debug_info_t *id, int level, char *string, ...);
+extern debug_entry_t *
+debug_sprintf_exception(debug_info_t* id,int level,char *string,...)
+ __attribute__ ((format(printf, 3, 4)));
int debug_register_view(debug_info_t* id, struct debug_view* view);
int debug_unregister_view(debug_info_t* id, struct debug_view* view);
diff -puN arch/um/include/shared/user.h~revert-treewide-use-__printf-not-__attribute__formatprintf arch/um/include/shared/user.h
--- a/arch/um/include/shared/user.h~revert-treewide-use-__printf-not-__attribute__formatprintf
+++ a/arch/um/include/shared/user.h
@@ -23,12 +23,14 @@
#include <stddef.h>
#endif
-extern __printf(1, 2) void panic(const char *fmt, ...);
+extern void panic(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
#ifdef UML_CONFIG_PRINTK
-extern __printf(1, 2) int printk(const char *fmt, ...);
+extern int printk(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
#else
-static inline __printf(1, 2) int printk(const char *fmt, ...)
+static inline int printk(const char *fmt, ...)
{
return 0;
}
_
Patches currently in -mm which might be from akpm@google.com are
origin.patch
treewide-use-__printf-not-__attribute__formatprintf.patch
leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix.patch
^ permalink raw reply
* [folded] leds-renesas-tpu-led-driver-v2-fix.patch removed from -mm tree
From: akpm @ 2011-10-31 23:51 UTC (permalink / raw)
To: axel.lin, damm, grant.likely, lethal, rpurdie, mm-commits
The patch titled
Subject: leds-renesas-tpu-led-driver-v2-fix
has been removed from the -mm tree. Its filename was
leds-renesas-tpu-led-driver-v2-fix.patch
This patch was dropped because it was folded into leds-renesas-tpu-led-driver-v2.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Axel Lin <axel.lin@gmail.com>
Subject: leds-renesas-tpu-led-driver-v2-fix
include linux/module.h
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Magnus Damm <damm@opensource.se>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/leds/leds-renesas-tpu.c | 1 +
1 file changed, 1 insertion(+)
diff -puN drivers/leds/leds-renesas-tpu.c~leds-renesas-tpu-led-driver-v2-fix drivers/leds/leds-renesas-tpu.c
--- a/drivers/leds/leds-renesas-tpu.c~leds-renesas-tpu-led-driver-v2-fix
+++ a/drivers/leds/leds-renesas-tpu.c
@@ -17,6 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
_
Patches currently in -mm which might be from axel.lin@gmail.com are
origin.patch
backlight-rename-corgibl_limit_intensity-to-genericbl_limit_intensity.patch
leds-renesas-tpu-led-driver-v2.patch
leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register.patch
leds-leds-lp5521-avoid-writing-uninitialized-value-to-lp5521_reg_op_mode-register-fix.patch
drivers-leds-leds-lm3530c-add-__devexit_p-where-needed.patch
^ permalink raw reply
* [folded] printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel-fix.patch removed from -mm tree
From: akpm @ 2011-10-31 23:50 UTC (permalink / raw)
To: yanmin_zhang, mm-commits
The patch titled
Subject: printk: add ignore_loglevel as module parameter
has been removed from the -mm tree. Its filename was
printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel-fix.patch
This patch was dropped because it was folded into printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Subject: printk: add ignore_loglevel as module parameter
We are enabling some power features on medfield. To test suspend-2-RAM
conveniently, we need turn on/off ignore_loglevel frequently without
rebooting.
Add a module parameter, so users could change it by:
/sys/module/printk/parameters/ignore_loglevel
Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Documentation/kernel-parameters.txt | 3 +++
kernel/printk.c | 2 ++
2 files changed, 5 insertions(+)
diff -puN Documentation/kernel-parameters.txt~printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel-fix Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt~printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel-fix
+++ a/Documentation/kernel-parameters.txt
@@ -973,6 +973,9 @@ bytes respectively. Such letter suffixes
ignore_loglevel [KNL]
Ignore loglevel setting - this will print /all/
kernel messages to the console. Useful for debugging.
+ We also add it as printk module parameter, so users
+ could change it dynamically, usually by
+ /sys/module/printk/parameters/ignore_loglevel.
ihash_entries= [KNL]
Set number of hash buckets for inode cache.
diff -puN kernel/printk.c~printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel-fix kernel/printk.c
--- a/kernel/printk.c~printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel-fix
+++ a/kernel/printk.c
@@ -533,6 +533,8 @@ static int __init ignore_loglevel_setup(
early_param("ignore_loglevel", ignore_loglevel_setup);
module_param_named(ignore_loglevel, ignore_loglevel, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to"
+ "print all kernel messages to the console.");
/*
* Write out chars from start to end - 1 inclusive
_
Patches currently in -mm which might be from yanmin_zhang@linux.intel.com are
printk-add-module-parameter-ignore_loglevel-to-control-ignore_loglevel.patch
printk-add-console_suspend-module-parameter.patch
^ permalink raw reply
* [folded] kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel-fix.patch removed from -mm tree
From: akpm @ 2011-10-31 23:49 UTC (permalink / raw)
To: akpm, dan, drepper, jmorris, kay.sievers, lennart, mingo, rdunlap,
mm-commits
The patch titled
Subject: kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel-fix
has been removed from the -mm tree. Its filename was
kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel-fix.patch
This patch was dropped because it was folded into kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel-fix
make cap_last_cap const, per Ulrich
Cc: Dan Ballard <dan@mindstab.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: James Morris <jmorris@namei.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Ulrich Drepper <drepper@akkadia.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/sysctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN kernel/sysctl.c~kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel-fix kernel/sysctl.c
--- a/kernel/sysctl.c~kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel-fix
+++ a/kernel/sysctl.c
@@ -134,7 +134,7 @@ static int minolduid;
static int min_percpu_pagelist_fract = 8;
static int ngroups_max = NGROUPS_MAX;
-static int cap_last_cap = CAP_LAST_CAP;
+static const int cap_last_cap = CAP_LAST_CAP;
#ifdef CONFIG_INOTIFY_USER
#include <linux/inotify.h>
@@ -743,7 +743,7 @@ static struct ctl_table kern_table[] = {
},
{
.procname = "cap_last_cap",
- .data = &cap_last_cap,
+ .data = (void *)&cap_last_cap,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = proc_dointvec,
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
origin.patch
dma-mapping-fix-sync_single_range_-dma-debugging.patch
include-linux-dmarh-forward-declare-struct-acpi_dmar_header.patch
proc-self-numa_maps-restore-huge-tag-for-hugetlb-vmas.patch
mm-add-comments-to-explain-mm_struct-fields.patch
mm-avoid-null-pointer-access-in-vm_struct-via-proc-vmallocinfo.patch
thp-mremap-support-and-tlb-optimization.patch
mm-neaten-warn_alloc_failed.patch
debug-pagealloc-add-support-for-highmem-pages.patch
mm-add-comment-explaining-task-state-setting-in-bdi_forker_thread-fix.patch
mm-munlock-use-mapcount-to-avoid-terrible-overhead.patch
kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel.patch
drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix.patch
lib-bitmapc-quiet-sparse-noise-about-address-space-fix.patch
llist-return-whether-list-is-empty-before-adding-in-llist_add-fix.patch
checkpatch-add-a-strict-check-for-utf-8-in-commit-logs.patch
^ permalink raw reply
* Re: [PATCH 08/14] Revert "KVM: PPC: Add support for explicit HIOR setting"
From: Alexander Graf @ 2011-10-31 23:49 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-ppc@vger.kernel.org, kvm list, Marcelo Tosatti
In-Reply-To: <4EAEA2E6.2070306@redhat.com>
On 31.10.2011, at 06:30, Avi Kivity <avi@redhat.com> wrote:
> On 10/31/2011 09:53 AM, Alexander Graf wrote:
>> This reverts commit 11d7596e18a712dc3bc29d45662ec111fd65946b. It exceeded
>> the padding on the SREGS struct, rendering the ABI backwards-incompatible.
>
> Can't find the commit hash. Please use hashes from the Linus tree when
> possible.
>
> This needs to be backported? To which trees?
I sent the revert pretty quickly after the original patch, but my last pullreq seems to have gone lost and I realized it way too late.
So worst case it's in 3.0. Maybe 3.1. Could you please check? I'm currently slightly limited on connectivity.
Alex
>
^ permalink raw reply
* Re: [PATCH 08/14] Revert "KVM: PPC: Add support for explicit HIOR setting"
From: Alexander Graf @ 2011-10-31 23:49 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-ppc@vger.kernel.org, kvm list, Marcelo Tosatti
In-Reply-To: <4EAEA2E6.2070306@redhat.com>
On 31.10.2011, at 06:30, Avi Kivity <avi@redhat.com> wrote:
> On 10/31/2011 09:53 AM, Alexander Graf wrote:
>> This reverts commit 11d7596e18a712dc3bc29d45662ec111fd65946b. It exceeded
>> the padding on the SREGS struct, rendering the ABI backwards-incompatible.
>
> Can't find the commit hash. Please use hashes from the Linus tree when
> possible.
>
> This needs to be backported? To which trees?
I sent the revert pretty quickly after the original patch, but my last pullreq seems to have gone lost and I realized it way too late.
So worst case it's in 3.0. Maybe 3.1. Could you please check? I'm currently slightly limited on connectivity.
Alex
>
^ permalink raw reply
* [folded] stop_machine-make-stop_machine-safe-and-efficient-to-call-early-v3.patch removed from -mm tree
From: akpm @ 2011-10-31 23:49 UTC (permalink / raw)
To: jeremy.fitzhardinge, tj, mm-commits
The patch titled
Subject: stop_machine-make-stop_machine-safe-and-efficient-to-call-early-v3.
has been removed from the -mm tree. Its filename was
stop_machine-make-stop_machine-safe-and-efficient-to-call-early-v3.patch
This patch was dropped because it was folded into stop_machine-make-stop_machine-safe-and-efficient-to-call-early.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Subject: stop_machine-make-stop_machine-safe-and-efficient-to-call-early-v3.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/stop_machine.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff -puN kernel/stop_machine.c~stop_machine-make-stop_machine-safe-and-efficient-to-call-early-v3 kernel/stop_machine.c
--- a/kernel/stop_machine.c~stop_machine-make-stop_machine-safe-and-efficient-to-call-early-v3
+++ a/kernel/stop_machine.c
@@ -490,8 +490,9 @@ int __stop_machine(int (*fn)(void *), vo
if (!stop_machine_initialized) {
/*
- * Handle the case where stop_machine() is called early in boot
- * before SMP startup.
+ * Handle the case where stop_machine() is called
+ * early in boot before stop_machine() has been
+ * initialized.
*/
unsigned long flags;
int ret;
_
Patches currently in -mm which might be from jeremy.fitzhardinge@citrix.com are
origin.patch
mm-avoid-null-pointer-access-in-vm_struct-via-proc-vmallocinfo.patch
stop_machine-make-stop_machine-safe-and-efficient-to-call-early.patch
^ permalink raw reply
* [folded] lis3-remove-the-references-to-the-global-variable-in-core-driver-fix.patch removed from -mm tree
From: akpm @ 2011-10-31 23:48 UTC (permalink / raw)
To: ilkka.koskinen, eric.piel, mm-commits
The patch titled
Subject: lis3-remove-the-references-to-the-global-variable-in-core-driver-fix
has been removed from the -mm tree. Its filename was
lis3-remove-the-references-to-the-global-variable-in-core-driver-fix.patch
This patch was dropped because it was folded into lis3-remove-the-references-to-the-global-variable-in-core-driver.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Subject: lis3-remove-the-references-to-the-global-variable-in-core-driver-fix
Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/misc/lis3lv02d/lis3lv02d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/misc/lis3lv02d/lis3lv02d.c~lis3-remove-the-references-to-the-global-variable-in-core-driver-fix drivers/misc/lis3lv02d/lis3lv02d.c
--- a/drivers/misc/lis3lv02d/lis3lv02d.c~lis3-remove-the-references-to-the-global-variable-in-core-driver-fix
+++ a/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -200,7 +200,7 @@ static int lis3lv02d_get_odr(struct lis3
u8 ctrl;
int shift;
- lis3->read(&lis3, CTRL_REG1, &ctrl);
+ lis3->read(lis3, CTRL_REG1, &ctrl);
ctrl &= lis3->odr_mask;
shift = ffs(lis3->odr_mask) - 1;
return lis3->odrs[(ctrl >> shift)];
_
Patches currently in -mm which might be from ilkka.koskinen@nokia.com are
lis3lv02d-avoid-divide-by-zero-due-to-unchecked.patch
lis3-update-maintainer-information.patch
lis3-add-support-for-hp-elitebook-2730p.patch
lis3-add-support-for-hp-elitebook-8540w.patch
hp_accel-add-hp-probook-655x.patch
lis3-free-regulators-if-probe-fails.patch
lis3-change-naming-to-consistent.patch
lis3-change-exported-function-to-use-given.patch
lis3-remove-the-references-to-the-global-variable-in-core-driver.patch
lis3lv02d-make-regulator-api-usage-unconditional.patch
--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.