Re: [PATCH bpf v3] x86/cpufeature: bpf hack for clang not supporting asm goto

2018-05-10 Thread Borislav Petkov
On Thu, May 10, 2018 at 10:58:35AM -0700, Alexei Starovoitov wrote:
> libbcc is a library. It's not only used by bcc scripts, but by production
> services that compile bpf programs with clang.

Let me get this straight: libbcc fails to compile because it
includes (through some long include chain) the kernel header
arch/x86/include/asm/cpufeature.h.

Is that it?

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: [PATCH bpf v3] x86/cpufeature: bpf hack for clang not supporting asm goto

2018-05-10 Thread Borislav Petkov
On Thu, May 10, 2018 at 08:52:42AM -0700, Alexei Starovoitov wrote:
> That makes me wonder what happened with "we do not break user space" rule?

As someone already pointed out on IRC, arch/x86/include/asm/cpufeature.h
is solely a kernel header so nothing but kernel should include it. So
forget the userspace breakage "argument".

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: [PATCH bpf v3] x86/cpufeature: bpf hack for clang not supporting asm goto

2018-05-10 Thread Borislav Petkov
On Thu, May 03, 2018 at 08:31:19PM -0700, Yonghong Song wrote:
> Commit d0266046ad54 ("x86: Remove FAST_FEATURE_TESTS")
> removed X86_FAST_FEATURE_TESTS and make macro static_cpu_has() always
> use __always_inline function _static_cpu_has() funciton.
> The static_cpu_has() uses gcc feature asm goto construct,
> which is not supported by clang.
> 
> Issues
> ==
> 
> Currently, for BPF programs written in C, the only widely-supported
> compiler is clang. Because of clang lacking support
> of asm goto construct, if you try to compile
> bpf programs under samples/bpf/,
>$ make -j20 && make headers_install && make samples/bpf/
> you will see a lot of failures like below:
> 
>   clang  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include \
>  -I/home/yhs/work/bpf-next/arch/x86/include \
>  -I./arch/x86/include/generated  -I/home/yhs/work/bpf-next/include \
>  -I./include -I/home/yhs/work/bpf-next/arch/x86/include/uapi \
>  -I./arch/x86/include/generated/uapi \
>  -I/home/yhs/work/bpf-next/include/uapi -I./include/generated/uapi \
>  -include /home/yhs/work/bpf-next/include/linux/kconfig.h
>  -Isamples/bpf \
>-I/home/yhs/work/bpf-next/tools/testing/selftests/bpf/ \
>-D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \
>-D__TARGET_ARCH_x86 -Wno-compare-distinct-pointer-types \
>-Wno-gnu-variable-sized-type-not-at-end \
>-Wno-address-of-packed-member -Wno-tautological-compare \
>-Wno-unknown-warning-option  \
>-O2 -emit-llvm -c 
> /home/yhs/work/bpf-next/samples/bpf/xdp_redirect_cpu_kern.c \
>  -o -| llc -march=bpf -filetype=obj -o 
> samples/bpf/xdp_redirect_cpu_kern.o
>   In file included from 
> /home/yhs/work/bpf-next/samples/bpf/xdp_redirect_cpu_kern.c:10:

This is not the kernel's problem.

Fix the samples to build successfully like the rest of the things in
tools/ use kernel machinery and undefine/redefine stuff so that it
builds. For example, tools/include/asm/alternative-asm.h redefines two
macros. So do something along those lines.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: NETDEV WATCHDOG: eth0 (tg3): transmit queue 0 timed out

2018-03-26 Thread Borislav Petkov
On Tue, Mar 20, 2018 at 11:41:06AM +0530, Satish Baddipadige wrote:
> Can you please test the attached patch?

Well, the network connection just died with it. It didn't fire the
netdev watchdog but I still had to down and up eth0 in order to continue
using it. ssh connection into the box survived so I didn't have to login
again but it still died intermittently.

I'll keep playing with it to see if I'll catch some sort of splat...

Thx.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: NETDEV WATCHDOG: eth0 (tg3): transmit queue 0 timed out

2018-03-20 Thread Borislav Petkov
On Tue, Mar 20, 2018 at 11:41:06AM +0530, Satish Baddipadige wrote:
> Can you please test the attached patch?

Sure, will do when I get back next week.

Thx.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply. Srsly.


NETDEV WATCHDOG: eth0 (tg3): transmit queue 0 timed out

2018-02-24 Thread Borislav Petkov
Hi,

this didn't happen before but after 4.16-rc1 my tg3 nic stops for
whatever reason and the connection to the machine is dead. It didn't show
anything in dmesg until today.

The IO pagefaults look like it is trying to access something it
shouldn't and maybe that's why it times out.

It triggers pretty quickly so I'd call it a reliable reproducer and thus
I can test patches... :-)

Thx.

