|
10 | 10 | * University of Stuttgart. All rights reserved.
|
11 | 11 | * Copyright (c) 2004-2005 The Regents of the University of California.
|
12 | 12 | * All rights reserved.
|
13 |
| - * Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. |
| 13 | + * Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. |
14 | 14 | * Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights
|
15 | 15 | * reserved.
|
16 | 16 | * Copyright (c) 2016 Research Organization for Information Science
|
@@ -92,6 +92,14 @@ opal_memory_patcher_component_t mca_memory_patcher_component = {
|
92 | 92 | #define memory_patcher_syscall syscall
|
93 | 93 | #endif
|
94 | 94 |
|
| 95 | +/* |
| 96 | + * The following block of code is #if 0'ed out because we do not need |
| 97 | + * to intercept mmap() any more (mmap() only deals with memory |
| 98 | + * protection; it does not invalidate any rcache entries for a given |
| 99 | + * region). But if we do someday, this is the code that we'll need. |
| 100 | + * It's a little non-trivial, so we might as well keep it (and #if 0 |
| 101 | + * it out). |
| 102 | + */ |
95 | 103 | #if 0
|
96 | 104 |
|
97 | 105 | #if OPAL_MEMORY_PATCHER_HAVE___MMAP && !OPAL_MEMORY_PATCHER_HAVE___MMAP_PROTO
|
@@ -385,8 +393,8 @@ static int patcher_open (void)
|
385 | 393 | opal_mem_hooks_set_support (OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT);
|
386 | 394 |
|
387 | 395 | #if 0
|
388 |
| - /* NTH: the only reason to hook mmap would be to detect memory protection. this does not invalidate |
389 |
| - * any cache entries in the region. */ |
| 396 | + /* See above block to see why mmap() functionality is #if 0'ed |
| 397 | + out */ |
390 | 398 | rc = opal_patcher->patch_symbol ("mmap", (uintptr_t) intercept_mmap, (uintptr_t *) &original_mmap);
|
391 | 399 | if (OPAL_SUCCESS != rc) {
|
392 | 400 | return rc;
|
@@ -428,6 +436,7 @@ static int patcher_open (void)
|
428 | 436 |
|
429 | 437 | static int patcher_close(void)
|
430 | 438 | {
|
431 |
| - /* NTH: is it possible to unpatch the symbols? */ |
| 439 | + /* Note that we don't need to unpatch any symbols here; the |
| 440 | + patcher framework will take care of all of that for us. */ |
432 | 441 | return OPAL_SUCCESS;
|
433 | 442 | }
|
0 commit comments