All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: kbuild-all@lists.01.org, linux-fsdevel@vger.kernel.org
Subject: [vfs:work.regset 9/9] arch/s390/kernel/ptrace.c:1306:11: error: initialization of 'int (*)(struct task_struct *, const struct user_regset *, struct membuf)' from incompatible pointer type 'int (*)(struct task_struct *, const struct user_regset *, unsigned int,  struct membuf)'
Date: Wed, 13 May 2020 14:32:43 +0800	[thread overview]
Message-ID: <202005131436.K98ecq5J%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6887 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.regset
head:   53a620bc6368a2da4a4c0c699b76f0bf1b4205e7
commit: 53a620bc6368a2da4a4c0c699b76f0bf1b4205e7 [9/9] s390: switch to ->get2()
config: s390-randconfig-r034-20200513 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 53a620bc6368a2da4a4c0c699b76f0bf1b4205e7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> arch/s390/kernel/ptrace.c:1306:11: error: initialization of 'int (*)(struct task_struct *, const struct user_regset *, struct membuf)' from incompatible pointer type 'int (*)(struct task_struct *, const struct user_regset *, unsigned int,  struct membuf)' [-Werror=incompatible-pointer-types]
1306 |   .get2 = s390_fpregs_get,
|           ^~~~~~~~~~~~~~~
arch/s390/kernel/ptrace.c:1306:11: note: (near initialization for 's390_regsets[1].get2')
arch/s390/kernel/ptrace.c: In function 's390_compat_regs_high_get':
>> arch/s390/kernel/ptrace.c:1441:14: error: 'n' undeclared (first use in this function)
1441 |  for (i = 0; n < NUM_GPRS; i++, gprs_high += 2)
|              ^
arch/s390/kernel/ptrace.c:1441:14: note: each undeclared identifier is reported only once for each function it appears in
arch/s390/kernel/ptrace.c: At top level:
arch/s390/kernel/ptrace.c:1510:11: error: initialization of 'int (*)(struct task_struct *, const struct user_regset *, struct membuf)' from incompatible pointer type 'int (*)(struct task_struct *, const struct user_regset *, unsigned int,  struct membuf)' [-Werror=incompatible-pointer-types]
1510 |   .get2 = s390_fpregs_get,
|           ^~~~~~~~~~~~~~~
arch/s390/kernel/ptrace.c:1510:11: note: (near initialization for 's390_compat_regsets[1].get2')
cc1: some warnings being treated as errors