...
[   15.916840] random: crng init done
[   44.792699] tg3 :01:00.0 eth0: Link is up at 100 Mbps, full duplex
[   44.793024] tg3 :01:00.0 eth0: Flow control is on for TX and on for RX
[   44.793315] tg3 :01:00.0 eth0: EEE is disabled
[   44.793395] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   58.216474] tg3 :01:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT 
domain=0x0001 address=0x0001f0c0 flags=0x]
[   58.216943] tg3 :01:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT 
domain=0x0001 address=0x0001f100 flags=0x]
[   58.217395] tg3 :01:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT 
domain=0x0001 address=0x0001f140 flags=0x]
[   58.217844] tg3 :01:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT 
domain=0x0001 address=0x0001f180 flags=0x]
[   64.992145] [ cut here ]
[   64.992406] NETDEV WATCHDOG: eth0 (tg3): transmit queue 0 timed out
[   64.992742] WARNING: CPU: 1 PID: 0 at net/sched/sch_generic.c:464 
dev_watchdog+0x1fe/0x210
[   64.992744] Modules linked in: arc4 iwlmvm mac80211 amdgpu kvm_amd kvm 
iwlwifi irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel 
snd_hda_codec_conexant snd_hda_codec_hdmi snd_hda_codec_generic aesni_intel 
sha256_generic aes_x86_64 crypto_simd snd_hda_intel cryptd glue_helper tg3 
snd_hda_codec pcspkr snd_hwdep cfg80211 joydev psmouse ptp snd_hda_core hp_wmi 
pps_core snd_pcm ehci_pci chash tpm_infineon rfkill libphy i2c_piix4 snd_timer 
fam15h_power xhci_pci ehci_hcd snd sg gpu_sched k10temp soundcore xhci_hcd 
tpm_tis tpm_tis_core video tpm battery button ac acpi_cpufreq evdev input_leds 
serio_raw sd_mod thermal pinctrl_amd
[   64.993216] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.16.0-rc1+ #2
[   64.993222] Hardware name: HP HP EliteBook 745 G3/807E, BIOS N73 Ver. 01.08 
01/28/2016
[   64.996048] RIP: 0010:dev_watchdog+0x1fe/0x210
[   64.996050] RSP: 0018:88043dc83e88 EFLAGS: 00010282
[   64.996052] RAX:  RBX:  RCX: 0103
[   64.996054] RDX: 8103 RSI: 0086 RDI: 
[   64.996055] RBP: 88042b86e39c R08: 81c0a400 R09: 0001
[   64.996057] R10: 035a R11:  R12: 88042b86e3b0
[   64.996058] R13: 88042b86e000 R14: 0005 R15: 88042a0ced80
[   64.996061] FS:  () GS:88043dc8() 
knlGS:
[   64.996063] CS:  0010 DS:  ES:  CR0: 80050033
[   64.996065] CR2: 7f98ed87eb00 CR3: 000428ea CR4: 001406e0
[   64.996068] Call Trace:
[   64.996074]  
[   64.996082]  ? qdisc_reset+0xe0/0xe0
[   64.996085]  ? qdisc_reset+0xe0/0xe0
[   64.996092]  call_timer_fn+0x2b/0x150
[   64.996097]  run_timer_softirq+0x415/0x460
[   64.996101]  ? tick_sched_timer+0x42/0x90
[   64.996106]  ? _raw_spin_lock_irq+0x1a/0x40
[   64.996110]  ? __hrtimer_run_queues+0x113/0x2d0
[   64.996114]  __do_softirq+0xeb/0x2d5
[   64.996121]  irq_exit+0xaa/0xb0
[   64.996125]  smp_apic_timer_interrupt+0x73/0x150
[   64.996128]  apic_timer_interrupt+0x7d/0x90
[   64.996131]  
[   64.996136] RIP: 0010:cpuidle_enter_state+0xa3/0x2f0
[   64.996138] RSP: 0018:c900019c3ea8 EFLAGS: 0246 ORIG_RAX: 
ff12
[   64.996141] RAX: 88043dc8 RBX: 000f21d4b954 RCX: 001f
[   64.996142] RDX: 000f21d4b954 RSI: 81da4ca1 RDI: 81db2a9e
[   64.996144] RBP: 88042a39a200 R08: 0005a0b5 R09: 000585fa
[   64.996145] R10: 0018 R11: 00049370 R12: 0002
[   64.996146] R13: 82095db8 R14:  R15: 000f0b23994e
[   64.996157]  ? cpuidle_enter_state+0x93/0x2f0
[   65.003171]  do_idle+0x19a/0x1f0
[   65.003176]  cpu_startup_entry+0x6f/0x80
[   65.003181]  start_secondary+0x1a5/0x200
[   65.003185]  secondary_startup_64+0xa5/0xb0
[   65.003189] Code: 00 49 63 4c 24 f0 eb 93 4c 89 ef c6 05 5b 10 af 00 01 e8 
b6 67 fd ff 89 d9 48 89 c2 4c 89 ee 48 c7 c7 20 f6 df 81 e8 e2 8d a7 ff <0f> ff 
eb be 0f 1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 
[   65.003234] ---[ end trace b191673f18a75f41 ]---
[   65.003243] tg3 :01:00.0 eth0: transmit timed out, resetting
[   67.679695] tg3 :01:00.0 eth0: 0x: 0x168714e4, 0x10100406, 
0x0210, 0x
[   67.680053] tg3 :01:00.0 eth0: 0x0010: 0xd082000c, 0x, 
0xd081000c, 0x
[   67.680406] tg3 :01:00.0 eth0: 0x0020: 0xd08c, 0x, 
0x, 0x807e103c
[   67.680419] tg3 :01:00.0 eth0: 0x0030: 0x, 

Re: [-next PATCH 4/4] treewide: Use DEVICE_ATTR_WO

2017-12-19 Thread Borislav Petkov
On Tue, Dec 19, 2017 at 10:51:14AM -0800, Joe Perches wrote:
> > The reason for the code churn being?
> 
> Consistency for easier grep by use-type.

Please explain that in the commit message so that we know why it was
changed.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: [-next PATCH 4/4] treewide: Use DEVICE_ATTR_WO

