- 15 11月, 2022 5 次提交
-
-
由 Xu Qiang 提交于
ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG CVE: NA -------------------------------- We increase task->mm->mm_users by one when we add the task to a sharepool group. Correspondingly we should drop the mm_users count when the task exits. Currently we hijack the mmput function and make it return early and decrease mm->mm_users by one (just as mmput would do) if it is not called from a task's exiting process, or we decrease mm->mm_users by the group number the task was added to. This has two problems: 1. It makes mmput and sp_group_exit hard to understand. 2. The process of judging if the task (also its mm) is exiting and decrease its mm_users count is not atomic. We use this condition: mm->mm_users == master->count + MM_WOULD_FREE(1) If someone else change the mm->mm_users during those two steps, the mm->mm_users would be wrong and mm_struct cannot be released anymore. Suppose the following process: proc1 proc2 1) mmput | V 2) enter sp_group_exit and 'mm->mm_users == master->count + 1' is true 3) | mmget V 4) decrease mm->mm_users by master->count | V 5) enter __mmput and release mm_struct if mm->mm_users == 1 6) mmput The statistical structure who has the same id of the task would get leaked together with mm_struct, so the next time we try to create the statistical structure of the same id, we get a failure. We fix this by moving sp_group_exit to do_exit() actually where the task is exiting. We don't need to judge if the task is exiting when someone calling mmput so there is no chance to change mm_users wrongly. Signed-off-by: NXu Qiang <xuqiang36@huawei.com> Signed-off-by: NWang Wensheng <wangwensheng4@huawei.com>
-
由 Zhang Zekun 提交于
ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG CVE: NA -------------------------------- Fix the following static check warning. Use parentheses to specify the sequence of expressions, instead of using the default priority.Should use parenthesis while use bitwise operator. Fix this by add bracket in the expression. Signed-off-by: NZhang Zekun <zhangzekun11@huawei.com>
-
由 Xu Qiang 提交于
ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG CVE: NA -------------------------------- Fix that value of CPU is too large in its_inc_lpi_count. Signed-off-by: NXu Qiang <xuqiang36@huawei.com>
-
由 Zhang Zekun 提交于
ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG CVE: NA -------------------------------- To support container scenario, use tgid instead of pid to find a specific task. In normal cases, "tgid" represent a process in init_pid_ns, this patch should not introduce problems to existing code. Rename the input parameter "int pid" to "int tgid" in following exported interfaces: 1.mg_sp_group_id_by_pid() 2.mg_sp_group_add_task() 3.mg_sp_group_del_task() 4.mg_sp_make_share_k2u() 5.mg_sp_make_share_u2k() 6.mg_sp_config_dvpp_range() Besides, rename these static function together: 1.__sp_find_spg_locked() 2.__sp_find_spg() The following function use "current->pid" to find spg, change "current->pid" to "current->tgid". 1.find_or_alloc_sp_group() 2.sp_alloc_prepare() 3.mg_sp_make_share_k2u() Signed-off-by: NZhang Zekun <zhangzekun11@huawei.com>
-
由 Wang Wensheng 提交于
ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG CVE: NA -------------------------------- This kernel parameter is used for ascend scene and would open all the options needed at once. Signed-off-by: NWang Wensheng <wangwensheng4@huawei.com>
-
- 14 11月, 2022 2 次提交
-
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @ma-wupeng Introduction ============ Memory reliable feature is a memory tiering mechanism. It is based on kernel mirror feature, which splits memory into two sperate regions, mirrored(reliable) region and non-mirrored (non-reliable) region. for kernel mirror feature: - allocate kernel memory from mirrored region by default - allocate user memory from non-mirrored region by default non-mirrored region will be arranged into ZONE_MOVABLE. for kernel reliable feature, it has additional features below: - normal user tasks never alloc memory from mirrored region with userspace apis(malloc, mmap, etc.) - special user tasks will allocate memory from mirrored region by default - tmpfs/pagecache allocate memory from mirrored region by default - upper limit of mirrored region allcated for user tasks, tmpfs and pagecache Support Reliable fallback mechanism which allows special user tasks, tmpfs and pagecache can fallback to alloc non-mirrored region, it's the default setting. In order to fulfil the goal - ___GFP_RELIABLE flag added for alloc memory from mirrored region. - the high_zoneidx for special user tasks/tmpfs/pagecache is set to ZONE_NORMAL. - normal user tasks could only alloc from ZONE_MOVABLE. This patch is just the main framework, memory reliable support for special user tasks, pagecache and tmpfs has own patches. To enable this function, mirrored(reliable) memory is needed and "kernelcore=reliable" should be added to kernel parameters. PR for 22.09: https://gitee.com/openeuler/kernel/pulls/79 Link:https://gitee.com/openeuler/kernel/pulls/235 Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: Xie XiuQi <xiexiuqi@huawei.com> Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @haochengxie Two patches to support MWAIT C1 as the default idle state. For systems disabled global C-states in BIOS, kernel will use the default function as idle state. Historically, the default idle state uses HLT, but it should be mwait (if it support) to improve the exit latency. Link:https://gitee.com/openeuler/kernel/pulls/200 Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
-
- 11 11月, 2022 31 次提交
-
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @chenke1978 [Description] The ROH module driver consists of the ROH Core and ROH DRV modules, which work with hardware to implement communication between nodes through HCCS packets. ROH Core is a protocol stack of the ROH architecture. It provides related services for upper layers by invoking operation interfaces provided by the ROH DRV. The ROH DRV implements the lower layer functions of the ROH featureand provides a series of interfaces for operating hardware for the ROH Core. This patch supports basic ROH functions, such as: sysfs file node query, abnormal interrupt handling, reset capability and dfx information query. RDMA/hns supports ROH mode, mainly adapted to the device id of ROH, and the different capabilities and features of RDMA/hns in ROH mode. [Testing] kernel options: CONFIG_ROH=m CONFIG_ROH_HNS=m Test passed with below step: 1. Using a hardware environment that supports ROH, insmod net/hns, RDMA/hns and ROH related drivers: insmod hnae3.ko insmod hclge.ko insmod hns3.ko insmod roh_core.ko insmod hns-roh-v1.ko insmod hns-roce-hw-v2.ko 2. Check whether ROH generates the corresponding sysfs node: ls /sys/class/roh/hns3_0/ 3. Check whether the abnormal interrupt information of roh is correct. The down or up of the network device link corresponding to roh will cause the roh abnormal interrupt count to increase. cat /proc/interrupts | grep roh 4. Configure the network port ip and check whether the ip/mac has the correct mapping relationship. 5. Query eid to check whether it complies with ip conversion rules: cat /sys/class/roh/hns3_0/node_eid 6. Use ping to check Ethernet communication is normal. 7. Use perftest to check RDMA communication is normal. 8. Use the "ethtool --reset eth1 all" command to trigger a reset. Link:https://gitee.com/openeuler/kernel/pulls/231 Reviewed-by: Ling Mingqiang <lingmingqiang@huawei.com> Reviewed-by: Xie XiuQi <xiexiuqi@huawei.com> Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @haochengxie HSMP is short of Host System Management Port. This is a feature of recent AMD EPYC platforms.The Host System Management Port (HSMP) is an interface to provide OS-level software with access to system management functions via a set of mailbox registers. Link:https://gitee.com/openeuler/kernel/pulls/217 Reviewed-by: Chen Wei <chenwei@xfusion.com> Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @allen-shi This is a cherry-pick of [PR62](https://gitee.com/openeuler/kernel/pulls/62) from openEuler-22.09 branch. This patchset is to enable Intel SPR core PMU support. The first 5 patches enable Intel SPR core PMU support. The last 3 patches fix bugs introduced by the above 5 patches. **Intel Kernel Issue** [#I596BF](https://gitee.com/openeuler/intel-kernel/issues/I596BF) **Test:** With this patch set: ``` \# perf stat -e L1-dcache-load-misses -- sleep 1 Performance counter stats for 'sleep 1': 10,134 L1-dcache-load-misses 1.000727264 seconds time elapsed 0.000584000 seconds user 0.000000000 seconds sys ``` Without this patch set, it returns event "not supported": ``` # perf stat -e L1-dcache-load-misses -- sleep 1 Performance counter stats for 'sleep 1': <not supported> L1-dcache-load-misses 1.001434664 seconds time elapsed 0.000000000 seconds user 0.001318000 seconds sys ``` Some other tests: ``` # perf mem record -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.030 MB perf.data (24 samples) ] [root@spr4s01 linux]# perf script --fields comm,weight,ip,sym perf-exec 0 ffffffffaf80cb0b __intel_pmu_enable_all.constprop.0 perf-exec 489 ffffffffafdfa612 acpi_os_read_memory perf-exec 359 ffffffffafa67daa perf_iterate_ctx perf-exec 435 ffffffffafa67daa perf_iterate_ctx perf-exec 123 ffffffffafa6d0eb perf_event_addr_filters_exec perf-exec 168 ffffffffafa67daa perf_iterate_ctx sleep 163 ffffffffafa67d72 perf_iterate_ctx sleep 174 ffffffffafa67d72 perf_iterate_ctx sleep 83 ffffffffafa67d92 perf_iterate_ctx sleep 159 ffffffffafa67d7c perf_iterate_ctx sleep 133 ffffffffafa67d7c perf_iterate_ctx sleep 0 ffffffffafa886aa filemap_map_pages sleep 0 ffffffffaf80cb0b __intel_pmu_enable_all.constprop.0 sleep 184 ffffffffafa67d92 perf_iterate_ctx sleep 0 ffffffffb025029e sync_regs sleep 0 ffffffffafa886aa filemap_map_pages sleep 0 7ffb7f2b7ba0 [unknown] sleep 0 7ffb7f2b7cd1 [unknown] sleep 150 ffffffffafa67d92 perf_iterate_ctx sleep 0 ffffffffafa886aa filemap_map_pages sleep 0 ffffffffafae8a37 page_remove_file_rmap sleep 0 ffffffffafad1c2f zap_pte_range sleep 0 ffffffffafad1c2f zap_pte_range sleep 0 ffffffffafaec00c unlink_anon_vmas # perf record -e cpu/event=0xcd,umask=0x1/ -e cpu/event=0x03,umask=0x82/ -- cat /proc/cpuinfo …… [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.029 MB perf.data (175 samples) ] # perf script|head -5 cat 254544 10879.930447: 1 cpu/event=0x03,umask=0x82/: ffffffffa7653768 memcpy_erms+0x8 (vmlinux) cat 254544 10879.930511: 1 cpu/event=0x03,umask=0x82/: ffffffffa6cda323 vm_area_dup+0x63 (vmlinux) cat 254544 10879.930513: 2 cpu/event=0x03,umask=0x82/: ffffffffa6edf233 __split_vma+0xa3 (vmlinux) cat 254544 10879.930564: 32 cpu/event=0x03,umask=0x82/: ffffffffa6e8b2a7 filemap_fault+0x2d7 (vmlinux) cat 254544 10879.930656: 48 cpu/event=0x03,umask=0x82/: ffffffffa76504de sync_regs+0x1e (vmlinux) # perf record -e instructions:ppp -a -- true [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 0.775 MB perf.data (3142 samples) ] # perf script|head -5 perf 254537 [000] 10812.672089: 1 instructions:ppp: ffffffffa764f883 do_syscall_64+0x33 (vmlinux) perf 254537 [000] 10812.672101: 1 instructions:ppp: ffffffffa6c262cd nmi_handle+0x6d (vmlinux) perf 254537 [000] 10812.672103: 4 instructions:ppp: ffffffffa6c2bcb5 native_sched_clock+0x5 (vmlinux) perf 254537 [000] 10812.672104: 74 instructions:ppp: ffffffffa6c2bcb5 native_sched_clock+0x5 (vmlinux) perf 254537 [000] 10812.672105: 1779 instructions:ppp: ffffffffa6c2bcb5 native_sched_clock+0x5 (vmlinux) # perf record -d --data-page-size -e major-faults -a -- sleep 1 Error: Asking for the data page size isnt supported by this kernel. # perf record -d -e major-faults -a -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.497 MB perf.data (3 samples) ] # perf script perf 25239 [447] 660.473507: 1 major-faults: 5c6d74 perf_mmap__consume+0x24 (/usr/bin/perf) perf 25239 [447] 660.473876: 1 major-faults: 5c6d74 perf_mmap__consume+0x24 (/usr/bin/perf) perf 25239 [447] 660.474401: 1 major-faults: 5c6d74 perf_mmap__consume+0x24 (/usr/bin/perf) # perf script --fields comm,addr perf 7fe0459a3408 perf 7fe03ec0d408 perf 7fe0333de408 ``` **Known Issue:** N/A **Default Config Change:** N/A Link:https://gitee.com/openeuler/kernel/pulls/226 Reviewed-by: Chen Wei <chenwei@xfusion.com> Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @allen-shi This is a cherry-pick of [PR125](https://gitee.com/openeuler/kernel/pulls/125) from openEuler-22.09 branch. Sapphire Rapids uncore frequency control is the same as Skylake and Ice Lake. Add the Sapphire Rapids CPU model number to the match array. backport upstream patch without change. Link:https://gitee.com/openeuler/kernel/pulls/230 Reviewed-by: Chen Wei <chenwei@xfusion.com> Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
-
由 Yu Liao 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- This patch add sysctl to clear pages in free lists of each NUMA node. For each NUMA node, clear each page in the free list, these work is scheduled on a random CPU of the NUMA node. When kasan is enabled and the pages are free, the shadow memory will be filled with 0xFF, writing these free pages will cause UAF, so just disable KASAN for clear freelist. In the case of large memory, the clear freelist will hold zone lock for a long time. As a result, the process may be blocked unless clear freelist thread exit, and causing the system to be reset by the watchdog. Provide a mechanism to stop clear freelist threads when elapsed time exceeds cfp_timeout, which can be set by module_param(). Signed-off-by: NYu Liao <liaoyu15@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Previous memory allocation in memblock for hugetlb may use mirrored or non-mirrored memory depends on the system's memory status. However this is not suitable if hugetlb user want to alloc memory from non-mirrored memory if memory reliable is enabled. In order to solve this problem, hugetlb use MEMBLOCK_NOMIRROR flag to alloc memory from non-mirrored region without fallback to mirrored region. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- With mirrored feature enabled, memblock will prefer to alloc memory from mirrored memory in any case. Since mirrored region and non-mirrored region may have different capacity or bandwidth, memblock user may choose which region to alloc memory rather than choose the mirrored one by default. To solve this problem, flag MEMBLOCK_NOMIRROR is introduced to alloc memory from non-mirrored region. Function memblock_alloc_range_nid_flags() is introduced to alloc memory with specify flag without fallback. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Since interrupt may occupy reliable task's context and its current->flags will have PF_RELIABLE and this will lead to redirect it's memory allocation to mirrored region. In order to solve this problem, update reliable task's gfp flag can only happen in normal task context by checking in_task(). Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Peng Wu 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Counting reliable memory allocated by the reliable user tasks. The policy of counting reliable memory usage is based on RSS statistics. Anywhere with counter of mm need count reliable pages too. Reliable page which is checked by page_reliable() need to update the reliable page counter by calling reliable_page_counter(). Updating the reliable pages should be considered if the following logic is added: - add_mm_counter - dec_mm_counter - inc_mm_counter_fast - dec_mm_counter_fast - rss[mm_counter(page)] Signed-off-by: NPeng Wu <wupeng58@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Peng Wu 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Adding an variable in mm_struct for accouting the amount of reliable memory allocated by the reliable user tasks. Signed-off-by: NPeng Wu <wupeng58@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Show debug info about memory reliable if oom occurs. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- reliable_debug is used to disable memory reliable features. Four bits are used to represent the following features - bit 0: memory reliable feature - bit 1: reliable fallback feature - bit 2: tmpfs use reliable memory feature - bit 3: pagecache use reliable memory feature Bit 1~3 are valid if and only if the bit 0 is 1. If the first bit is 0, all other features will be closed no matter other bits's status. For example, you can disable all features by $ echo 0 > /proc/sys/vm/reliable_debug Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Introduce reliable_debug=S to control shmem use mirrored memory. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- This limit is used to restrict the amount of mirrored memory by shmem. This memory allocation will return no memory if reliable fallback is off or fallback to non-mirrored region if reliable fallback on. This limit can be set or access via /proc/sys/vm/shmem_reliable_bytes_limit. The default value of this limit is LONG_MAX. This limit can be set from 0 to the total size of mirrored memory. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Signed-off-by: NZhou Guanghui <zhouguanghui1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Zhou Guanghui 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Count reliable shmem usage based on NR_SHMEM. Add ReliableShmem in /proc/meminfo to show reliable memory info used by shmem. - ReliableShmem: reliable memory used by shmem Signed-off-by: NZhou Guanghui <zhouguanghui1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Introduce fallback mechanism for memory reliable. memory allocation will fallback to non-mirrored region if zone's low watermark is reached and kswapd will be awakened at this time. This mechanism is enabled by defalut and can be disabled by adding "reliable_debug=F" to the kernel parameters. This mechanism rely on CONFIG_MEMORY_RELIABLE and need "kernelcore=reliable" in the kernel parameters. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- There is a upper limit for all memory allocation if the following condtions are met: - gfp_zone(gfp & ~ GFP_RELIABLE) == ZONE_MOVABLE - gfp & GFP_RELIABLE is true Init tasks will alloc memory from non-mirrored region if their allocation trigger limit. The limit can be set or access via /proc/sys/vm/task_reliable_limit This limit's default value is ULONG_MAX. User can update this value between current user used reliable memory size and total reliable memory size. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Hugepaged collapse pages into huge page will use the same memory region. When hugepaged collapse pages into huge page, hugepaged will check if there is any reliable pages in the area to be collapsed. If this area contains any reliable pages, hugepaged will alloc memory from mirrored region. Otherwise it will alloc momory from non-mirrored region. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Chen Wandun 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Add interface /proc/sys/vm/reliable_pagecache_max_bytes to set the max size for reliable page cache, the max size cant beyond total reliable ram. the whole reliable memory feature depend on kernelcore=mirror, and which depend on NUMA, so remove redundant code in UMA. Signed-off-by: NChen Wandun <chenwandun@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Chen Wandun 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Add statistics for usage of reliable page cache, Item "ReliableFileCache" in /proc/meminfo show the usage of reliable page cache. Signed-off-by: NChen Wandun <chenwandun@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Chen Wandun 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Item "FileCache" in /proc/meminfo show the number of page cache in LRU(active + inactive). Signed-off-by: NChen Wandun <chenwandun@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Chen Wandun 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Add cmdline for the reliable memory usage of page cache. Page cache will not use reliable memory when passing option "P" to reliable_debug in cmdline. Signed-off-by: NChen Wandun <chenwandun@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Peng Wu 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Add kernel param reliable_debug in reparation for control memory reliable features. Signed-off-by: NPeng Wu <wupeng58@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Memory reliable only handle memory allocation from movable zone. GFP_RELIABLE will be removed if the conditions are not met. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Kdump only have limited memory and will lead to bugly memory reliable features if memory reliable if enabled. So disable memory reliable if kdump is in progress. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Count reliable memory info based on zone info. Any zone below ZONE_MOVABLE is seed as reliable zone and sum the pages there. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Use show_val_kb() to format meminfo. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Export the mem_reliable_status(), so it can be used by others to check memory reliable's status. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Static key mem_reliable is used to check wheater memory reliable's status in kernel's inline functions. These inline function rely on this but dirver can not use because this symbol is not exported. To slove this problem, export this symbol to make prepration for driver to use memory reliable's inline function. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Message "shmem reliable disabled." will be printed if memory reliable is disabled. This is not necessary so drop it. Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
由 Ma Wupeng 提交于
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- LTP's proc01 test was failing be because this ret code (1): proc01 1 TFAIL : proc01.c:400: read failed: /proc/self/task/1406366/reliable: errno=EPERM(1): Operation not permitted To slove this problem, return corrent errno in reliable_check(). Signed-off-by: NMa Wupeng <mawupeng1@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
-
- 10 11月, 2022 2 次提交
-
-
由 Ning Qiang 提交于
stable inclusion from stable-v5.10.136 commit e5b556a7b2711a39e3aa13aeff26560c17417b8b category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZWNE Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e5b556a7b2711a39e3aa13aeff26560c17417b8b -------------------------------- commit fd97e4ad upstream. In do_adb_query() function of drivers/macintosh/adb.c, req->data is copied form userland. The parameter "req->data[2]" is missing check, the array size of adb_handler[] is 16, so adb_handler[req->data[2]].original_address and adb_handler[req->data[2]].handler_id will lead to oob read. Cc: stable <stable@kernel.org> Signed-off-by: NNing Qiang <sohu0106@126.com> Reviewed-by: NKees Cook <keescook@chromium.org> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220713153734.2248-1-sohu0106@126.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
-
由 Hilda Wu 提交于
stable inclusion from stable-v5.10.136 commit 75742ffc3630203e95844c72c7144f507e2a557d category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZWNE Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=75742ffc3630203e95844c72c7144f507e2a557d -------------------------------- commit 6ad353df upstream. Add the support ID(0x13D3, 0x3586) to usb_device_id table for Realtek RTL8852C. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3586 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: NHilda Wu <hildawu@realtek.com> Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
-