vim +1306 arch/s390/kernel/ptrace.c

  1291	
  1292	static const struct user_regset s390_regsets[] = {
  1293		{
  1294			.core_note_type = NT_PRSTATUS,
  1295			.n = sizeof(s390_regs) / sizeof(long),
  1296			.size = sizeof(long),
  1297			.align = sizeof(long),
  1298			.get2 = s390_regs_get,
  1299			.set = s390_regs_set,
  1300		},
  1301		{
  1302			.core_note_type = NT_PRFPREG,
  1303			.n = sizeof(s390_fp_regs) / sizeof(long),
  1304			.size = sizeof(long),
  1305			.align = sizeof(long),
> 1306			.get2 = s390_fpregs_get,
  1307			.set = s390_fpregs_set,
  1308		},
  1309		{
  1310			.core_note_type = NT_S390_SYSTEM_CALL,
  1311			.n = 1,
  1312			.size = sizeof(unsigned int),
  1313			.align = sizeof(unsigned int),
  1314			.get2 = s390_system_call_get,
  1315			.set = s390_system_call_set,
  1316		},
  1317		{
  1318			.core_note_type = NT_S390_LAST_BREAK,
  1319			.n = 1,
  1320			.size = sizeof(long),
  1321			.align = sizeof(long),
  1322			.get2 = s390_last_break_get,
  1323			.set = s390_last_break_set,
  1324		},
  1325		{
  1326			.core_note_type = NT_S390_TDB,
  1327			.n = 1,
  1328			.size = 256,
  1329			.align = 1,
  1330			.get2 = s390_tdb_get,
  1331			.set = s390_tdb_set,
  1332		},
  1333		{
  1334			.core_note_type = NT_S390_VXRS_LOW,
  1335			.n = __NUM_VXRS_LOW,
  1336			.size = sizeof(__u64),
  1337			.align = sizeof(__u64),
  1338			.get2 = s390_vxrs_low_get,
  1339			.set = s390_vxrs_low_set,
  1340		},
  1341		{
  1342			.core_note_type = NT_S390_VXRS_HIGH,
  1343			.n = __NUM_VXRS_HIGH,
  1344			.size = sizeof(__vector128),
  1345			.align = sizeof(__vector128),
  1346			.get2 = s390_vxrs_high_get,
  1347			.set = s390_vxrs_high_set,
  1348		},
  1349		{
  1350			.core_note_type = NT_S390_GS_CB,
  1351			.n = sizeof(struct gs_cb) / sizeof(__u64),
  1352			.size = sizeof(__u64),
  1353			.align = sizeof(__u64),
  1354			.get2 = s390_gs_cb_get,
  1355			.set = s390_gs_cb_set,
  1356		},
  1357		{
  1358			.core_note_type = NT_S390_GS_BC,
  1359			.n = sizeof(struct gs_cb) / sizeof(__u64),
  1360			.size = sizeof(__u64),
  1361			.align = sizeof(__u64),
  1362			.get2 = s390_gs_bc_get,
  1363			.set = s390_gs_bc_set,
  1364		},
  1365		{
  1366			.core_note_type = NT_S390_RI_CB,
  1367			.n = sizeof(struct runtime_instr_cb) / sizeof(__u64),
  1368			.size = sizeof(__u64),
  1369			.align = sizeof(__u64),
  1370			.get2 = s390_runtime_instr_get,
  1371			.set = s390_runtime_instr_set,
  1372		},
  1373	};
  1374	
  1375	static const struct user_regset_view user_s390_view = {
  1376		.name = UTS_MACHINE,
  1377		.e_machine = EM_S390,
  1378		.regsets = s390_regsets,
  1379		.n = ARRAY_SIZE(s390_regsets)
  1380	};
  1381	
  1382	#ifdef CONFIG_COMPAT
  1383	static int s390_compat_regs_get(struct task_struct *target,
  1384					const struct user_regset *regset,
  1385					struct membuf to)
  1386	{
  1387		unsigned n;
  1388	
  1389		if (target == current)
  1390			save_access_regs(target->thread.acrs);
  1391	
  1392		for (n = 0; n < sizeof(s390_compat_regs); n += sizeof(compat_ulong_t))
  1393			membuf_store(&to, __peek_user_compat(target, n));
  1394		return 0;
  1395	}
  1396	
  1397	static int s390_compat_regs_set(struct task_struct *target,
  1398					const struct user_regset *regset,
  1399					unsigned int pos, unsigned int count,
  1400					const void *kbuf, const void __user *ubuf)
  1401	{
  1402		int rc = 0;
  1403	
  1404		if (target == current)
  1405			save_access_regs(target->thread.acrs);
  1406	
  1407		if (kbuf) {
  1408			const compat_ulong_t *k = kbuf;
  1409			while (count > 0 && !rc) {
  1410				rc = __poke_user_compat(target, pos, *k++);
  1411				count -= sizeof(*k);
  1412				pos += sizeof(*k);
  1413			}
  1414		} else {
  1415			const compat_ulong_t  __user *u = ubuf;
  1416			while (count > 0 && !rc) {
  1417				compat_ulong_t word;
  1418				rc = __get_user(word, u++);
  1419				if (rc)
  1420					break;
  1421				rc = __poke_user_compat(target, pos, word);
  1422				count -= sizeof(*u);
  1423				pos += sizeof(*u);
  1424			}
  1425		}
  1426	
  1427		if (rc == 0 && target == current)
  1428			restore_access_regs(target->thread.acrs);
  1429	
  1430		return rc;
  1431	}
  1432	
  1433	static int s390_compat_regs_high_get(struct task_struct *target,
  1434					     const struct user_regset *regset,
  1435					     struct membuf to)
  1436	{
  1437		compat_ulong_t *gprs_high;
  1438		int i;
  1439	
  1440		gprs_high = (compat_ulong_t *)task_pt_regs(target)->gprs;
> 1441		for (i = 0; n < NUM_GPRS; i++, gprs_high += 2)
  1442			membuf_store(&to, *gprs_high);
  1443		return 0;
  1444	}
  1445	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28408 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [vfs:work.regset 9/9] arch/s390/kernel/ptrace.c:1306:11: error: initialization of 'int (*)(struct task_struct *, const struct user_regset *, struct membuf)' from incompatible pointer type 'int (*)(struct task_struct *, const struct user_regset *, unsigned int, struct membuf)'
