(no commit message)
[ikiwiki.git] / docs / developer / alexh_todo / index.mdwn
CommitLineData
b475db1d 1## Note: this is my personal todo and ideas list (alexh@)
53af51d2 2
d2e33566 3* add a communication channel mechanism to dm
4 - essentially a way to send messages and receive responses to dm target instances
5
38202188 6* cryptdisks
7 - Improve to support external scripts/programs providing passphrases
8
e4eadd94 9* dm_target_crypt
5d279a75 10 - Look at plain64 iv support, what it implies vs plain.
e4eadd94 11 - Think about benbi iv support
e4eadd94 12
6e280d9e 13* Add TrueCrypt support
14 - Simply add a userland tool that sets dm_target_crypt up with the right parameters, extracted from the TrueCrypt header
5d279a75 15 - https://github.com/bwalex/tc-play <- done!
16 - needs OpenSSL with XTS support; probably next major release
6e280d9e 17
e09e6796 18* Update cryptsetup
19
744c3358 20* Update opencrypto
21 - http://www.openbsd.org/cgi-bin/cvsweb/src/sys/crypto/
5d279a75 22 - think about support for other ciphers, such as Serpent and Twofish
744c3358 23
e09e6796 24* Port hwpmc & dig into (boot-up) performance
25
1bf667d1 26* linuxulator
6c260381 27 - port to x86_64
28 - separate out common arch parts (linprocfs, for example)
53af51d2 29
e09e6796 30* Fix the crash analysis script (or rather the programs it calls [some segfault])
0d62372b 31
32* route show
53af51d2 33
6c260381 34* Take a look at updating lvm/dm/libdm
1bf667d1 35
1bf667d1 36* sync up vr
37 o Added VT6105M specific register definitions. VT6105M has the
38 following hardware capabilities.
39 - Tx/Rx IP/TCP/UDP checksum offload.
40 - VLAN hardware tag insertion/extraction. Due to lack of information
41 for getting extracted VLAN tag in Rx path, VLAN hardware support
42 was not implemented yet.
43 - CAM(Content Addressable Memory) based 32 entry perfect multicast/
44 VLAN filtering.
45 - 8 priority queues.
46 o Implemented CAM based 32 entry perfect multicast filtering for
47 VT6105M. If number of multicast entry is greater than 32, vr(4)
48 uses traditional hash based filtering.
49
6c260381 50* rip out the disk partitioning from the disk subsystem and implement it in a more general fashion
51 - crazy idea: as dm targets with an auto-configuration option!
52
6c260381 53* sync some more opencrypto from OpenBSD
1bf667d1 54
55* ATA (automatic) spindown (see FreeBSD current)
0d62372b 56
57* Update callout
58 http://svn.freebsd.org/viewvc/base?view=revision&revision=127969
59
60* inv ctxsw rusage
61 - see irc logs
62 - some incorrect accounting going on, don't remember details :)
63
64* unionfs update
65 - make it work without whiteout
66
67
68
b475db1d 69###Boring:
1bf667d1 70
1bf667d1 71
72* RedZone, a buffer corruption protection for the kernel malloc(9) facility has been implemented.
73 - This detects both buffer underflows and overflows at runtime on free(9) and realloc(9),
74 and prints backtraces from where memory was allocated and from where it was freed.
75 - see irc log below.
76
77* port uart driver (?)
78
0d62372b 79* port wscons (?) or update syscons
80 - probably way too much effort (wscons)
81
82
83* port usb4bsd
84 - wrapper is included for userland; should be easy to port
85 - http://svn.freebsd.org/viewvc/base?view=revision&revision=184610
86 - http://turbocat.net/~hselasky/usb4bsd/
87 - http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/shortlog/refs/heads/usb2
88
1bf667d1 89* suspend/resume for SMP x86
90 - http://lists.freebsd.org/pipermail/freebsd-acpi/2008-May/004879.html
91
1bf667d1 92* AMD64 suspend/resume
93 - http://svn.freebsd.org/viewvc/base?view=revision&revision=189903
6c260381 94
95
6c260381 96* text dumps
97
1bf667d1 98
1bf667d1 99
100[alexh@leaf:~/home] $ roundup-server -p 8080 bt=bugtracker
101
53af51d2 102<pre>
1bf667d1 103-05:48- : dillon@: no, double frees to the object cache are nasty. It can't detect them. the object
104 winds up in the magazine array twice
105-05:48- : dillon@: (and possibly different magazines, too)
106-05:49- : alexh@: can't I just write some magic to a free object on the first objcache_put and check
107 if it's there on objcache_put?
108-05:49- : alexh@: and clear it on objcache_get, anyways
109-05:50- : dillon@: no, because the object is still may have live-initialized fields
110-05:50- : dillon@: because it hasn't been dtor'ed yet (one of the features of the objcache, to avoid
111 having to reinitialize objects every time)
112-05:50- : dillon@: the mbuf code uses that feature I think, probably other bits too
113-05:51- : dillon@: theoretically we could allocate slightly larger objects and store a magic number at
114 offset [-1] or something like that, but it gets a little iffy doing that
115-05:52- : dillon@: the objcache with the objcache malloc default could probably do something like that
116 I guess.
117-05:52- : dillon@: I don't consider memory tracking to be a huge issue w/ dragonfly, though I like the
118 idea of being able to do it. It is a much bigger problem in FreeBSD due to the
119 large number of committers
120
121
122-05:55- : dillon@: For the slab allocator you may be able to do something using the Zone header.
123-05:55- : dillon@: the slab allocator in fact I think already has optional code to allocate a tracking
124 bitmap to detect double-frees
125-05:56- : dillon@: sorry, I just remembered the bit about the power-of-2 allocations
126-05:56- : dillon@: for example, power-of-2-sized allocations are guaranteed not only to be aligned on
127 that particular size boundary, but also to not cross a PAGE_BOUNDARY (unless the
128 size is > PAGE_SIZE)
129-05:57- : dillon@: various subsystems such as AHCI depend on that behavior to allocate system
130 structures for which the chipsets only allow one DMA descriptor.
131-05:59- : alexh@: http://svn.freebsd.org/viewvc/base/head/sys/vm/redzone.c?view=markup&pathrev=155086
132 < this is redzone. it basically calls redzone_addr_ntor() to increase the size in
133 malloc(), and then redzone_setup() just before returning the chunk
134-06:02- : dillon@: jeeze. that looks horrible.
135-06:03- : alexh@: I don't quite get that nsize + redzone_roundup(nsize)
136-06:03- : dillon@: I don't get it either. It would completely break power-of-2-sized alignments in the
137 original request
138-06:04- : dillon@: hmmm. well, no it won't break them, but the results are oging to be weird
139-06:04- : dillon@: ick.
140
141-06:15- : dillon@: if the original request is a power of 2 the redzone adjusted request must be a power
142 of 2
143-06:15- : dillon@: basically
144-06:16- : dillon@: so original request 64, redzone request must be 128, 256, 512, 1024, etc.
145-06:16- : alexh@: yah, k
146-06:16- : dillon@: original request 32, current redzone code would be 32+128 which is WRONG.
147-06:16- : alexh@: how big is PAGE_SIZE ?
148-06:16- : dillon@: 4096 on i386 and amd64
149-06:17- : alexh@: and one single malloc can't be bigger than that?
150-06:17- : dillon@: I'm fairly sure our kmalloc does not guarantee alignment past PAGE_SIZE (that is,
151 the alignment will be only PAGE_SIZE eve if you allocate PAGE_SIZE*2)
152-06:17- : dillon@: a single kmalloc can be larger then PAGE_SIZe
153-06:18- : dillon@: it will use the zone up to around 1/2 the zone size (~64KB I think), after which it
154 allocates pages directly with the kernel kvm allocator
155-06:18- : dillon@: if you look at the kmalloc code you will see the check for oversized allocations
156-06:18- : alexh@: yah, saw that
157-06:18- : alexh@: "handle large allocations directly"
158-06:19- : alexh@: not sure how to do this, really, as the size is obviously also changed in
159 kmem_slab_alloc
160-06:20- : alexh@: but kmem_slab_alloc isn't called always, is it?
161-06:20- : alexh@: only if the req doesn't fit into an existant zone
162-06:20- : dillon@: right
163-06:20- : dillon@: you don't want to redzone the zone allocation itself
53af51d2 164
165</pre>