diff for duplicates of <20110421141125.GG10698@linux.vnet.ibm.com> diff --git a/a/1.txt b/N1/1.txt index 1f49b0c..e0a2ddd 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -8,32 +8,32 @@ > > >> > +static int xol_add_vma(struct uprobes_xol_area *area) > >> > +{ -> >> > + struct vm_area_struct *vma; -> >> > + struct mm_struct *mm; -> >> > + struct file *file; -> >> > + unsigned long addr; -> >> > + int ret = -ENOMEM; +> >> > + struct vm_area_struct *vma; +> >> > + struct mm_struct *mm; +> >> > + struct file *file; +> >> > + unsigned long addr; +> >> > + int ret = -ENOMEM; > >> > + -> >> > + mm = get_task_mm(current); -> >> > + if (!mm) -> >> > + return -ESRCH; +> >> > + mm = get_task_mm(current); +> >> > + if (!mm) +> >> > + return -ESRCH; > >> > + -> >> > + down_write(&mm->mmap_sem); -> >> > + if (mm->uprobes_xol_area) { -> >> > + ret = -EALREADY; -> >> > + goto fail; -> >> > + } +> >> > + down_write(&mm->mmap_sem); +> >> > + if (mm->uprobes_xol_area) { +> >> > + ret = -EALREADY; +> >> > + goto fail; +> >> > + } > >> > + -> >> > + /* -> >> > + * Find the end of the top mapping and skip a page. -> >> > + * If there is no space for PAGE_SIZE above -> >> > + * that, mmap will ignore our address hint. -> >> > + * -> >> > + * We allocate a "fake" unlinked shmem file because -> >> > + * anonymous memory might not be granted execute -> >> > + * permission when the selinux security hooks have -> >> > + * their way. -> >> > + */ +> >> > + /* +> >> > + * Find the end of the top mapping and skip a page. +> >> > + * If there is no space for PAGE_SIZE above +> >> > + * that, mmap will ignore our address hint. +> >> > + * +> >> > + * We allocate a "fake" unlinked shmem file because +> >> > + * anonymous memory might not be granted execute +> >> > + * permission when the selinux security hooks have +> >> > + * their way. +> >> > + */ > >> > >> That just annoys me, so we're working around some stupid sekurity crap, > >> executable anonymous maps are perfectly fine, also what do JITs do? @@ -131,3 +131,10 @@ install_special_mapping() instead of we calling do_mmap_pgoff(). -- Thanks and Regards Srikar + +-- +To unsubscribe, send a message with 'unsubscribe linux-mm' in +the body to majordomo@kvack.org. For more info on Linux MM, +see: http://www.linux-mm.org/ . +Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ +Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N1/content_digest index ac9f150..fe5e20a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -37,32 +37,32 @@ "> \n" "> >> > +static int xol_add_vma(struct uprobes_xol_area *area)\n" "> >> > +{\n" - "> >> > + \302\240 struct vm_area_struct *vma;\n" - "> >> > + \302\240 struct mm_struct *mm;\n" - "> >> > + \302\240 struct file *file;\n" - "> >> > + \302\240 unsigned long addr;\n" - "> >> > + \302\240 int ret = -ENOMEM;\n" + "> >> > + struct vm_area_struct *vma;\n" + "> >> > + struct mm_struct *mm;\n" + "> >> > + struct file *file;\n" + "> >> > + unsigned long addr;\n" + "> >> > + int ret = -ENOMEM;\n" "> >> > +\n" - "> >> > + \302\240 mm = get_task_mm(current);\n" - "> >> > + \302\240 if (!mm)\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 return -ESRCH;\n" + "> >> > + mm = get_task_mm(current);\n" + "> >> > + if (!mm)\n" + "> >> > + return -ESRCH;\n" "> >> > +\n" - "> >> > + \302\240 down_write(&mm->mmap_sem);\n" - "> >> > + \302\240 if (mm->uprobes_xol_area) {\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 ret = -EALREADY;\n" - "> >> > + \302\240 \302\240 \302\240 \302\240 \302\240 goto fail;\n" - "> >> > + \302\240 }\n" + "> >> > + down_write(&mm->mmap_sem);\n" + "> >> > + if (mm->uprobes_xol_area) {\n" + "> >> > + ret = -EALREADY;\n" + "> >> > + goto fail;\n" + "> >> > + }\n" "> >> > +\n" - "> >> > + \302\240 /*\n" - "> >> > + \302\240 \302\240* Find the end of the top mapping and skip a page.\n" - "> >> > + \302\240 \302\240* If there is no space for PAGE_SIZE above\n" - "> >> > + \302\240 \302\240* that, mmap will ignore our address hint.\n" - "> >> > + \302\240 \302\240*\n" - "> >> > + \302\240 \302\240* We allocate a \"fake\" unlinked shmem file because\n" - "> >> > + \302\240 \302\240* anonymous memory might not be granted execute\n" - "> >> > + \302\240 \302\240* permission when the selinux security hooks have\n" - "> >> > + \302\240 \302\240* their way.\n" - "> >> > + \302\240 \302\240*/\n" + "> >> > + /*\n" + "> >> > + * Find the end of the top mapping and skip a page.\n" + "> >> > + * If there is no space for PAGE_SIZE above\n" + "> >> > + * that, mmap will ignore our address hint.\n" + "> >> > + *\n" + "> >> > + * We allocate a \"fake\" unlinked shmem file because\n" + "> >> > + * anonymous memory might not be granted execute\n" + "> >> > + * permission when the selinux security hooks have\n" + "> >> > + * their way.\n" + "> >> > + */\n" "> >>\n" "> >> That just annoys me, so we're working around some stupid sekurity crap,\n" "> >> executable anonymous maps are perfectly fine, also what do JITs do?\n" @@ -159,6 +159,13 @@ "\n" "-- \n" "Thanks and Regards\n" - Srikar + "Srikar\n" + "\n" + "--\n" + "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" + "the body to majordomo@kvack.org. For more info on Linux MM,\n" + "see: http://www.linux-mm.org/ .\n" + "Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/\n" + "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" -c858ca03324f5cc31cb7b73886fb918eac686e49bda27ab18daaf88b4a4cfe0a +f352364992d5544ad5deaa247973f70e2c0d198e7972d6370e96f0fc74398cf8
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.