aboutsummaryrefslogtreecommitdiff
path: root/share/examples/kld
Commit message (Collapse)AuthorAgeFilesLines
* Remove "All Rights Reserved" from FreeBSD Foundation copyrightsEd Maste2024-09-071-1/+0
| | | | | | | | | | These ones were unambiguous cases where the Foundation was the only listed copyright holder. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5c2bc3db201a4fe8d7911cf816bea104d5dc2138) (cherry picked from commit f06d322e9d925ab56a4aa8210a67637d4d341ab6)
* Remove $FreeBSD$: one-line bare tagWarner Losh2023-08-234-5/+0
| | | | | | | Remove /^\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit 05248206f720)
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-2314-14/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit d0b2dbfa0ecf)
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-233-6/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in main: (cherry picked from commit 1d386b48a555)
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-237-14/+0
| | | | | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b3e7694832e8)
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-07-252-2/+2
| | | | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-NetBSD 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 (cherry picked from commit b61a573019428cbdc38ed03be9ecd2482011ea66)
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-07-254-4/+4
| | | | | | | | | | | 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 (cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
* Fix build for KLD dyn_sysctl exampleOleksandr Tymoshenko2019-03-161-4/+2
| | | | | | | | | | | | Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE PR: 236139 Submitted by: Andrew Reiter <arr@watson.org> MFC after: 1 week Notes: svn path=/head/; revision=345220
* example cdev: use make_dev_sEitan Adler2018-01-262-7/+14
| | | | | | | | | Make use of make_dev_s in the example cdev. While here, fix warnings. Reviewed by: rpokala Notes: svn path=/head/; revision=328428
* share and pc-sysinstall: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2710-4/+24
| | | | | | | | | | | | | | | | | | 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. Commit these apart because compile testing doesn't guarantee I didn't made some nasty mistake. No functional change intended. Notes: svn path=/head/; revision=326275
* Update share/examples/* to properly install /usr/share/examples.Glen Barber2016-05-1013-0/+26
| | | | | | | | | | | | | As result of this, a new examples package is now created. Note, this is only effective with 'SHARED=copies' (the default), as the 'SHARED=symlinks' mechanism will create a symlink to the source tree version of the file(s). Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=299293
* share: minor spelling fixes.Pedro F. Giffuni2016-05-011-1/+1
| | | | | | | | | Mostly comments but these tend to be user-visible. MFC after: 2 weeks Notes: svn path=/head/; revision=298882
* This is the much-discussed major upgrade to the random(4) device, known to ↵Mark Murray2014-10-301-15/+39
| | | | | | | | | | | | | | | | | | | | | | you all as /dev/random. This code has had an extensive rewrite and a good series of reviews, both by the author and other parties. This means a lot of code has been simplified. Pluggable structures for high-rate entropy generators are available, and it is most definitely not the case that /dev/random can be driven by only a hardware souce any more. This has been designed out of the device. Hardware sources are stirred into the CSPRNG (Yarrow, Fortuna) like any other entropy source. Pluggable modules may be written by third parties for additional sources. The harvesting structures and consequently the locking have been simplified. Entropy harvesting is done in a more general way (the documentation for this will follow). There is some GREAT entropy to be had in the UMA allocator, but it is disabled for now as messing with that is likely to annoy many people. The venerable (but effective) Yarrow algorithm, which is no longer supported by its authors now has an alternative, Fortuna. For now, Yarrow is retained as the default algorithm, but this may be changed using a kernel option. It is intended to make Fortuna the default algorithm for 11.0. Interested parties are encouraged to read ISBN 978-0-470-47424-2 "Cryptography Engineering" By Ferguson, Schneier and Kohno for Fortuna's gory details. Heck, read it anyway. Many thanks to Arthur Mesh who did early grunt work, and who got caught in the crossfire rather more than he deserved to. My thanks also to folks who helped me thresh this out on whiteboards and in the odd "Hallway track", or otherwise. My Nomex pants are on. Let the feedback commence! Reviewed by: trasz,des(partial),imp(partial?),rwatson(partial?) Approved by: so(des) Notes: svn path=/head/; revision=273872
* NO_MAN= has been deprecated in favor of MAN= for some time, go aheadWarner Losh2014-04-132-2/+2
| | | | | | | | | and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. Notes: svn path=/head/; revision=264400
* Snapshot. This passes the build test, but has not yet been finished or debugged.Mark Murray2013-10-041-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Contains: * Refactor the hardware RNG CPU instruction sources to feed into the software mixer. This is unfinished. The actual harvesting needs to be sorted out. Modified by me (see below). * Remove 'frac' parameter from random_harvest(). This was never used and adds extra code for no good reason. * Remove device write entropy harvesting. This provided a weak attack vector, was not very good at bootstrapping the device. To follow will be a replacement explicit reseed knob. * Separate out all the RANDOM_PURE sources into separate harvest entities. This adds some secuity in the case where more than one is present. * Review all the code and fix anything obviously messy or inconsistent. Address som review concerns while I'm here, like rename the pseudo-rng to 'dummy'. Submitted by: Arthur Mesh <arthurmesh@gmail.com> (the first item) Notes: svn path=/projects/random_number_generator/; revision=256042
* Remove short-lived idea; thread to harvest (eg) RDRAND enropy into the usual ↵Mark Murray2013-08-301-19/+1
| | | | | | | | | harvest queues. It was a nifty idea, but too heavyweight. Submitted by: Arthur Mesh <arthurmesh@gmail.com> Notes: svn path=/projects/random_number_generator/; revision=255075
* 1) example (partially humorous random_adaptor, that I call "EXAMPLE")Mark Murray2013-08-243-1/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * It's not meant to be used in a real system, it's there to show how the basics of how to create interfaces for random_adaptors. Perhaps it should belong in a manual page 2) Move probe.c's functionality in to random_adaptors.c * rename random_ident_hardware() to random_adaptor_choose() 3) Introduce a new way to choose (or select) random_adaptors via tunable "rngs_want" It's a list of comma separated names of adaptors, ordered by preferences. I.e.: rngs_want="yarrow,rdrand" Such setting would cause yarrow to be preferred to rdrand. If neither of them are available (or registered), then system will default to something reasonable (currently yarrow). If yarrow is not present, then we fall back to the adaptor that's first on the list of registered adaptors. 4) Introduce a way where RNGs can play a role of entropy source. This is mostly useful for HW rngs. The way I envision this is that every HW RNG will use this functionality by default. Functionality to disable this is also present. I have an example of how to use this in random_adaptor_example.c (see modload event, and init function) 5) fix kern.random.adaptors from kern.random.adaptors: yarrowpanicblock to kern.random.adaptors: yarrow,panic,block 6) add kern.random.active_adaptor to indicate currently selected adaptor: root@freebsd04:~ # sysctl kern.random.active_adaptor kern.random.active_adaptor: yarrow Submitted by: Arthur Mesh <arthurmesh@gmail.com> Notes: svn path=/projects/random_number_generator/; revision=254784
* Fix typo.Gleb Smirnoff2013-07-171-1/+1
| | | | | | | Submitted by: ae Notes: svn path=/head/; revision=253421
* Improve example, so that it doesn't dump core when example moduleGleb Smirnoff2013-07-171-2/+6
| | | | | | | isn't loaded. Notes: svn path=/head/; revision=253420
* Revert previous commit...Kevin Lo2012-10-102-2/+2
| | | | | | | Pointyhat to: kevlo (myself) Notes: svn path=/head/; revision=241394
* Prefer NULL over 0 for pointersKevin Lo2012-10-092-2/+2
| | | | Notes: svn path=/head/; revision=241370
* Minor style(9) improvementEd Maste2012-08-071-3/+3
| | | | Notes: svn path=/head/; revision=239130
* Uuencode the sample "binary" firmware image file (instead of explicitlyEd Maste2011-04-013-23/+20
| | | | | | | | | | adding \0 bytes). This is a technique that would be used in an actual driver and is more suitable as an example. Reviewed by: mlaier Notes: svn path=/head/; revision=220256
* Avoid having a binary file in our source tree and instead create it atEd Maste2011-03-312-0/+4
| | | | | | | | build time, to avoid possible grief maintaining FreeBSD source in alternative version control tools. Notes: svn path=/head/; revision=220205
* Add an example Khelp module, which will be referenced in the forthcoming KhelpLawrence Stewart2011-02-114-1/+172
| | | | | | | | | | | | documentation. Sponsored by: FreeBSD Foundation Discussed with: David Hayes <dahayes at swin edu au> MFC after: 5 weeks X-MFC with: r216615 Notes: svn path=/head/; revision=218545
* Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.Matthew D Fleming2011-01-191-2/+3
| | | | Notes: svn path=/head/; revision=217566
* Fix the syscall module name after r205320.Konstantin Belousov2010-06-151-1/+1
| | | | | | | | Submitted by: Vladislav Movchan <vladislav.movchan gmail com> MFC after: 1 week Notes: svn path=/head/; revision=209199
* Conform style.Makefile(5) and replace = and += with ?=, which lets you toWojciech A. Koszek2010-02-012-2/+2
| | | | | | | | | override WARNS. Reported by: <marius@nuenneri.ch> and uqs@ Notes: svn path=/head/; revision=203349
* Include unistd.h for read(), write() and stdlib.h for exit().Wojciech A. Koszek2010-01-182-3/+6
| | | | | | | Bump WARNS to 5 while being here. Notes: svn path=/head/; revision=202603
* Small cleanup while being here:Wojciech A. Koszek2010-01-182-14/+6
| | | | | | | | | | | | | - sort includes - remove usage(), since it seems to come from older version of the KLD - remove unnecessary variable - mark argc/argv as unused Bring WARNS = 5 to the Makefile. Notes: svn path=/head/; revision=202602
* Include stdlib.h for exit(3) and unistd.h for syscall(2). This makesWojciech A. Koszek2010-01-181-0/+2
| | | | | | | this program to compile cleanly. Notes: svn path=/head/; revision=202601
* Small fix for making this KLD to compile.Wojciech A. Koszek2010-01-181-1/+1
| | | | Notes: svn path=/head/; revision=202600
* Where if not in examples we should follow style(9)?Pawel Jakub Dawidek2009-06-032-34/+30
| | | | Notes: svn path=/head/; revision=193374
* Include the <sys/sysproto.h> header which includes the prerequisite headerKevin Lo2007-07-221-0/+1
| | | | | | | | | for AUE_NULL. Approved by: re (kensmith) Notes: svn path=/head/; revision=171536
* We don't have d_maj field in cdevsw structure anymore.Maxim Sobolev2006-05-191-8/+1
| | | | Notes: svn path=/head/; revision=158751
* Style.Ruslan Ermilov2006-03-151-2/+2
| | | | Notes: svn path=/head/; revision=156733
* firmware(9) is a subsystem to load binary data into the kernel via aMax Laier2006-01-297-1/+114
| | | | | | | | | | | | | specially crafted module. There are several handrolled sollutions to this problem in the tree already which will be replaced with this. They include iwi(4), ipw(4), ispfw(4) and digi(4). No objection from: arch MFC after: 2 weeks X-MFC after: some drivers have been converted Notes: svn path=/head/; revision=154974
* Start the dreaded NOFOO -> NO_FOO conversion.Ruslan Ermilov2004-12-212-2/+2
| | | | | | | OK'ed by: core Notes: svn path=/head/; revision=139103
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+2
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* According to module(9), when command is unrecognized, the module shouldPawel Jakub Dawidek2004-08-303-3/+3
| | | | | | | return EOPNOTSUPP. Notes: svn path=/head/; revision=134520
* Update for struct cdevsw and dev_t -> struct cdev * changes, plus oneTim J. Robbins2004-07-162-7/+9
| | | | | | | 64-bit portability fix. Notes: svn path=/head/; revision=132247
* Style.Maxim Konovalov2004-06-091-5/+4
| | | | Notes: svn path=/head/; revision=130276
* Remove duplicate #include.Lukas Ertl2004-06-091-1/+0
| | | | | | | | PR: misc/67748 Submitted by: bugghy <bugghy@phenix.rootshell.be> Notes: svn path=/head/; revision=130272
* Fix the cdev kld example.Martin Blapp2003-08-034-23/+14
| | | | | | | | | PR: 52954 Submitted by: Priit Piipuu <priit.piipuu@mail.ee> Reviewed by: phk Notes: svn path=/head/; revision=118385
* Update the SUBDIR hacks to work with the current bsd.subdir.mk.Ruslan Ermilov2002-07-112-73/+4
| | | | Notes: svn path=/head/; revision=99771
* Update the KLD examples so they will work with current.Andrew R. Reiter2001-11-132-4/+10
| | | | | | | Reviewed: jhb Notes: svn path=/head/; revision=86316
* Style.Ruslan Ermilov2001-09-181-83/+8
| | | | Notes: svn path=/head/; revision=83609
* Style.Ruslan Ermilov2001-09-181-13/+3
| | | | Notes: svn path=/head/; revision=83608
* Removed unneeded stuff.Ruslan Ermilov2001-05-181-12/+0
| | | | Notes: svn path=/head/; revision=76814
* Unbreak by syncing with changes in <sys/sysctl.h> macros.Andrzej Bialecki2001-02-101-12/+12
| | | | Notes: svn path=/head/; revision=72336