2017-12-19 Thread Borislav Petkov
On Tue, Dec 19, 2017 at 10:15:09AM -0800, Joe Perches wrote:
> Convert DEVICE_ATTR uses to DEVICE_ATTR_WO where possible.
> 
> Done with perl script:
> 
> $ git grep -w --name-only DEVICE_ATTR | \
>   xargs perl -i -e 'local $/; while (<>) { 
> s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(?:\s*S_IWUSR\s*|\s*0200\s*)\)?\s*,\s*NULL\s*,\s*\s_store\s*\)/DEVICE_ATTR_WO(\1)/g;
>  print;}'
> 
> Signed-off-by: Joe Perches 
> ---
>  arch/s390/kernel/smp.c | 2 +-
>  arch/x86/kernel/cpu/microcode/core.c   | 2 +-
>  drivers/input/touchscreen/elants_i2c.c | 2 +-
>  drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
>  drivers/net/wimax/i2400m/sysfs.c   | 3 +--
>  drivers/scsi/lpfc/lpfc_attr.c  | 3 +--
>  drivers/thermal/thermal_sysfs.c| 2 +-
>  7 files changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
> index b8c1a85bcf2d..a919b2f0141d 100644
> --- a/arch/s390/kernel/smp.c
> +++ b/arch/s390/kernel/smp.c
> @@ -1151,7 +1151,7 @@ static ssize_t __ref rescan_store(struct device *dev,
>   rc = smp_rescan_cpus();
>   return rc ? rc : count;
>  }
> -static DEVICE_ATTR(rescan, 0200, NULL, rescan_store);
> +static DEVICE_ATTR_WO(rescan);
>  #endif /* CONFIG_HOTPLUG_CPU */
>  
>  static int __init s390_smp_init(void)
> diff --git a/arch/x86/kernel/cpu/microcode/core.c 
> b/arch/x86/kernel/cpu/microcode/core.c
> index c4fa4a85d4cb..09c74b0560dd 100644
> --- a/arch/x86/kernel/cpu/microcode/core.c
> +++ b/arch/x86/kernel/cpu/microcode/core.c
> @@ -560,7 +560,7 @@ static ssize_t pf_show(struct device *dev,
>   return sprintf(buf, "0x%x\n", uci->cpu_sig.pf);
>  }
>  
> -static DEVICE_ATTR(reload, 0200, NULL, reload_store);
> +static DEVICE_ATTR_WO(reload);
>  static DEVICE_ATTR(version, 0400, version_show, NULL);
>  static DEVICE_ATTR(processor_flags, 0400, pf_show, NULL);
>  

# cat /sys/devices/system/cpu/microcode/reload
cat: /sys/devices/system/cpu/microcode/reload: Permission denied

The reason for the code churn being?

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog

2017-06-14 Thread Borislav Petkov
Hi,

when I run a small CPU hotplugging script while I'm logged into the
machine over ssh, I see the dev watchdog timeout below. Driver is
e1000e.

After the eth0 reset, I ifdown/ifup the eth0 interface and it comes back
up again just fine.

Any ideas?

Kernel is -rc5 + tip/master.

...
[   48.954397] Broke affinity for irq 29
[   48.954402] Broke affinity for irq 30
[   48.954407] Broke affinity for irq 31
[   48.955486] smpboot: CPU 3 is now offline
[   48.989339] x86: Booting SMP configuration:
[   48.989864] smpboot: Booting Node 0 Processor 1 APIC 0x1
[   49.009156] smpboot: Booting Node 0 Processor 2 APIC 0x2
[   49.033626] smpboot: Booting Node 0 Processor 3 APIC 0x3
[   62.944886] NETDEV WATCHDOG: eth0 (e1000e): transmit queue 0 timed out
[   62.946579] [ cut here ]
[   62.947842] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:316 
dev_watchdog+0x21b/0x220
[   62.947844] Modules linked in: msr cpufreq_powersave cpufreq_userspace 
cpufreq_conservative binfmt_misc uinput vfat fat l
oop dm_crypt dm_mod dax hid_generic usbhid hid x86_pkg_temp_thermal coretemp 
kvm_intel arc4 kvm irqbypass crc32_pclmul iwldv
m crc32c_intel iTCO_wdt ghash_clmulni_intel iTCO_vendor_support mac80211 
snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_co
dec_generic aesni_intel aes_x86_64 crypto_simd cryptd iwlwifi sdhci_pci 
snd_hda_intel glue_helper snd_hda_codec intel_cstate
 intel_rapl_perf snd_hwdep sdhci snd_hda_core pcspkr serio_raw i2c_i801 
mmc_core snd_pcm sg cfg80211 lpc_ich ehci_pci mfd_co
re thinkpad_acpi snd_timer ehci_hcd wmi nvram thermal snd soundcore xhci_pci 
led_class ac battery xhci_hcd
[   62.947949] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.12.0-rc5+ #2
[   62.947951] Hardware name: LENOVO 2320CTO/2320CTO, BIOS G2ET86WW (2.06 ) 
11/13/2012
[   62.947953] task: 85814500 task.stack: 8580
[   62.947957] RIP: 0010:dev_watchdog+0x21b/0x220
[   62.947959] RSP: 0018:a3ecdd203e48 EFLAGS: 00010296
[   62.947963] RAX: 003a RBX:  RCX: 
[   62.947965] RDX: 0103 RSI: 00f6 RDI: 0001
[   62.947967] RBP: a3ecdd203e78 R08:  R09: 0001
[   62.947968] R10:  R11:  R12: a3ecd3bef480
[   62.947970] R13:  R14: a3ecd20c4000 R15: 0001
[   62.947973] FS:  () GS:a3ecdd20() 
knlGS:
[   62.947975] CS:  0010 DS:  ES:  CR0: 80050033
[   62.947977] CR2: 7fa6610d3000 CR3: 4f80f000 CR4: 001406f0
[   62.947979] Call Trace:
[   62.947982]  
[   62.947989]  ? qdisc_rcu_free+0x50/0x50
[   62.947996]  call_timer_fn+0x93/0x370
[   62.948004]  ? qdisc_rcu_free+0x50/0x50
[   62.948008]  run_timer_softirq+0x231/0x600
[   62.948014]  ? ktime_get+0x8e/0x110
[   62.948027]  __do_softirq+0x11b/0x496
[   62.948039]  irq_exit+0xb5/0xc0
[   62.948043]  smp_apic_timer_interrupt+0x3d/0x50
[   62.948047]  apic_timer_interrupt+0x90/0xa0
[   62.948053] RIP: 0010:cpuidle_enter_state+0x143/0x3b0
[   62.948055] RSP: 0018:85803df0 EFLAGS: 0206 ORIG_RAX: 
ff10
[   62.948059] RAX: 85814500 RBX: 0005 RCX: 0001
[   62.948061] RDX: 20c49ba5e353f7cf RSI: 0001 RDI: 85814500
[   62.948063] RBP: 85803e28 R08: a3ecdd217ae4 R09: 0018
[   62.948064] R10:  R11:  R12: 0005
[   62.948066] R13: a3ecdd2221d0 R14: 858b1518 R15: 000ea217da13
[   62.948069]  
[   62.948089]  cpuidle_enter+0x17/0x20
[   62.948094]  call_cpuidle+0x23/0x40
[   62.948098]  do_idle+0x188/0x1d0
[   62.948105]  cpu_startup_entry+0x62/0x70
[   62.948111]  rest_init+0xcf/0xe0
[   62.948120]  start_kernel+0x3a9/0x3b6
[   62.948128]  x86_64_start_reservations+0x29/0x2b
[   62.948134]  x86_64_start_kernel+0x187/0x198
[   62.948144]  secondary_startup_64+0x9f/0x9f
[   62.948148]  ? secondary_startup_64+0x9f/0x9f
[   62.948162] Code: 63 8e 18 04 00 00 eb 95 4c 89 f7 c6 05 d6 29 62 00 01 e8 
59 6f fd ff 89 d9 4c 89 f6 48 c7 c7 e0 de 6c 8
5 48 89 c2 e8 99 c0 a9 ff <0f> ff eb c3 90 0f 1f 44 00 00 48 c7 47 08 00 00 00 
00 55 48 c7 
[   62.948242] ---[ end trace 5af3fdd778e0ef18 ]---
[   62.948463] e1000e :00:19.0 eth0: Reset adapter unexpectedly
[   64.750919] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: 
Rx/Tx


