lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 30 Oct 2017 08:56:13 -0500
From:   Brijesh Singh <brijesh.singh@....com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     brijesh.singh@....com, kvm@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Joerg Roedel <joro@...tes.org>,
        Tom Lendacky <thomas.lendacky@....com>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [Part2 PATCH v6 32/38] KVM: SVM: Add support for SEV
 DEBUG_DECRYPT command



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
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