summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_sysctl.c
AgeCommit message (Collapse)Author
2024-05-20linux(4): Add const qualifier to the value parameter of function handle_string()Zhenlei Huang
The content that `value` point to is not going to be altered by function handle_string(). MFC after: 1 week
2023-08-18linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743Dmitry Chagin
2023-08-16sys: Remove $FreeBSD$: one-line .c patternWarner Losh
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-05-12spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
2023-02-14linux(4): Cleanup includes under compat/linuxDmitry Chagin
Cleanup unneeded includes, sort the rest according to style(9). No functional changes. MFC after: 2 weeks
2023-02-12linux(4): Get rid of the opt_compat.h include.Dmitry Chagin
Since e013e369 COMPAT_LINUX, COMPAT_LINUX32 build options are removed, so include of opt_compat.h is no more needed. MFC after: 2 weeks
2022-04-19linux: plug a set-but-not-used varMateusz Guzik
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-05-05linux: remove redundant SDT tracepointsEdward Tomasz Napierala
Remove all the 'entry' and 'return' probes; they clutter up the source and are redundant to FBT. Reviewed By: dchagin Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30040
2018-06-25Quiet unused fn warning for linuxulator w/o legacy syscallsEd Maste
Sponsored by: Turing Robotic Industries Notes: svn path=/head/; revision=335644
2018-06-15linuxulator: do not include legacy syscalls on arm64Ed Maste
Existing linuxulator platforms (i386, amd64) support legacy syscalls, such as non-*at ones like open, but arm64 and other new platforms do not. Wrap these in #ifdef LINUX_LEGACY_SYSCALLS, #defined in the MD linux.h files. We may need finer grained control in the future but this is sufficient for now. Reviewed by: andrew Sponsored by: Turing Robotic Industries Differential Revision: https://reviews.freebsd.org/D15237 Notes: svn path=/head/; revision=335201
2018-02-16Rationalize license text on Linuxolator filesEd Maste
Many licenses on Linuxolator files contained small variations from the standard FreeBSD license text. To avoid license proliferation switch to the standard 2-clause FreeBSD license for those files where I have permission from each of the listed copyright holders. Additional files waiting on permission from others are listed in review D14210. Approved by: kan, marcel, sos, rdivacky MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=329370
2017-11-27sys/compat: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326266
2015-05-24Where possible we will use M_LINUX malloc(9) type.Dmitry Chagin
Move M_FUTEX defines to the linux_common.ko. Differential Revision: https://reviews.freebsd.org/D1077 Reviewed by: emaste Notes: svn path=/head/; revision=283427
2013-11-25- For kernel compiled only with KDTRACE_HOOKS and not any lock debuggingAttilio Rao
option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined version of the releasing functions for mutex, rwlock and sxlock. Failing to do so skips the lockstat_probe_func invokation for unlocking. - As part of the LOCKSTAT support is inlined in mutex operation, for kernel compiled without lock debugging options, potentially every consumer must be compiled including opt_kdtrace.h. Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES is linked there and it is only used as a compile-time stub [0]. [0] immediately shows some new bug as DTRACE-derived support for debug in sfxge is broken and it was never really tested. As it was not including correctly opt_kdtrace.h before it was never enabled so it was kept broken for a while. Fix this by using a protection stub, leaving sfxge driver authors the responsibility for fixing it appropriately [1]. Sponsored by: EMC / Isilon storage division Discussed with: rstone [0] Reported by: rstone [1] Discussed with: philip Notes: svn path=/head/; revision=258541
2013-01-29Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.hJohn Baldwin
by moving bits that are MI out into headers in compat/linux. Reviewed by: Chagin Dmitry dmitry | gmail MFC after: 2 weeks Notes: svn path=/head/; revision=246085
2012-05-05- >500 static DTrace probes for the linuxulatorAlexander Leidinger
- DTrace scripts to check for errors, performance, ... they serve mostly as examples of what you can do with the static probe;s with moderate load the scripts may be overwhelmed, excessive lock-tracing may influence program behavior (see the last design decission) Design decissions: - use "linuxulator" as the provider for the native bitsize; add the bitsize for the non-native emulation (e.g. "linuxuator32" on amd64) - Add probes only for locks which are acquired in one function and released in another function. Locks which are aquired and released in the same function should be easy to pair in the code, inter-function locking is more easy to verify in DTrace. - Probes for locks should be fired after locking and before releasing to prevent races (to provide data/function stability in DTrace, see the man-page of "dtrace -v ..." and the corresponding DTrace docs). Notes: svn path=/head/; revision=235063
2006-03-19Unbreak COMPAT_LINUX32 option support on amd64.Ruslan Ermilov
Broken by: netchild Notes: svn path=/head/; revision=156874
2006-03-18Fixup some problems in my previous commit (COMPAT_43).Alexander Leidinger
Pointyhat to: netchild Notes: svn path=/head/; revision=156850
2006-03-18Get rid of the need of COMPAT_43 in the linuxolator.Alexander Leidinger
Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz> Obtained from: DragonFly (some parts) Notes: svn path=/head/; revision=156842
2005-01-14Match the LINUX32's style with existing styleDavid E. O'Brien
Submitted by: Jung-uk Kim <jkim@niksun.com> Use positive, not negative logic. Notes: svn path=/head/; revision=140214
2004-08-16Changes to MI Linux emulation code necessary to run 32-bit Linux binariesTim J. Robbins
on AMD64, and the general case where the emulated platform has different size pointers than we use natively: - declare certain structure members as l_uintptr_t and use the new PTRIN and PTROUT macros to convert to and from native pointers. - declare some structures __packed on amd64 when the layout would differ from that used on i386. - include <machine/../linux32/linux.h> instead of <machine/../linux/linux.h> if compiling with COMPAT_LINUX32. This will need to be revisited before 32-bit and 64-bit Linux emulation support can coexist in the same kernel. - other small scattered changes. This should be a no-op on i386 and Alpha. Notes: svn path=/head/; revision=133816
2003-06-10Use __FBSDID().David E. O'Brien
Notes: svn path=/head/; revision=116173
2003-03-03Clean up whitespace and remove register keyword.Dag-Erling Smørgrav
Notes: svn path=/head/; revision=111798
2003-03-03More caddr_t removal, in conjunction with copy{in,out}(9) this time.Dag-Erling Smørgrav
Also clean up some egregious casts and incorrect use of sizeof. Notes: svn path=/head/; revision=111797
2003-02-19Back out M_* changes, per decision of the TRB.Warner Losh
Approved by: trb Notes: svn path=/head/; revision=111119
2003-01-21Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
2003-01-02Add function linux_msg() for regulating output from the linux emulationAlfred Perlstein
code, make the emulator use it. Rename unsupported_msg() to unimplemented_syscall(). Rename some arguments for clarity Fixup grammar. Requested by: bde Notes: svn path=/head/; revision=108541
2002-09-24Back out last commit. Linux uses the old 4.3BSD sockaddr format.Jonathan Mini
Notes: svn path=/head/; revision=103886
2002-09-23Don't use compatability syscall wrappers in emulation code.Jonathan Mini
This is needed for the COMPAT_FREEBSD3 option split. Reviewed by: alfred, jake Notes: svn path=/head/; revision=103839
2002-09-05Include <sys/malloc.h> instead of depending on namespace pollution 2Bruce Evans
layers deep in <sys/proc.h> or <sys/vnode.h>. Removed unused includes. Sorted includes. Notes: svn path=/head/; revision=102954
2002-09-01Use the new kern_* functions to avoid the need to store argumentsIan Dowse
in the stack gap. This converts most VFS and signal related system calls, as well as select(). Discussed on: -arch Approved by: marcel Notes: svn path=/head/; revision=102814
2001-09-12KSE Milestone 2Julian Elischer
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
2001-09-08Round of cleanups and enhancements. These include (in random order):Marcel Moolenaar
o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse. Notes: svn path=/head/; revision=83221