Re: [PATCH bpf-next] s390/bpf: Implement new atomic ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 4, 2021 at 3:30 PM Ilya Leoshkevich <iii@xxxxxxxxxxxxx> wrote:
>
> Implement BPF_AND, BPF_OR and BPF_XOR as the existing BPF_ADD. Since
> the corresponding machine instructions return the old value, BPF_FETCH
> happens by itself, the only additional thing that is required is
> zero-extension.
>
> There is no single instruction that implements BPF_XCHG on s390, so use
> a COMPARE AND SWAP loop.
>
> BPF_CMPXCHG, on the other hand, can be implemented by a single COMPARE
> AND SWAP. Zero-extension is automatically inserted by the verifier.
>
> Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
> ---
>
> Note: this patch depends on [1]; posting now to get some feedback.
>
> [1] https://lore.kernel.org/bpf/20210303110402.3965626-1-jackmanb@xxxxxxxxxx/

lgtm.
This patch will sit in patchwork until bpf is merged with bpf-next.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux