lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 11 Mar 2018 07:29:41 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>
Subject: kernel/jump_label.c:377:51: warning: cast to pointer from integer of
 different size

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3266b5bd97eaa72793df0b6e5a106c69ccc166c4
commit: dc1dd184c2f0016bec35c0d7a48c057e0ad763d3 jump_label: Warn on failed jump_label patching attempt
date:   2 weeks ago
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-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
        git checkout dc1dd184c2f0016bec35c0d7a48c057e0ad763d3
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   In file included from arch/sparc/include/asm/bug.h:21:0,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/memory.h:19,
                    from kernel/jump_label.c:8:
   kernel/jump_label.c: In function '__jump_label_update':
>> kernel/jump_label.c:377:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        WARN_ONCE(1, "can't patch jump_label at %pS", (void *)entry->code);
                                                      ^
   include/asm-generic/bug.h:91:69: note: in definition of macro '__WARN_printf'
    #define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
                                                                        ^~~
>> include/asm-generic/bug.h:153:3: note: in expansion of macro 'WARN'
      WARN(1, format);    \
      ^~~~
>> kernel/jump_label.c:377:5: note: in expansion of macro 'WARN_ONCE'
        WARN_ONCE(1, "can't patch jump_label at %pS", (void *)entry->code);
        ^~~~~~~~~

vim +377 kernel/jump_label.c

   363	
   364	static void __jump_label_update(struct static_key *key,
   365					struct jump_entry *entry,
   366					struct jump_entry *stop)
   367	{
   368		for (; (entry < stop) && (jump_entry_key(entry) == key); entry++) {
   369			/*
   370			 * An entry->code of 0 indicates an entry which has been
   371			 * disabled because it was in an init text area.
   372			 */
   373			if (entry->code) {
   374				if (kernel_text_address(entry->code))
   375					arch_jump_label_transform(entry, jump_label_type(entry));
   376				else
 > 377					WARN_ONCE(1, "can't patch jump_label at %pS", (void *)entry->code);
   378			}
   379		}
   380	}
   381	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (53472 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