mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Youling Tang <tangyouling@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	Xi Ruoyao <xry111@xry111.site>,
	Jinyang He <hejinyang@loongson.cn>
Cc: oe-kbuild-all@lists.linux.dev, Xuerui Wang <kernel@xen0n.name>,
	loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 4/5] LoongArch: Add support for kernel relocation
Date: Sat, 11 Feb 2023 02:01:40 +0800	[thread overview]
Message-ID: <202302110150.tIuRIiTp-lkp@intel.com> (raw)
In-Reply-To: <1676018856-26520-5-git-send-email-tangyouling@loongson.cn>

Hi Youling,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.2-rc7 next-20230210]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Youling-Tang/LoongArch-Use-la-pcrel-instead-of-la-abs-when-it-s-trivially-possible/20230210-165022
patch link:    https://lore.kernel.org/r/1676018856-26520-5-git-send-email-tangyouling%40loongson.cn
patch subject: [PATCH v4 4/5] LoongArch: Add support for kernel relocation
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20230211/202302110150.tIuRIiTp-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/26dc7750408c7f232632db44fab905df7b48d83c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Youling-Tang/LoongArch-Use-la-pcrel-instead-of-la-abs-when-it-s-trivially-possible/20230210-165022
        git checkout 26dc7750408c7f232632db44fab905df7b48d83c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash arch/loongarch/kernel/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302110150.tIuRIiTp-lkp@intel.com/

Note: functions only called from assembly code should be annotated with the asmlinkage attribute
All warnings (new ones prefixed by >>):

>> arch/loongarch/kernel/relocate.c:21:13: warning: no previous prototype for 'relocate_kernel' [-Wmissing-prototypes]
      21 | void __init relocate_kernel(void)
         |             ^~~~~~~~~~~~~~~


vim +/relocate_kernel +21 arch/loongarch/kernel/relocate.c

    20	
  > 21	void __init relocate_kernel(void)
    22	{
    23		reloc_offset = (unsigned long)_text - VMLINUX_LOAD_ADDRESS;
    24	
    25		if (reloc_offset) {
    26			Elf64_Rela *rela, *rela_end;
    27			rela = (Elf64_Rela *)&__rela_dyn_start;
    28			rela_end = (Elf64_Rela *)&__rela_dyn_end;
    29	
    30			for ( ; rela < rela_end; rela++) {
    31				Elf64_Addr addr = rela->r_offset;
    32				Elf64_Addr relocated_addr = rela->r_addend;
    33	
    34				if (rela->r_info != R_LARCH_RELATIVE)
    35					continue;
    36	
    37				if (relocated_addr >= VMLINUX_LOAD_ADDRESS)
    38					relocated_addr =
    39						(Elf64_Addr)RELOCATED(relocated_addr);
    40	
    41				*(Elf64_Addr *)RELOCATED(addr) = relocated_addr;
    42			}
    43		}
    44	}
    45	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  parent reply	other threads:[~2023-02-10 18:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  8:47 [PATCH v4 0/5] LoongArch: Add kernel relocation and KASLR support Youling Tang
2023-02-10  8:47 ` [PATCH v4 1/5] LoongArch: Use la.pcrel instead of la.abs when it's trivially possible Youling Tang
2023-02-10  9:04   ` Huacai Chen
2023-02-10  8:47 ` [PATCH v4 2/5] LoongArch: Use la.pcrel instead of la.abs for exception handlers Youling Tang
2023-02-10  9:09   ` Huacai Chen
2023-02-10  9:18     ` Youling Tang
2023-02-16  2:32       ` Youling Tang
2023-02-16  6:56         ` Huacai Chen
2023-02-16  6:59         ` Jinyang He
2023-02-16  7:10           ` Xi Ruoyao
2023-02-16  8:03             ` Youling Tang
2023-02-16 11:18               ` Youling Tang
2023-02-16 11:29                 ` Youling Tang
2023-02-10  8:47 ` [PATCH v4 3/5] LoongArch: Add JUMP_VIRT_ADDR macro implementation to avoid using la.abs Youling Tang
2023-02-10  8:47 ` [PATCH v4 4/5] LoongArch: Add support for kernel relocation Youling Tang
2023-02-10  9:05   ` Huacai Chen
2023-02-10 18:01   ` kernel test robot [this message]
2023-02-10  8:47 ` [PATCH v4 5/5] LoongArch: Add support for kernel address space layout randomization (KASLR) Youling Tang
2023-02-10  9:06   ` Youling Tang
2023-02-10  9:37     ` Youling Tang
2023-02-17  8:09   ` Xi Ruoyao
2023-02-17  8:24     ` Youling Tang

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=202302110150.tIuRIiTp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chenhuacai@kernel.org \
    --cc=hejinyang@loongson.cn \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tangyouling@loongson.cn \
    --cc=xry111@xry111.site \
    /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®