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,13 +443,13 @@ static int is_pure_ops_struct(const_tree node)
|
||||
if (node == fieldtype)
|
||||
continue;
|
||||
|
||||
if (!is_fptr(fieldtype))
|
||||
return 0;
|
||||
|
||||
if (code != RECORD_TYPE && code != UNION_TYPE)
|
||||
if (code == RECORD_TYPE || code == UNION_TYPE) {
|
||||
if (!is_pure_ops_struct(fieldtype))
|
||||
return 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!is_pure_ops_struct(fieldtype))
|
||||
if (!is_fptr(fieldtype))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user