All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <19CDB9880DBFC241860D925D8FAA94A00342F48A@BADAG02.ba.imgtec.org>

diff --git a/a/1.txt b/N1/1.txt
index 792a9d2..041c052 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -19,150 +19,4 @@ only affects uname. From the discussion [1] it seems like the right way to go.
  > If you are going to submit a new patch, can you please create a proper git patch
  > (using git format-patch) and include your Signed-off-by line as well? Thank you
 If not obvious, my first post here, thanks for the tips.
-------------------
-From 6ce4addd17a333ad9935c1d6dc9fa9114e02b3fd Mon Sep 17 00:00:00 2001
-From: Nikola Veljkovic <Nikola.Veljkovic@imgtec.com>
-Date: Thu, 30 Jul 2015 13:54:26 +0200
-Subject: [PATCH] Fix personality syscall for mips64-o32/n32
-Content-Length: 5435
-Lines: 139
-
-Remove unnecessary sys_32_personality wrapper, which replaces
-PER_LINUX32 with PER_LINUX.
-
-Most other archs removed the wrapper even before 2.6.
-
-Now that exec domains are gone, there is almost no kernel code using
-personality flags - so set PER_LINUX and let userspace change it.
-
-This fixes bionic test on Android, by making mips more like other
-architectures. Change has been tested on mips64 (n64 and o32), there
-were no regressions.
-
-Signed-off-by: Nikola Veljkovic <Nikola.Veljkovic@imgtec.com>
----
- arch/mips/kernel/linux32.c     | 14 --------------
- arch/mips/kernel/scall64-n32.S |  2 +-
- arch/mips/kernel/scall64-o32.S |  2 +-
- 3 files changed, 2 insertions(+), 16 deletions(-)
-
-diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
-index 0b29646..0513e19 100644
---- a/arch/mips/kernel/linux32.c
-+++ b/arch/mips/kernel/linux32.c
-@@ -119,20 +119,6 @@ SYSCALL_DEFINE6(32_pwrite, unsigned int, fd, const char __user *, buf,
- 	return sys_pwrite64(fd, buf, count, merge_64(a4, a5));
- }
- 
--SYSCALL_DEFINE1(32_personality, unsigned long, personality)
--{
--	unsigned int p = personality & 0xffffffff;
--	int ret;
--
--	if (personality(current->personality) == PER_LINUX32 &&
--	    personality(p) == PER_LINUX)
--		p = (p & ~PER_MASK) | PER_LINUX32;
--	ret = sys_personality(p);
--	if (ret != -1 && personality(ret) == PER_LINUX32)
--		ret = (ret & ~PER_MASK) | PER_LINUX;
--	return ret;
--}
--
- asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3,
- 				   size_t count)
- {
-diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
-index 4b20106..e4c036c 100644
---- a/arch/mips/kernel/scall64-n32.S
-+++ b/arch/mips/kernel/scall64-n32.S
-@@ -240,7 +240,7 @@ EXPORT(sysn32_call_table)
- 	PTR	compat_sys_sigaltstack
- 	PTR	compat_sys_utime		/* 6130 */
- 	PTR	sys_mknod
--	PTR	sys_32_personality
-+	PTR	sys_personality
- 	PTR	compat_sys_ustat
- 	PTR	compat_sys_statfs
- 	PTR	compat_sys_fstatfs		/* 6135 */
-diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
-index f543ff4..9b3e881 100644
---- a/arch/mips/kernel/scall64-o32.S
-+++ b/arch/mips/kernel/scall64-o32.S
-@@ -363,7 +363,7 @@ EXPORT(sys32_call_table)
- 	PTR	sys_fchdir
- 	PTR	sys_bdflush
- 	PTR	sys_sysfs			/* 4135 */
--	PTR	sys_32_personality
-+	PTR	sys_personality
- 	PTR	sys_ni_syscall			/* for afs_syscall */
- 	PTR	sys_setfsuid
- 	PTR	sys_setfsgid
--- 
-2.4.0
-
-________________________________________
-From: Markos Chandras
-Sent: Tuesday, August 18, 2015 2:56 PM
-To: Nikola Veljkovic
-Cc: linux-mips@linux-mips.org; ralf@linux-mips.org; Chris Dearman; Raghu Gandham; Miodrag Dinic; Petar Jovanovic; Lazar Trsic
-Subject: Re: [PATCH] MIPS: personality syscall discrepancy on mips64-o32/n32
-
-On Tue, Aug 18, 2015 at 10:25:31AM +0000, Nikola Veljkovic wrote:
-> There is a discrepancy in the personality() syscall on mips64.
->
-> For a 32bit process (o32 or n32) sys_32_personality() [1] is called, which
-> converts PER_LINUX32 -> PER_LINUX:
->
-> ret = sys_personality(p);
-> if (ret != -1 && (ret & PER_MASK) == PER_LINUX32)  // personality macro applied
->    ret = (ret & ~PER_MASK) | PER_LINUX;            // to make it clearer
->
-> This is different than what Intel and ARM are doing. They directly invoke
-> sys_personality(). On Android, this causes a bionic test to fail for mips, as it
-> expects PER_LINUX32 but receives PER_LINUX, when ran on mips64 core.
->
-> The code itself comes from older kernel versions (2.4), where it was also used
-> by other architectures [2], [3], [4]. However, since kernel 2.6 other archs are
-> invoking sys_personality() directly, for all ABIs.
->
-> Is there any reason why we should do PER_LINUX32 -> PER_LINUX on mips? Also, if
-> we do change this for o32, should we change it for n32, as well? There is no n32
-> support for Android, so it would have to be tested elsewhere.
->
-> Tested changing only o32 on Android, there were no regressions:
->
-> diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
-> index ab93427..b94ee4e 100644
-> --- a/arch/mips/kernel/scall64-o32.S
-> +++ b/arch/mips/kernel/scall64-o32.S
-> @@ -358,7 +358,7 @@ sys_call_table:
->         sys     sys_fchdir              1
->         sys     sys_bdflush             2
->         sys     sys_sysfs               3       /* 4135 */
-> -       sys     sys_32_personality      1
-> +       sys     sys_personality         1
->         sys     sys_ni_syscall          0       /* for afs_syscall */
->         sys     sys_setfsuid            1
->         sys     sys_setfsgid            1
-> --
->
-> [1] http://git.linux-mips.org/cgit/ralf/linux.git/tree/arch/mips/kernel/linux32.c#n122
-> [2] http://git.linux-mips.org/cgit/ralf/linux.git/tree/include/asm-mips64/elf.h?h=linux-2.4#n124
-> [3] http://git.linux-mips.org/cgit/ralf/linux.git/tree/arch/x86_64/ia32/sys_ia32.c?h=linux-2.4#n1974
-> [4] http://git.linux-mips.org/cgit/ralf/linux.git/tree/arch/ia64/ia32/sys_ia32.c?h=linux-2.4#n4005
-> --
-> Nikola Veljkovic
-
-Hi,
-
-I am not sure what the implication will be to userland with that change...
-
-I presume you also need to fix the n32 case and then completely remove the sys_32_personality
-syscall from linux32.c. Moreover, I think you also need to fix the arch/mips/include/asm/elf.h
-code to set LINUX32 for O32 and n32 (for both 32b and 64b kernels.)
-
-If you are going to submit a new patch, can you please create a proper git patch
-(using git format-patch) and include your Signed-off-by line as well? Thank you
-
---
-markos
\ No newline at end of file
+------------------
\ No newline at end of file
diff --git a/a/content_digest b/N1/content_digest
index 912cea3..008d170 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -53,153 +53,7 @@
   " > If you are going to submit a new patch, can you please create a proper git patch\n",
   " > (using git format-patch) and include your Signed-off-by line as well? Thank you\n",
   "If not obvious, my first post here, thanks for the tips.\n",
-  "------------------\n",
-  "From 6ce4addd17a333ad9935c1d6dc9fa9114e02b3fd Mon Sep 17 00:00:00 2001\n",
-  "From: Nikola Veljkovic <Nikola.Veljkovic\@imgtec.com>\n",
-  "Date: Thu, 30 Jul 2015 13:54:26 +0200\n",
-  "Subject: [PATCH] Fix personality syscall for mips64-o32/n32\n",
-  "Content-Length: 5435\n",
-  "Lines: 139\n",
-  "\n",
-  "Remove unnecessary sys_32_personality wrapper, which replaces\n",
-  "PER_LINUX32 with PER_LINUX.\n",
-  "\n",
-  "Most other archs removed the wrapper even before 2.6.\n",
-  "\n",
-  "Now that exec domains are gone, there is almost no kernel code using\n",
-  "personality flags - so set PER_LINUX and let userspace change it.\n",
-  "\n",
-  "This fixes bionic test on Android, by making mips more like other\n",
-  "architectures. Change has been tested on mips64 (n64 and o32), there\n",
-  "were no regressions.\n",
-  "\n",
-  "Signed-off-by: Nikola Veljkovic <Nikola.Veljkovic\@imgtec.com>\n",
-  "---\n",
-  " arch/mips/kernel/linux32.c     | 14 --------------\n",
-  " arch/mips/kernel/scall64-n32.S |  2 +-\n",
-  " arch/mips/kernel/scall64-o32.S |  2 +-\n",
-  " 3 files changed, 2 insertions(+), 16 deletions(-)\n",
-  "\n",
-  "diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c\n",
-  "index 0b29646..0513e19 100644\n",
-  "--- a/arch/mips/kernel/linux32.c\n",
-  "+++ b/arch/mips/kernel/linux32.c\n",
-  "\@\@ -119,20 +119,6 \@\@ SYSCALL_DEFINE6(32_pwrite, unsigned int, fd, const char __user *, buf,\n",
-  " \treturn sys_pwrite64(fd, buf, count, merge_64(a4, a5));\n",
-  " }\n",
-  " \n",
-  "-SYSCALL_DEFINE1(32_personality, unsigned long, personality)\n",
-  "-{\n",
-  "-\tunsigned int p = personality & 0xffffffff;\n",
-  "-\tint ret;\n",
-  "-\n",
-  "-\tif (personality(current->personality) == PER_LINUX32 &&\n",
-  "-\t    personality(p) == PER_LINUX)\n",
-  "-\t\tp = (p & ~PER_MASK) | PER_LINUX32;\n",
-  "-\tret = sys_personality(p);\n",
-  "-\tif (ret != -1 && personality(ret) == PER_LINUX32)\n",
-  "-\t\tret = (ret & ~PER_MASK) | PER_LINUX;\n",
-  "-\treturn ret;\n",
-  "-}\n",
-  "-\n",
-  " asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3,\n",
-  " \t\t\t\t   size_t count)\n",
-  " {\n",
-  "diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S\n",
-  "index 4b20106..e4c036c 100644\n",
-  "--- a/arch/mips/kernel/scall64-n32.S\n",
-  "+++ b/arch/mips/kernel/scall64-n32.S\n",
-  "\@\@ -240,7 +240,7 \@\@ EXPORT(sysn32_call_table)\n",
-  " \tPTR\tcompat_sys_sigaltstack\n",
-  " \tPTR\tcompat_sys_utime\t\t/* 6130 */\n",
-  " \tPTR\tsys_mknod\n",
-  "-\tPTR\tsys_32_personality\n",
-  "+\tPTR\tsys_personality\n",
-  " \tPTR\tcompat_sys_ustat\n",
-  " \tPTR\tcompat_sys_statfs\n",
-  " \tPTR\tcompat_sys_fstatfs\t\t/* 6135 */\n",
-  "diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S\n",
-  "index f543ff4..9b3e881 100644\n",
-  "--- a/arch/mips/kernel/scall64-o32.S\n",
-  "+++ b/arch/mips/kernel/scall64-o32.S\n",
-  "\@\@ -363,7 +363,7 \@\@ EXPORT(sys32_call_table)\n",
-  " \tPTR\tsys_fchdir\n",
-  " \tPTR\tsys_bdflush\n",
-  " \tPTR\tsys_sysfs\t\t\t/* 4135 */\n",
-  "-\tPTR\tsys_32_personality\n",
-  "+\tPTR\tsys_personality\n",
-  " \tPTR\tsys_ni_syscall\t\t\t/* for afs_syscall */\n",
-  " \tPTR\tsys_setfsuid\n",
-  " \tPTR\tsys_setfsgid\n",
-  "-- \n",
-  "2.4.0\n",
-  "\n",
-  "________________________________________\n",
-  "From: Markos Chandras\n",
-  "Sent: Tuesday, August 18, 2015 2:56 PM\n",
-  "To: Nikola Veljkovic\n",
-  "Cc: linux-mips\@linux-mips.org; ralf\@linux-mips.org; Chris Dearman; Raghu Gandham; Miodrag Dinic; Petar Jovanovic; Lazar Trsic\n",
-  "Subject: Re: [PATCH] MIPS: personality syscall discrepancy on mips64-o32/n32\n",
-  "\n",
-  "On Tue, Aug 18, 2015 at 10:25:31AM +0000, Nikola Veljkovic wrote:\n",
-  "> There is a discrepancy in the personality() syscall on mips64.\n",
-  ">\n",
-  "> For a 32bit process (o32 or n32) sys_32_personality() [1] is called, which\n",
-  "> converts PER_LINUX32 -> PER_LINUX:\n",
-  ">\n",
-  "> ret = sys_personality(p);\n",
-  "> if (ret != -1 && (ret & PER_MASK) == PER_LINUX32)  // personality macro applied\n",
-  ">    ret = (ret & ~PER_MASK) | PER_LINUX;            // to make it clearer\n",
-  ">\n",
-  "> This is different than what Intel and ARM are doing. They directly invoke\n",
-  "> sys_personality(). On Android, this causes a bionic test to fail for mips, as it\n",
-  "> expects PER_LINUX32 but receives PER_LINUX, when ran on mips64 core.\n",
-  ">\n",
-  "> The code itself comes from older kernel versions (2.4), where it was also used\n",
-  "> by other architectures [2], [3], [4]. However, since kernel 2.6 other archs are\n",
-  "> invoking sys_personality() directly, for all ABIs.\n",
-  ">\n",
-  "> Is there any reason why we should do PER_LINUX32 -> PER_LINUX on mips? Also, if\n",
-  "> we do change this for o32, should we change it for n32, as well? There is no n32\n",
-  "> support for Android, so it would have to be tested elsewhere.\n",
-  ">\n",
-  "> Tested changing only o32 on Android, there were no regressions:\n",
-  ">\n",
-  "> diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S\n",
-  "> index ab93427..b94ee4e 100644\n",
-  "> --- a/arch/mips/kernel/scall64-o32.S\n",
-  "> +++ b/arch/mips/kernel/scall64-o32.S\n",
-  "> \@\@ -358,7 +358,7 \@\@ sys_call_table:\n",
-  ">         sys     sys_fchdir              1\n",
-  ">         sys     sys_bdflush             2\n",
-  ">         sys     sys_sysfs               3       /* 4135 */\n",
-  "> -       sys     sys_32_personality      1\n",
-  "> +       sys     sys_personality         1\n",
-  ">         sys     sys_ni_syscall          0       /* for afs_syscall */\n",
-  ">         sys     sys_setfsuid            1\n",
-  ">         sys     sys_setfsgid            1\n",
-  "> --\n",
-  ">\n",
-  "> [1] http://git.linux-mips.org/cgit/ralf/linux.git/tree/arch/mips/kernel/linux32.c#n122\n",
-  "> [2] http://git.linux-mips.org/cgit/ralf/linux.git/tree/include/asm-mips64/elf.h?h=linux-2.4#n124\n",
-  "> [3] http://git.linux-mips.org/cgit/ralf/linux.git/tree/arch/x86_64/ia32/sys_ia32.c?h=linux-2.4#n1974\n",
-  "> [4] http://git.linux-mips.org/cgit/ralf/linux.git/tree/arch/ia64/ia32/sys_ia32.c?h=linux-2.4#n4005\n",
-  "> --\n",
-  "> Nikola Veljkovic\n",
-  "\n",
-  "Hi,\n",
-  "\n",
-  "I am not sure what the implication will be to userland with that change...\n",
-  "\n",
-  "I presume you also need to fix the n32 case and then completely remove the sys_32_personality\n",
-  "syscall from linux32.c. Moreover, I think you also need to fix the arch/mips/include/asm/elf.h\n",
-  "code to set LINUX32 for O32 and n32 (for both 32b and 64b kernels.)\n",
-  "\n",
-  "If you are going to submit a new patch, can you please create a proper git patch\n",
-  "(using git format-patch) and include your Signed-off-by line as well? Thank you\n",
-  "\n",
-  "--\n",
-  "markos"
+  "------------------"
 ]
 
-729b1d0eecd738ab11417cc7b3b31a207ae26294f657909e660b7a114499ae91
+e7b319b8adc408c9e048e971ad2c978bcaceecdc54f5f4e847c4bb8d28f7a6d2

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.