All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparc64: Limit nvme of_path_of_nvme to just SPARC
@ 2018-03-02  3:25 Eric Snowberg
  2018-03-05 14:40 ` Daniel Kiper
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Snowberg @ 2018-03-02  3:25 UTC (permalink / raw)
  To: grub-devel; +Cc: daniel.kiper, glaubitz, Eric Snowberg

Limit NVMe of_path_of_nvme to just SPARC hardware for now.  It has been
found that non-Open Firmware hardware platforms can some how access
this function.

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
---

Note:
  This patch should be applied after Adrian's "ieee1275: Fix crash in 
  of_path_of_nvme when of_path is empty" patch

---
 grub-core/osdep/linux/ofpath.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c
index 6180621..a6153d3 100644
--- a/grub-core/osdep/linux/ofpath.c
+++ b/grub-core/osdep/linux/ofpath.c
@@ -350,6 +350,7 @@ of_path_of_ide(const char *sys_devname __attribute__((unused)), const char *devi
   return ret;
 }
 
+#ifdef __sparc__
 static char *
 of_path_of_nvme(const char *sys_devname __attribute__((unused)),
 	        const char *device,
@@ -396,6 +397,7 @@ of_path_of_nvme(const char *sys_devname __attribute__((unused)),
   free (sysfs_path);
   return of_path;
 }
+#endif
 
 static int
 vendor_is_ATA(const char *path)
@@ -728,9 +730,11 @@ grub_util_devname_to_ofpath (const char *sys_devname)
     /* All the models I've seen have a devalias "floppy".
        New models have no floppy at all. */
     ofpath = xstrdup ("floppy");
+#ifdef __sparc__
   else if (device[0] == 'n' && device[1] == 'v' && device[2] == 'm'
            && device[3] == 'e')
     ofpath = of_path_of_nvme (name_buf, device, devnode, devicenode);
+#endif
   else
     {
       grub_util_warn (_("unknown device type %s"), device);
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sparc64: Limit nvme of_path_of_nvme to just SPARC
  2018-03-02  3:25 [PATCH] sparc64: Limit nvme of_path_of_nvme to just SPARC Eric Snowberg
@ 2018-03-05 14:40 ` Daniel Kiper
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2018-03-05 14:40 UTC (permalink / raw)
  To: Eric Snowberg; +Cc: grub-devel, glaubitz

On Thu, Mar 01, 2018 at 07:25:09PM -0800, Eric Snowberg wrote:
> Limit NVMe of_path_of_nvme to just SPARC hardware for now.  It has been
> found that non-Open Firmware hardware platforms can some how access
> this function.
>
> Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>

Applied with other SPARC stuff.

Thanks,

Daniel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-05 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02  3:25 [PATCH] sparc64: Limit nvme of_path_of_nvme to just SPARC Eric Snowberg
2018-03-05 14:40 ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.