1
0
Fork 0
alistair23-linux/Documentation
Eric Biggers 03d66cfa2a crypto: doc - improve the skcipher API example code
Rewrite the skcipher API example, changing it to encrypt a buffer with
AES-256-XTS.  This addresses various problems with the previous example:

- It requests a specific driver "cbc-aes-aesni", which is unusual.
  Normally users ask for "cbc(aes)", not a specific driver.

- It encrypts only a single AES block.  For the reader, that doesn't
  clearly distinguish the "skcipher" API from the "cipher" API.

- Showing how to encrypt something with bare CBC is arguably a poor
  choice of example, as it doesn't follow modern crypto trends.  Now,
  usually authenticated encryption is recommended, in which case the
  user would use the AEAD API, not skcipher.  Disk encryption is still a
  legitimate use for skcipher, but for that usually XTS is recommended.

- Many other bugs and poor coding practices, such as not setting
  CRYPTO_TFM_REQ_MAY_SLEEP, unnecessarily allocating a heap buffer for
  the IV, unnecessary NULL checks, using a pointless wrapper struct, and
  forgetting to set an error code in one case.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-06-13 14:31:40 +08:00
..
ABI power supply and reset changes for the v5.2 series 2019-05-15 18:50:40 -07:00
EDID Docs/EDID: Calculate CRC while building the code 2018-11-06 07:36:22 -07:00
PCI pci-v4.20-changes 2018-10-25 06:50:48 -07:00
RCU doc: Fix typos and otherwise modernize checklist.txt 2019-03-26 14:37:06 -07:00
accelerators ocxl: Document new OCXL IOCTLs 2018-06-03 20:40:33 +10:00
accounting psi: introduce psi monitor 2019-05-14 19:52:48 -07:00
acpi/dsd LED updates for 5.2-rc1. 2019-05-07 18:02:51 -07:00
admin-guide panic: add an option to replay all the printk message in buffer 2019-05-18 15:52:26 -07:00
aoe
arm ARM: 8833/1: Ensure that NEON code always compiles with Clang 2019-02-12 15:20:09 +00:00
arm64 * ARM: support for SVE and Pointer Authentication in guests, PMU improvements 2019-05-17 10:33:30 -07:00
auxdisplay Doc: misc-devices: move lcd-panel-cgram.txt to auxdisplay/ 2018-04-12 16:08:02 +02:00
backlight
block block: null: Add documentation for "zone_nr_conv" param 2019-04-09 08:18:23 -06:00
blockdev zram: idle writeback fixes and cleanup 2019-01-08 17:15:10 -08:00
bpf docs/btf: fix the missing section marks 2019-05-09 15:59:59 -07:00
bus-devices
cdrom Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
cgroup-v1 A fairly routine cycle for docs - lots of typo fixes, some new documents, 2019-03-09 09:56:17 -08:00
cma
connector
console Documentation: corrections to console/console.txt 2018-08-10 16:09:40 -06:00
core-api lib: Move mathematic helpers to separate folder 2019-05-14 19:52:49 -07:00
cpu-freq Documentation: cpu-freq: Frequencies aren't always sorted 2018-11-07 13:29:04 +01:00
crypto crypto: doc - improve the skcipher API example code 2019-06-13 14:31:40 +08:00
dev-tools gcov: docs: add a note on GCC vs Clang differences 2019-05-14 19:52:51 -07:00
device-mapper dm integrity: add a bitmap mode 2019-05-08 13:41:58 -04:00
devicetree dt-bindings: move Atmel ECC508A I2C crypto processor to trivial-devices 2019-05-30 15:35:46 +08:00
doc-guide docs: doc-guide: remove the extension from .rst files 2019-04-19 12:46:27 -06:00
driver-api This is the bulk of the GPIO changes for the v5.2 kernel cycle: 2019-05-11 10:54:43 -04:00
driver-model i2c: core: add device-managed version of i2c_new_dummy 2019-05-17 19:29:40 +02:00
early-userspace Correct gen_init_cpio tool's documentation 2018-11-25 12:25:53 -07:00
extcon
fault-injection doc: fault-injection: fix macro name in example 2019-01-07 15:36:11 -07:00
fb fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd line option 2019-01-16 17:42:35 +01:00
features Merge branch 'parisc-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2019-05-07 19:34:17 -07:00
filesystems autofs: add description of ignore pseudo mount option 2019-05-14 19:52:50 -07:00
firmware-guide Documentation: ACPI: Direct references are allowed to devices only 2019-05-13 10:40:21 +02:00
firmware_class
fmc Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
fpga docs: fpga: add a document for FPGA Device Feature List (DFL) Framework Overview 2018-07-15 13:55:44 +02:00
gpio docs: gpio: convert docs to ReST and rename to *.rst 2019-04-23 23:30:07 +02:00
gpu drm: add drm_format_helper.c to kerneldoc 2019-04-17 09:39:22 +02:00
hid HID: doc: fix wrong data structure reference for UHID_OUTPUT 2018-12-18 14:55:22 +01:00
hwmon hwmon: (lm75) Add support for TMP75B 2019-05-03 13:16:18 -07:00
i2c i2c-piix4: Add Hygon Dhyana SMBus support 2019-05-03 16:47:54 +02:00
ia64
ide Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
iio
infiniband Documentation/infiniband: update from locked to pinned_vm 2019-02-07 12:56:23 -07:00
input doc: Change LXR references to elixir.bootlin.com 2019-02-01 16:05:03 -07:00
interconnect interconnect: Add generic on-chip interconnect API 2019-01-22 13:37:25 +01:00
ioctl seccomp: add a return code to trap to userspace 2018-12-11 16:28:41 -08:00
isdn Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
kbuild moduleparam: Save information about built-in modules in separate file 2019-05-07 21:50:24 +09:00
kdump kdump: Document kernel data exported in the vmcoreinfo note 2019-01-15 11:05:28 +01:00
kernel-hacking doc:it_IT: translation for kernel-hacking 2018-07-26 16:21:09 -06:00
laptops Documentation: fix lg-laptop.rst warnings 2019-02-11 08:27:47 -07:00
leds Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
lightnvm
livepatch docs/livepatch: Unify style of livepatch documentation in the ReST format 2019-05-07 16:06:28 -06:00
locking Documentation/locking/lockdep: Drop last two chars of sample states 2019-03-04 12:55:18 -07:00
m68k Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
maintainer docs: Fix more broken references 2018-06-15 18:11:26 -03:00
md
media media updates for v5.2-rc1 2019-05-16 11:57:16 -07:00
memory-devices
mic
mips Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
misc-devices Documentation: add ibmvmc to toctree(index) and fix warnings 2019-01-14 08:37:17 -07:00
mmc Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
mtd Documentation: mtd: remove stale pxa3xx NAND controller documentation 2018-09-04 23:37:38 +02:00
namespaces
netlabel Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
networking rxrpc: Allow the kernel to mark a call as being non-interruptible 2019-05-16 16:25:20 +01:00
nfc
nios2
nvdimm libnvdimm/security: Add documentation for nvdimm security support 2018-12-21 12:44:41 -08:00
nvmem Documentation: nvmem: document cell tables and lookup entries 2018-09-28 15:14:54 +02:00
openrisc
parisc Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
pcmcia pcmcia: remove long deprecated pcmcia_request_exclusive_irq() function 2018-08-18 12:30:42 -07:00
perf Documentation: perf: Add documentation for ThunderX2 PMU uncore driver 2018-12-06 12:29:47 +00:00
phy
platform
power PM/EM: Document the Energy Model framework 2019-01-27 12:29:37 +01:00
powerpc Documentation: powerpc: Expand the DAWR acronym 2019-05-03 02:54:58 +10:00
pps
process A reasonably busy cycle for docs, including: 2019-05-08 12:42:50 -07:00
pti
ptp ptp: Fix documentation to match code. 2018-03-26 12:13:21 -04:00
rapidio
riscv perf: riscv: Add Document for Future Porting Guide 2018-06-04 14:02:11 -07:00
s390 Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
scheduler sched/doc: Document Energy Aware Scheduling 2019-01-27 12:29:37 +01:00
scsi scsi: ufs-bsg: Allow reading descriptors 2019-02-27 09:00:02 -05:00
security doc: security: Add kern-doc for lsm_hooks.h 2019-02-22 08:54:09 -07:00
serial docs: serial: convert docs to ReST and rename to *.rst 2019-04-25 11:37:42 +02:00
sh sh: remove board_time_init() callback 2018-12-18 16:13:04 +01:00
sound ALSA: doc: my_chip has no element ioport 2019-04-03 11:55:47 +02:00
sparc docs: sparc: convert to ReST 2019-05-08 17:13:35 -07:00
sphinx Documentation/sphinx: allow "functions" with no parameters 2018-06-30 07:52:42 -06:00
sphinx-static docs: improve readability for people with poorer eyesight 2018-10-07 09:16:50 -06:00
spi spi-summary: document set_cs_timing 2019-04-08 14:13:43 +07:00
sysctl userfaultfd/sysctl: add vm.unprivileged_userfaultfd 2019-05-14 09:47:45 -07:00
target scsi: target/core: Remove the write_pending_status() callback function 2019-02-04 21:23:59 -05:00
thermal docs: hwmon: Add an index file and rename docs to *.rst 2019-04-17 10:37:23 -07:00
timers Docs: Correct /proc/stat path 2019-02-22 08:50:17 -07:00
trace The major changes in this tracing update includes: 2019-05-15 16:05:47 -07:00
translations Some late arriving documentation changes. In particular, this contains the 2019-05-10 13:24:53 -04:00
usb docs: usb: convert documents to ReST 2019-04-16 12:16:19 +02:00
userspace-api Documentation: seccomp: unify list indentation 2019-03-18 12:00:28 -06:00
virtual * ARM: support for SVE and Pointer Authentication in guests, PMU improvements 2019-05-17 10:33:30 -07:00
vm mm/hmm: add default fault flags to avoid the need to pre-fill pfns arrays 2019-05-14 09:47:48 -07:00
w1 Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
watchdog Documentation/watchdog: Add documentation mlx-wdt driver 2019-03-02 15:28:20 +01:00
wimax
x86 x86/speculation/mds: Improve CPU buffer clear documentation 2019-05-16 09:05:12 +02:00
xilinx drivers: Defer probe if firmware is not ready 2019-03-18 13:45:27 +01:00
xtensa xtensa: document boot parameter passing 2019-02-03 18:06:19 -08:00
.gitignore
Changes
CodingStyle
DMA-API-HOWTO.txt DMA mapping updates for 5.2 2019-05-09 08:40:55 -07:00
DMA-API.txt virtio: fixes, cleanups 2019-03-10 12:47:57 -07:00
DMA-ISA-LPC.txt Documentation/DMA-ISA-LPC: fix an incorrect reference 2019-02-11 08:23:07 -07:00
DMA-attributes.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
Intel-IOMMU.txt
Makefile docs: Makefile: use latexmk if available 2019-04-01 14:33:42 -06:00
SAK.txt
SM501.txt
SubmittingPatches
atomic_bitops.txt docs: atomic_bitops.txt: add a title for this document 2019-04-11 12:37:02 -06:00
atomic_t.txt Documentation/atomic_t: Clarify signed vs unsigned 2019-03-18 10:27:52 -07:00
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
clearing-warn-once.txt A reasonably busy cycle for docs, including: 2019-05-08 12:42:50 -07:00
conf.py This is a fairly typical cycle for documentation. There's some welcome 2018-10-24 18:01:11 +01:00
cpu-load.txt
cputopology.txt topology: Simplify cputopology.txt formatting and wording 2019-04-19 10:56:04 +02:00
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt Documentation: remove stale firmware API reference 2018-05-14 16:44:41 +02:00
digsig.txt
docutils.conf
dontdiff A reasonably busy cycle for docs, including: 2019-05-08 12:42:50 -07:00
efi-stub.txt efi_stub: update documentation on dtb= parameter 2018-09-09 14:46:44 -06:00
eisa.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst Merge branch 'x86-mds-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-14 07:57:29 -07:00
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt block: Track DISCARD statistics and output them in stat and diskstat 2018-07-18 08:44:22 -06:00
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-per-CPU-kthreads.txt doc: Update removal of RCU-bh/sched update machinery 2018-08-30 10:59:48 -07:00
kobject.txt kref/kobject: Improve documentation 2018-12-06 13:57:03 +01:00
kprobes.txt Merge branch 'parisc-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2019-05-07 19:34:17 -07:00
kref.txt
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lsm.txt
lzo.txt lib/lzo: fix bugs for very short or empty input 2019-04-05 16:02:30 -10:00
mailbox.txt
memory-barriers.txt docs/memory-barriers.txt: Update I/O section to be clearer about CPU vs thread 2019-04-23 13:34:17 +01:00
men-chameleon-bus.txt
nommu-mmap.txt Documentation: nommu-map: Fix duplicate word typo 2018-06-26 09:01:27 -06:00
ntb.txt docs: ntb.txt: add blank lines to clean up some Sphinx warnings 2019-04-11 12:37:03 -06:00
numastat.txt
packing.txt lib: Add support for generic packing operations 2019-05-03 10:49:17 -04:00
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pnp.txt
preempt-locking.txt x86/fpu: Remove fpu__restore() 2019-04-09 19:27:42 +02:00
pwm.txt
rbtree.txt
remoteproc.txt
rfkill.txt rfkill: Fix several typos in documentation 2018-06-15 13:36:08 +02:00
robust-futex-ABI.txt
robust-futexes.txt futex: Update comments and docs about return values of arch futex code 2019-04-26 13:57:55 +01:00
rpmsg.txt
rtc.txt Documentation: rtc: Correct location of rtctest.c 2019-03-25 10:34:55 -06:00
sgi-ioc4.txt
siphash.txt
smsc_ece1099.txt
speculation.txt docs: speculation.txt: mark example blocks as such 2019-04-11 12:37:03 -06:00
static-keys.txt static_keys.txt: Fix trivial spelling mistake 2019-02-06 16:44:16 -07:00
svga.txt
switchtec.txt NTB: switchtec_ntb: Update switchtec documentation with prerequisites for NTB 2018-10-11 11:28:53 -05:00
sync_file.txt
tee.txt
this_cpu_ops.txt
unaligned-memory-access.txt docs: unaligned-memory-access.txt: use a lowercase title 2019-04-11 12:37:03 -06:00
vfio-mediated-device.txt vfio/mdev: Check globally for duplicate devices 2018-06-08 10:24:27 -06:00
vfio.txt vfio: fix documentation 2018-05-08 09:16:41 -06:00
video-output.txt docs: video-output.txt: convert it to ReST format 2019-04-11 12:37:03 -06:00
xillybus.txt
xz.txt
zorro.txt