lkml.org 
[lkml]   [2017]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Part2 PATCH v6 32/38] KVM: SVM: Add support for SEV DEBUG_DECRYPT command
From
Date


On 10/27/17 3:25 PM, Borislav Petkov wrote:

...

>> + ret = -EFAULT;
>> + } else {
>> + memcpy((void *)dst_kaddr, page_address(tpage) + offset, size);
> arch/x86/kvm/svm.c: In function ‘svm_mem_enc_op’:
> arch/x86/kvm/svm.c:6115:4: warning: argument 1 null where non-null expected [-Wnonnull]
> memcpy((void *)dst_kaddr, page_address(tpage) + offset, size);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ./arch/x86/include/asm/string.h:4:0,
> from ./include/linux/string.h:18,
> from ./include/linux/bitmap.h:8,
> from ./include/linux/cpumask.h:11,
> from ./arch/x86/include/asm/cpumask.h:4,
> from ./arch/x86/include/asm/msr.h:10,
> from ./arch/x86/include/asm/processor.h:20,
> from ./arch/x86/include/asm/cpufeature.h:4,
> from ./arch/x86/include/asm/thread_info.h:52,
> from ./include/linux/thread_info.h:37,
> from ./arch/x86/include/asm/preempt.h:6,
> from ./include/linux/preempt.h:80,
> from ./include/linux/hardirq.h:4,
> from ./include/linux/kvm_host.h:10,
> from arch/x86/kvm/svm.c:20:
> ./arch/x86/include/asm/string_64.h:31:14: note: in a call to function ‘memcpy’ declared here
> extern void *memcpy(void *to, const void *from, size_t len);
> ^~~~~~
>

I am not able to reproduce the build warning in my setup, what config
option or compiler you are using to  trigger this issue ?  I am on
Fedora with gcc 6.4.x. Logically, the code looks okay. I can try to
rearrange code to fix the warning. I have not touched this function
since couple of rev, have u seen similar warning in previous versions
(v5, v4 etc). thanks

-Brijesh
 

\
 
 \ /
  Last update: 2017-10-30 14:56    [W:0.143 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site