Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1158753ybl; Sat, 18 Jan 2020 20:14:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyKP9YyEzoczblZ24c49nx+lOXh9pGVzMCEkbINuCVvW65moMzy4+pPKMaM6FgSyWS+gdKI X-Received: by 2002:a05:6808:3c2:: with SMTP id o2mr9008663oie.145.1579407256690; Sat, 18 Jan 2020 20:14:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579407256; cv=none; d=google.com; s=arc-20160816; b=Q6BzgYrX5kQWrZmYE3HqfaIsnnrY212LHoGjVINEPaNEyHq832tlxnLDu+x0f/8hpS 0zK8njabY3olGufo7FDZQm6nvA27ipsD4wzICCjWbopyU5h2fa/Lidc3HTxzKfnSlICe a3k8bJ9Bp/nz3jlkI3JYbLTz+AsyYNwW0pROUP5YxWku9mCHgeh1cC/F5EMxmC7FPxV9 RxAoque8v/Gv18PFVqh5FoeY7d6sJY6MLO5VuNtbNIO/TowJ1RipWJRPi5SR+m/34m7N IWBbGRnHse2Mlz/hC4YZx82//wfSAadxBEH+JJKjSICa9v7QAV2hidkArQ79aXo9+9vk eZCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=C7kwDUUX9HD9wSkfaoKeD3WRZW/s6UPYxiemMWHJ45U=; b=ezF5B9+C9puD8y0y0LXsuPfHly+zgkTEltGA5QAONHJuRGLyA6xACmCrwIGoGFofAj PgM34hB+29iNpngdyifuCfzwIWjSRSxhXHErbFF2p4dwG8IbQhtpkqGVwObsaFuRZ+AH L6JAkKTt0KiZHO3VFH3wYHAt1aiNsjPIeqJUB59BPkOtJM7ISOS2krpZD6YAQoGqX82p oMCvG6SOksjuKiMz6C1Z8KKHn+CgSiexPZFnoSOcPPjaQfJeoxYmCmRchrV/Y+8mJrBG yxlr78mRBF+T8+3Yzim/0h9qzHU1pYL3zqCpD/TjXOGmDLek0O0rbdWXHOIC1IqarWaf Qwsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="tjtC/NAC"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si16498822oia.232.2020.01.18.20.14.01; Sat, 18 Jan 2020 20:14:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="tjtC/NAC"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726465AbgASENB (ORCPT + 99 others); Sat, 18 Jan 2020 23:13:01 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:34498 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbgASENB (ORCPT ); Sat, 18 Jan 2020 23:13:01 -0500 Received: by mail-yw1-f65.google.com with SMTP id b186so16375026ywc.1 for ; Sat, 18 Jan 2020 20:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C7kwDUUX9HD9wSkfaoKeD3WRZW/s6UPYxiemMWHJ45U=; b=tjtC/NACNgMyo6oo9eX2ad4ILNzVGudp5hF/L98rHBtCr2bd5dYus1cWqO12H0uM6q KBX/+QMEaPrHKka+C3Z860CGmL41ND3umn0BSVxMtvwQeOXeAQM2TliwA11Cn3i/TjIh r7aiggrcso2mPxQ3FmDWm+kUXOz6P/uTDzuAcua5rKTc5IT730vIef4U4tsMq2hEOS4r nF5t5/ZfxrKIFZvoMpqroN6X3afTfuiCP0NdkmtoBML+ASrhW9mnj1lixObmrSXww4x7 7z+pAiATf7H2mskTyZH8iW4VfzXPGz5Z3JTYuAr6fUJsDxICzHyjf51j8T/2BsFfF6dA RwAw== 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=C7kwDUUX9HD9wSkfaoKeD3WRZW/s6UPYxiemMWHJ45U=; b=odU4tGX90QUDXyTjUQKil8sObu72Wqgqzm9bNdaKg/oZupjgJx2mwrAkGppjroAcw4 +ItsTB/4AI7Qn3pii5UQlt7kyNVLP4UIrqoIMu1d1pmNDnKkGH1ekjT2weAXjNMwNF/t Qa+GAYHc9xglW3hV7hUtsbIp/Cxv2laVoHe3ckHpEVUqPoovbjgLJ1y8+W/Mfo4W1QTy 1X88DijbdVVA5/h+Gk9Cg5fBbSBBB7AzKM+W/Kc2lS4NeHR28Qut2RnF2WnYL7ThIH9S 425Zn3P49+ywa2ZWfqPTRIxaL/kMclIxV488qPEfLJwJp8fcw8vUiQbcVertjyMFZpCL KpJQ== X-Gm-Message-State: APjAAAUPqRKpvtUALpWjizIa/3K3QKc8V3pYsuMA9IiSdE/8J+sPhAyE W7AttT2A4/4OY2oOWaglOgKl2mDd0iU/Nib2CUTj3g== X-Received: by 2002:a81:3845:: with SMTP id f66mr38141320ywa.220.1579407180395; Sat, 18 Jan 2020 20:13:00 -0800 (PST) MIME-Version: 1.0 References: <1579058620-26684-1-git-send-email-zhangshaokun@hisilicon.com> <20200116.042722.153124126288244814.davem@davemloft.net> <930faaff-4d18-452d-2e44-ef05b65dc858@gmail.com> <1b3aaddf-22f5-1846-90f1-42e68583c1e4@gmail.com> <430496fc-9f26-8cb4-91d8-505fda9af230@hisilicon.com> <20200117123253.GC14879@hirez.programming.kicks-ass.net> <5fd55696-e46c-4269-c106-79782efb0dd8@hisilicon.com> In-Reply-To: <5fd55696-e46c-4269-c106-79782efb0dd8@hisilicon.com> From: Eric Dumazet Date: Sat, 18 Jan 2020 20:12:48 -0800 Message-ID: Subject: Re: [PATCH] net: optimize cmpxchg in ip_idents_reserve To: Shaokun Zhang Cc: Peter Zijlstra , Eric Dumazet , David Miller , netdev , LKML , jinyuqi@huawei.com, Alexey Kuznetsov , Hideaki YOSHIFUJI , guoyang2@huawei.com, Will Deacon Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 18, 2020 at 7:47 PM Shaokun Zhang wrote: > > We have used the atomic_add_return[1], but it makes the UBSAN unhappy followed > by the comment. > It seems that Eric also agreed to do it if some comments are added. I will do > it later. > > Thanks, > Shaokun > > [1] https://lkml.org/lkml/2019/7/26/217 > In case you have missed it, we needed a proper analysis. My feedback was quite simple : Have you first checked that current UBSAN versions will not complain anymore ? You never did this work, never replied to my question, and months later you come back with a convoluted patch while we simply can proceed with a revert now we are sure that linux kernels are compiled with the proper option. As mentioned yesterday, no need for a comment. Instead the changelog should be explaining why the revert is now safe.