Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3664576lfo; Mon, 23 May 2022 10:45:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaFh2fhyEglbctB2JhCaNLKbzpVtOjQI8I2jJiO2uC+Z3xRoAVzntAaIxlTTWHjOeg8jeM X-Received: by 2002:a63:64a:0:b0:3fa:2f02:601d with SMTP id 71-20020a63064a000000b003fa2f02601dmr7312667pgg.514.1653327904488; Mon, 23 May 2022 10:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653327904; cv=none; d=google.com; s=arc-20160816; b=cx54+IuXVFVIdy2eNBUgCstSRhFN/Re7nB9JOBYmkgWRjLt0krJhadW6gaF7mvg0s4 KOa/ZA69W71imzQtB/sMTj9TwiFNyCz67ae2y1CF6pKkBfYIbwpZ8DlZcjrcW7uHURrP hf2Rc58WyjsTVUPUypJBw//0Oq8hZB8SSN9z0nF42aha/PN7jWe2zpWWkQjxnQFvOWi6 3TOzWi8lgatKI96ejcuZvj+NDT56Fh8F7fo+0opkpUYk3RjEt8rEHFApnMDMZLYMiPfD fWDnA1ZmK0ntWelMCAO0KYntCeIbpiidqJJ/3V4URi25yNSZ7ItNrWDwA7uGWPOSxoX2 alwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kVCTG+3+NA8/KUywnzUbBkQ75c3uC0F9FoLTv7cklr4=; b=MDMbbB7YuYJCBTQ43JrQgCY8KHv7TdoVL3uyY8pO6T167KbSP/ZjlRJ0uhZdjoP/zL eaCVxhnHxyvyZgsSC021kGwDZzCZVprRX0E3UEJZouxtJc+8syInYzuyHD/JkpxFUZPW qbCUL1PuQeJUs01yX00CbTOmPwjX2dqAEUySAbgKLi7yZz71/UhyURn4VPG16VYX1j9L QqWrNArmI6whh9QSJSpH2ZkfGGKAkBpQSlJEGIVUVi4SqLhndr7c2gljSyrj5DZLy2ar H4MGH6CyaYyTK7ZfKjwEr1Z0c+GPrRNm/qA1H+uceBRUyFgXp27LiK8AgXoqG2E+PcwM cakQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dEAveRG7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v189-20020a6389c6000000b003f9f41da8c6si9237491pgd.2.2022.05.23.10.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:45:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dEAveRG7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ACFA9D410D; Mon, 23 May 2022 10:44:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243364AbiEWRly (ORCPT + 99 others); Mon, 23 May 2022 13:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242510AbiEWR1q (ORCPT ); Mon, 23 May 2022 13:27:46 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4914A814AC; Mon, 23 May 2022 10:23:38 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id l20-20020a17090a409400b001dd2a9d555bso14375564pjg.0; Mon, 23 May 2022 10:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=kVCTG+3+NA8/KUywnzUbBkQ75c3uC0F9FoLTv7cklr4=; b=dEAveRG7O1ujSVYjlQfsaO+q3cP8iBMOi6KEg10kguUaVpe8ICSQBjKAxntihwgkrX rF6creaObAFxLfp98upZ7iOl8Cjj8uZA5cYNqmwh4Xtg+nXlgJ7sDoxec1jK5PLk1s/W 2Uli+3sqrT/0iIINldfzLFsH5qxEmWQpeuo4GUFJ/iLWBBj9tHEzp68NQC/OWUmZVEc1 tAb0X2ongh3O15vvd6Pu5GEq5Rn1FOGtRYjGr871OE8/NMmDCCJ37XrBGpYIIlQf4QwR dgYh3JXeb+Z5tM5Ji3GqYHqXuXkOnvGuqCeYL4QNymyFqfrbcRtK1dPLvohkLxHLUQbK V51w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=kVCTG+3+NA8/KUywnzUbBkQ75c3uC0F9FoLTv7cklr4=; b=DuJbFKpQS5RuupYF5CiIo2rIN5r3WjI7yehGRE4hNj7U8TqWUJ4cOM6C+y6y9IhbFH 9OI//CdQd3/IrP7MsvksJCEtRF0wbpb+RJfW67Cxn4lh1IAXHCUlz+ZzXLYoe8FOlZ50 qu++0ZI/n3/E4YBabl0EKzAdfqwHaGa96/bTi84Ee+zLYh1H4m4c9M4ihWoXMma29qNv uRjlkMzbFMixHUkE7rpxkETBSEuDZvUrqKNu33boIp8a1vm2Ep8mAGFvq6MlO9/qnn5/ H2xgctWnrdK0PMzqXrzfggcggUikM7RgWp2YY06AJuzh5ikX3sL7TVuIhAWPOEhypDqU wL3A== X-Gm-Message-State: AOAM530ZltzhTyLuf1+jsPtEVkRz9Xp/tPG3nl3peuDCpamrLCxG9k/C nA1a4oNeC+S+zQWOkNjMdKg= X-Received: by 2002:a17:90b:3b8b:b0:1df:f2ca:c56d with SMTP id pc11-20020a17090b3b8b00b001dff2cac56dmr39343pjb.199.1653326604202; Mon, 23 May 2022 10:23:24 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id 1-20020a170902c10100b001617aef3e08sm5474612pli.51.2022.05.23.10.23.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 10:23:23 -0700 (PDT) Message-ID: <772f9381-1180-319e-3afa-cca900291c94@gmail.com> Date: Mon, 23 May 2022 10:23:22 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH ipsec] Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process" Content-Language: en-US To: Michal Kubecek , Steffen Klassert , netdev@vger.kernel.org Cc: Jiasheng Jiang , Herbert Xu , "David S. Miller" , Jakub Kicinski , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org References: From: Florian Fainelli In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/23/22 09:01, Michal Kubecek wrote: > This reverts commit 4dc2a5a8f6754492180741facf2a8787f2c415d7. > > A non-zero return value from pfkey_broadcast() does not necessarily mean > an error occurred as this function returns -ESRCH when no registered > listener received the message. In particular, a call with > BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return > zero so that this commit in fact prevents processing any PF_KEY message. > One visible effect is that racoon daemon fails to find encryption > algorithms like aes and refuses to start. > > Excluding -ESRCH return value would fix this but it's not obvious that > we really want to bail out here and most other callers of > pfkey_broadcast() also ignore the return value. Also, as pointed out by > Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code > should use netlink instead so that we should only disturb the code for > really important fixes. > > Signed-off-by: Michal Kubecek Maybe you can add a comment above the call such that future tool-based patches submissions to give the author a chance to read the comment above and ask oneself twice whether this is relevant or not? -- Florian