search for: __read_once_size

Displaying 10 results from an estimated 10 matches for "__read_once_size".

2019 Nov 08
0
[PATCH 01/13] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h
...provides the + * required ordering. + */ +#ifndef __ASM_GENERIC_RWONCE_H +#define __ASM_GENERIC_RWONCE_H + +#ifndef __ASSEMBLY__ + +#include <linux/compiler_attributes.h> +#include <linux/kasan-checks.h> + +#include <uapi/linux/types.h> + +#include <asm/barrier.h> + +#define __READ_ONCE_SIZE \ +({ \ + switch (size) { \ + case 1: *(__u8 *)res = *(volatile __u8 *)p; break; \ + case 2: *(__u16 *)res = *(volatile __u16 *)p; break; \ + case 4: *(__u32 *)res = *(volatile __u32 *)p; break; \ + case 8: *(__u64 *)res = *(volatile __u64 *)p; break; \ + default: \ +...
2019 Nov 08
15
[PATCH 00/13] Finish off [smp_]read_barrier_depends()
...: Joe Perches <joe at perches.com> Cc: Boqun Feng <boqun.feng at gmail.com> Cc: linux-alpha at vger.kernel.org Cc: virtualization at lists.linux-foundation.org --->8 Will Deacon (13): compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h READ_ONCE: Undefine internal __READ_ONCE_SIZE macro after use READ_ONCE: Allow __READ_ONCE_SIZE cases to be overridden by the architecture vhost: Remove redundant use of read_barrier_depends() barrier alpha: Override READ_ONCE() with barriered implementation READ_ONCE: Remove smp_read_barrier_depends() invocation alpha: Replace s...
2018 Jan 25
0
[PATCH net-next 11/12] tools/virtio: copy READ/WRITE_ONCE
...__i386__) || defined(__x86_64__) || defined(__s390x__) +#define smp_wmb() barrier() +#else +#define smp_wmb() smp_release() +#endif + +#ifdef __alpha__ +#define smp_read_barrier_depends() smp_acquire() +#else +#define smp_read_barrier_depends() do {} while(0) +#endif + +static __always_inline +void __read_once_size(const volatile void *p, void *res, int size) +{ + switch (size) { \ + case 1: *(unsigned char *)res = *(volatile unsigned char *)p; break; \ + case 2: *(unsigned short *)res = *(volatile unsigned short *)p; break;...
2017 Nov 09
1
Crash in network stack under Xen
...Which I'm guessing means the packet didn't have a valid layer 4 protocol definition, or we don't have that protocol enabled. Then when attempting to handle that failure there was a GPF, I believe by accessing invalid data in shinfo->frag_list . "skb_release_data+0x73" is in __read_once_size, which I think is generated by "kfree_skb: if (likely(atomic_read(&skb->users) == 1))" . --Sarah
2018 Jul 05
0
KASAN: stack-out-of-bounds Read in __netif_receive_skb_core
...e bug, please add the following tag to the commit: > Reported-by: syzbot+4e955f82549d361ed655 at syzkaller.appspotmail.com #syz dup: KASAN: stack-out-of-bounds Read in timerqueue_add > ================================================================== > BUG: KASAN: stack-out-of-bounds in __read_once_size > include/linux/compiler.h:188 [inline] > BUG: KASAN: stack-out-of-bounds in __netif_receive_skb_core+0x2e09/0x3680 > net/core/dev.c:4657 > Read of size 8 at addr ffff8801a852d1e8 by task swapper/0/0 > > CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.18.0-rc3+ #45 > Hardware name:...
2018 Dec 10
1
[PATCH net 4/4] vhost: log dirty page correctly
...st/vhost.c: In function 'vhost_log_write': drivers//vhost/vhost.c:1788:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] r = log_write_hva(vq, (u64)iov[i].iov_base, ^ Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size Cyclomatic Complexity 1 arch/x86/include/asm/barrier.h:array_index_mask_nospec Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write...
2017 Oct 30
3
[locking/paravirt] static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' used before call to jump_label_init()
...x-perf-x86_64-rhel-7.2-3d6dabc2c8b475c40d8f4a8b5da8c5d71b2fa13f/tools/include/linux/compiler.h:157:45: error: use of deleted function 'atomic_read(const atomic_t*)::<unnamed union>::<constructor>()' [ 77.033842] [ 77.035368] ({ union { typeof(x) __val; char __c[1]; } __u; __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) [ 77.035369] [ 77.035930] ^ [ 77.035930] [ 77.038426] /usr/src/linux-perf-x86_64-rhel-7.2-3d6dabc2c8b475c40d8f4a8b5da8c5d71b2fa13f/tools/include/asm/../../arch/x86/include/asm/atomic.h:27:9: note: in...
2017 Oct 30
3
[locking/paravirt] static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' used before call to jump_label_init()
...x-perf-x86_64-rhel-7.2-3d6dabc2c8b475c40d8f4a8b5da8c5d71b2fa13f/tools/include/linux/compiler.h:157:45: error: use of deleted function 'atomic_read(const atomic_t*)::<unnamed union>::<constructor>()' [ 77.033842] [ 77.035368] ({ union { typeof(x) __val; char __c[1]; } __u; __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) [ 77.035369] [ 77.035930] ^ [ 77.035930] [ 77.038426] /usr/src/linux-perf-x86_64-rhel-7.2-3d6dabc2c8b475c40d8f4a8b5da8c5d71b2fa13f/tools/include/asm/../../arch/x86/include/asm/atomic.h:27:9: note: in...
2018 Dec 10
9
[PATCH net 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was done
2018 Dec 10
9
[PATCH net 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was done