- 07 1月, 2021 40 次提交
-
-
由 Li Jun 提交于
stable inclusion from stable-5.10.2 commit 2bd9751e6790c45377628c09b92afbc4f1bfe4ed bugzilla: 46859 -------------------------------- commit c1373f10 upstream. If a USB2 device wakeup is not enabled/supported the link state may still be in U0 in xhci_bus_suspend(), where it's then manually put to suspended U3 state. Just as with selective suspend the device needs time to enter U3 suspend before continuing with further suspend operations (e.g. system suspend), otherwise we may enter system suspend with link state in U0. [commit message rewording -Mathias] Cc: <stable@vger.kernel.org> Signed-off-by: NLi Jun <jun.li@nxp.com> Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20201208092912.1773650-6-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Takashi Iwai 提交于
stable inclusion from stable-5.10.2 commit f1e6ab052c63a3bf3871aa2a8ec846feb7a77be2 bugzilla: 46859 -------------------------------- commit c6dde8ff upstream. The current channel-map control implementation in USB-audio driver may lead to an error message like "control 3:0:0:Playback Channel Map:0: access overflow" when CONFIG_SND_CTL_VALIDATION is set. It's because the chmap get callback clears the whole array no matter which count is set, and rather the false-positive detection. This patch fixes the problem by clearing only the needed array range at usb_chmap_ctl_get(). Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201211130048.6358-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Takashi Iwai 提交于
stable inclusion from stable-5.10.2 commit cc3edd81ef035b728955241dca8a3b3c2f333ab6 bugzilla: 46859 -------------------------------- commit 43d5ca88 upstream. syzbot spotted a potential out-of-bounds shift in the USB-audio format parser that receives the arbitrary shift value from the USB descriptor. Add a range check for avoiding the undefined behavior. Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201209084552.17109-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Oliver Neukum 提交于
stable inclusion from stable-5.10.2 commit d8f0c9ec3638be7344a3e8ebe4415aae1b356981 bugzilla: 46859 -------------------------------- commit 08a02f95 upstream. I got reports that some models of this old scanner need this when using runtime PM. Signed-off-by: NOliver Neukum <oneukum@suse.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201207130323.23857-1-oneukum@suse.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Bui Quang Minh 提交于
stable inclusion from stable-5.10.2 commit 5fb2a55ad3e0a7f3c5094c36a54c230355ed3d38 bugzilla: 46859 -------------------------------- commit e90cfa81 upstream. This error path err_add_pdata: for (i = 0; i < mod_data.num; i++) kfree(dum[i]); can be triggered when not all dum's elements are initialized. Fix this by initializing all dum's elements to NULL. Acked-by: NAlan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Signed-off-by: NBui Quang Minh <minhquangbui99@gmail.com> Link: https://lore.kernel.org/r/1607063090-3426-1-git-send-email-minhquangbui99@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Alan Stern 提交于
stable inclusion from stable-5.10.2 commit d483f5e5ce532e410dc10d91a025f12ee3fd2c82 bugzilla: 46859 -------------------------------- commit b175d273 upstream. Commit d9f0d82f ("USB: legousbtower: use usb_control_msg_recv()") contained an elementary logical error. The check of the return code from the new usb_control_msg_recv() function was inverted. Reported-and-tested-by: syzbot+9be25235b7a69b24d117@syzkaller.appspotmail.com Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20201208163042.GD1298255@rowland.harvard.edu Fixes: d9f0d82f ("USB: legousbtower: use usb_control_msg_recv()") Cc: stable <stable@vger.kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Steven Rostedt (VMware) 提交于
stable inclusion from stable-5.10.2 commit 2902e302991a4dacd155658bcb3053e4d6b7d4a0 bugzilla: 46859 -------------------------------- commit 170f4869 upstream. The logic for truncating the log file for emailing based on the MAIL_MAX_SIZE option is confusing and incorrect. Simplify it and have the tail of the log file truncated to the max size specified in the config. Cc: stable@vger.kernel.org Fixes: 855d8abd ("ktest.pl: Change the logic to control the size of the log file emailed") Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Steven Rostedt (VMware) 提交于
stable inclusion from stable-5.10.2 commit 4e282a8dff800c535a5828dc7d2e46cb18ddbc18 bugzilla: 46859 -------------------------------- commit 8cd6bc03 upstream. If the size of the error log is too big to send via email, and the sending fails, it wont email any result. This can be confusing for the user who is waiting for an email on the completion of the tests. If it fails to send email, then try again without the log file stating that it failed to send an email. Obviously this will not be of use if the sending of email failed for some other reasons, but it will at least give the user some information when it fails for the most common reason. Cc: stable@vger.kernel.org Fixes: c2d84ddb ("ktest.pl: Add MAIL_COMMAND option to define how to send email") Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Peilin Ye 提交于
stable inclusion from stable-5.10.2 commit d3f4117b0275b2fb2de3a034fe1060a80104833f bugzilla: 46859 -------------------------------- commit 0032ce0f upstream. ptrace_get_syscall_info() is potentially copying uninitialized stack memory to userspace, since the compiler may leave a 3-byte hole near the beginning of `info`. Fix it by adding a padding field to `struct ptrace_syscall_info`. Fixes: 201766a2 ("ptrace: add PTRACE_GET_SYSCALL_INFO request") Suggested-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NPeilin Ye <yepeilin.cs@gmail.com> Reviewed-by: NDmitry V. Levin <ldv@altlinux.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200801152044.230416-1-yepeilin.cs@gmail.comSigned-off-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Hanjun Guo 提交于
hulk inclusion category: feature bugzilla: 46503 CVE: NA --------------------------- Adding more invalidation and clean ABIs for kernel and kernel module use. For now we have 7 functions for module: void flush_icache_range(unsigned long start, unsigned long end); void inval_dcache_area(void *addr, size_t len); void clean_dcache_area(void *addr, size_t len); void flush_dcache_area(void *addr, size_t len); void inval_dcache_range(unsigned long start, unsigned long end); void clean_dcache_range(unsigned long start, unsigned long end); void flush_dcache_range(unsigned long start, unsigned long end); Signed-off-by: NHanjun Guo <guohanjun@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Hanjun Guo 提交于
hulk inclusion category: feature bugzilla: 46503 CVE: NA --------------------------- Adding flush_dcache_area() for module use, and export __flush_dcache_area() for that purpose. Signed-off-by: NHanjun Guo <guohanjun@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Xiangyu Lu 提交于
euler inclusion category: bugfix bugzilla: 46850 CVE: NA --------------------------------- Linux kernel allow to specify a single-user mode, or specify the init process by init parameter, which could bypass the login authentication mechanisms, direct access to root identify. Close init kernel boot parameters through CONFIG_SECURITY_BOOT_INIT. Signed-off-by: NXiangyu Lu <luxiangyu@huawei.com> Reviewed-by: NWang Kai <morgan.wang@huawei.com> Signed-off-by: NWeilong Chen <chenweilong@huawei.com> [hj: backport from hulk-3.10 for security enhancement] Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Ngaobo <gaobo794@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Xiongfeng Wang 提交于
euler inclusion category: bugfix bugzilla: 46851 CVE: NA ------------------------------------------------- The PCIe controller in some Hisilicon Chip is not completely ECAM-compliant. Part of its PCIe cores do not support ECAM. Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Nyangerkun <yangerkun@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 yu kuai 提交于
euler inclusion category: feature bugzilla: 46858 CVE: NA --------------------------- Commit 214b35a353e7 ("fs/dirty_pages: fix kernel panic in concurrency mode") move initialization of buffer from proc_dpages_open() to seq_read_dirty(), and left a variable 'm' set but not used. Fixes: 214b35a353e7 ("fs/dirty_pages: fix kernel panic in concurrency mode") Signed-off-by: Nyu kuai <yukuai3@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Nyangerkun <yangerkun@huawei.com> Signed-off-by: NDianfang Zhang <zhangdianfang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 yu kuai 提交于
euler inclusion category: bugfix bugzilla: 46858 CVE: NA --------------------------- The present code doesn't support concurrency mode, test it this way will cause kernel panic. The reason is that 'buff_used' didn't use any concurrent access mechanism. Fix the problem by following changes: 1. move the initialization of buffer from proc_dpages_open to seq_read_dirty. 2. use mutex for 'buff_used'. 3. before calling simple_read_from_buffer in seq_read_dirty, judge if the buffer changed since last read. If so, return -EFAULT. Signed-off-by: Nyu kuai <yukuai3@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NDianfang Zhang <zhangdianfang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 yu kuai 提交于
euler inclusion category: bugfix bugzilla: 46858 CVE: NA --------------------------- Just code optimization to make the code better, no functional change. Signed-off-by: Nyu kuai <yukuai3@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NDianfang Zhang <zhangdianfang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 yu kuai 提交于
euler inclusion category: bugfix bugzilla: 46858 CVE: NA --------------------------- In 'write_proc', if input from userspace is invlid, the 'buff_num' will be set to 0 with unfreed buffer. Fix it by setting 'buff_num' to 'old_buff_num'. Reported-by: Nsong jian <songjian15@huawei.com> Signed-off-by: Nyu kuai <yukuai3@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NDianfang Zhang <zhangdianfang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 yu kuai 提交于
euler inclusion category: bugfix bugzilla: 46858 CVE: NA --------------------------- In write_proc and write_limit_proc, we alloccate 'msg' with 'PAGE_SIZE' bytes, which is defined as 4096. The problem is that if 'count' is 4096, the following code will cause index out of bounds: msg[count] = '\0' In order to fix the problem, we use kzalloc instead of kmalloc and delete the code above. 'buff_limit' is static int type, but 'temp' is log type in write_limit_proc. Thus if we input a value which is more than 'MAX_INT' (the max integer of int type), we can get a negative number for 'buff_limit'. For example: echo 2147483648 > /proc/dirty/page_threshold cat /proc/dirty/page_threshold -2147483648 Fix the problem by changing 'temp < 0' to 'tmp < 0 || temp > MAX_INT' Fixes: 3296069cbce1 ("fs/dirty_pages: dump the number of dirty pages for each inode") Reported-by: Nsong jian <songjian15@huawei.com> Signed-off-by: Nyu kuai <yukuai3@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NDianfang Zhang <zhangdianfang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 yu kuai 提交于
euler inclusion category: feature bugzilla: 46858 CVE: NA --------------------------- In order to analysing the IO performance when using buffer IO, it's useful to obtain the number of dirty pages for a inode in the filesystem. This feather is migrated from redhat-7.2. It create 3 interfaces by using profs. /proc/dirty/buffer_size for buffer allocation and release; /proc/dirty/page_threshold to filter result; /proc/dirty/dirty_list to get dirty pages. Visit http://openeuler.huawei.com/bugzilla/show_bug.cgi?id=23941 for details about modifications and implementations. Signed-off-by: Nyu kuai <yukuai3@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NDianfang Zhang <zhangdianfang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Kefeng Wang 提交于
hulk inclusion category: bugfix bugzilla: 46856 CVE: NA --------------------------- The start_pfn and end_pfn are already available in move_freepages_block(), there is no need to go back and forth between page and pfn in move_freepages and move_freepages_block, and pfn_valid_within() should validate pfn first before touching the page. Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yang Yingliang 提交于
hulk inclusion category: feature bugzilla: 46791 CVE: N/A ------------------------------------------------- Now MBIGEN can support to generate SPIs by writing GICD_SETSPIR. Add dt example to help document. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yang Yingliang 提交于
hulk inclusion category: feature bugzilla: 46791 CVE: N/A ------------------------------------------------- Now with 50528752 ("irqchip/gic-v3: Add support for Message Based Interrupts as an MSI controller"), we can support MBIGEN to generate message based SPIs by writing GICD_SETSPIR. The first 64-pins of each MBIGEN chip is used to generate SPIs, and each MBIGEN chip has several MBIGEN nodes, every node has 128 pins for generating LPIs. The total pins are: 64(SPIs) + 128 * node_nr(LPIs). So we can translate the pin index in a unified way in mbigen_domain_translate(). Also Add TYPE and VEC registers that used by generating SPIs, the driver can access them when MBIGEN is used to generate SPIs. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yang Yingliang 提交于
hulk inclusion category: feature bugzilla: 46791 CVE: N/A ------------------------------------------------- A MBIGEN can also be used for generating SPIs, so let's rename register macros to make them more resonable. The first 64-pins of MBIGEN is used by SPIs, so rename RESERVED_IRQ_PER_MBIGEN_CHIP to SPI_NUM_PER_MBIGEN_CHIP and change the comment for this marcro. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Xiongfeng Wang 提交于
hulk inclusion category: feature bugzilla: 46790 CVE: NA -------------------------------- ARM erratum 1418040 only affect AARCH32. ILP32 is not affected. Signed-off-by: NXiongfeng Wang <wangxiongfeng2@hauwei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Xiongfeng Wang 提交于
hulk inclusion category: bugfix bugzilla: 46790 DTS: NA -------------------------------- The following commit clear upper 32 bits of x0 on syscall return for compat application. But it is only suitable for A32 applications. It is not correct for ilp32 applications. Fixes: 15956689 ("arm64: compat: Ensure upper 32 bits of x0 are zero on syscall return") Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Xiongfeng Wang 提交于
hulk inclusion category: bugfix bugzilla: 46790 CVE: NA -------------------------------- ILP32 application belongs to the compat application. But its syscall number is different from the traditional compat a32 application. The syscall number is the same with the lp64 application. So we need to fix the secure computing mode 1 syscall check for ilp32. Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Andrew Pinski 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- This patch adds the config option for ILP32. Signed-off-by: NAndrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Reviewed-by: NDavid Daney <ddaney@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/Kconfig Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Philipp Tomsich 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- ILP32 VDSO exports following symbols: __kernel_rt_sigreturn; __kernel_gettimeofday; __kernel_clock_gettime; __kernel_clock_getres. What shared object to use, kernel selects depending on result of is_ilp32_compat_task() in arch/arm64/kernel/vdso.c, so it substitutes correct pages and spec. Adjusted to move the data page before code pages in sync with commit 601255ae ("arm64: vdso: move data page before code pages") Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/Makefile arch/arm64/kernel/Makefile arch/arm64/kernel/asm-offsets.c arch/arm64/kernel/vdso.c arch/arm64/kernel/vdso/gettimeofday.S [wangxiongfeng: rewrite vdso-ilp32/Makefile according to vdso/Makefile] Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- ILP32 has context-related structures different from both aarch32 and aarch64/lp64. In this patch compat_arch_ptrace() renamed to compat_a32_ptrace(), and compat_arch_ptrace() only makes choice between compat_a32_ptrace() and new compat_ilp32_ptrace() handler. compat_ilp32_ptrace() calls generic compat_ptrace_request() for all requests except PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, which need special handling. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- ILP32 uses AARCH32 compat structures and syscall handlers for signals. But ILP32 rt_sigframe and ucontext structures differ from both LP64 and AARCH32. >From software point of view ILP32 is typical 32-bit compat ABI, and from hardware point of view, it's just like LP64. struct rt_sigframe defined in this patch in arch/arm64/kernel/signal_ilp32.c redefines one in arch/arm64/kernel/signal.c. And functions located in arch/arm64/include/signal_common.h pick up new structure to generate the code suitable for ILP32. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- ILP32 needs to mix 32bit struct siginfo and 64bit sigframe for its signal handlers. Move the existing compat code for copying siginfo to user space and manipulating signal masks into signal32_common.c so it can be used to deliver aarch32 and ilp32 signals. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- Following patches of the series introduce ILP32-specific structures and handlers for signal subsystem. In this patch, functions and structures that common for LP64 and ILP32 are moved to arch/arm64/include/asm/signal_common.h to let ILP32 code reuse them. Some functions work with struct rt_sigframe which differs for ILP32. Therefore, to let ILP32 generate correct code, body of that functions are moved to arch/arm64/include/asm/signal_common.h. Others just declared in new header. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/kernel/signal.c Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- Depending on the personality of the task, syscalls has to be dispatched to either aarch64, aarch32 or aarch64/ilp32 syscall handlers. We add the support of ILP32 mode in this series, therefore introduce corresponding syscall table. Some system calls are wired to aarch32 syscall handlers, as listed in arch/arm64/kernel/sys_ilp32.c. For aarch64/ilp32, top halves of syscall arguments are meaningless anthough not zeroed by hardware. Do that in the delouse_pt_regs() routine to avoid passing garbage by userspace. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/kernel/syscall.c Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- According to userspace/kernel ABI, userspace off_t is passed in register pair just like in aarch32. In this patch corresponding aarch32 handlers are shared to ilp32 code. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- Like binfmt_elf32.c for AARCH32, binfmt_ilp32.c is needed to handle ILP32 binaries. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- ILP32 patch series introduces new type of binaries which is also compat. So rename existung aarch32 compat_elf_hwcap's helps to avoid confusing. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/kernel/cpuinfo.c drivers/clocksource/arm_arch_timer.c Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- As we support more than one compat formats, it looks more reasonable to not use fs/compat_binfmt.c. Custom binfmt_elf32.c allows to move aarch32 specific definitions there and make code more maintainable and readable. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/include/asm/elf.h arch/arm64/kernel/Makefile Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- syscall_get_arch() currently makes no difference between arm64 and arm64/ilp32. Fix it by adding AUDIT_ARCH_AARCH64ILP32. Reported-by: NAndy Lutomirski <luto@amacapital.net> Signed-off-by: NYury Norov <ynorov@marvell.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- ILP32 tasks are needed to be distinguished from LP64 and AARCH32. This patch adds helper functions is_ilp32_compat_{task,thread} and thread flag TIF_32BIT_AARCH64 to address it. This is a preparation for following patches in ILP32 patchset. For consistency, SET_PERSONALITY is changed here accordingly. Signed-off-by: NAndrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: NChristoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Reviewed-by: NDavid Daney <ddaney@caviumnetworks.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/include/asm/thread_info.h Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-
由 Yury Norov 提交于
maillist inclusion category: feature bugzilla: 46790 CVE: NA Reference: https://github.com/norov/linux/commits/ilp32-5.2 -------------------------------- Based on patch of Andrew Pinski. This patch introduces is_a32_compat_task and is_a32_thread so it is easier to say this is a a32 specific thread or a generic compat thread/task. Corresponding functions are located in <asm/is_compat.h> to avoid mess in headers. Some files include both <linux/compat.h> and <asm/compat.h>, and this is wrong because <linux/compat.h> has <asm/compat.h> already included. It was fixed too. Signed-off-by: NYury Norov <ynorov@caviumnetworks.com> Signed-off-by: NAndrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: NBamvor Jian Zhang <bamv2005@gmail.com> Signed-off-by: NYury Norov <ynorov@marvell.com> Conflicts: arch/arm64/include/asm/compat.h arch/arm64/kernel/process.c arch/arm64/kernel/traps.c arch/arm64/mm/mmap.c Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
-