kexec: make kexec_segment user buffer pointer a union
kexec: make kexec_segment user buffer pointer a union

So far kexec_segment->buf was always a user space pointer as user space
passed the array of kexec_segment structures and kernel copied it.

But with new system call, list of kexec segments will be prepared by
kernel and kexec_segment->buf will point to a kernel memory.

So while I was adding code where I made assumption that ->buf is pointing
to kernel memory, sparse started giving warning.

Make ->buf a union.  And where a user space pointer is expected, access it
using ->buf and where a kernel space pointer is expected, access it using
->kbuf.  That takes care of sparse warnings.

Signed-off-by: Vivek Goyal <61d11262d0d9873ddb5a887f48fcb04e8c5973d0@redhat.com>
Cc: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@suse.de>
Cc: Michael Kerrisk <cc9a9bf9e3f3b546e69143652ae261619ab7ca78@gmail.com>
Cc: Yinghai Lu <0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org>
Cc: Eric Biederman <8a741aa8cbd77ebc4a56ddb528ce9fd15d42f034@xmission.com>
Cc: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
Cc: Matthew Garrett <10ea1ff373631291cadf45b163e9fbaf27d1200e@srcf.ucam.org>
Cc: Greg Kroah-Hartman <79e2475f81a6317276bf7cbb3958b20d289b78df@kroah.com>
Cc: Dave Young <5716cc40769303914dac486db0fc6ac4cba9419e@redhat.com>
Cc: WANG Chao <c2aee7029fe382c8d64e1072d797631ac5391d91@redhat.com>
Cc: Baoquan He <1b95acc14c82271bede46a8b6a84bd6be6240a7c@redhat.com>
Cc: Andy Lutomirski <2cc0d0d76de2e6f37b92deeb83c85cb306fc5dc1@amacapital.net>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs