The NetBSD Project

CVS log for src/sys/compat/common/if_media_80.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.1.4.1: download - view: text, markup, annotated - select for diffs
Wed Aug 3 11:11:31 2022 UTC (2 years, 4 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +3 -2 lines
Pull up following revision(s), all via patch
(requested by riastradh in ticket #1487):

	sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
	sys/compat/sunos/sunos_misc.c: revision 1.177
	sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
	sys/compat/common/kern_resource_43.c: revision 1.23
	sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
	sys/compat/common/vfs_syscalls_12.c: revision 1.38
	sys/compat/ultrix/ultrix_misc.c: revision 1.126
	sys/compat/common/kern_sig_43.c: revision 1.37
	sys/compat/linux/common/linux_mtio.c: revision 1.8
	sys/compat/freebsd/freebsd_misc.c: revision 1.34
	sys/compat/freebsd/freebsd_machdep.c: revision 1.5
	sys/compat/linux/common/linux_olduname.c: revision 1.67
	sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
	sys/compat/freebsd/freebsd_sched.c: revision 1.23
	sys/compat/ossaudio/ossaudio.c: revision 1.84
	sys/compat/sys/time_types.h: revision 1.6
	sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
	sys/compat/common/ieee80211_20.c: revision 1.7
	sys/compat/linux/common/linux_file.c: revision 1.119
	sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
	sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
	sys/compat/linux32/common/linux32_time.c: revision 1.38
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
	sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
	sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
	sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
	sys/compat/linux/common/linux_misc.c: revision 1.252
	sys/compat/linux/common/linux_hdio.c: revision 1.19
	sys/compat/sunos/sunos_ioctl.c: revision 1.71
	sys/compat/linux/common/linux_sched.c: revision 1.79
	sys/compat/common/kern_info_43.c: revision 1.40
	sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
	sys/compat/linux/common/linux_socket.c: revision 1.153
	sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
	sys/compat/common/vfs_syscalls_43.c: revision 1.68
	sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
	sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
	sys/compat/common/kern_time_50.c: revision 1.37
	sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
	sys/compat/linux/common/linux_cdrom.c: revision 1.28
	sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
	sys/compat/common/kern_info_09.c: revision 1.22
	sys/compat/linux32/common/linux32_resource.c: revision 1.12
	sys/compat/linux/common/linux_oldolduname.c: revision 1.67
	sys/compat/common/if_media_80.c: revision 1.4
	sys/compat/linux/arch/alpha/linux_osf1.c: revision 1.5
	sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
	sys/compat/linux32/common/linux32_signal.c: revision 1.21
	sys/compat/common/kern_sig_13.c: revision 1.22
	sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
	sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
	sys/compat/netbsd32/netbsd32_time.c: revision 1.56
	sys/compat/linux/common/linux_signal.c: revision 1.84
	sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
	sys/compat/sunos32/sunos32_misc.c: revision 1.85
	sys/compat/linux/common/linux_time.c: revision 1.40
	sys/compat/linux/common/linux_fdio.c: revision 1.14
	sys/compat/common/vfs_syscalls_30.c: revision 1.43

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Aug 3 01:38:51 2022 UTC (2 years, 4 months ago) by riastradh
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-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.4: preferred, colored
Changes since revision 1.4: +2 -1 lines
sys/compat/common/if_media_80.c: Add kernel rcsid.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Sep 7 11:43:02 2021 UTC (3 years, 3 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -2 lines
sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

Revision 1.1.2.4: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:14 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.1.2.3: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.3: +2 -2 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:00 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.1.2.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.2: +3 -5 lines
Merge changes from current as of 20200406

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Dec 12 02:15:42 2019 UTC (5 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, 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.2: preferred, colored
Changes since revision 1.2: +3 -5 lines
Rather than keeping a separate mutex, condvar, and pserialize for each
module hook, we can share a common set of synchronization structures.
This cuts the amount of cacheline_aligned data for these structures by
50%.

Note that we still have a per-hook localcount, since we need to count
individual references.

As discussed with riastradh@

Welcome to 9.99.22 !

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Sep 26 01:28:27 2019 UTC (5 years, 2 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3 lines
fix sign-compare issues.

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:06:58 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.1: +192 -0 lines
Sync with HEAD

Revision 1.1.2.1
Fri May 17 07:37:11 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
FILE REMOVED
Changes since revision 1.1: +0 -192 lines
file if_media_80.c was added on branch phil-wifi on 2019-06-10 22:06:58 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri May 17 07:37:11 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: phil-wifi, netbsd-9
 The max subtype of the ifmedia word is 31. It's too small for Ethernet now.
We currently use use it up to 30. We should extend the limit to be able to use
more than 10Gbps speeds. Our ifmedia(4) is inconvenience and have some problem
so we should redesign the interface, but it's too late for netbsd-9 to do it.
So, we keep the data structure size and modify the structure a bit. The
strategy is almost the same as FreeBSD. Many bits of IFM_OMASK for Ethernet
have not used, so use some of them for Ethernet's subtype.

The differences against FreeBSD are:
 - We use NetBSD style compat code (i.e. no SIOCGIFXMEDIA).
 - FreeBSD's IFM_ETH_XTYPE's bit location is from 11 to "14" even though
   IFM_OMASK is from 8 to "15". We use _IFM_ETH_XTMASK from bit 13 to "15".
 - FreeBSD changed the meaning of IFM_TYPE_MATCH(). I think we should
   not do it. We keep it not changing and added new IFM_TYPE_SUBTYPE_MATCH()
   macro for matching both TYPE and SUBTYPE.
 - Added up to 400GBASE-SR16.

New layout of the media word is as follows (from ifmedia_h):

 * if_media Options word:
 *	Bits	Use
 *	----	-------
 *	0-4	Media subtype	MAX SUBTYPE == 255 for ETH and 31 for others
 *	5-7	Media type
 *	8-15	Type specific options
 *	16-18	Mode (for multi-mode devices)
 *	19	(Reserved for Future Use)
 *	20-27	Shared (global) options
 *	28-31	Instance
 *
 *   3                     2                   1
 *   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
 *  +-------+---------------+-+-----+---------------+-----+---------+
 *  |       |               |R|     |               |     |         |
 *  | IMASK |     GMASK     |F|MMASK+-----+ OMASK   |NMASK|  TMASK  |
 *  |       |               |U|     |XTMSK|         |     |         |
 *  +-------+---------------+-+-----+-----+---------+-----+---------+
 *   <----->                   <--->                 <--->
 *  IFM_INST()               IFM_MODE()            IFM_TYPE()
 *
 *                              IFM_SUBTYPE(other than ETH)<------->
 *
 *                                   <---> IFM_SUBTYPE(ETH)<------->
 *
 *
 *           <------------->         <------------->
 *                        IFM_OPTIONS()

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>