Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
|
#
1.16 |
|
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!)
|
Revision tags: netbsd-8-1-RC1 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606
|
#
1.15 |
|
27-Apr-2015 |
martin |
branches: 1.15.16; Print error codes from sysmon
|
Revision tags: nick-nhusb-base-20150406
|
#
1.14 |
|
21-Feb-2015 |
nakayama |
Fix queue handling to make the watchdog timer actually works on netbsd-7 if it is configured by wdogctl=YES in rc.conf, and also avoid a hangup duaring shutdown.
- don't put an entry which is already in the queue. - read a first entry properly to handle the queue. - check the lom status if input buffer is empty before writing.
|
Revision tags: nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
|
#
1.13 |
|
25-Feb-2014 |
pooka |
branches: 1.13.4; 1.13.6; Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate lines of code.
|
#
1.12 |
|
20-Feb-2014 |
joerg |
Don't use conditional format strings, if they aren't equivalent in the arguments they use.
|
Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base
|
#
1.11 |
|
24-Jan-2013 |
nakayama |
branches: 1.11.2; Fix typo in KASSERT, pointed out by riastradh@ and martin@.
|
Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
|
#
1.10 |
|
02-Jun-2012 |
dsl |
branches: 1.10.2; Add some pre-processor magic to verify that the type of the data item passed to sysctl_createv() actually matches the declared type for the item itself. In the places where the caller specifies a function and a structure address (typically the 'softc') an explicit (void *) cast is now needed. Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting AcpiGbl_EnableAmlDebugObject. (mostly passing the address of a uint64_t when typed as CTLTYPE_INT). I've test built quite a few kernels, but there may be some unfixed MD fallout. Most likely passing &char[] to char *. Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
|
Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
#
1.9 |
|
20-Jun-2011 |
pgoyette |
branches: 1.9.2; Initialize sensor states before registering.
|
#
1.8 |
|
19-Jun-2011 |
nakayama |
Limit reading from registers at most once every second with using ratecheck(9).
|
Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase jym-xensuspend-base rmind-uvmplock-base jym-xensuspend-nbase
|
#
1.7 |
|
28-Feb-2011 |
nakayama |
branches: 1.7.2; lom_refresh(): Update only the sensor status specified by the edata as noted in sysmon_envsys(9).
lom_sysctl_alarm(): Update alarm status before reading via sysctl to make it usable at a boot time.
|
Revision tags: uebayasi-xip-base7 bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1
|
#
1.6 |
|
22-Mar-2010 |
nakayama |
branches: 1.6.2; 1.6.4; 1.6.6; Fix off-by-one in LOMlite hostname code. From rev 1.21 of OpenBSD.
|
Revision tags: yamt-nfs-mp-base9 uebayasi-xip-base
|
#
1.5 |
|
28-Dec-2009 |
nakayama |
branches: 1.5.2; 1.5.4; 1.5.6; Make fault LED and alarms status changeable via sysctl(8). The sysctl entries are created under the hw.lomN MIB.
|
Revision tags: matt-premerge-20091211
|
#
1.4 |
|
13-Dec-2009 |
nakayama |
Merge change of OpenBSD rev 1.20:
Remove debug printf and properly dequeue command instead when a read times out on LOMLite2.
|
#
1.3 |
|
28-Nov-2009 |
nakayama |
Add support for monitoring Fault LED and Alarms status.
|
#
1.2 |
|
16-Nov-2009 |
nakayama |
Merge changes between revision 1.16 and 1.19 of OpenBSD with shutdownhook_establish(9) to pmf(9) conversion:
- LOMlite seems to get wedged from time to time; add some code to unwedge it.
- Make sure we don't insert and entry into the list of pending commends twice.
- Establish a shutdown hook to disable the watchdog timer to prevent watchdog triggers after the kernel has been halted.
- Handle LOMlite2 in an interrupt-driven way; avoids using delay(9) once the machine is up and running.
|
#
1.1 |
|
02-Oct-2009 |
nakayama |
branches: 1.1.2; Port lom(4) driver for LOMlite lights out management hardware monitor and watchdog timer from OpenBSD.
It supports the LOMlite found on Sun Netra t1 and the LOMlite2 found on Sun Netra T1/X1 and Sun Fire V100/V120.
|