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


Default branch: MAIN


Revision 1.11 / (download) - annotate - [select for diffs], Tue May 24 06:20:04 2022 UTC (22 months, 3 weeks ago) by andvar
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, 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
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

s/build-in/built-in/ in comments.

Revision 1.6.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:02 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.6: +107 -16 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

Sync with HEAD

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 1 11:06:56 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: 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-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
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

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) - annotate - [select for diffs], Thu Jan 31 16:03:50 2019 UTC (5 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.8: +2 -5 lines
Diff to previous 1.8 (colored)

remove unused variable

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:40 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: MAIN
Changes since 1.7: +110 -16 lines
Diff to previous 1.7 (colored)

Merge the [pgoyette-compat] branch

Revision 1.6.2.13 / (download) - annotate - [select for diffs], Tue Jan 22 07:42:40 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.6.2.12: +4 -13 lines
Diff to previous 1.6.2.12 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

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) - annotate - [select for diffs], Fri Jan 18 00:01:01 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.11: +4 -4 lines
Diff to previous 1.6.2.11 (colored) to branchpoint 1.6 (colored)

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) - annotate - [select for diffs], Mon Jan 14 13:34:27 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.10: +4 -4 lines
Diff to previous 1.6.2.10 (colored) to branchpoint 1.6 (colored)

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) - annotate - [select for diffs], Sun Jan 13 10:49:50 2019 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.9: +5 -5 lines
Diff to previous 1.6.2.9 (colored) to branchpoint 1.6 (colored)

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) - annotate - [select for diffs], Sat Sep 29 21:36:14 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.8: +3 -5 lines
Diff to previous 1.6.2.8 (colored) to branchpoint 1.6 (colored)

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) - annotate - [select for diffs], Tue Sep 18 23:03:54 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.7: +4 -4 lines
Diff to previous 1.6.2.7 (colored) to branchpoint 1.6 (colored)

The COMPAT_HOOK macros were renamed to MODULE_HOOK, adjust all callers

Revision 1.6.2.7 / (download) - annotate - [select for diffs], Tue Sep 18 10:35:04 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.6: +16 -4 lines
Diff to previous 1.6.2.6 (colored) to branchpoint 1.6 (colored)

Use the MP-safe compat hooks for netbsd32_compat_80.c's modctl

Revision 1.6.2.6 / (download) - annotate - [select for diffs], Fri Sep 14 08:53:22 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.5: +2 -5 lines
Diff to previous 1.6.2.5 (colored) to branchpoint 1.6 (colored)

Move some extern definitions into netbsd32_netbsd.h rather than having
them in the .c files.

Revision 1.6.2.5 / (download) - annotate - [select for diffs], Tue Sep 11 04:53:42 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.4: +6 -3 lines
Diff to previous 1.6.2.4 (colored) to branchpoint 1.6 (colored)

Install the syscalls into the netbsd32 table, not the default/native table.

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Mon Sep 10 22:50:51 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.3: +13 -110 lines
Diff to previous 1.6.2.3 (colored) to branchpoint 1.6 (colored)

More work on splitting the compat_netbsd32 module

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Fri Sep 7 23:32:30 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.2: +23 -97 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored)

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) - annotate - [select for diffs], Thu Sep 6 06:55:46 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6.2.1: +6 -6 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored)

Sync with HEAD

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

Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:29 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

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) - annotate - [select for diffs], Tue Apr 3 08:29:44 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.6: +288 -24 lines
Diff to previous 1.6 (colored)

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) - annotate - [select for diffs], Thu Jan 18 13:31:21 2018 UTC (6 years, 2 months ago) by maxv
Branch: 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
Changes since 1.5: +10 -4 lines
Diff to previous 1.5 (colored)

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) - annotate - [select for diffs], Sun Dec 3 11:36:56 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.5.8.1: +178 -0 lines
Diff to previous 1.5.8.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

update from HEAD

Revision 1.2.2.4 / (download) - annotate - [select for diffs], Mon Aug 28 17:51:59 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.3: +2 -8 lines
Diff to previous 1.2.2.3 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with HEAD

Revision 1.5.8.1, Thu Jun 1 02:45:08 2017 UTC (6 years, 10 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.5: +0 -178 lines
FILE REMOVED

file netbsd32_module.c was added on branch tls-maxphys on 2017-12-03 11:36:56 +0000

Revision 1.5 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:08 2017 UTC (6 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, 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
Changes since 1.4: +2 -8 lines
Diff to previous 1.4 (colored)

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) - annotate - [select for diffs], Sun Dec 27 12:09:47 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.2: +70 -59 lines
Diff to previous 1.2.2.2 (colored) to branchpoint 1.2 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.4 / (download) - annotate - [select for diffs], Sat Dec 19 13:15:21 2015 UTC (8 years, 3 months ago) by maxv
Branch: 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
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored)

Missing field (was here before my change).

Revision 1.3 / (download) - annotate - [select for diffs], Sat Dec 12 15:27:42 2015 UTC (8 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.2: +69 -59 lines
Diff to previous 1.2 (colored)

Put the code in charge of handling MODCTL_STAT (32bit) into a separate
function. No functional change.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Tue Sep 22 12:05:55 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.1: +173 -0 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored)

Sync with HEAD

Revision 1.2.2.1, Sun Jun 21 06:51:05 2015 UTC (8 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2: +0 -173 lines
FILE REMOVED

file netbsd32_module.c was added on branch nick-nhusb on 2015-09-22 12:05:55 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jun 21 06:51:05 2015 UTC (8 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Branch point for: nick-nhusb
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

Add missing sys/kauth.h

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jun 20 19:58:40 2015 UTC (8 years, 9 months ago) by martin
Branch: MAIN

Implement modctl, sigqueinfo and mq_*

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>