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

2021-04-05 Thread Brijesh Singh
On 4/5/21 10:06 AM, Sean Christopherson wrote: > On Sun, Apr 04, 2021, Christophe Leroy wrote: >> Le 03/04/2021 à 01:37, Sean Christopherson a écrit : >>> @@ -152,11 +153,21 @@ static int __sev_do_cmd_locked(int cmd, void *data, >>> int *psp_ret) >>> sev = psp->sev_data; >>> buf_len =

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

2021-04-05 Thread Sean Christopherson
On Sun, Apr 04, 2021, Christophe Leroy wrote: > > Le 03/04/2021 à 01:37, Sean Christopherson a écrit : > > @@ -152,11 +153,21 @@ static int __sev_do_cmd_locked(int cmd, void *data, > > int *psp_ret) > > sev = psp->sev_data; > > buf_len = sev_cmd_buffer_len(cmd); > > - if

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

2021-04-04 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 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,

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

2021-04-02 Thread Sean Christopherson
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, i.e. pretty much every command can be put on the stack.