Date: Wed, 13 May 2020 14:32:43 +0800	[thread overview]
Message-ID: <202005131436.K98ecq5J%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7081 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.regset
head:   53a620bc6368a2da4a4c0c699b76f0bf1b4205e7
commit: 53a620bc6368a2da4a4c0c699b76f0bf1b4205e7 [9/9] s390: switch to ->get2()
config: s390-randconfig-r034-20200513 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 53a620bc6368a2da4a4c0c699b76f0bf1b4205e7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> arch/s390/kernel/ptrace.c:1306:11: error: initialization of 'int (*)(struct task_struct *, const struct user_regset *, struct membuf)' from incompatible pointer type 'int (*)(struct task_struct *, const struct user_regset *, unsigned int,  struct membuf)' [-Werror=incompatible-pointer-types]
1306 |   .get2 = s390_fpregs_get,
|           ^~~~~~~~~~~~~~~
arch/s390/kernel/ptrace.c:1306:11: note: (near initialization for 's390_regsets[1].get2')
arch/s390/kernel/ptrace.c: In function 's390_compat_regs_high_get':
>> arch/s390/kernel/ptrace.c:1441:14: error: 'n' undeclared (first use in this function)
1441 |  for (i = 0; n < NUM_GPRS; i++, gprs_high += 2)
|              ^
arch/s390/kernel/ptrace.c:1441:14: note: each undeclared identifier is reported only once for each function it appears in
arch/s390/kernel/ptrace.c: At top level:
arch/s390/kernel/ptrace.c:1510:11: error: initialization of 'int (*)(struct task_struct *, const struct user_regset *, struct membuf)' from incompatible pointer type 'int (*)(struct task_struct *, const struct user_regset *, unsigned int,  struct membuf)' [-Werror=incompatible-pointer-types]
1510 |   .get2 = s390_fpregs_get,
|           ^~~~~~~~~~~~~~~
arch/s390/kernel/ptrace.c:1510:11: note: (near initialization for 's390_compat_regsets[1].get2')
cc1: some warnings being treated as errors

