Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4199265pxb; Mon, 1 Feb 2021 15:31:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTr+7GskSElFxIvCRf1d/vkCNJe1ecPQ7oTj/4nSSv7Vshgpuj9iA9BuUpofMutmvcOIlY X-Received: by 2002:a17:907:169e:: with SMTP id hc30mr6875ejc.498.1612222284143; Mon, 01 Feb 2021 15:31:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612222284; cv=none; d=google.com; s=arc-20160816; b=mK78vSpIH+WU3vkgMLYhZQo2QIart73/MygIfrG0y2aWhfckMXzn7SZBSNqjW4iyOU vhcvoQFK+iTEgBrqt2W8jOVbUItzOUybu/A/5a2q3Qcgi7dm/iDEXs1lfuc49d/A7Roj PoKWP1Om+LC55bUIlYZR1exGzRv/qkALOUVejkzBdYdBSOsIirlO3e8eQl1rMEnPkMNV 1jnTJ0SsAxsmk32bpUDvKdnpG3OV6HeNk3pdyzg0TxaUK2U6r5gcMlXpShD6STLEFHlx Rc9DT7ZjWUYC0aN41oLuEZR2rDS2QBLxM5+N2ATZHryrqATHV3Q+CtnZy1kH8gbWzBmM JljA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EjvkqNV3yKzly7yLuBoaIr5wpK8OrxpWH9YRQsNyHaA=; b=KJwvoq7pDVh9vm9e8wlRqxysLZM66ZfIhuAqPDur6KxkVwAxQj5frHdiYp/RyNwc/k nX+NE7aRjZ1TlrJUsaKaqUOa+UtM4LIQZ1Vro/R9VF+uJWTVKg2BTO9zjC6pl7Yi65ay hib/bDBYoW4jkvKMk2SOmau0WJCTT2I3a5VSGi6Vqst2lHAlgtUas3k0lZYMsHjtQPRR JX9qg1ZdzCng3vwP8ZXvRjjlyjcwoQRZ8eeMHm9MnUY4Qwif8fbvREZvRL7qFepdEid2 FkXviihPABUcrsgIo9i+o+CK8hzff4GsTBCVaJgN3LEYa24SldRcwojHnYoQsyvjwoCh EU1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dhMnRDcN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si3222052ejs.405.2021.02.01.15.30.59; Mon, 01 Feb 2021 15:31:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dhMnRDcN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231245AbhBAX22 (ORCPT + 99 others); Mon, 1 Feb 2021 18:28:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbhBAX2V (ORCPT ); Mon, 1 Feb 2021 18:28:21 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF753C061573; Mon, 1 Feb 2021 15:27:40 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id h7so25267449lfc.6; Mon, 01 Feb 2021 15:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EjvkqNV3yKzly7yLuBoaIr5wpK8OrxpWH9YRQsNyHaA=; b=dhMnRDcNX9OsQJKrXz9yYh0j/fhr++0wMYkwXvfeJaHU4y66CTAo96Ir7wY81isDcl fiFp0otLS2O16NYVMBA/JvwWG5xgjrTdle9Z/JM/twrtqu9hzQCvOo0lzBfRiVbnQ/UZ /w6ohU5Zg1FH2tx0KLJtW9LFUEpF5f/39PXJByuGecqFubk038KA2gVkC+brQ2MbwyQ8 +au5v9vcbIHk3STl2XDMS/mFwwNycQqYZil/dJUn5XPpe5XK1Vn+JJawXvp0n9fP6+sM 9hsGV4l/p3f2xAavrQOgVo7u2t5DswvrQD2qYgf3mYIpy4Ny8kQM8dWYDqeVLav83d2V jmlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EjvkqNV3yKzly7yLuBoaIr5wpK8OrxpWH9YRQsNyHaA=; b=LhLeTZ1QA1Gplu/AkShG8LvhQwphfxBVzS6ADGXrVU6ReDvQU0JFFSDrx9QIHhDhti jsPWMuwob8+5dwRB5Xa8Dl/vdsPhAPr3Sx7z71K5kTQcjA+wvGvKpEleeJuGUG7d+YTV YrxBGCFzSL+417Epr9TV9OzDdrNObO54zXT+0+h+oBmItsIMgWkmqsyf5bghaBjYqC97 pTBAwaso/efxPwBT1JpIVXFb9aug0fbfRQze5zFY3GzwxykdDDMw4IzMsg7n6fJ8RyrO I8p0bkKvVDRuCGUwMCsygstL2g/0pjcqtM4aSN9KDcMHWFUufHRi6rWmx8dRrElSATzv ffAA== X-Gm-Message-State: AOAM531ZaL9hM0zOIl7/T9Lq/mGxshI76jRKH5/vVZgyjpf6sKa2bCXm u9GzO4O2tSL7ovc1UmXVH8fs7XTKi8YMUXvfEq1vJkLnCYQ= X-Received: by 2002:a19:ad0d:: with SMTP id t13mr9412240lfc.539.1612222057872; Mon, 01 Feb 2021 15:27:37 -0800 (PST) MIME-Version: 1.0 References: <20210201150028.2279522-1-jackmanb@google.com> In-Reply-To: <20210201150028.2279522-1-jackmanb@google.com> From: Alexei Starovoitov Date: Mon, 1 Feb 2021 15:27:26 -0800 Message-ID: Subject: Re: [PATCH bpf-next v2] bpf: Propagate memory bounds to registers in atomics w/ BPF_FETCH To: Brendan Jackman Cc: bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , KP Singh , Florent Revest , John Fastabend , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 1, 2021 at 7:00 AM Brendan Jackman wrote: > + > +SEC("fentry/bpf_fentry_test1") > +int BPF_PROG(sub, int x) > +{ > + int a = 0; > + int b = __sync_fetch_and_add(&a, 1); It probably needs ENABLE_ATOMICS_TESTS ? Otherwise clang without -mcpu=v3 will complain: "fatal error: error in backend: Invalid usage of the XADD return value"