Merge tag 'gcc-plugins-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull gcc-plugins fix from Kees Cook: "Fix a potential problem in randomize_layout structure auto-selection (that was not triggered by any existing kernel structures)" * tag 'gcc-plugins-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: randstruct: Check member structs in is_pure_ops_struct()
This commit is contained in:
@@ -443,14 +443,14 @@ static int is_pure_ops_struct(const_tree node)
|
|||||||
if (node == fieldtype)
|
if (node == fieldtype)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!is_fptr(fieldtype))
|
if (code == RECORD_TYPE || code == UNION_TYPE) {
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (code != RECORD_TYPE && code != UNION_TYPE)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!is_pure_ops_struct(fieldtype))
|
if (!is_pure_ops_struct(fieldtype))
|
||||||
return 0;
|
return 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_fptr(fieldtype))
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user