-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: [net/bpf] 3051bf36c2 BUG: unable to handle kernel paging request at 0000a7cf

2017-03-12 Thread Borislav Petkov
On Thu, Mar 09, 2017 at 03:26:02PM -0800, Linus Torvalds wrote:
> Maybe it's the lguest games with PGE that need to be removed?

Btw, tglx suggested something else the other day: warn when we're
changing boot_cpu_data x86_capability bits *after* alternatives have
run. The reasoning behind it being that potentially some patching
static_cpu_has() has done won't be correct anymore.

And it is pretty cheap to do it, it fires nicely on the 32-bit config
with LGUEST=y.

---
diff --git a/arch/x86/include/asm/cpufeature.h 
b/arch/x86/include/asm/cpufeature.h
index d59c15c3defd..f06c3dc6db70 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -124,8 +124,18 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
 
 #define boot_cpu_has(bit)  cpu_has(_cpu_data, bit)
 
-#define set_cpu_cap(c, bit)set_bit(bit, (unsigned long 
*)((c)->x86_capability))
-#define clear_cpu_cap(c, bit)  clear_bit(bit, (unsigned long 
*)((c)->x86_capability))
+#define set_cpu_cap(c, bit)\
+({ \
+   WARN_ON(c == _cpu_data && alternatives_patched);   \
+   set_bit(bit, (unsigned long *)((c)->x86_capability));   \
+})
+
+#define clear_cpu_cap(c, bit)  \
+({ \
+   WARN_ON(c == _cpu_data && alternatives_patched);   \
+   clear_bit(bit, (unsigned long *)((c)->x86_capability)); \
+})
+
 #define setup_clear_cpu_cap(bit) do { \
clear_cpu_cap(_cpu_data, bit); \
set_bit(bit, (unsigned long *)cpu_caps_cleared); \

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 


Re: [net/bpf] 3051bf36c2 BUG: unable to handle kernel paging request at 0000a7cf

2017-03-09 Thread Borislav Petkov
On Thu, Mar 09, 2017 at 03:26:02PM -0800, Linus Torvalds wrote:
> So should all of commit ("c109bf95992b x86/cpufeature: Remove
> cpu_has_pge") just be reverted (and then marked for stable)?
> 
> Or do we have some alternate plan?

I think we want to do this:

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 6fa85944af83..fc5abff9b7fd 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -188,7 +188,7 @@ static inline void __native_flush_tlb_single(unsigned long 
addr)
 
 static inline void __flush_tlb_all(void)
 {
-   if (static_cpu_has(X86_FEATURE_PGE))
+   if (boot_cpu_has(X86_FEATURE_PGE))
__flush_tlb_global();
else
__flush_tlb();
---

but it is late here so I'd prefer to do a real patch tomorrow when I'm
not almost sleeping on the keyboard. Unless Daniel wants to write one
and test it now.

> This has apparently been going on for a long while (it got merged into
> 4.7), but presumably it only actually _matters_ if lguest is enabled
> and used and we've triggered that lguest_arch_host_init() code.

That's what I gather too, yes.

What sane code would go and clear X86_FEATURE_PGE?!? :-)))

> Maybe it's the lguest games with PGE that need to be removed?

Well, as far as I can read the comment in lguest_arch_host_init(), it
does some monkey business with switching to the guest kernel where
global pages are not present anymore... or something. So it sounds to me
like lguest would break if we removed the games but I have no idea what
it does with that.

And besides, the small hunk above restores the situation before
("c109bf95992b x86/cpufeature: Remove cpu_has_pge") so applying it would
actually be a no-brainer.

Thanks.

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 


Re: [net/bpf] 3051bf36c2 BUG: unable to handle kernel paging request at 0000a7cf

2017-03-09 Thread Borislav Petkov
On Thu, Mar 09, 2017 at 11:11:17PM +0100, Daniel Borkmann wrote:
> Yeah, I just tried that out and it had no effect unfortunately, the
> static_cpu_has() was still 1.

Right, just as I thought.

I guess we could return to doing boot_cpu_has() in __flush_tlb_all()
then. I mean, the timing-sensitivity argument is meh - killing global
TLB entries a bit faster doesn't bring me a whole lot when I have to go
and walk pagetable and reestablish them, which is the real price to pay
anyway.

Thanks.

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 


Re: [net/bpf] 3051bf36c2 BUG: unable to handle kernel paging request at 0000a7cf

