[MODERATED] Re: ***UNCHECKED*** Re: [PATCH v7 0/5] NX 0
Paolo Bonzini <[email protected]>
| Newsgroups | org.kernel.lore.historical-speck |
|---|---|
| Message-ID | <[email protected]> |
On 31/10/19 22:00, speck for Tyler Hicks wrote:
>> diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
>> index 0fccd8c0312e..86f531fea9d0 100644
>> --- a/drivers/base/cpu.c
>> +++ b/drivers/base/cpu.c
>
> I hate to make this thread more of a mess than it already is but I
> noticed that you dropped a hunk that shouldn't have been dropped. The
> following needs to be applied on top of this patch:
Thank you Tyler. Let me just pick Thomas's bundles and send the final
version.
Paolo
> diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
> index 86f531fea9d0..7fbc022a235b 100644
> --- a/drivers/base/cpu.c
> +++ b/drivers/base/cpu.c
> @@ -561,6 +561,12 @@ ssize_t __weak cpu_show_tsx_async_abort(struct device *dev,
> return sprintf(buf, "Not affected\n");
> }
>
> +ssize_t __weak cpu_show_itlb_multihit(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + return sprintf(buf, "Not affected\n");
> +}
> +
> static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL);
> static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL);
> static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL);
>
>> @@ -568,6 +568,7 @@ static DEVICE_ATTR(spec_store_bypass, 0444, cpu_show_spec_store_bypass, NULL);
>> static DEVICE_ATTR(l1tf, 0444, cpu_show_l1tf, NULL);
>> static DEVICE_ATTR(mds, 0444, cpu_show_mds, NULL);
>> static DEVICE_ATTR(tsx_async_abort, 0444, cpu_show_tsx_async_abort, NULL);
>> +static DEVICE_ATTR(itlb_multihit, 0444, cpu_show_itlb_multihit, NULL);
>>
>> static struct attribute *cpu_root_vulnerabilities_attrs[] = {
>> &dev_attr_meltdown.attr,
>> @@ -577,6 +578,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = {
>> &dev_attr_l1tf.attr,
>> &dev_attr_mds.attr,
>> &dev_attr_tsx_async_abort.attr,
>> + &dev_attr_itlb_multihit.attr,
>> NULL
>> };
>>
>> diff --git a/include/linux/cpu.h b/include/linux/cpu.h
>> index f35369f79771..2a093434e975 100644
>> --- a/include/linux/cpu.h
>> +++ b/include/linux/cpu.h
>> @@ -62,6 +62,8 @@ extern ssize_t cpu_show_mds(struct device *dev,
>> extern ssize_t cpu_show_tsx_async_abort(struct device *dev,
>> struct device_attribute *attr,
>> char *buf);
>> +extern ssize_t cpu_show_itlb_multihit(struct device *dev,
>> + struct device_attribute *attr, char *buf);
>>
>> extern __printf(4, 5)
>> struct device *cpu_device_create(struct device *parent, void *drvdata,
>> --
>> 2.16.4
>>