Skip to content

Commit

Permalink
x86/floppy: Use designated initializers
Browse files Browse the repository at this point in the history
Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20161217213705.GA1248@beast
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Kees Cook authored and Ingo Molnar committed Dec 18, 2016
1 parent cb02de9 commit ffc7dc8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions arch/x86/include/asm/floppy.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,18 @@ static struct fd_routine_l {
int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
} fd_routine[] = {
{
request_dma,
free_dma,
get_dma_residue,
dma_mem_alloc,
hard_dma_setup
._request_dma = request_dma,
._free_dma = free_dma,
._get_dma_residue = get_dma_residue,
._dma_mem_alloc = dma_mem_alloc,
._dma_setup = hard_dma_setup
},
{
vdma_request_dma,
vdma_nop,
vdma_get_dma_residue,
vdma_mem_alloc,
vdma_dma_setup
._request_dma = vdma_request_dma,
._free_dma = vdma_nop,
._get_dma_residue = vdma_get_dma_residue,
._dma_mem_alloc = vdma_mem_alloc,
._dma_setup = vdma_dma_setup
}
};

Expand Down

0 comments on commit ffc7dc8

Please sign in to comment.