aboutsummaryrefslogtreecommitdiffstats
path: root/efi-move-some-sysfs-files-to-be-read-only-by-root.patch
diff options
Diffstat (limited to 'efi-move-some-sysfs-files-to-be-read-only-by-root.patch')
-rw-r--r--efi-move-some-sysfs-files-to-be-read-only-by-root.patch25
1 files changed, 12 insertions, 13 deletions
diff --git a/efi-move-some-sysfs-files-to-be-read-only-by-root.patch b/efi-move-some-sysfs-files-to-be-read-only-by-root.patch
index 671e16c802059b..280a248523f919 100644
--- a/efi-move-some-sysfs-files-to-be-read-only-by-root.patch
+++ b/efi-move-some-sysfs-files-to-be-read-only-by-root.patch
@@ -9,11 +9,16 @@ Also add __ATTR_RO_MODE() to sysfs.h to make this easier.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
-index f70febf680c3..c3eefa126e3b 100644
+---
+ drivers/firmware/efi/efi.c | 3 +--
+ drivers/firmware/efi/esrt.c | 15 ++++++---------
+ drivers/firmware/efi/runtime-map.c | 10 +++++-----
+ include/linux/sysfs.h | 5 +++++
+ 4 files changed, 17 insertions(+), 16 deletions(-)
+
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
-@@ -143,8 +143,7 @@ static ssize_t systab_show(struct kobject *kobj,
+@@ -143,8 +143,7 @@ static ssize_t systab_show(struct kobjec
return str - buf;
}
@@ -23,11 +28,9 @@ index f70febf680c3..c3eefa126e3b 100644
#define EFI_FIELD(var) efi.var
-diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c
-index bd7ed3c1148a..7aae2483fcb9 100644
--- a/drivers/firmware/efi/esrt.c
+++ b/drivers/firmware/efi/esrt.c
-@@ -106,7 +106,7 @@ static const struct sysfs_ops esre_attr_ops = {
+@@ -106,7 +106,7 @@ static const struct sysfs_ops esre_attr_
};
/* Generic ESRT Entry ("ESRE") support. */
@@ -36,7 +39,7 @@ index bd7ed3c1148a..7aae2483fcb9 100644
{
char *str = buf;
-@@ -117,18 +117,16 @@ static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf)
+@@ -117,18 +117,16 @@ static ssize_t esre_fw_class_show(struct
return str - buf;
}
@@ -58,7 +61,7 @@ index bd7ed3c1148a..7aae2483fcb9 100644
esre_attr_decl(fw_type, 32, "%u");
esre_attr_decl(fw_version, 32, "%u");
-@@ -193,14 +191,13 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
+@@ -193,14 +191,13 @@ static int esre_create_sysfs_entry(void
/* support for displaying ESRT fields at the top level */
#define esrt_attr_decl(name, size, fmt) \
@@ -75,11 +78,9 @@ index bd7ed3c1148a..7aae2483fcb9 100644
esrt_attr_decl(fw_resource_count, 32, "%u");
esrt_attr_decl(fw_resource_count_max, 32, "%u");
-diff --git a/drivers/firmware/efi/runtime-map.c b/drivers/firmware/efi/runtime-map.c
-index 8e64b77aeac9..f377609ff141 100644
--- a/drivers/firmware/efi/runtime-map.c
+++ b/drivers/firmware/efi/runtime-map.c
-@@ -63,11 +63,11 @@ static ssize_t map_attr_show(struct kobject *kobj, struct attribute *attr,
+@@ -63,11 +63,11 @@ static ssize_t map_attr_show(struct kobj
return map_attr->show(entry, buf);
}
@@ -96,8 +97,6 @@ index 8e64b77aeac9..f377609ff141 100644
/*
* These are default attributes that are added for every memmap entry.
-diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
-index e32dfe098e82..a886133ae15c 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -117,6 +117,11 @@ struct attribute_group {