The NetBSD Project

CVS log for src/sys/compat/netbsd32/netbsd32_module.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / compat / netbsd32

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue May 24 06:20:04 2022 UTC (2 years, 10 months ago) by andvar
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -3 lines
s/build-in/built-in/ in comments.

Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:02 2019 UTC (5 years, 9 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +107 -16 lines
Sync with HEAD

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Mar 1 11:06:56 2019 UTC (6 years ago) by pgoyette
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Jan 31 16:03:50 2019 UTC (6 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -5 lines
remove unused variable

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Jan 27 02:08:40 2019 UTC (6 years, 1 month ago) by pgoyette
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +110 -16 lines
Merge the [pgoyette-compat] branch

Revision 1.6.2.13: download - view: text, markup, annotated - select for diffs
Tue Jan 22 07:42:40 2019 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.6.2.12: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.12: +4 -13 lines
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 {}.

Revision 1.6.2.12: download - view: text, markup, annotated - select for diffs
Fri Jan 18 00:01:01 2019 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.11: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.11: +4 -4 lines
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).

Revision 1.6.2.11: download - view: text, markup, annotated - select for diffs
Mon Jan 14 13:34:27 2019 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.10: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.10: +4 -4 lines
Create a variant of the HOOK macros that handles hook routines of
type void, and use them where appropriate.

Revision 1.6.2.10: download - view: text, markup, annotated - select for diffs
Sun Jan 13 10:49:50 2019 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.9: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.9: +5 -5 lines
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.

Revision 1.6.2.9: download - view: text, markup, annotated - select for diffs
Sat Sep 29 21:36:14 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.8: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.8: +3 -5 lines
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).

Revision 1.6.2.8: download - view: text, markup, annotated - select for diffs
Tue Sep 18 23:03:54 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.7: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.7: +4 -4 lines
The COMPAT_HOOK macros were renamed to MODULE_HOOK, adjust all callers

Revision 1.6.2.7: download - view: text, markup, annotated - select for diffs
Tue Sep 18 10:35:04 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.6: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.6: +16 -4 lines
Use the MP-safe compat hooks for netbsd32_compat_80.c's modctl

Revision 1.6.2.6: download - view: text, markup, annotated - select for diffs
Fri Sep 14 08:53:22 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.5: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.5: +2 -5 lines
Move some extern definitions into netbsd32_netbsd.h rather than having
them in the .c files.

Revision 1.6.2.5: download - view: text, markup, annotated - select for diffs
Tue Sep 11 04:53:42 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.4: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.4: +6 -3 lines
Install the syscalls into the netbsd32 table, not the default/native table.

Revision 1.6.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 10 22:50:51 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.3: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.3: +13 -110 lines
More work on splitting the compat_netbsd32 module

Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 7 23:32:30 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.2: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.2: +23 -97 lines
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.

Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:55:46 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6.2.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.1: +6 -6 lines
Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:29:29 2018 UTC (6 years, 6 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
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!)

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 3 08:29:44 2018 UTC (6 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +288 -24 lines
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.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Jan 18 13:31:21 2018 UTC (7 years, 2 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +10 -4 lines
Don't return the address of the kernel modules if the user is not
privileged. Discussed on tech-kern@.

Revision 1.5.8.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:36:56 2017 UTC (7 years, 3 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.5.8.1: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.8.1: +178 -0 lines
update from HEAD

Revision 1.2.2.4: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:51:59 2017 UTC (7 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.2.2.3: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.3: +2 -8 lines
Sync with HEAD

Revision 1.5.8.1
Thu Jun 1 02:45:08 2017 UTC (7 years, 9 months ago) by jdolecek
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.5: +0 -178 lines
file netbsd32_module.c was added on branch tls-maxphys on 2017-12-03 11:36:56 +0000

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Jun 1 02:45:08 2017 UTC (7 years, 9 months ago) by chs
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: tls-maxphys
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -8 lines
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.

Revision 1.2.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:09:47 2015 UTC (9 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.2.2.2: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.2: +70 -59 lines
Sync with HEAD (as of 26th Dec)

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Dec 19 13:15:21 2015 UTC (9 years, 3 months ago) by maxv
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -2 lines
Missing field (was here before my change).

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Dec 12 15:27:42 2015 UTC (9 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +69 -59 lines
Put the code in charge of handling MODCTL_STAT (32bit) into a separate
function. No functional change.

Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:05:55 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.1: +173 -0 lines
Sync with HEAD

Revision 1.2.2.1
Sun Jun 21 06:51:05 2015 UTC (9 years, 9 months ago) by skrll
Branches: nick-nhusb
FILE REMOVED
Changes since revision 1.2: +0 -173 lines
file netbsd32_module.c was added on branch nick-nhusb on 2015-09-22 12:05:55 +0000

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Jun 21 06:51:05 2015 UTC (9 years, 9 months ago) by msaitoh
Branches: MAIN
CVS tags: nick-nhusb-base-20150921
Branch point for: nick-nhusb
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -2 lines
Add missing sys/kauth.h

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Jun 20 19:58:40 2015 UTC (9 years, 9 months ago) by martin
Branches: MAIN
Implement modctl, sigqueinfo and mq_*

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>