Searched +hist:5 +hist:gs (Results 1 - 25 of 159) sorted by relevance
| /src/usr.bin/netstat/ | ||
| H A D | bpf.c | 1.12 Tue Jun 26 06:48:03 GMT 2018 msaitoh Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.12 Tue Jun 26 06:48:03 GMT 2018 msaitoh Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.1 Thu Aug 04 19:39:40 GMT 2005 rpaulo Implemented the userland part of the BPF statistics and BPF peers, net.bpf.stats and net.bpf.peers sysctls respectively. netstat(1) now has an additional syntax: netstat [-s] [-B] [-I Interface] Only the super user can see a list of BPF peers with the following command: # netstat -B Active BPF peers PID Int Recv Drop Capt Flags Bufsize Comm 4941 lo0 0 0 0 I--S- 262144 tcpdump 252 ex0 19668 0 5 I-RS- 32768 dhclient And every user can see the BPF statistics with: $ netstat -s -B bpf: 19669 total packets received 5 total packets captured 0 total packets dropped This idea came from FreeBSD (Christian S.J. Peron) but, currently, they doen't have a userland utility in the base system to read the sysctls. Reviewed by: christos@ 1.1 Thu Aug 04 19:39:40 GMT 2005 rpaulo Implemented the userland part of the BPF statistics and BPF peers, net.bpf.stats and net.bpf.peers sysctls respectively. netstat(1) now has an additional syntax: netstat [-s] [-B] [-I Interface] Only the super user can see a list of BPF peers with the following command: # netstat -B Active BPF peers PID Int Recv Drop Capt Flags Bufsize Comm 4941 lo0 0 0 0 I--S- 262144 tcpdump 252 ex0 19668 0 5 I-RS- 32768 dhclient And every user can see the BPF statistics with: $ netstat -s -B bpf: 19669 total packets received 5 total packets captured 0 total packets dropped This idea came from FreeBSD (Christian S.J. Peron) but, currently, they doen't have a userland utility in the base system to read the sysctls. Reviewed by: christos@ |
| /src/sys/dev/pci/cxgb/ | ||
| H A D | cxgb_main.c | 1.9 Sat Apr 24 23:36:57 GMT 2021 thorpej branches: 1.9.8; Merge thorpej-cfargs branch: Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?). 1.5 Tue Jun 26 06:48:01 GMT 2018 msaitoh branches: 1.5.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.5 Tue Jun 26 06:48:01 GMT 2018 msaitoh branches: 1.5.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. |
| /src/sys/arch/x86/include/ | ||
| H A D | sysarch.h | 1.9 Wed Jul 07 01:14:53 GMT 2010 chs branches: 1.9.18; 1.9.36; 1.9.40; 1.9.44; add the guts of TLS support on amd64. based on joerg's patch, reworked by me to support 32-bit processes as well. we now keep %fs and %gs loaded with the user values while in the kernel, which means we don't need to reload them when returning to user mode. 1.8 Sat Mar 21 14:41:30 GMT 2009 ad branches: 1.8.2; 1.8.4; PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash Fix numerous problems: 1. LDT updates are not atomic. 2. Number of processes running with private LDTs and/or I/O bitmaps is not capped. System with high maxprocs can be paniced. 3. LDTR can be leaked over context switch. 4. GDT slot allocations can race, giving the same LDT slot to two procs. 5. Incomplete interrupt/trap frames can be stacked. 6. In some rare cases segment faults are not handled correctly. 1.6 Sat Nov 10 20:06:24 GMT 2007 ad branches: 1.6.14; 1.6.16; 1.6.18; - When computing the TSC frequency, call i8254_delay() and not DELAY(). - Use atomics to adjust the pmap reference count, instead of taking locks. - Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used as per-thread registers. This is compatible with FreeBSD. - Run patches after we have attached CPUs, since we then know if the system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR and makes running MP kernels on UP systems cheaper. - Patch out many of the 'lock' prefixes to nops if uniprocessor. - Do a wbinvd after patching to ensure that the trace/instruction cache is up to date. 1.6 Sat Nov 10 20:06:24 GMT 2007 ad branches: 1.6.14; 1.6.16; 1.6.18; - When computing the TSC frequency, call i8254_delay() and not DELAY(). - Use atomics to adjust the pmap reference count, instead of taking locks. - Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used as per-thread registers. This is compatible with FreeBSD. - Run patches after we have attached CPUs, since we then know if the system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR and makes running MP kernels on UP systems cheaper. - Patch out many of the 'lock' prefixes to nops if uniprocessor. - Do a wbinvd after patching to ensure that the trace/instruction cache is up to date. |
| /src/sys/arch/emips/ebus/ | ||
| H A D | if_le_ebus.c | 1.20 Wed May 29 10:07:28 GMT 2019 msaitoh Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future. 1.16 Tue Jun 26 06:47:58 GMT 2018 msaitoh branches: 1.16.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.16 Tue Jun 26 06:47:58 GMT 2018 msaitoh branches: 1.16.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.4 Thu Feb 02 19:42:59 GMT 2012 tls branches: 1.4.6; 1.4.10; Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. |
| /src/sys/arch/sparc/include/ | ||
| H A D | ptrace.h | 1.15 Tue Dec 24 14:50:59 GMT 2019 kamil Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFO PT_LWPINFO is a legacy ptrace(2) operation that was originally intended to retrieve the thread (LWP) information inside a traced process. It has a number of flaws and is confused with PT_LWPINFO from FreeBSD. PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename, removal of pl_event) and introduces new features: signal context (pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address (pl_private). The private pointer was so far missing information for a debugger. PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific information, so far missed in the core(5) files. PT_LWPSTATUS retrieves LWP information for the prompted thread. PT_LWPNEXT retrieves LWP information for the next thread, borrowing the semantics from NetBSD specific PT_LWPINFO. PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for the foreseeable future, without plans of removing it. Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT. Keep ATF tests for PT_LWPINFO. Switch GDB to new API. Proposed on tech-kern@. 1.15 Tue Dec 24 14:50:59 GMT 2019 kamil Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFO PT_LWPINFO is a legacy ptrace(2) operation that was originally intended to retrieve the thread (LWP) information inside a traced process. It has a number of flaws and is confused with PT_LWPINFO from FreeBSD. PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename, removal of pl_event) and introduces new features: signal context (pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address (pl_private). The private pointer was so far missing information for a debugger. PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific information, so far missed in the core(5) files. PT_LWPSTATUS retrieves LWP information for the prompted thread. PT_LWPNEXT retrieves LWP information for the next thread, borrowing the semantics from NetBSD specific PT_LWPINFO. PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for the foreseeable future, without plans of removing it. Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT. Keep ATF tests for PT_LWPINFO. Switch GDB to new API. Proposed on tech-kern@. 1.3 Fri Feb 11 16:51:36 GMT 1994 pk [GS]ETREG definitions for ptrace |
| /src/sys/dev/ic/ | ||
| H A D | am79900.c | 1.28 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.28.2; 1.28.10; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.28 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.28.2; 1.28.10; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.23 Thu Feb 02 19:43:02 GMT 2012 tls branches: 1.23.6; 1.23.24; Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. |
| H A D | lan9118.c | 1.30 Mon Apr 22 08:05:01 GMT 2019 msaitoh On drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to ifmedia_ioctl(), the hook is not required because ether_ioctl has it (if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in ifmedia_ioctl(), so no functional change. 1.27 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.27.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.27 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.27.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.15 Thu Feb 02 19:43:03 GMT 2012 tls Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. 1.2 Mon Nov 23 09:41:53 GMT 2009 kiyohara - Wait the ready 5sec, not 5msec. - Set IFM_ACTIVE to ifm_status instead of ifm_active. ifconfig(8) always said 'no carrier'... 1.2 Mon Nov 23 09:41:53 GMT 2009 kiyohara - Wait the ready 5sec, not 5msec. - Set IFM_ACTIVE to ifm_status instead of ifm_active. ifconfig(8) always said 'no carrier'... |
| H A D | cs89x0.c | 1.47 Wed May 29 10:07:29 GMT 2019 msaitoh branches: 1.47.4; Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future. 1.41 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.41.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.41 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.41.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.33 Thu Feb 02 19:43:03 GMT 2012 tls branches: 1.33.6; 1.33.20; Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. |
| H A D | i82596.c | 1.42 Wed May 29 10:07:29 GMT 2019 msaitoh branches: 1.42.4; Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future. 1.38 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.38.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.38 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.38.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.20 Tue May 05 15:47:35 GMT 2009 tsutsui Add support for i82596 Rev A chip which doesn't have the enhanced 32 bit big endian mode: - add IEE_REV_A flag to indicate if chip support the 32 bit BE mode or not - add IEE_SWAPA32() macro and use it on necessary 32 bit DMA pointers - rename IEE_SWAP() macro for the SCP address pointer and statistics counters which require word swap even on Rev B/C chips to IEE_SWAP32() for clarification - add comments about these BE mode quirks Tested on HP9000 735/125 by me and also tested on 715/50 by skrll@ with netbsd-5 branch, and fixes MI part of PR port-hp700/35531. |
| H A D | mb86950.c | 1.32 Wed May 29 10:07:29 GMT 2019 msaitoh branches: 1.32.4; Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future. 1.28 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.28.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.28 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.28.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.19 Thu Feb 02 19:43:03 GMT 2012 tls branches: 1.19.6; Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. |
| H A D | awi.c | 1.99 Thu Dec 05 03:11:40 GMT 2019 msaitoh branches: 1.99.2; Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing. 1.94 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.94.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.94 Tue Jun 26 06:48:00 GMT 2018 msaitoh branches: 1.94.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.18 Fri Jun 09 05:31:15 GMT 2000 onoe cleanup haeders. add opt_awi.h to define AWI_DEBUG, AWI_WEP_ARC4. show the firmware version at attach. create a framework to support WEP (encryption code is not included for now). a new wiconfig compatible ioctl interface replaced the awictl interface. fix memory leak in selecting AP fix bugs in ESSID selection changes from FreeBSD-current by Warner Losh: revision 1.2 date: 2000/04/17 22:58:15; author: imp; state: Exp; lines: +16 -1 Provide mem* for compat with NetBSD to fix LINT fixes from FreeBSD-current by Guido van Rooij: revision 1.4 date: 2000/05/29 19:58:10; author: guido; state: Exp; lines: +5 -2 Fix a panic resulting from an obvious null pointer deref. Apparently some other panics still exist in this driver, but with this fix, it was at least possible to run the Nokia card at SANE 2000. 1.14 Mon Mar 27 00:52:45 GMT 2000 onoe backout changes between 1.10 and 1.12 to re-enable awictl stuff. Actually, it is partially duplicated with SIOC[GS]IFMEDIA and SIOC[GS]80211NWID ioctls currently supported. But I'd like to leave it until configuration interface for common 802.11 stuff will be cleaned up. 1.14 Mon Mar 27 00:52:45 GMT 2000 onoe backout changes between 1.10 and 1.12 to re-enable awictl stuff. Actually, it is partially duplicated with SIOC[GS]IFMEDIA and SIOC[GS]80211NWID ioctls currently supported. But I'd like to leave it until configuration interface for common 802.11 stuff will be cleaned up. |
| /src/sys/arch/x86/x86/ | ||
| H A D | sys_machdep.c | 1.42 Sat Oct 21 06:55:54 GMT 2017 maxv Improve our segregs model. Pass 3/3. Treat %gs the same way we treat %ds/%es/%fs: restore it in INTRFASTEXIT on 32bit LWPs. On Xen however, its behavior does not change, because we need to do an hypercall before INTR_RESTORE_GPRS, and that's too complicated for now. As a side effect, this change fixes a bug in the ACPI wakeup code; %fs/%gs were not restored on 32bit LWPs, and chances are they would segfault shortly afterwards. Support for USER_LDT on amd64 is almost complete now. 1.42 Sat Oct 21 06:55:54 GMT 2017 maxv Improve our segregs model. Pass 3/3. Treat %gs the same way we treat %ds/%es/%fs: restore it in INTRFASTEXIT on 32bit LWPs. On Xen however, its behavior does not change, because we need to do an hypercall before INTR_RESTORE_GPRS, and that's too complicated for now. As a side effect, this change fixes a bug in the ACPI wakeup code; %fs/%gs were not restored on 32bit LWPs, and chances are they would segfault shortly afterwards. Support for USER_LDT on amd64 is almost complete now. 1.18 Sun Mar 29 09:24:52 GMT 2009 ad _lwp_setprivate: provide the value to MD code if a hook is present. This will be used to support TLS. The MD method must match the ELF TLS spec for that CPU architecture (if there is a spec). At this time it is only implemented for i386, where it means setting the per-thread base address for %gs. Please implement this for your platform! 1.17 Sat Mar 21 14:41:30 GMT 2009 ad PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash Fix numerous problems: 1. LDT updates are not atomic. 2. Number of processes running with private LDTs and/or I/O bitmaps is not capped. System with high maxprocs can be paniced. 3. LDTR can be leaked over context switch. 4. GDT slot allocations can race, giving the same LDT slot to two procs. 5. Incomplete interrupt/trap frames can be stacked. 6. In some rare cases segment faults are not handled correctly. 1.5 Sat Nov 10 20:06:25 GMT 2007 ad - When computing the TSC frequency, call i8254_delay() and not DELAY(). - Use atomics to adjust the pmap reference count, instead of taking locks. - Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used as per-thread registers. This is compatible with FreeBSD. - Run patches after we have attached CPUs, since we then know if the system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR and makes running MP kernels on UP systems cheaper. - Patch out many of the 'lock' prefixes to nops if uniprocessor. - Do a wbinvd after patching to ensure that the trace/instruction cache is up to date. 1.5 Sat Nov 10 20:06:25 GMT 2007 ad - When computing the TSC frequency, call i8254_delay() and not DELAY(). - Use atomics to adjust the pmap reference count, instead of taking locks. - Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used as per-thread registers. This is compatible with FreeBSD. - Run patches after we have attached CPUs, since we then know if the system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR and makes running MP kernels on UP systems cheaper. - Patch out many of the 'lock' prefixes to nops if uniprocessor. - Do a wbinvd after patching to ensure that the trace/instruction cache is up to date. |
| /src/sys/dev/pci/ | ||
| H A D | if_xge.c | 1.32 Wed May 29 10:07:29 GMT 2019 msaitoh branches: 1.32.4; Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future. 1.26 Tue Jun 26 06:48:01 GMT 2018 msaitoh branches: 1.26.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.26 Tue Jun 26 06:48:01 GMT 2018 msaitoh branches: 1.26.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.16 Thu Feb 02 19:43:06 GMT 2012 tls branches: 1.16.6; Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. |
| H A D | if_vte.c | 1.20 Tue Jun 26 06:48:01 GMT 2018 msaitoh branches: 1.20.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.20 Tue Jun 26 06:48:01 GMT 2018 msaitoh branches: 1.20.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.5 Thu Feb 02 19:43:05 GMT 2012 tls Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. |
| /src/sys/net/ | ||
| H A D | if_sppp.h | 1.27 Tue Apr 20 14:32:03 GMT 2010 jmcneill branches: 1.27.18; 1.27.36; COMPAT_50 support for SPPP[GS]ETIDLETO and SPPP[GS]ETKEEPALIVE, ok martin@ 1.27 Tue Apr 20 14:32:03 GMT 2010 jmcneill branches: 1.27.18; 1.27.36; COMPAT_50 support for SPPP[GS]ETIDLETO and SPPP[GS]ETKEEPALIVE, ok martin@ 1.14 Mon Jan 07 10:49:02 GMT 2002 martin Implement a retry counter for failed authorizations and limit it to a configurable maximum (default: 5). Some ISPs shut down accounts (at least temporarily) after to many bad retries. This hit me recently due to a stupid pilot error and the fast retry rate. |
| /src/sys/arch/arm/gemini/ | ||
| H A D | gemini_gmac.c | 1.21 Sat Apr 24 23:36:27 GMT 2021 thorpej branches: 1.21.8; Merge thorpej-cfargs branch: Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?). 1.16 Tue Jun 26 06:47:57 GMT 2018 msaitoh branches: 1.16.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.16 Tue Jun 26 06:47:57 GMT 2018 msaitoh branches: 1.16.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. |
| /src/sys/dev/qbus/ | ||
| H A D | if_de.c | 1.34 Tue Jun 26 06:48:02 GMT 2018 msaitoh branches: 1.34.2; 1.34.10; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.34 Tue Jun 26 06:48:02 GMT 2018 msaitoh branches: 1.34.2; 1.34.10; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.9 Thu Apr 26 19:36:07 GMT 2001 ragge Use ubmemalloc() to get mapped uba memory. Only copy mbufs if there are more than two in a mbuf chain (on transmit). This squeezed another 5% out of the DEUNA. (now closing up to 100 K/s :-) |
| /src/sys/arch/macppc/dev/ | ||
| H A D | adb.c | 1.36 Sat Apr 24 23:36:41 GMT 2021 thorpej branches: 1.36.8; Merge thorpej-cfargs branch: Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?). 1.29 Sat Dec 12 14:44:09 GMT 2009 tsutsui branches: 1.29.10; Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port. XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms() 1.29 Sat Dec 12 14:44:09 GMT 2009 tsutsui branches: 1.29.10; Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port. XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms() |
| H A D | cuda.c | 1.28 Sat Apr 24 23:36:41 GMT 2021 thorpej branches: 1.28.2; 1.28.8; Merge thorpej-cfargs branch: Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?). 1.15 Sat Dec 12 14:44:09 GMT 2009 tsutsui branches: 1.15.10; Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port. XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms() 1.15 Sat Dec 12 14:44:09 GMT 2009 tsutsui branches: 1.15.10; Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port. XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms() |
| H A D | pmu.c | 1.37 Sat Apr 24 23:36:41 GMT 2021 thorpej branches: 1.37.2; 1.37.8; Merge thorpej-cfargs branch: Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?). 1.17 Sat Dec 12 14:44:09 GMT 2009 tsutsui branches: 1.17.2; 1.17.4; Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port. XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms() 1.17 Sat Dec 12 14:44:09 GMT 2009 tsutsui branches: 1.17.2; 1.17.4; Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port. XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms() |
| /src/sys/arch/amd64/amd64/ | ||
| H A D | locore.S | 1.223 Sun Jul 16 19:55:43 GMT 2023 riastradh x86: Sprinkle extensive commentary about %fs/%gs initialization. Plus some other side quests like the three-stage GDT metamorphosis lifecycle. No functional change intended. 1.187 Thu Oct 03 05:06:29 GMT 2019 maxv Remove the LazyFPU code, as posted 5 months ago on port-amd64@. 1.159 Tue Mar 20 18:27:58 GMT 2018 maxv (Re)Fix handling of segment register faults. My previous attempt did fix faults occuring when reloading %es/%ds/%fs/%gs, but it did not fix faults occuring when executing 'iretq', because before iretq we needed to do +16 in %rsp, and the resulting stack layout was not the one kernuser_reenter() expected (tf_trapno and tf_err were not there). So now: pop tf_trapno and tf_err right away in intrfastexit(), and update the layout in kernuser_reenter() accordingly. The resulting code is actually simpler. Tested by "hardcoding" an iretq fault; the process correctly receives a SIGSEGV. (Note that segment register faults do not happen in the wild, you really need to try hard to trigger one.) 1.137 Sat Oct 21 06:55:54 GMT 2017 maxv Improve our segregs model. Pass 3/3. Treat %gs the same way we treat %ds/%es/%fs: restore it in INTRFASTEXIT on 32bit LWPs. On Xen however, its behavior does not change, because we need to do an hypercall before INTR_RESTORE_GPRS, and that's too complicated for now. As a side effect, this change fixes a bug in the ACPI wakeup code; %fs/%gs were not restored on 32bit LWPs, and chances are they would segfault shortly afterwards. Support for USER_LDT on amd64 is almost complete now. 1.137 Sat Oct 21 06:55:54 GMT 2017 maxv Improve our segregs model. Pass 3/3. Treat %gs the same way we treat %ds/%es/%fs: restore it in INTRFASTEXIT on 32bit LWPs. On Xen however, its behavior does not change, because we need to do an hypercall before INTR_RESTORE_GPRS, and that's too complicated for now. As a side effect, this change fixes a bug in the ACPI wakeup code; %fs/%gs were not restored on 32bit LWPs, and chances are they would segfault shortly afterwards. Support for USER_LDT on amd64 is almost complete now. 1.134 Thu Oct 19 18:36:31 GMT 2017 maxv Improve our segregs model. Pass 1/3. Right now, we are saving and restoring %ds/%es each time we enter/leave the kernel. However, we let %fs/%gs live in the kernel space, and we rely on the fact that when switching to an LWP, %fs/%gs are set right away (via cpu_switchto or setregs). It has two drawbacks: we are taking care of %ds/%es while they are deprecated (useless) on 64bit LWPs, and we are restricting %fs/%gs while they still have a meaning on 32bit LWPs. Therefore, handle 32bit and 64bit LWPs differently: * 64bit LWPs use fixed segregs, which are not taken care of. * 32bit LWPs have dynamic segregs, always saved/restored. For now, only %ds and %es are changed; %fs and %gs will be in the next passes. The trapframe is constructed as usual. In INTRFASTEXIT, we restore %ds/%es depending on the %cs value. If %cs contains one of the two standard 64bit selectors, don't do anything. Otherwise, restore everything. When doing a context switch, just restore %ds/%es to their default values. On a 32bit LWP they will be overwritten by INTRFASTEXIT; on a 64bit LWP they won't be updated. In the ACPI wakeup code, restore %ds/%es to the default 64bit user value. 1.134 Thu Oct 19 18:36:31 GMT 2017 maxv Improve our segregs model. Pass 1/3. Right now, we are saving and restoring %ds/%es each time we enter/leave the kernel. However, we let %fs/%gs live in the kernel space, and we rely on the fact that when switching to an LWP, %fs/%gs are set right away (via cpu_switchto or setregs). It has two drawbacks: we are taking care of %ds/%es while they are deprecated (useless) on 64bit LWPs, and we are restricting %fs/%gs while they still have a meaning on 32bit LWPs. Therefore, handle 32bit and 64bit LWPs differently: * 64bit LWPs use fixed segregs, which are not taken care of. * 32bit LWPs have dynamic segregs, always saved/restored. For now, only %ds and %es are changed; %fs and %gs will be in the next passes. The trapframe is constructed as usual. In INTRFASTEXIT, we restore %ds/%es depending on the %cs value. If %cs contains one of the two standard 64bit selectors, don't do anything. Otherwise, restore everything. When doing a context switch, just restore %ds/%es to their default values. On a 32bit LWP they will be overwritten by INTRFASTEXIT; on a 64bit LWP they won't be updated. In the ACPI wakeup code, restore %ds/%es to the default 64bit user value. 1.134 Thu Oct 19 18:36:31 GMT 2017 maxv Improve our segregs model. Pass 1/3. Right now, we are saving and restoring %ds/%es each time we enter/leave the kernel. However, we let %fs/%gs live in the kernel space, and we rely on the fact that when switching to an LWP, %fs/%gs are set right away (via cpu_switchto or setregs). It has two drawbacks: we are taking care of %ds/%es while they are deprecated (useless) on 64bit LWPs, and we are restricting %fs/%gs while they still have a meaning on 32bit LWPs. Therefore, handle 32bit and 64bit LWPs differently: * 64bit LWPs use fixed segregs, which are not taken care of. * 32bit LWPs have dynamic segregs, always saved/restored. For now, only %ds and %es are changed; %fs and %gs will be in the next passes. The trapframe is constructed as usual. In INTRFASTEXIT, we restore %ds/%es depending on the %cs value. If %cs contains one of the two standard 64bit selectors, don't do anything. Otherwise, restore everything. When doing a context switch, just restore %ds/%es to their default values. On a 32bit LWP they will be overwritten by INTRFASTEXIT; on a 64bit LWP they won't be updated. In the ACPI wakeup code, restore %ds/%es to the default 64bit user value. 1.134 Thu Oct 19 18:36:31 GMT 2017 maxv Improve our segregs model. Pass 1/3. Right now, we are saving and restoring %ds/%es each time we enter/leave the kernel. However, we let %fs/%gs live in the kernel space, and we rely on the fact that when switching to an LWP, %fs/%gs are set right away (via cpu_switchto or setregs). It has two drawbacks: we are taking care of %ds/%es while they are deprecated (useless) on 64bit LWPs, and we are restricting %fs/%gs while they still have a meaning on 32bit LWPs. Therefore, handle 32bit and 64bit LWPs differently: * 64bit LWPs use fixed segregs, which are not taken care of. * 32bit LWPs have dynamic segregs, always saved/restored. For now, only %ds and %es are changed; %fs and %gs will be in the next passes. The trapframe is constructed as usual. In INTRFASTEXIT, we restore %ds/%es depending on the %cs value. If %cs contains one of the two standard 64bit selectors, don't do anything. Otherwise, restore everything. When doing a context switch, just restore %ds/%es to their default values. On a 32bit LWP they will be overwritten by INTRFASTEXIT; on a 64bit LWP they won't be updated. In the ACPI wakeup code, restore %ds/%es to the default 64bit user value. 1.129 Fri Sep 15 17:32:12 GMT 2017 maxv Declare INTRFASTEXIT as a function, so that there is only one iretq in the kernel. Then, check %rip against the address of this iretq instead of disassembling (%rip) - which could fault again, or point at some random address which happens to contain the iretq opcode. The same is true for gs below, but I'll fix that in another commit. |
| H A D | netbsd32_machdep.c | 1.132 Wed Nov 27 09:16:58 GMT 2019 rin Add support for PT_[GS]ETXMMREGS requests for COMPAT_NETBSD32 on amd64. For this purpose, PT_[GS]ETXMMREGS are added to amd64/ptrace.h. These are intended for internal usage for COMPAT_NETBSD32, and therefore not exposed to userland. Thanks to kamil, mgorny, and pgoyette for their kind review! XXX pullup to netbsd-9 1.132 Wed Nov 27 09:16:58 GMT 2019 rin Add support for PT_[GS]ETXMMREGS requests for COMPAT_NETBSD32 on amd64. For this purpose, PT_[GS]ETXMMREGS are added to amd64/ptrace.h. These are intended for internal usage for COMPAT_NETBSD32, and therefore not exposed to userland. Thanks to kamil, mgorny, and pgoyette for their kind review! XXX pullup to netbsd-9 1.120 Sun Mar 24 15:58:32 GMT 2019 maxv Disable preemption when setting PCB_COMPAT32, to prevent a context switch before cpu_fsgs_reload() finishes, otherwise we write garbage in the GDT. On NetBSD-current it is harmless, however in NetBSD-8 it might cause panics, because NetBSD-8 uses the old SegRegs model and under this model we reload %fs and %gs during switches. 1.114 Thu Dec 07 16:22:22 GMT 2017 christos Keep fs/gs the same for the signal context; otherwise calling things like __lwp_getprivate_fast() from a signal handler (that uses %gs) die. Merge context building code. 1.114 Thu Dec 07 16:22:22 GMT 2017 christos Keep fs/gs the same for the signal context; otherwise calling things like __lwp_getprivate_fast() from a signal handler (that uses %gs) die. Merge context building code. 1.102 Thu Feb 09 08:38:25 GMT 2017 maxv No, do not just copy code from i386 and expect it to work on amd64. There are several structural differences. At least two issues here: segment registers that could fault in kernel mode with userland TLS, and a non- canonical %eip on iret. Not even tested, but just obvious. By the way, I believe this function is still buggy since we don't call cpu_fsgs_reload while %fs/%gs could have been reloaded. 1.70 Mon Feb 07 03:54:45 GMT 2011 chs move macros for validating fs/gs to segments.h and use them in the linux32 code as well. 1.69 Wed Jan 26 21:44:31 GMT 2011 njoly Do mask the upper 16 bits, when sanity checking fs/gs register values. Fix my own PR/43842. 1.64 Wed Jul 07 01:14:52 GMT 2010 chs add the guts of TLS support on amd64. based on joerg's patch, reworked by me to support 32-bit processes as well. we now keep %fs and %gs loaded with the user values while in the kernel, which means we don't need to reload them when returning to user mode. 1.41 Mon May 21 08:10:38 GMT 2007 fvdl Revert fs/gs changes until I figure out issues with them. |
| /src/sys/arch/amd64/include/ | ||
| H A D | netbsd32_machdep.h | 1.25 Wed Nov 27 09:16:58 GMT 2019 rin Add support for PT_[GS]ETXMMREGS requests for COMPAT_NETBSD32 on amd64. For this purpose, PT_[GS]ETXMMREGS are added to amd64/ptrace.h. These are intended for internal usage for COMPAT_NETBSD32, and therefore not exposed to userland. Thanks to kamil, mgorny, and pgoyette for their kind review! XXX pullup to netbsd-9 1.25 Wed Nov 27 09:16:58 GMT 2019 rin Add support for PT_[GS]ETXMMREGS requests for COMPAT_NETBSD32 on amd64. For this purpose, PT_[GS]ETXMMREGS are added to amd64/ptrace.h. These are intended for internal usage for COMPAT_NETBSD32, and therefore not exposed to userland. Thanks to kamil, mgorny, and pgoyette for their kind review! XXX pullup to netbsd-9 1.9 Sun Mar 12 20:25:25 GMT 2006 cube branches: 1.9.2; Support the generation of coredumps for 32-bits binaries under COMPAT_NETBSD32. They haven't worked for 5 years. Silently agreed by the tech-kern readers. XXX sparc64 MD glue still lacking. XXX The FPU registers on i386 are not dumped correctly, according to my XXX tests. It shouldn't be much work for someone who has the slightest XXX idea of how that stuff is supposed to be laid out on i386. |
| H A D | ptrace.h | 1.19 Wed Nov 27 09:16:58 GMT 2019 rin Add support for PT_[GS]ETXMMREGS requests for COMPAT_NETBSD32 on amd64. For this purpose, PT_[GS]ETXMMREGS are added to amd64/ptrace.h. These are intended for internal usage for COMPAT_NETBSD32, and therefore not exposed to userland. Thanks to kamil, mgorny, and pgoyette for their kind review! XXX pullup to netbsd-9 1.19 Wed Nov 27 09:16:58 GMT 2019 rin Add support for PT_[GS]ETXMMREGS requests for COMPAT_NETBSD32 on amd64. For this purpose, PT_[GS]ETXMMREGS are added to amd64/ptrace.h. These are intended for internal usage for COMPAT_NETBSD32, and therefore not exposed to userland. Thanks to kamil, mgorny, and pgoyette for their kind review! XXX pullup to netbsd-9 1.2 Sun Mar 12 20:25:25 GMT 2006 cube branches: 1.2.16; 1.2.20; 1.2.22; Support the generation of coredumps for 32-bits binaries under COMPAT_NETBSD32. They haven't worked for 5 years. Silently agreed by the tech-kern readers. XXX sparc64 MD glue still lacking. XXX The FPU registers on i386 are not dumped correctly, according to my XXX tests. It shouldn't be much work for someone who has the slightest XXX idea of how that stuff is supposed to be laid out on i386. |
| /src/sys/arch/sun2/dev/ | ||
| H A D | if_ec.c | 1.34 Wed May 29 10:07:29 GMT 2019 msaitoh branches: 1.34.4; Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future. 1.29 Tue Jun 26 06:47:59 GMT 2018 msaitoh branches: 1.29.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.29 Tue Jun 26 06:47:59 GMT 2018 msaitoh branches: 1.29.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. 1.20 Thu Feb 02 19:43:00 GMT 2012 tls branches: 1.20.6; 1.20.20; Entropy-pool implementation move and cleanup. 1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64. |
Completed in 141 milliseconds