Re: [PATCH 3/5] crypto: ccp: Play nice with vmalloc'd memory for SEV command structs

2021-04-03 Thread Christophe Leroy
Le 03/04/2021 à 01:37, Sean Christopherson a écrit : Copy vmalloc'd data to an internal buffer instead of rejecting outright so that callers can put SEV command buffers on the stack without running afoul of CONFIG_VMAP_STACK=y. Currently, the largest supported command takes a 68 byte buffer,

Re: [PATCH 1/5] crypto: ccp: Detect and reject vmalloc addresses destined for PSP

2021-04-03 Thread Christophe Leroy
Le 03/04/2021 à 01:36, Sean Christopherson a écrit : Explicitly reject vmalloc'd data as the source for SEV commands that are sent to the PSP. The PSP works with physical addresses, and __pa() will not return the correct address for a vmalloc'd pionter, which at best will cause the command to

Re: [PATCH 3/5] crypto: ccp: Play nice with vmalloc'd memory for SEV command structs

2021-04-03 Thread Christophe Leroy
Le 03/04/2021 à 01:37, Sean Christopherson a écrit : Copy vmalloc'd data to an internal buffer instead of rejecting outright so that callers can put SEV command buffers on the stack without running afoul of CONFIG_VMAP_STACK=y. Currently, the largest supported command takes a 68 byte buffer,

Re: [PATCH 3/5] crypto: ccp: Play nice with vmalloc'd memory for SEV command structs

2021-04-03 Thread Christophe Leroy
Le 03/04/2021 à 01:37, Sean Christopherson a écrit : Copy vmalloc'd data to an internal buffer instead of rejecting outright so that callers can put SEV command buffers on the stack without running afoul of CONFIG_VMAP_STACK=y. Currently, the largest supported command takes a 68 byte buffer,

Re: [PATCH 2/5] crypto: ccp: Reject SEV commands with mismatching command buffer

2021-04-03 Thread Christophe Leroy
Le 03/04/2021 à 01:36, Sean Christopherson a écrit : WARN on and reject SEV commands that provide a valid data pointer, but do not have a known, non-zero length. And conversely, reject commands that take a command buffer but none is provided. Aside from sanity checking intput, disallowing a