Re: [PATCH bpf-next v2] selftests/bpf: Fix endianness issue in test_sockopt_sk

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

 



On Tue, Sep 15, 2020 at 6:20 PM Andrii Nakryiko
<andrii.nakryiko@xxxxxxxxx> wrote:
>
> On Tue, Sep 15, 2020 at 4:39 AM Ilya Leoshkevich <iii@xxxxxxxxxxxxx> wrote:
> >
> > getsetsockopt() calls getsockopt() with optlen == 1, but then checks
> > the resulting int. It is ok on little endian, but not on big endian.
> >
> > Fix by checking char instead.
> >
> > Fixes: 8a027dc0 ("selftests/bpf: add sockopt test that exercises sk helpers")
> > Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
> > ---
> >
> > v1->v2: Also pass a single byte to log_err.
> >
>
> Acked-by: Andrii Nakryiko <andriin@xxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>



[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