2017-03-09 Thread Borislav Petkov
On Thu, Mar 09, 2017 at 10:32:12PM +0100, Daniel Borkmann wrote:
>   get_online_cpus();
>   if (boot_cpu_has(X86_FEATURE_PGE)) { /* We have a broader idea of 
> "global". */
>   /* Remember that this was originally set (for cleanup). */
>   cpu_had_pge = 1;
>   /*
>* adjust_pge is a helper function which sets or unsets the PGE
>* bit on its CPU, depending on the argument (0 == unset).
>*/
>   on_each_cpu(adjust_pge, (void *)0, 1);
>   /* Turn off the feature in the global feature set. */
>   clear_cpu_cap(_cpu_data, X86_FEATURE_PGE);

Can you make that:

setup_clear_cpu_cap(X86_FEATURE_PGE);

and see if it fixes your issue?

Thanks.

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 


Re: [net/bpf] 3051bf36c2 BUG: unable to handle kernel paging request at 0000a7cf

2017-03-09 Thread Borislav Petkov
On Thu, Mar 09, 2017 at 10:55:47PM +0100, Borislav Petkov wrote:
> Can you make that:
> 
>   setup_clear_cpu_cap(X86_FEATURE_PGE);
> 
> and see if it fixes your issue?

Hmm, in reading the thread a bit more, that might not work. If I see it
correctly, lguest does

 clear_cpu_cap(_cpu_data, X86_FEATURE_PGE);

after the alternatives have run and static_cpu_has() sites have already
been patched so clearing that bit won't bring anything.

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 


Re: [PATCH v3 4/8] x86: stop exporting msr-index.h to userland

2017-01-13 Thread Borislav Petkov
On Fri, Jan 13, 2017 at 05:08:34PM +0100, Nicolas Dichtel wrote:
> Le 13/01/2017 à 16:43, David Howells a écrit :
> >> -header-y += msr-index.h
> > 
> > I see it on my desktop as /usr/include/asm/msr-index.h and it's been there 
> > at
> > least four years - and as such it's part of the UAPI.  I don't think you can
> > remove it unless you can guarantee there are no userspace users.
> I keep it in the v2 of the series, but the maintainer, Borislav Petkov, asks 
> me
> to un-export it.
> 
> I will follow the maintainer decision.

I'm not the maintainer. I simply think that exporting that file was
wrong because it if we change something in it, we will break userspace.
And that should not happen - if userspace needs MSRs, it should do its
own defines.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: [PATCH v2 4/7] x86: put msr-index.h in uapi

2017-01-06 Thread Borislav Petkov
On Fri, Jan 06, 2017 at 10:43:56AM +0100, Nicolas Dichtel wrote:
> This header file is exported, thus move it to uapi.

It should rather not be exported - please remove it from
arch/x86/include/uapi/asm/Kbuild instead.

Thanks.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: linux-next: manual merge of the net-next tree with the net tree

2016-11-29 Thread Borislav Petkov
On Tue, Nov 29, 2016 at 11:22:32AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the net-next tree got a conflict in:
> 
>   drivers/net/ethernet/amd/xgbe/xgbe-main.c
> 
> between commit:
> 
>   91eefaabf102 ("amd-xgbe: Fix unused suspend handlers build warning")
> 
> from the net tree and commit:
> 
>   bd8255d8ba35 ("amd-xgbe: Prepare for supporting PCI devices")
> 
> from the net-next tree.
> 
> I fixed it up (the latter removed the code modified by the former)

... except that +#ifdef CONFIG_PM is present in the new
drivers/net/ethernet/amd/xgbe/xgbe-platform.c now.

So actually the proper fix is, IMO, to convert:

+#ifdef CONFIG_PM
+static int xgbe_platform_suspend(struct device *dev)

to

+#ifdef CONFIG_PM_SLEEP
+static int xgbe_platform_suspend(struct device *dev)

so that it doesn't fire again.

David, would you prefer a patch against linux-next?

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 


[PATCH] amd-xgbe: Fix unused suspend handlers build warning

2016-11-26 Thread Borislav Petkov
From: Borislav Petkov <b...@suse.de>

Fix:

  drivers/net/ethernet/amd/xgbe/xgbe-main.c:835:12: warning: ‘xgbe_suspend’ 
defined
but not used [-Wunused-function]
  drivers/net/ethernet/amd/xgbe/xgbe-main.c:855:12: warning: ‘xgbe_resume’ 
defined
but not used [-Wunused-function]

I see it during randconfig builds here.

Signed-off-by: Borislav Petkov <b...@suse.de>
Cc: Tom Lendacky <thomas.lenda...@amd.com>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/amd/xgbe/xgbe-main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c 
b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
index e10e569c0d5f..2e8451b0a74a 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
@@ -831,7 +831,7 @@ static int xgbe_remove(struct platform_device *pdev)
return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int xgbe_suspend(struct device *dev)
 {
struct net_device *netdev = dev_get_drvdata(dev);
@@ -876,7 +876,7 @@ static int xgbe_resume(struct device *dev)
 
return ret;
 }
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM_SLEEP */
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id xgbe_acpi_match[] = {
-- 
2.10.0



Re: Kernel 4.8.7 crashing down cleanup_net()

2016-11-13 Thread Borislav Petkov
Hmm, there's cleanup_net() namespaces fun in there, adding netdev@.

On Sat, Nov 12, 2016 at 02:17:03PM -0800, Ashton Holmes wrote:
> I upgraded to 4.8.7 and the system boots and my root partition gets
> decrypted but right after that both of my monitors turn off and
> looking at syslog from 4.8.6 shows the following:
> 
> Nov 12 11:54:24 user-desktop kernel: [   19.853197] [ cut
> here ]
> Nov 12 11:54:24 user-desktop kernel: [   19.853206] WARNING: CPU: 2
> PID: 177 at fs/proc/proc_sysctl.c:1607 ops_exit_list.isra.4+0x33/0x60
> Nov 12 11:54:24 user-desktop kernel: [   19.853210] Modules linked in:
> amdgpu eeepc_wmi i2c_algo_bit asus_wmi drm_kms_helper video rfkill
> snd_hda_codec_realtek ttm snd_hda_codec_generic snd_hda_codec_hdmi drm
> snd_hda_intel snd_usb_audio sparse_keymap snd_hda_codec mxm_wmi
> snd_usbmidi_lib snd_hda_core efi_pstore snd_hwdep snd_rawmidi evdev
> snd_seq_device joydev snd_pcm serio_raw pcspkr efivars fam15h_power
> k10temp snd_timer snd sp5100_tco i2c_piix4 sg soundcore i2c_core
> shpchp tpm_infineon tpm_tis tpm_tis_core tpm wmi button it87 hwmon_vid
> autofs4 ext4 crc16 jbd2 mbcache algif_skcipher af_alg dm_crypt dm_mod
> hid_generic usbhid hid sr_mod cdrom sd_mod ohci_pci crct10dif_pclmul
> crc32_pclmul crc32c_intel aesni_intel aes_x86_64 glue_helper lrw
> gf128mul ablk_helper cryptd psmouse ohci_hcd ahci libahci ehci_pci
> ehci_hcd libata xhci_pci xhci_hcd e1000e usbcore scsi_mod ptp
> usb_common pps_core
> Nov 12 11:54:24 user-desktop kernel: [   19.853264] CPU: 2 PID: 177
> Comm: kworker/u16:2 Not tainted 4.8.7 #1
> Nov 12 11:54:24 user-desktop kernel: [   19.853267] Hardware name: To
> be filled by O.E.M. To be filled by O.E.M./CROSSHAIR V FORMULA-Z, BIOS
> 2201 03/23/2015
> Nov 12 11:54:24 user-desktop kernel: [   19.853273] Workqueue: netns 
> cleanup_net
> Nov 12 11:54:24 user-desktop kernel: [   19.853276]  0286
> b98071d2 81302a8f 
> Nov 12 11:54:24 user-desktop kernel: [   19.853281]  
> 81076f54 880814f88040 8808140efdf0
> Nov 12 11:54:24 user-desktop kernel: [   19.853285]  818f11d8
> 818f11e0 8808140efde0 0200
> Nov 12 11:54:24 user-desktop kernel: [   19.853290] Call Trace:
> Nov 12 11:54:24 user-desktop kernel: [   19.853295]
> [] ? dump_stack+0x5c/0x7d
> Nov 12 11:54:24 user-desktop kernel: [   19.853299]
> [] ? __warn+0xc4/0xe0
> Nov 12 11:54:24 user-desktop kernel: [   19.853302]
> [] ? ops_exit_list.isra.4+0x33/0x60
> Nov 12 11:54:24 user-desktop kernel: [   19.853305]
> [] ? cleanup_net+0x1b0/0x290
> Nov 12 11:54:24 user-desktop kernel: [   19.853309]
> [] ? process_one_work+0x14d/0x410
> Nov 12 11:54:24 user-desktop kernel: [   19.853312]
> [] ? worker_thread+0x62/0x490
> Nov 12 11:54:24 user-desktop kernel: [   19.853315]
> [] ? rescuer_thread+0x340/0x340
> Nov 12 11:54:24 user-desktop kernel: [   19.853318]
> [] ? kthread+0xdf/0x100
> Nov 12 11:54:24 user-desktop kernel: [   19.853322]
> [] ? __switch_to+0x2bb/0x710
> Nov 12 11:54:24 user-desktop kernel: [   19.853325]
> [] ? ret_from_fork+0x1f/0x40
> Nov 12 11:54:24 user-desktop kernel: [   19.853328]
> [] ? kthread_park+0x50/0x50
> Nov 12 11:54:24 user-desktop kernel: [   19.853331] ---[ end trace
> c4840b46b58dbe12 ]---
> 

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: WARNING: CPU: 1 PID: 2485 at drivers/net/wireless/intel/iwlwifi/pcie/trans.c:1752 iwl_trans_pcie_grab_nic_access+0x110/0x120 [iwlwifi]

2016-04-16 Thread Borislav Petkov
On Fri, Apr 15, 2016 at 04:16:02AM +, Grumbach, Emmanuel wrote:
> [1] https://git.kernel.org/cgit/linux/kernel/git/iwlwifi/backport-iwlwi
> fi.git/

It is very strange to pull from this repo, git fetch is doing something
for a while now without any forward progress.

In any case, 4.5 is bad too, testing 4.4 now. I'm travelling currently
so the whole bisection deal will take a whole but I'll get to it
eventually.

Thanks for taking a look.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply. Srsly.


WARNING: CPU: 1 PID: 2485 at drivers/net/wireless/intel/iwlwifi/pcie/trans.c:1752 iwl_trans_pcie_grab_nic_access+0x110/0x120 [iwlwifi]

2016-04-14 Thread Borislav Petkov
Hi,

so I'm seeing this when wlan0 tries to associate. On 4.6-rc2 + tip.
After that, wifi is dead in the water. Anyone have a clue?

And 4.5 seems fine, I'm typing from it as we speak.

...
[2.111418] iwlwifi :02:00.0: loaded firmware version 21.302800.0 
op_mode iwlmvm
...
[2.220954] iwlwifi :02:00.0: Detected Intel(R) Dual Band Wireless AC 
7265, REV=0x210
[2.221460] iwlwifi :02:00.0: L1 Enabled - LTR Disabled
[2.221988] iwlwifi :02:00.0: L1 Enabled - LTR Disabled
...
[  311.776764] iwlwifi :02:00.0: L1 Enabled - LTR Disabled
[  311.777226] iwlwifi :02:00.0: L1 Enabled - LTR Disabled
[  311.837783] iwlwifi :02:00.0: L1 Enabled - LTR Disabled
[  311.838262] iwlwifi :02:00.0: L1 Enabled - LTR Disabled
[  311.853871] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  315.606321] wlan0: authenticate with 00:c0:23:b9:ff:10
[  315.609802] wlan0: send auth to 00:c0:23:b9:ff:10 (try 1/3)
[  315.612246] wlan0: authenticated
[  315.612656] iwlwifi :02:00.0 wlan0: disabling HT as WMM/QoS is not 
supported by the AP
[  315.612946] iwlwifi :02:00.0 wlan0: disabling VHT as WMM/QoS is not 
supported by the AP
[  315.614655] wlan0: associate with 00:c0:23:b9:ff:10 (try 1/3)
[  315.718696] wlan0: associate with 00:c0:23:b9:ff:10 (try 2/3)
[  315.722311] wlan0: deauthenticated from 00:c0:23:b9:ff:10 while associating 
(Reason: 6=CLASS2_FRAME_FROM_NONAUTH_STA)
[  316.159994] wlan0: authenticate with 00:c0:23:ba:5a:70
[  316.162826] wlan0: send auth to 00:c0:23:ba:5a:70 (try 1/3)
[  316.166422] wlan0: authenticated
[  316.166864] iwlwifi :02:00.0 wlan0: disabling HT as WMM/QoS is not 
supported by the AP
[  316.167164] iwlwifi :02:00.0 wlan0: disabling VHT as WMM/QoS is not 
supported by the AP
[  316.170689] wlan0: associate with 00:c0:23:ba:5a:70 (try 1/3)
[  316.173951] wlan0: RX AssocResp from 00:c0:23:ba:5a:70 (capab=0x121 status=0 
aid=4)
[  316.175966] wlan0: associated
[  316.176160] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  653.272205] iwlwifi :02:00.0: Failed to wake NIC for hcmd
[  653.272497] iwlwifi :02:00.0: Error sending STATISTICS_CMD: enqueue_hcmd 
failed: -5
[  653.290868] iwlwifi :02:00.0: Failed to wake NIC for hcmd
[  653.291211] iwlwifi :02:00.0: Error sending STATISTICS_CMD: enqueue_hcmd 
failed: -5
[  661.124556] iwlwifi :02:00.0: Queue 2 stuck for 1 ms.
[  661.124748] iwlwifi :02:00.0: Current SW read_ptr 59 write_ptr 63
[  661.142657] [ cut here ]
[  661.142816] WARNING: CPU: 1 PID: 2485 at 
drivers/net/wireless/intel/iwlwifi/pcie/trans.c:1752 
iwl_trans_pcie_grab_nic_access+0x110/0x120 [iwlwifi]
[  661.143231] Timeout waiting for hardware access (CSR_GP_CNTRL 0x)
[  661.143449] Modules linked in: msr hid_generic arc4 kvm_amd kvm irqbypass 
crct10dif_pclmul crc32_pclmul iwlmvm crc32c_intel mac80211 jitterentropy_rng 
sha256_generic hmac acpi_cpufreq tpm_infineon drbg amdgpu iwlwifi aesni_intel 
snd_hda_codec_conexant aes_x86_64 glue_helper lrw snd_hda_codec_generic 
gf128mul snd_hda_codec_hdmi ablk_helper cryptd psmouse snd_hda_intel evdev 
joydev input_leds cfg80211 snd_hda_codec serio_raw pcspkr snd_hwdep 
snd_hda_core tg3 snd_pcm fam15h_power ptp edac_core pps_core xhci_pci k10temp 
snd_timer ttm xhci_hcd libphy ehci_pci snd ehci_hcd i2c_piix4 sg soundcore 
battery tpm_tis tpm video processor ac button sd_mod thermal
[  661.145657] CPU: 1 PID: 2485 Comm: iceweasel Tainted: GW   
4.6.0-rc2+ #1
[  661.145905] Hardware name: HP HP EliteBook 745 G3/807E, BIOS N73 Ver. 01.08 
01/28/2016
[  661.146159]   812d9e79 88043dc83d78 

