OpenBSD CVS

CVS log for src/sys/uvm/uvm_swap_encrypt.c


[BACK] Up to [local] / src / sys / uvm

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Fri Mar 12 14:15:49 2021 UTC (3 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

spelling

ok mpi@

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jan 9 21:00:29 2021 UTC (3 years, 5 months ago) by gnezdo
Branch: MAIN
Changes since 1.22: +3 -2 lines
Diff to previous 1.22 (colored)

Enforce range with sysctl_int_bounded in swap_encrypt_ctl

OK millert@

Revision 1.22 / (download) - annotate - [select for diffs], Wed May 6 04:00:10 2015 UTC (9 years, 1 month ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.21: +8 -1 lines
Diff to previous 1.21 (colored)

make SWAP_KEY_GET symmetrical with SWAP_KEY_PUT by having it call
a function in uvm_swap_encrypt.c instead of doing stuff inline.

lets me remove an extern from the header too.

ok kettenis@

Revision 1.21 / (download) - annotate - [select for diffs], Mon May 4 10:21:15 2015 UTC (9 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

reduce the scope of things that include uvm_swap_encrypt.h.

uvm_meter.c needs it to route the sysctl, uvm_swap.c needs it to
use the functionality, and uvm_swap_encrypt.c needs it to for obvious
reasons. userland sysctl already includes it explicitely.

everything else doesnt and shouldnt care.

ok miod@

Revision 1.20 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:53 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
Changes since 1.19: +1 -2 lines
Diff to previous 1.19 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.19 / (download) - annotate - [select for diffs], Tue Nov 18 02:37:31 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.18: +1 -2 lines
Diff to previous 1.18 (colored)

move arc4random prototype to systm.h. more appropriate for most code
to include that than rdnvar.h. ok deraadt dlg

Revision 1.18 / (download) - annotate - [select for diffs], Sun Sep 14 14:17:27 2014 UTC (9 years, 8 months ago) by jsg
Branch: MAIN
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

remove uneeded proc.h includes
ok mpi@ kspillner@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jan 11 15:42:06 2011 UTC (13 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

for key material that is being being discarded, convert bzero() to
explicit_bzero() where required
ok markus mikeb

Revision 1.16 / (download) - annotate - [select for diffs], Tue Apr 20 22:05:44 2010 UTC (14 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

remove proc.h include from uvm_map.h.  This has far reaching effects, as
sysctl.h was reliant on this particular include, and many drivers included
sysctl.h unnecessarily.  remove sysctl.h or add proc.h as needed.
ok deraadt

Revision 1.15 / (download) - annotate - [select for diffs], Mon Mar 23 22:07:41 2009 UTC (15 years, 2 months ago) by oga
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.14: +1 -14 lines
Diff to previous 1.14 (colored)

turn a for (i = 0; i < size; i++) arc4random(); loop into arc4random_buf().

Since that function is now so small (2 lines), inline it into it's only user.

Shaves some bytes (104 on amd64).

ok deraadt@, blambert@. djm@ liked an earlier diff.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Mar 26 16:06:46 2005 UTC (19 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

encrypt swap by default.  cheap, and why not.  can be disabled by people
who have machines that hit swap a lot.  decided after survey of developers,
we found that most turned this on.  ok various

Revision 1.13 / (download) - annotate - [select for diffs], Mon Nov 29 23:01:37 2004 UTC (19 years, 6 months ago) by hshoexer
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.12: +15 -19 lines
Diff to previous 1.12 (colored)

ansi + some knf, no binary change

ok deraadt

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Thu Feb 19 11:01:45 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.1.2.5: +14 -11 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.12 / (download) - annotate - [select for diffs], Fri Dec 26 10:04:49 2003 UTC (20 years, 5 months ago) by markus
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.11: +15 -12 lines
Diff to previous 1.11 (colored)

- use 1/2 space for rijndael context in ipsec
- rijndael_set_key_enc_only()  sets up context for encryption only
- rijndael_set_key() always sets up full context
- rijndaelKeySetupDec() gets back original protoype
- uvm: use _enc_only() interface
with hshoexer@, ok deraadt@

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Fri Mar 28 00:08:48 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.1.2.4: +6 -6 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

Sync the SMP branch with 3.3

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:50 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.10: +7 -7 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

sync to -current

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jul 2 19:38:55 2002 UTC (21 years, 11 months ago) by nate
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.10: +7 -7 lines
Diff to previous 1.10 (colored)

inital -> initial

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:02:31 2001 UTC (22 years, 7 months ago) by niklas
Branch: SMP
Changes since 1.1.2.3: +1 -3 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

merge in -current

Revision 1.10 / (download) - annotate - [select for diffs], Tue Nov 6 19:53:21 2001 UTC (22 years, 7 months ago) by miod
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_1_BASE, OPENBSD_3_1
Branch point for: UBC
Changes since 1.9: +1 -3 lines
Diff to previous 1.9 (colored)

Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.
(Look ma, I might have broken the tree)

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:32:14 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.1.2.2: +7 -7 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.9 / (download) - annotate - [select for diffs], Fri Aug 24 15:59:42 2001 UTC (22 years, 9 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.8: +6 -6 lines
Diff to previous 1.8 (colored)

switch to the optimised AES reference code from
http://www.esat.kuleuven.ac.be/~rijmen/rijndael/rijndael-fst-3.0.zip
the same code is used by ssh, so please make sure to update
usr.sbin/ssh/rijndael.c if you change this code.
tested on sparc (jason) and with swap encryption (me); ok deraadt@, provos@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 6 22:34:44 2001 UTC (22 years, 10 months ago) by mickey
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

remove vm_conf.h; art@ ok

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Mon May 14 22:47:48 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.1.2.1: +179 -62 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jan 29 02:07:49 2001 UTC (23 years, 4 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.6: +2 -0 lines
Diff to previous 1.6 (colored)

$OpenBSD$

Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 7 20:15:28 2000 UTC (23 years, 9 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Convert bzero to memset(X, 0..) and bcopy to memcpy.
This is to match (make diffs smaller) the code in NetBSD.
new gcc inlines those functions, so this could also be a performance win.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 14 16:51:55 2000 UTC (24 years ago) by provos
Branch: MAIN
Changes since 1.4: +43 -0 lines
Diff to previous 1.4 (colored)

put in own ctl level for swapencrypt.

Revision 1.4 / (download) - annotate - [select for diffs], Sat May 27 21:06:08 2000 UTC (24 years ago) by provos
Branch: MAIN
Changes since 1.3: +135 -69 lines
Diff to previous 1.3 (colored)

use rijndael instead of blowfish because of faster key setup.
break swap paritions into sections, each section has own
encryption key.  if a section's key becomes unreferenced, erase it.

Revision 1.3 / (download) - annotate - [select for diffs], Fri May 26 15:18:29 2000 UTC (24 years ago) by provos
Branch: MAIN
Changes since 1.2: +10 -4 lines
Diff to previous 1.2 (colored)

use encrypted blocknumber as IV

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Thu Mar 2 07:04:48 2000 UTC (24 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

Sync with -current

Revision 1.2 / (download) - annotate - [select for diffs], Tue Feb 29 11:16:45 2000 UTC (24 years, 3 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

<crypto/blf.h>

Revision 1.1 / (download) - annotate - [select for diffs], Thu Dec 30 18:21:55 1999 UTC (24 years, 5 months ago) by provos
Branch: MAIN
CVS Tags: SMP_BASE
Branch point for: SMP

swap encryption for UVM, option UVM_SWAP_ENCRYPT.  needs to be enabled
via sysctl.
Pages are encrypted with the Blowfish encryption algorithm, the key
is initialized randomly on first swap out, ensuring that entropy has
accumulated in the kernel randomness pool.  Eventually, swap encryption
will be decided on a process by process basis, e.g. a process that reads from
a cryptographic filesystem will enable swap encrypt for its pages. okay
art@ and deraadt@.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.