diff options
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 28 | 
1 files changed, 28 insertions, 0 deletions
| diff --git a/fs/proc/array.c b/fs/proc/array.c index a23c3e220a5f..bb87e4d89cd8 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -369,6 +369,34 @@ static inline void task_seccomp(struct seq_file *m, struct task_struct *p)  		seq_puts(m, "vulnerable");  		break;  	} + +	seq_puts(m, "\nSpeculationIndirectBranch:\t"); +	switch (arch_prctl_spec_ctrl_get(p, PR_SPEC_INDIRECT_BRANCH)) { +	case -EINVAL: +		seq_puts(m, "unsupported"); +		break; +	case PR_SPEC_NOT_AFFECTED: +		seq_puts(m, "not affected"); +		break; +	case PR_SPEC_PRCTL | PR_SPEC_FORCE_DISABLE: +		seq_puts(m, "conditional force disabled"); +		break; +	case PR_SPEC_PRCTL | PR_SPEC_DISABLE: +		seq_puts(m, "conditional disabled"); +		break; +	case PR_SPEC_PRCTL | PR_SPEC_ENABLE: +		seq_puts(m, "conditional enabled"); +		break; +	case PR_SPEC_ENABLE: +		seq_puts(m, "always enabled"); +		break; +	case PR_SPEC_DISABLE: +		seq_puts(m, "always disabled"); +		break; +	default: +		seq_puts(m, "unknown"); +		break; +	}  	seq_putc(m, '\n');  } |