[  661.146418]  810588ac 88042474 88043dc83dc8 
880424747adc
[  661.146677]  88043dc83e00 88009b2301e0 88009b2301f0 
8105891f
[  661.146937] Call Trace:
[  661.147020][] ? dump_stack+0x5c/0x83
[  661.147223]  [] ? __warn+0xec/0x110
[  661.147387]  [] ? warn_slowpath_fmt+0x4f/0x60
[  661.147580]  [] ? iwl_poll_bit+0x2f/0x70 [iwlwifi]
[  661.147785]  [] ? 
iwl_trans_pcie_grab_nic_access+0x110/0x120 [iwlwifi]
[  661.148045]  [] ? iwl_trans_pcie_read_mem+0x27/0x90 
[iwlwifi]
[  661.148280]  [] ? iwl_pcie_txq_stuck_timer+0xd0/0x380 
[iwlwifi]
[  661.148521]  [] ? task_tick_fair+0x4b8/0x920
[  661.148712]  [] ? perf_event_task_tick+0x6f/0x230
[  661.148915]  [] ? iwl_pcie_txq_unmap+0x160/0x160 [iwlwifi]
[  661.149142]  [] ? call_timer_fn+0x30/0x150
[  661.149325]  [] ? iwl_pcie_txq_unmap+0x160/0x160 [iwlwifi]
[  661.149552]  [] ? run_timer_softirq+0x223/0x2d0
[  661.149750]  [] ? __do_softirq+0xdd/0x2c4
[  661.149931]  [] ? irq_exit+0x85/0x90
[  661.150098]  [] ? smp_apic_timer_interrupt+0x3e/0x50
[  661.150308]  [] ? apic_timer_interrupt+0x82/0x90
[  661.150507]   
[  661.150573] ---[ end trace 9159ae5cde33d1c4 ]---
[  661.150786] iwl data: : df 11 13 81 ff ff ff ff ae 0f 0c 81 00 00 00 
00  
[  661.168775] 