vim +1306 arch/s390/kernel/ptrace.c

  1291	
  1292	static const struct user_regset s390_regsets[] = {
  1293		{
  1294			.core_note_type = NT_PRSTATUS,
  1295			.n = sizeof(s390_regs) / sizeof(long),
  1296			.size = sizeof(long),
  1297			.align = sizeof(long),
  1298			.get2 = s390_regs_get,
  1299			.set = s390_regs_set,
  1300		},
  1301		{
  1302			.core_note_type = NT_PRFPREG,
  1303			.n = sizeof(s390_fp_regs) / sizeof(long),
  1304			.size = sizeof(long),
  1305			.align = sizeof(long),
> 1306			.get2 = s390_fpregs_get,
  1307			.set = s390_fpregs_set,
  1308		},
  1309		{
  1310			.core_note_type = NT_S390_SYSTEM_CALL,
  1311			.n = 1,
  1312			.size = sizeof(unsigned int),
  1313			.align = sizeof(unsigned int),
  1314			.get2 = s390_system_call_get,
  1315			.set = s390_system_call_set,
  1316		},
  1317		{
  1318			.core_note_type = NT_S390_LAST_BREAK,
  1319			.n = 1,
  1320			.size = sizeof(long),
  1321			.align = sizeof(long),
  1322			.get2 = s390_last_break_get,
  1323			.set = s390_last_break_set,
  1324		},
  1325		{
  1326			.core_note_type = NT_S390_TDB,
  1327			.n = 1,
  1328			.size = 256,
  1329			.align = 1,
  1330			.get2 = s390_tdb_get,
  1331			.set = s390_tdb_set,
  1332		},
  1333		{
  1334			.core_note_type = NT_S390_VXRS_LOW,
  1335			.n = __NUM_VXRS_LOW,
  1336			.size = sizeof(__u64),
  1337			.align = sizeof(__u64),
  1338			.get2 = s390_vxrs_low_get,
  1339			.set = s390_vxrs_low_set,
  1340		},
  1341		{
  1342			.core_note_type = NT_S390_VXRS_HIGH,
  1343			.n = __NUM_VXRS_HIGH,
  1344			.size = sizeof(__vector128),
  1345			.align = sizeof(__vector128),
  1346			.get2 = s390_vxrs_high_get,
  1347			.set = s390_vxrs_high_set,
  1348		},
  1349		{
  1350			.core_note_type = NT_S390_GS_CB,
  1351			.n = sizeof(struct gs_cb) / sizeof(__u64),
  1352			.size = sizeof(__u64),
  1353			.align = sizeof(__u64),
  1354			.get2 = s390_gs_cb_get,
  1355			.set = s390_gs_cb_set,
  1356		},
  1357		{
  1358			.core_note_type = NT_S390_GS_BC,
  1359			.n = sizeof(struct gs_cb) / sizeof(__u64),
  1360			.size = sizeof(__u64),
  1361			.align = sizeof(__u64),
  1362			.get2 = s390_gs_bc_get,
  1363			.set = s390_gs_bc_set,
  1364		},
  1365		{
  1366			.core_note_type = NT_S390_RI_CB,
  1367			.n = sizeof(struct runtime_instr_cb) / sizeof(__u64),
  1368			.size = sizeof(__u64),
  1369			.align = sizeof(__u64),
  1370			.get2 = s390_runtime_instr_get,
  1371			.set = s390_runtime_instr_set,
  1372		},
  1373	};
  1374	
  1375	static const struct user_regset_view user_s390_view = {
  1376		.name = UTS_MACHINE,
  1377		.e_machine = EM_S390,
  1378		.regsets = s390_regsets,
  1379		.n = ARRAY_SIZE(s390_regsets)
  1380	};
  1381	
  1382	#ifdef CONFIG_COMPAT
  1383	static int s390_compat_regs_get(struct task_struct *target,
  1384					const struct user_regset *regset,
  1385					struct membuf to)
  1386	{
  1387		unsigned n;
  1388	
  1389		if (target == current)
  1390			save_access_regs(target->thread.acrs);
  1391	
  1392		for (n = 0; n < sizeof(s390_compat_regs); n += sizeof(compat_ulong_t))
  1393			membuf_store(&to, __peek_user_compat(target, n));
  1394		return 0;
  1395	}
  1396	
  1397	static int s390_compat_regs_set(struct task_struct *target,
  1398					const struct user_regset *regset,
  1399					unsigned int pos, unsigned int count,
  1400					const void *kbuf, const void __user *ubuf)
  1401	{
  1402		int rc = 0;
  1403	
  1404		if (target == current)
  1405			save_access_regs(target->thread.acrs);
  1406	
  1407		if (kbuf) {
  1408			const compat_ulong_t *k = kbuf;
  1409			while (count > 0 && !rc) {
  1410				rc = __poke_user_compat(target, pos, *k++);
  1411				count -= sizeof(*k);
  1412				pos += sizeof(*k);
  1413			}
  1414		} else {
  1415			const compat_ulong_t  __user *u = ubuf;
  1416			while (count > 0 && !rc) {
  1417				compat_ulong_t word;
  1418				rc = __get_user(word, u++);
  1419				if (rc)
  1420					break;
  1421				rc = __poke_user_compat(target, pos, word);
  1422				count -= sizeof(*u);
  1423				pos += sizeof(*u);
  1424			}
  1425		}
  1426	
  1427		if (rc == 0 && target == current)
  1428			restore_access_regs(target->thread.acrs);
  1429	
  1430		return rc;
  1431	}
  1432	
  1433	static int s390_compat_regs_high_get(struct task_struct *target,
  1434					     const struct user_regset *regset,
  1435					     struct membuf to)
  1436	{
  1437		compat_ulong_t *gprs_high;
  1438		int i;
  1439	
  1440		gprs_high = (compat_ulong_t *)task_pt_regs(target)->gprs;
> 1441		for (i = 0; n < NUM_GPRS; i++, gprs_high += 2)
  1442			membuf_store(&to, *gprs_high);
  1443		return 0;
  1444	}
  1445	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28408 bytes --]

             reply	other threads:[~2020-05-13  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  6:32 kbuild test robot [this message]
2020-05-13  6:32 ` [vfs:work.regset 9/9] arch/s390/kernel/ptrace.c:1306:11: error: initialization of 'int (*)(struct task_struct *, const struct user_regset *, struct membuf)' from incompatible pointer type 'int (*)(struct task_struct *, const struct user_regset *, unsigned int, struct membuf)' kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202005131436.K98ecq5J%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.