The NetBSD Project

CVS log for src/sys/dev/hid/hid.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / hid

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.6 / (download) - annotate - [select for diffs], Tue Oct 17 02:46:57 2023 UTC (5 months, 3 weeks ago) by nat
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.5: +6 -4 lines
Diff to previous 1.5 (colored)

Improve hid matching.

It now matches all kinds (application/physical/logical) in the hid
collection.

Patch from PR applied.

Addresses PR/46868.

Ok skrll@

Revision 1.5 / (download) - annotate - [select for diffs], Sun Mar 13 11:35:47 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: 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
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

hid: Avoid arithmetic overflow by rearranging inequalities.

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:05 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.1.4.1: +15 -9 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Merge changes from current as of 20200406

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Sun Jan 5 09:53:18 2020 UTC (4 years, 3 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.3: +15 -9 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

Pull up following revision(s) (requested by maxv in ticket #605):

	sys/dev/hid/hid.c: revision 1.4

Fix small read overflows when parsing HID tables. Noticed by kASan the
other day while I was playing with vHCI.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jan 1 09:40:17 2020 UTC (4 years, 3 months ago) by maxv
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, 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.3: +15 -9 lines
Diff to previous 1.3 (colored)

Fix small read overflows when parsing HID tables. Noticed by kASan the
other day while I was playing with vHCI.

Revision 1.1.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:08 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.1: +37 -37 lines
Diff to previous 1.1 (colored)

Sync with HEAD

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:31 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.1.2.1: +36 -36 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.3 / (download) - annotate - [select for diffs], Thu Nov 15 23:01:45 2018 UTC (5 years, 4 months ago) by jakllsch
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, netbsd-9-base, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.2: +36 -36 lines
Diff to previous 1.2 (colored)

Correctly handle signed/unsigned quantities in kernel HID parser.

Should fix PR kern/53605.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Thu Sep 6 06:55:49 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

Sync with HEAD

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

Revision 1.2 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:31 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (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.1 / (download) - annotate - [select for diffs], Sun Dec 10 17:03:07 2017 UTC (6 years, 4 months ago) by bouyer
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, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi, pgoyette-compat

Factor out bus-independant HID code so that it can be shared by USB, bluetooth
and i2c.
dev/usb/ukbdmap.c is renamed to dev/hid/hidkbdmap.c
dev/usb/hid.[ch] moved to dev/hid/
usage pages moved from dev/usb/usbhid.h moved to dev/hid/hid.h,
and updated with OpenBSD entries.
bus-independant code moved from dev/usb/ums.c to dev/hid/hidms.c
(the same should be done for keyboard and touchpad drivers)

Needed for the upcoming HID over I2C support, proposed on tech-kern@
on Dec, 1.

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>