Thread (72 messages) flat view 72 messages, 3 authors, 2017-11-02

Re: [Part2 PATCH v6.1 16/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

From: Brijesh Singh <hidden>
Date: 2017-10-31 01:29:40
Also in: kvm, lkml


On 10/30/17 12:57 PM, Borislav Petkov wrote:
On Mon, Oct 30, 2017 at 12:49:14PM -0500, Brijesh Singh wrote:
quoted
If the buffer is allocated on the stack then there is no guarantee that
static global is not allocated on the stack.
Okay, Just tried static global with CONFIG_VMAP_STACK=y and I am getting
wrong physical address with __pa. PSP command fails with error code
"INVALID_ADDRESS". The same thing works fine with kmalloc() buffer.
quoted
I can certainly move the allocation outside, but then it may increase the
code size in other functions. If its not a big deal then I would prefer to
keep what we have.
Avoiding repeated k*alloc calls is always a good thing. Actually kmalloc-ing 20
bytes each time sounds like it is not worth the calling overhead to me.
To avoid repeated k*alloc calls, I could devm_kzalloc() these variable 
during sev_init() and reuse them when needed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help