Skip to content
Snippets Groups Projects
Unverified Commit f25ff47b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!122 【kernel-openEuler-1.0-LTS】kernel:fix some issues with 4.19 kernel on openEuler 22.03 system

Merge Pull Request from: @tangbinzy 
 
This PR is to adapt the 4.19 kernel to the openEuler 22.03 system, the step one is just for initial kernel use.

Kernel Issue:
1)the problems of 4.19 kernel on openEuler 22.03 system, as follows:
https://gitee.com/openeuler/kernel/issues/I5Q0UG
2)the common problems of 4.19 kernel on 22.03/20.03, as follows:
2.1、https://gitee.com/openeuler/kernel/issues/I5QR5E
2.2、https://gitee.com/openeuler/kernel/issues/I5QSAP
2.3、https://gitee.com/openeuler/kernel/issues/I5RTF5
2.4、https://gitee.com/openeuler/kernel/issues/I5RZPX

Default config change
N/A 
 
Link:https://gitee.com/openeuler/kernel/pulls/122

 
Reviewed-by: default avatarJackie Liu <liuyun01@kylinos.cn>
Signed-off-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parents b9f6a788 9d5f9988
No related branches found
No related tags found
No related merge requests found
......@@ -1732,11 +1732,17 @@ nmi_restore:
iretq
END(nmi)
#ifndef CONFIG_IA32_EMULATION
/*
* This handles SYSCALL from 32-bit code. There is no way to program
* MSRs to fully disable 32-bit SYSCALL.
*/
ENTRY(ignore_sysret)
UNWIND_HINT_EMPTY
mov $-ENOSYS, %eax
sysret
END(ignore_sysret)
#endif
ENTRY(rewind_stack_do_exit)
UNWIND_HINT_FUNC
......
......@@ -55,8 +55,13 @@
/*
* Initialize the stackprotector canary value.
*
* NOTE: this must only be called from functions that never return,
* NOTE: this must only be called from functions that never return
* and it must always be inlined.
*
* In addition, it should be called from a compilation unit for which
* stack protector is disabled. Alternatively, the caller should not end
* with a function call which gets tail-call optimized as that would
* lead to checking a modified canary value.
*/
static __always_inline void boot_init_stack_canary(void)
{
......
......@@ -264,6 +264,14 @@ static void notrace start_secondary(void *unused)
wmb();
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
/*
* Prevent tail call to cpu_startup_entry() because the stack protector
* guard has been changed a couple of function calls up, in
* boot_init_stack_canary() and must not be checked before tail calling
* another function.
*/
prevent_tail_call_optimization();
}
/**
......
......@@ -90,6 +90,7 @@ asmlinkage __visible void cpu_bringup_and_idle(void)
{
cpu_bringup();
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
prevent_tail_call_optimization();
}
void xen_smp_intr_free_pv(unsigned int cpu)
......
......@@ -255,7 +255,7 @@ int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm)
pdev = pci_get_device(PCI_VENDOR_ID_INTEL, did, NULL);
if (!pdev) {
skx_printk(KERN_ERR, "Can't get tolm/tohm\n");
edac_dbg(2, "Can't get tolm/tohm\n");
return -ENODEV;
}
......
......@@ -178,6 +178,10 @@ void i40e_notify_client_of_netdev_close(struct i40e_vsi *vsi, bool reset)
"Cannot locate client instance close routine\n");
return;
}
if (!test_bit(__I40E_CLIENT_INSTANCE_OPENED, &cdev->state)) {
dev_dbg(&pf->pdev->dev, "Client is not open, abort close\n");
return;
}
cdev->client->ops->close(&cdev->lan_info, cdev->client, reset);
clear_bit(__I40E_CLIENT_INSTANCE_OPENED, &cdev->state);
i40e_client_release_qvlist(&cdev->lan_info);
......@@ -376,7 +380,7 @@ void i40e_client_subtask(struct i40e_pf *pf)
/* Remove failed client instance */
clear_bit(__I40E_CLIENT_INSTANCE_OPENED,
&cdev->state);
i40e_client_del_instance(pf);
return;
}
}
}
......
......@@ -870,12 +870,20 @@ xfs_qm_reset_dqcounts(
ddq->d_bcount = 0;
ddq->d_icount = 0;
ddq->d_rtbcount = 0;
ddq->d_btimer = 0;
ddq->d_itimer = 0;
ddq->d_rtbtimer = 0;
ddq->d_bwarns = 0;
ddq->d_iwarns = 0;
ddq->d_rtbwarns = 0;
/*
* dquot id 0 stores the default grace period and the maximum
* warning limit that were set by the administrator, so we
* should not reset them.
*/
if (ddq->d_id != 0) {
ddq->d_btimer = 0;
ddq->d_itimer = 0;
ddq->d_rtbtimer = 0;
ddq->d_bwarns = 0;
ddq->d_iwarns = 0;
ddq->d_rtbwarns = 0;
}
if (xfs_sb_version_hascrc(&mp->m_sb)) {
xfs_update_cksum((char *)&dqb[j],
......
......@@ -365,4 +365,10 @@ static inline void *offset_to_ptr(const int *off)
compiletime_assert(__native_word(t), \
"Need native word sized stores/loads for atomicity.")
/*
* This is needed in functions which generate the stack canary, see
* arch/x86/kernel/smpboot.c::start_secondary() for an example.
*/
#define prevent_tail_call_optimization() mb()
#endif /* __LINUX_COMPILER_H */
......@@ -734,6 +734,8 @@ asmlinkage __visible void __init start_kernel(void)
/* Do the rest non-__init'ed, we're now alive */
rest_init();
prevent_tail_call_optimization();
}
/* Call all constructor functions linked into the kernel. */
......
......@@ -226,8 +226,11 @@ static int read_symbols(struct elf *elf)
symtab = find_section_by_name(elf, ".symtab");
if (!symtab) {
WARN("missing symbol table");
return -1;
/*
* A missing symbol table is actually possible if it's an empty
* .o file. This can happen for thunk_64.o.
*/
return 0;
}
symbols_nr = symtab->sh.sh_size / symtab->sh.sh_entsize;
......
......@@ -42,7 +42,7 @@ static bool done = false, silent = false, fshared = false;
static pthread_mutex_t thread_lock;
static pthread_cond_t thread_parent, thread_worker;
static struct stats waketime_stats, wakeup_stats;
static unsigned int ncpus, threads_starting, nthreads = 0;
static unsigned int threads_starting, nthreads = 0;
static int futex_flag = 0;
static const struct option options[] = {
......@@ -140,7 +140,7 @@ int bench_futex_wake(int argc, const char **argv)
sigaction(SIGINT, &act, NULL);
if (!nthreads)
nthreads = ncpus;
nthreads = cpu->nr;
worker = calloc(nthreads, sizeof(*worker));
if (!worker)
......
......@@ -796,7 +796,7 @@ static void test_sockmap(int tasks, void *data)
FD_ZERO(&w);
FD_SET(sfd[3], &w);
to.tv_sec = 1;
to.tv_sec = 30;
to.tv_usec = 0;
s = select(sfd[3] + 1, &w, NULL, NULL, &to);
if (s == -1) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment