[lkml]   [2018]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH V3 2/5 selinux-next] selinux: Introduce selinux_ruleset struct
Hi Peter,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pcmoore-selinux/next]
[also build test ERROR on v4.17-rc7]
[cannot apply to security/next next-20180531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

base: next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sh

All error/warnings (new ones prefixed by >>):

security/selinux/ss/policydb.c: In function 'policydb_flattened_alloc':
>> security/selinux/ss/policydb.c:3544:12: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
*tmpbuf = vmalloc(*size);
>> security/selinux/ss/policydb.c:3544:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
*tmpbuf = vmalloc(*size);
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:14,
from security/selinux/ss/policydb.c:33:
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
security/selinux/ss/policydb.c:3548:10: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR "SELinux: vmalloc failed for %ld\n", *size);
security/selinux/ss/policydb.c:3548:50: note: format string is defined here
printk(KERN_ERR "SELinux: vmalloc failed for %ld\n", *size);
security/selinux/ss/policydb.c: In function 'policydb_flattened_free':
>> security/selinux/ss/policydb.c:3555:2: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

vim +3544 security/selinux/ss/policydb.c

3539 int policydb_flattened_alloc(struct policydb *db, void **tmpbuf, size_t *size)
3540 {
3541 int rc = 0;
3543 *size = db->len;
> 3544 *tmpbuf = vmalloc(*size);
3546 if (!*tmpbuf) {
3547 rc = -ENOMEM;
> 3548 printk(KERN_ERR "SELinux: vmalloc failed for %ld\n", *size);
3549 }
3550 return rc;
3551 }
3553 int policydb_flattened_free(void *tmpbuf)
3554 {
> 3555 vfree(tmpbuf);
3556 return 0;
3557 }

0-DAY kernel test infrastructure Open Source Technology Center Intel Corporation
[unhandled content-type:application/gzip]
 \ /
  Last update: 2018-06-01 15:58    [W:0.159 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site