Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
S390 bpf_jit.S is removed in net-next and had changes in 'net', since that code isn't used any more take the removal. TLS data structures split the TX and RX components in 'net-next', put the new struct members from the bug fix in 'net' into the RX part. The 'net-next' tree had some reworking of how the ERSPAN code works in the GRE tunneling code, overlapping with a one-line headroom calculation fix in 'net'. Overlapping changes in __sock_map_ctx_update_elem(), keep the bits that read the prog members via READ_ONCE() into local variables before using them. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -261,7 +261,7 @@ static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf,
|
||||
* Inherently racy -- command line shares address space
|
||||
* with code and data.
|
||||
*/
|
||||
rv = access_remote_vm(mm, arg_end - 1, &c, 1, 0);
|
||||
rv = access_remote_vm(mm, arg_end - 1, &c, 1, FOLL_ANON);
|
||||
if (rv <= 0)
|
||||
goto out_free_page;
|
||||
|
||||
@@ -279,7 +279,7 @@ static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf,
|
||||
int nr_read;
|
||||
|
||||
_count = min3(count, len, PAGE_SIZE);
|
||||
nr_read = access_remote_vm(mm, p, page, _count, 0);
|
||||
nr_read = access_remote_vm(mm, p, page, _count, FOLL_ANON);
|
||||
if (nr_read < 0)
|
||||
rv = nr_read;
|
||||
if (nr_read <= 0)
|
||||
@@ -325,7 +325,7 @@ static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf,
|
||||
bool final;
|
||||
|
||||
_count = min3(count, len, PAGE_SIZE);
|
||||
nr_read = access_remote_vm(mm, p, page, _count, 0);
|
||||
nr_read = access_remote_vm(mm, p, page, _count, FOLL_ANON);
|
||||
if (nr_read < 0)
|
||||
rv = nr_read;
|
||||
if (nr_read <= 0)
|
||||
@@ -946,7 +946,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
|
||||
max_len = min_t(size_t, PAGE_SIZE, count);
|
||||
this_len = min(max_len, this_len);
|
||||
|
||||
retval = access_remote_vm(mm, (env_start + src), page, this_len, 0);
|
||||
retval = access_remote_vm(mm, (env_start + src), page, this_len, FOLL_ANON);
|
||||
|
||||
if (retval <= 0) {
|
||||
ret = retval;
|
||||
|
@@ -209,25 +209,34 @@ kclist_add_private(unsigned long pfn, unsigned long nr_pages, void *arg)
|
||||
{
|
||||
struct list_head *head = (struct list_head *)arg;
|
||||
struct kcore_list *ent;
|
||||
struct page *p;
|
||||
|
||||
if (!pfn_valid(pfn))
|
||||
return 1;
|
||||
|
||||
p = pfn_to_page(pfn);
|
||||
if (!memmap_valid_within(pfn, p, page_zone(p)))
|
||||
return 1;
|
||||
|
||||
ent = kmalloc(sizeof(*ent), GFP_KERNEL);
|
||||
if (!ent)
|
||||
return -ENOMEM;
|
||||
ent->addr = (unsigned long)__va((pfn << PAGE_SHIFT));
|
||||
ent->addr = (unsigned long)page_to_virt(p);
|
||||
ent->size = nr_pages << PAGE_SHIFT;
|
||||
|
||||
/* Sanity check: Can happen in 32bit arch...maybe */
|
||||
if (ent->addr < (unsigned long) __va(0))
|
||||
if (!virt_addr_valid(ent->addr))
|
||||
goto free_out;
|
||||
|
||||
/* cut not-mapped area. ....from ppc-32 code. */
|
||||
if (ULONG_MAX - ent->addr < ent->size)
|
||||
ent->size = ULONG_MAX - ent->addr;
|
||||
|
||||
/* cut when vmalloc() area is higher than direct-map area */
|
||||
if (VMALLOC_START > (unsigned long)__va(0)) {
|
||||
if (ent->addr > VMALLOC_START)
|
||||
goto free_out;
|
||||
/*
|
||||
* We've already checked virt_addr_valid so we know this address
|
||||
* is a valid pointer, therefore we can check against it to determine
|
||||
* if we need to trim
|
||||
*/
|
||||
if (VMALLOC_START > ent->addr) {
|
||||
if (VMALLOC_START - ent->addr < ent->size)
|
||||
ent->size = VMALLOC_START - ent->addr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user