conntrack.c:(.text+0x3d8075): undefined reference to `nf_nat_icmp_reply_translation'

2016-04-03 Thread Borislav Petkov
Hi people,

I'm seeing this while doing randconfig builds on rc1 + tip:

net/built-in.o: In function `__ovs_ct_lookup':
conntrack.c:(.text+0x3d8075): undefined reference to 
`nf_nat_icmp_reply_translation'
make: *** [vmlinux] Error 1

.config attached.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 4.6.0-rc1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=28
CONFIG_ARCH_MMAP_RND_BITS_MAX=32
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ZONE_DMA32=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx 
-fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 
-fcall-saved-r11"
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_DEBUG_RODATA=y
CONFIG_PGTABLE_LEVELS=4
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
# CONFIG_FHANDLE is not set
CONFIG_USELIB=y
# CONFIG_AUDIT is not set
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_HZ_PERIODIC=y
# CONFIG_NO_HZ_IDLE is not set
# CONFIG_NO_HZ is not set
CONFIG_HIGH_RES_TIMERS=y

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_IRQ_TIME_ACCOUNTING is not set

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
CONFIG_RCU_EXPERT=y
CONFIG_SRCU=y
CONFIG_TASKS_RCU=y
# CONFIG_RCU_STALL_COMMON is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_RCU_KTHREAD_PRIO=0
# CONFIG_RCU_EXPEDITE_BOOT is not set
CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_SUPPORTS_INT128=y
# CONFIG_CGROUPS is not set
CONFIG_CHECKPOINT_RESTORE=y
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
CONFIG_RD_LZ4=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_ANON_INODES=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_BPF=y
CONFIG_EXPERT=y
# CONFIG_MULTIUSER is not set
# CONFIG_SGETMASK_SYSCALL is not set
# CONFIG_SYSFS_SYSCALL is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set
CONFIG_KALLSYMS_BASE_RELATIVE=y
CONFIG_PRINTK=y
# CONFIG_BUG is not set
# CONFIG_ELF_CORE is not set
CONFIG_PCSPKR_PLATFORM=y
# CONFIG_BASE_FULL is not set
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
CONFIG_SIGNALFD=y
# CONFIG_TIMERFD is not set
# CONFIG_EVENTFD is not set
CONFIG_BPF_SYSCALL=y
# CONFIG_SHMEM is not set
# CONFIG_AIO is not set
CONFIG_ADVISE_SYSCALLS=y
# CONFIG_USERFAULTFD is not set
# CONFIG_MEMBARRIER is not set
CONFIG_EMBEDDED=y
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# 

Re: [PATCH] bus: subsys: update return type of -remove_dev() to void

2015-07-30 Thread Borislav Petkov
On Thu, Jul 30, 2015 at 03:04:01PM +0530, Viresh Kumar wrote:
 Its return value is not used by the subsys core and nothing meaningful
 can be done with it, even if we want to use it. The subsys device is
 anyway getting removed.

I'm assuming sysfs paths covered by it, will remain intact... ? For the
microcode loader case that's this hierarchy here:

$ tree /sys/devices/system/cpu/cpu?/microcode/
/sys/devices/system/cpu/cpu0/microcode/
├── processor_flags
└── version
/sys/devices/system/cpu/cpu1/microcode/
├── processor_flags
└── version
...

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.24-rc5-mm1

2007-12-13 Thread Borislav Petkov
On Thu, Dec 13, 2007 at 04:01:34PM +0100, Benjamin Thery wrote:
 The problem comes from the new macro UDPX_INC_STATS_BH introduced
 by Herbert, which was a nice addition to increment the correct 
 UDP MIB depending on the socket family, but unfortunately 
 the use of this macro from kernel code (I mean code not compiled 
 as module) requires that IPv6 is also compiled in kernel 
 (CONFIG_IPv6=y) in order to have udp_stats_in6 defined at link 
 time.
 
 Benjamin
 
 Pierre Peiffer wrote:
  Hi,
  
  My config does not link any more:
  
  ...
CHK include/linux/compile.h
UPD include/linux/compile.h
CC  init/version.o
LD  init/built-in.o
LD  .tmp_vmlinux1
  net/built-in.o: In function `xs_udp_data_ready':
  /home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:842:
  undefined reference to `udp_stats_in6'
  /home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:846:
  undefined reference to `udp_stats_in6'
  make[1]: *** [.tmp_vmlinux1] Error 1
  make: *** [sub-make] Error 2
  
  After a first look, udp_stats_in6 seems to be defined in ipv6 (file
  net/ipv6/udp.c) but I have
  
  CONFIG_IPV6=m
  and
  CONFIG_SUNRPC=y
  
  So, SUNRPC uses something defined in a module in my case ?
  
  ... looking more, this dependency seems to have been introduced by the patch
  [UDP]: Restore missing inDatagrams increments
  ( http://thread.gmane.org/gmane.linux.network/79716/focus=79831 )
  
  (I cc netdev)
  
  I don't know what is the right way to fix this ... ?

you might do select IPV6 in the SUNRPC section of fs/Kconfig, however select 
is
evil...

-- 
Regards/Gruß,
Boris.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Olympic (IBM PCI tokenring): handle return codes of register_netdev

2007-04-20 Thread Borislav Petkov
Handle return codes of register_netdev().

Signed-off-by: Borislav Petkov [EMAIL PROTECTED]


Index: 21-rc7/drivers/net/tokenring/olympic.c
===
--- 21-rc7.orig/drivers/net/tokenring/olympic.c
+++ 21-rc7/drivers/net/tokenring/olympic.c
@@ -264,7 +264,10 @@ static int __devinit olympic_probe(struc
SET_NETDEV_DEV(dev, pdev-dev);
 
pci_set_drvdata(pdev,dev) ; 
-   register_netdev(dev) ; 
+
+   if (register_netdev(dev))
+   goto op_free_iomap;
+
printk(Olympic: %s registered as: 
%s\n,olympic_priv-olympic_card_name,dev-name);
if (olympic_priv-olympic_network_monitor) { /* Must go after 
register_netdev as we need the device name */ 
char proc_name[20] ; 
@@ -281,7 +284,8 @@ op_free_iomap:
if (olympic_priv-olympic_lap)
iounmap(olympic_priv-olympic_lap);
 
-   free_netdev(dev);
+   if (dev)
+   free_netdev(dev);
 op_release_dev:
pci_release_regions(pdev); 
 
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] fix comments for register_netdev()

2007-04-18 Thread Borislav Petkov
Correct the function name in the comments supplied with register_netdev()

Signed-off-by: Borislav Petkov [EMAIL PROTECTED]


Index: 21-rc7/net/core/dev.c
===
--- 21-rc7.orig/net/core/dev.c
+++ 21-rc7/net/core/dev.c
@@ -3002,7 +3002,7 @@ out:
  * chain. 0 is returned on success. A negative errno code is returned
  * on a failure to set up the device, or if the name is a duplicate.
  *
- * This is a wrapper around register_netdev that takes the rtnl semaphore
+ * This is a wrapper around register_netdevice that takes the rtnl 
semaphore
  * and expands the device name if you passed a format string to
  * alloc_netdev.
  */
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html