From: kbuild test robot <lkp@intel.com>
To: Anders Roxell <anders.roxell@linaro.org>
Cc: kbuild-all@01.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux@armlinux.org.uk,
arnd@arndb.de, Anders Roxell <anders.roxell@linaro.org>
Subject: Re: [PATCH] arch/arm/Kconfig: enable ARM_MODULE_PLTS when LOCKDEP=y
Date: Wed, 31 Jan 2018 20:12:11 +0800 [thread overview]
Message-ID: <201801312036.gXYpKLF3%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180129234900.11121-1-anders.roxell@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 4755 bytes --]
Hi Anders,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.15 next-20180126]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Anders-Roxell/arch-arm-Kconfig-enable-ARM_MODULE_PLTS-when-LOCKDEP-y/20180131-115917
config: arm-moxart_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
arch/arm/kernel/module-plts.c: In function 'in_init':
>> arch/arm/kernel/module-plts.c:36:23: error: dereferencing pointer to incomplete type 'const struct module'
return loc - (u32)mod->init_layout.base < mod->init_layout.size;
^~
arch/arm/kernel/module-plts.c: In function 'get_module_plt':
>> arch/arm/kernel/module-plts.c:41:56: error: dereferencing pointer to incomplete type 'struct module'
struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core :
^~
vim +36 arch/arm/kernel/module-plts.c
7d485f64 Ard Biesheuvel 2014-11-24 33
b7ede5a1 Ard Biesheuvel 2017-02-22 34 static bool in_init(const struct module *mod, unsigned long loc)
b7ede5a1 Ard Biesheuvel 2017-02-22 35 {
b7ede5a1 Ard Biesheuvel 2017-02-22 @36 return loc - (u32)mod->init_layout.base < mod->init_layout.size;
b7ede5a1 Ard Biesheuvel 2017-02-22 37 }
b7ede5a1 Ard Biesheuvel 2017-02-22 38
7d485f64 Ard Biesheuvel 2014-11-24 39 u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val)
7d485f64 Ard Biesheuvel 2014-11-24 40 {
b7ede5a1 Ard Biesheuvel 2017-02-22 @41 struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core :
b7ede5a1 Ard Biesheuvel 2017-02-22 42 &mod->arch.init;
b7ede5a1 Ard Biesheuvel 2017-02-22 43
b7ede5a1 Ard Biesheuvel 2017-02-22 44 struct plt_entries *plt = (struct plt_entries *)pltsec->plt->sh_addr;
66e94ba3 Ard Biesheuvel 2016-08-18 45 int idx = 0;
35fa91ee Ard Biesheuvel 2016-08-16 46
66e94ba3 Ard Biesheuvel 2016-08-18 47 /*
66e94ba3 Ard Biesheuvel 2016-08-18 48 * Look for an existing entry pointing to 'val'. Given that the
66e94ba3 Ard Biesheuvel 2016-08-18 49 * relocations are sorted, this will be the last entry we allocated.
66e94ba3 Ard Biesheuvel 2016-08-18 50 * (if one exists).
66e94ba3 Ard Biesheuvel 2016-08-18 51 */
b7ede5a1 Ard Biesheuvel 2017-02-22 52 if (pltsec->plt_count > 0) {
b7ede5a1 Ard Biesheuvel 2017-02-22 53 plt += (pltsec->plt_count - 1) / PLT_ENT_COUNT;
b7ede5a1 Ard Biesheuvel 2017-02-22 54 idx = (pltsec->plt_count - 1) % PLT_ENT_COUNT;
7d485f64 Ard Biesheuvel 2014-11-24 55
66e94ba3 Ard Biesheuvel 2016-08-18 56 if (plt->lit[idx] == val)
66e94ba3 Ard Biesheuvel 2016-08-18 57 return (u32)&plt->ldr[idx];
66e94ba3 Ard Biesheuvel 2016-08-18 58
66e94ba3 Ard Biesheuvel 2016-08-18 59 idx = (idx + 1) % PLT_ENT_COUNT;
66e94ba3 Ard Biesheuvel 2016-08-18 60 if (!idx)
66e94ba3 Ard Biesheuvel 2016-08-18 61 plt++;
66e94ba3 Ard Biesheuvel 2016-08-18 62 }
66e94ba3 Ard Biesheuvel 2016-08-18 63
b7ede5a1 Ard Biesheuvel 2017-02-22 64 pltsec->plt_count++;
b7ede5a1 Ard Biesheuvel 2017-02-22 65 BUG_ON(pltsec->plt_count * PLT_ENT_SIZE > pltsec->plt->sh_size);
7d485f64 Ard Biesheuvel 2014-11-24 66
66e94ba3 Ard Biesheuvel 2016-08-18 67 if (!idx)
7d485f64 Ard Biesheuvel 2014-11-24 68 /* Populate a new set of entries */
7d485f64 Ard Biesheuvel 2014-11-24 69 *plt = (struct plt_entries){
7d485f64 Ard Biesheuvel 2014-11-24 70 { [0 ... PLT_ENT_COUNT - 1] = PLT_ENT_LDR, },
7d485f64 Ard Biesheuvel 2014-11-24 71 { val, }
7d485f64 Ard Biesheuvel 2014-11-24 72 };
66e94ba3 Ard Biesheuvel 2016-08-18 73 else
66e94ba3 Ard Biesheuvel 2016-08-18 74 plt->lit[idx] = val;
66e94ba3 Ard Biesheuvel 2016-08-18 75
66e94ba3 Ard Biesheuvel 2016-08-18 76 return (u32)&plt->ldr[idx];
7d485f64 Ard Biesheuvel 2014-11-24 77 }
7d485f64 Ard Biesheuvel 2014-11-24 78
:::::: The code at line 36 was first introduced by commit
:::::: b7ede5a1f5905ac394cc8e61712a13e3c5cb7b8f ARM: 8662/1: module: split core and init PLT sections
:::::: TO: Ard Biesheuvel <ard.biesheuvel@linaro.org>
:::::: CC: Russell King <rmk+kernel@armlinux.org.uk>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 12748 bytes --]
next prev parent reply other threads:[~2018-01-31 12:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 23:49 Anders Roxell
2018-01-29 23:57 ` Russell King - ARM Linux
2018-01-31 11:25 ` Arnd Bergmann
2018-01-31 11:46 ` Russell King - ARM Linux
2018-01-31 20:14 ` Anders Roxell
2018-01-31 11:15 ` kbuild test robot
2018-01-31 12:12 ` kbuild test robot [this message]
2018-01-31 20:19 ` [PATCHv2] arch/arm/Kconfig: default ARM_MODULE_PLTS to 'y' Anders Roxell
2018-01-31 20:24 ` Ard Biesheuvel
2018-01-31 20:24 ` Arnd Bergmann
2018-01-31 20:25 ` Russell King - ARM Linux
2018-02-14 20:46 ` Anders Roxell
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=201801312036.gXYpKLF3%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=kbuild-all@01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®