Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543881 > unrolled thread
| Started by | Kees Cook <keescook@chromium.org> |
|---|---|
| First post | 2016-12-17 02:10 +0100 |
| Last post | 2016-12-17 17:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] x86/floppy: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-17 02:10 +0100
Re: [PATCH] x86/floppy: use designated initializers Ingo Molnar <mingo@kernel.org> - 2016-12-17 17:20 +0100
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-12-17 02:10 +0100 |
| Subject | [PATCH] x86/floppy: use designated initializers |
| Message-ID | <sPbFD-2GI-29@gated-at.bofh.it> |
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>
---
arch/x86/include/asm/floppy.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h
index 1c7eefe32502..d0e4702883b9 100644
--- a/arch/x86/include/asm/floppy.h
+++ b/arch/x86/include/asm/floppy.h
@@ -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
}
};
--
2.7.4
--
Kees Cook
Nexus Security
[toc] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-12-17 17:20 +0100 |
| Message-ID | <sPpSi-3tm-27@gated-at.bofh.it> |
| In reply to | #1543881 |
* Kees Cook <keescook@chromium.org> wrote:
> 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>
> ---
> arch/x86/include/asm/floppy.h | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h
> index 1c7eefe32502..d0e4702883b9 100644
> --- a/arch/x86/include/asm/floppy.h
> +++ b/arch/x86/include/asm/floppy.h
> @@ -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
Please align the two columns vertically while at it.
Thanks,
Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web