Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145493211
D21987.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21987.diff
View Options
Index: head/sys/dev/nvdimm/nvdimm_acpi.c
===================================================================
--- head/sys/dev/nvdimm/nvdimm_acpi.c
+++ head/sys/dev/nvdimm/nvdimm_acpi.c
@@ -144,7 +144,9 @@
free(spa_mapping, M_NVDIMM_ACPI);
break;
}
- nvdimm_create_namespaces(spa_mapping, nfitbl);
+ if (nvdimm_spa_type_user_accessible(spa_type) &&
+ spa_type != SPA_TYPE_CONTROL_REGION)
+ nvdimm_create_namespaces(spa_mapping, nfitbl);
SLIST_INSERT_HEAD(&dev->spas, spa_mapping, link);
}
free(spas, M_NVDIMM_ACPI);
Index: head/sys/dev/nvdimm/nvdimm_spa.c
===================================================================
--- head/sys/dev/nvdimm/nvdimm_spa.c
+++ head/sys/dev/nvdimm/nvdimm_spa.c
@@ -155,6 +155,15 @@
return (SPA_TYPE_UNKNOWN);
}
+bool
+nvdimm_spa_type_user_accessible(enum SPA_mapping_type spa_type)
+{
+
+ if ((int)spa_type < 0 || spa_type >= nitems(nvdimm_SPA_uuid_list))
+ return (false);
+ return (nvdimm_SPA_uuid_list[spa_type].u_usr_acc);
+}
+
static vm_memattr_t
nvdimm_spa_memattr(uint64_t efi_mem_flags)
{
Index: head/sys/dev/nvdimm/nvdimm_var.h
===================================================================
--- head/sys/dev/nvdimm/nvdimm_var.h
+++ head/sys/dev/nvdimm/nvdimm_var.h
@@ -166,6 +166,7 @@
uint64_t ***listp, int *countp);
enum SPA_mapping_type nvdimm_spa_type_from_name(const char *);
enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *);
+bool nvdimm_spa_type_user_accessible(enum SPA_mapping_type);
struct nvdimm_dev *nvdimm_find_by_handle(nfit_handle_t nv_handle);
int nvdimm_spa_init(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr,
enum SPA_mapping_type spa_type);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 21, 12:56 PM (14 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28922973
Default Alt Text
D21987.diff (1 KB)
Attached To
Mode
D21987: nvdimm(4): Only expose namespaces for accessible data SPAs
Attached
Detach File
Event Timeline
Log In to Comment