#define ALLOW_SELECT #undef NO_INLINE_ASM #define SHORT_BANNERS #define MANUAL_PNP #undef DO_TIMINGS #include #ifdef __KERNEL__ #include #include #include #include #include #include #include #include #include #include #include #include #include #endif #include #define FALSE 0 #define TRUE 1 extern int sound_alloc_dma(int chn, char *deviceID); extern int sound_open_dma(int chn, char *deviceID); extern void sound_free_dma(int chn); extern void sound_close_dma(int chn); extern void reprogram_timer(void); #define USE_AUTOINIT_DMA extern void *sound_mem_blocks[1024]; extern int sound_nblocks; #undef PSEUDO_DMA_AUTOINIT #define ALLOW_BUFFER_MAPPING extern const struct file_operations oss_sound_fops; lue='5102981212454998d549273ff9847f19e97a1794'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/net/rxrpc
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2016-11-29 09:45:04 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-11-30 19:46:44 +0800
commit5102981212454998d549273ff9847f19e97a1794 (patch)
tree2f1b0259571af794c5e1004d452b0f81966c646f /net/rxrpc
parentc8467f7a3620698bf3c22f0e199b550fb611a8ae (diff)
crypto: drbg - prevent invalid SG mappings
When using SGs, only heap memory (memory that is valid as per virt_addr_valid) is allowed to be referenced. The CTR DRBG used to reference the caller-provided memory directly in an SG. In case the caller provided stack memory pointers, the SG mapping is not considered to be valid. In some cases, this would even cause a paging fault. The change adds a new scratch buffer that is used unconditionally to catch the cases where the caller-provided buffer is not suitable for use in an SG. The crypto operation of the CTR DRBG produces its output with that scratch buffer and finally copies the content of the scratch buffer to the caller's buffer. The scratch buffer is allocated during allocation time of the CTR DRBG as its access is protected with the DRBG mutex. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/rxrpc')