History log of /src/sys/compat/netbsd32/netbsd32_module.c |
Revision | | Date | Author | Comments |
1.11 |
| 24-May-2022 |
andvar | s/build-in/built-in/ in comments.
|
1.10 |
| 01-Mar-2019 |
pgoyette | Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly discussed on irc.
NFCI intended.
Ride the earlier kernel bump - it;s getting crowded.
|
1.9 |
| 31-Jan-2019 |
christos | remove unused variable
|
1.8 |
| 27-Jan-2019 |
pgoyette | Merge the [pgoyette-compat] branch
|
1.7 |
| 03-Sep-2018 |
riastradh | Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.6 |
| 18-Jan-2018 |
maxv | branches: 1.6.2; 1.6.4; Don't return the address of the kernel modules if the user is not privileged. Discussed on tech-kern@.
|
1.5 |
| 01-Jun-2017 |
chs | branches: 1.5.8; remove checks for failure after memory allocation calls that cannot fail:
kmem_alloc() with KM_SLEEP kmem_zalloc() with KM_SLEEP percpu_alloc() pserialize_create() psref_class_create()
all of these paths include an assertion that the allocation has not failed, so callers should not assert that again.
|
1.4 |
| 19-Dec-2015 |
maxv | Missing field (was here before my change).
|
1.3 |
| 12-Dec-2015 |
maxv | Put the code in charge of handling MODCTL_STAT (32bit) into a separate function. No functional change.
|
1.2 |
| 21-Jun-2015 |
msaitoh | branches: 1.2.2; Add missing sys/kauth.h
|
1.1 |
| 20-Jun-2015 |
martin | Implement modctl, sigqueinfo and mq_*
|
1.2.2.4 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.2.2.3 |
| 27-Dec-2015 |
skrll | Sync with HEAD (as of 26th Dec)
|
1.2.2.2 |
| 22-Sep-2015 |
skrll | Sync with HEAD
|
1.2.2.1 |
| 21-Jun-2015 |
skrll | file netbsd32_module.c was added on branch nick-nhusb on 2015-09-22 12:05:55 +0000
|
1.5.8.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.5.8.1 |
| 01-Jun-2017 |
jdolecek | file netbsd32_module.c was added on branch tls-maxphys on 2017-12-03 11:36:56 +0000
|
1.6.4.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.6.2.13 |
| 22-Jan-2019 |
pgoyette | Convert the MODULE_{,VOID_}HOOK_CALL macros to do everything in-line rather than defining an intermediate hook##call function. Almost all of the hooks are called only once, and although we lose the ability of doing things like
if (MODULE_HOOK_CALL(...) == 0) ...
we simplify things quite a bit. With this change, we no longer need to have both declaration and definition macros, and the definition no longer needs to have both prototype argument list and a "real" argument list.
FWIW, the above if now needs to written as
int ret;
MODULE_HOOK_CALL(..., ret); if (ret == 0) ...
with appropriate use of braces {}.
|
1.6.2.12 |
| 18-Jan-2019 |
pgoyette | Don't restrict hooks to having only int or void types. Pass the hook's type to the various macros, as needed.
Allows us to reduce diffs to original in at least one or two places (we no longer have to provide an additional parameter to the hook routine for returning a non-int return value).
|
1.6.2.11 |
| 14-Jan-2019 |
pgoyette | Create a variant of the HOOK macros that handles hook routines of type void, and use them where appropriate.
|
1.6.2.10 |
| 13-Jan-2019 |
pgoyette | Remove the HOOK2 versions of the MODULE_HOOK macros. There were only a few uses, and using them led to some lack of clarity in the code. Instead, we now use two separate hooks, with names that make it clear(er) what we're doing.
This also positions us to start unraveling some of the rtsock_50 mess, which will need (at least) five hooks.
|
1.6.2.9 |
| 29-Sep-2018 |
pgoyette | In MODULE_HOOK_CALL_DECL we don't need to provide the actual argument list for calling the hook function, nor do we need to provide the default value (for when the hook has not been set).
|
1.6.2.8 |
| 18-Sep-2018 |
pgoyette | The COMPAT_HOOK macros were renamed to MODULE_HOOK, adjust all callers
|
1.6.2.7 |
| 18-Sep-2018 |
pgoyette | Use the MP-safe compat hooks for netbsd32_compat_80.c's modctl
|
1.6.2.6 |
| 14-Sep-2018 |
pgoyette | Move some extern definitions into netbsd32_netbsd.h rather than having them in the .c files.
|
1.6.2.5 |
| 11-Sep-2018 |
pgoyette | Install the syscalls into the netbsd32 table, not the default/native table.
|
1.6.2.4 |
| 10-Sep-2018 |
pgoyette | More work on splitting the compat_netbsd32 module
|
1.6.2.3 |
| 07-Sep-2018 |
pgoyette | At the request of reviewers, remove the module alias functionality.
We will rely only on module names and duplicate-symbol detection to detect module conflicts.
|
1.6.2.2 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.6.2.1 |
| 03-Apr-2018 |
pgoyette | Remove fixed allocation of modules' "required" lists (previously limited to MAXMODDEPS entries). Update the modctl(MODCTL_STAT) syscall to return the required data in a new format, and retain the previous data format in MODCTL_OSTAT. Update the compat_80 and compat_netbsd32 modules as needed.
|