提交 65a94b14 编写于 作者: J Jan Glauber 提交者: Martin Schwidefsky

[S390] oprofile s390: prevent stack corruption

Prevent stack corruption by memcpy which copies more bytes then
available at the destination. While at it use the new test_facility
to test for the facility bit.
Signed-off-by: NJan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 78fca1b9
无相关合并请求
......@@ -517,12 +517,8 @@ static int stop_sampling(int cpu)
static int check_hardware_prerequisites(void)
{
unsigned long long facility_bits[2];
memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32);
if (!(facility_bits[1] & (1ULL << 59)))
if (!test_facility(68))
return -EOPNOTSUPP;
return 0;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部