Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4951955pxb; Tue, 2 Nov 2021 19:40:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWZS4T+fbwRY0Exmbvjzkn7DXQhYmTB+NpjpvjYE+wO6+g4YywZnnHkdqXQ0zQnrcvPoxL X-Received: by 2002:a05:6e02:15c4:: with SMTP id q4mr27512538ilu.18.1635907217300; Tue, 02 Nov 2021 19:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635907217; cv=none; d=google.com; s=arc-20160816; b=UlzLNtyDvFpxlnZGo26Z5Hd7X6oUnQoltf5/YH8O8VGwi8l209m1hGaOiu+4uTjvyI lAc8G0pB9NSJ3WZnrWzReJCQX63HsJT0f1U7P8hD3oSbLTYTBbcn1/eCfspLQMyC/Vh3 DPTkI8gN3TgKk+okzROETzkfc14ZSvRI6X0L6TfkIK+X+vJt4/yPWLiQ2jQERyMhpNXR 3SOEyn3y2w6vFOyqWCHkM4vHCq40CzoU3lP/e4DjRA9ccHEDP6fheW0+I3Lz47PEY538 ND8AFjRjnRLS/BO9lQd7RmPm3LtGgi6Dv3t/kN2lk72Pl09wEbOCrjCiGmNrElI+Um9n BnDw== 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=xvmUh+kq0qTw+qHqGvn2Q3Zzs548+5cTf9/0rb+MLBg=; b=J+IW+8gtMg2rE5WJ5NYxpHxKdR/8tOaKGKrFeo3HoIrhmz/X+X2/frl4yfSNSrFv6K RvefyQ/Y+f0kaT8jLp5JWOd4VUV7b1eort1sY+Pchxn0in6M3CxE81JpKDP7374jjqRd HYFDI1LFaMMFDZ7ESoxGpbg5tL0r09TkfkOSyyD15k56NpnaicoeID/k8NLgQHU7jvPh eSPMCuVwHEcLdSoHTrOny2DEeYRGp8mzM/zTbAZ9E/xqbrxK7V8SKR8yxtlidMjP6fF4 2AKz3eCjIV7RheQVe7ydImqC9uUG/+3ZPJRR341FOfHhxudVIBNf45cgVwQ/Nw7jabnk xIbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=J20RSSX8; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 m14si1450058jam.86.2021.11.02.19.40.00; Tue, 02 Nov 2021 19:40:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=20210112 header.b=J20RSSX8; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 S231240AbhKCCma (ORCPT + 99 others); Tue, 2 Nov 2021 22:42:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231340AbhKCCm3 (ORCPT ); Tue, 2 Nov 2021 22:42:29 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D428C061714; Tue, 2 Nov 2021 19:39:54 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id w29-20020a056830411d00b0055abaca9349so1529670ott.13; Tue, 02 Nov 2021 19:39:54 -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=xvmUh+kq0qTw+qHqGvn2Q3Zzs548+5cTf9/0rb+MLBg=; b=J20RSSX8JCBK5BS5hTCLpLsYV8WHE2ZeTA8iSflgoS8iGa17seKc8DdIt6mpWT3qtX 5s4O6TEPY/KAZ7pwTLRyprD5mrxQ2etlcuPjxIH50HjPw5ASImHvkdt+LptDJSoihK6M +KPkR/peMqvzrxhoSyu62snNPf1NUKh2n3TG8WYURCiPx9kP5XgWp7uozwjqtjezrxXC iy5ukKJi809VPxDd1sF4FOgoYjsqCNoy/p3j4tAUWcl/4H/nyj+TBjcVFC5bcULuUOWn rGB6zNonvoixk53xlXieUtklibMCzCiS8aaWKb4l8OMS/aDZbR2wvOsGK+acFa4xQYO8 CVUQ== 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=xvmUh+kq0qTw+qHqGvn2Q3Zzs548+5cTf9/0rb+MLBg=; b=u9diKYsNpIBqCYLVqu1M7eyj/cXUMIgpfrLO0g3tt4EKDgz3ed8W3F+dzoSg0rVGXv DvinfDfLXhoNWNUHVQsRpcErfsgc/kwN4oyMzGz6Z5fARb9TBy6F6VTa/82zDprXc7Ka 14R0ZRron1eNYuKRMxUfOCBVVTtYuvD5B0jzRAjtPebETHIvSF7seNqID6JDHv+m4LMH auDL037ayIaW8HxJ65kzbyYDMTinYprIsY7chJbcnYZnqTBcAZYR7MKp2TPh0tOsGDGm S/2gCJzkZq5KlkjAQSTA6jSNbI++rAaePBLSGyPU8DdTtMvua4YUCUakuL4wC0S+cCPI TxAw== X-Gm-Message-State: AOAM532ZHdyNOeWuvkvqLRJgBp8NBqrTmfXfLQO4v3wWHsF9UGSCzrN9 BKpoj4lHDPWwZsPsayJOC5g= X-Received: by 2002:a9d:4c11:: with SMTP id l17mr3801606otf.289.1635907193676; Tue, 02 Nov 2021 19:39:53 -0700 (PDT) Received: from [172.16.0.2] ([8.48.134.30]) by smtp.googlemail.com with ESMTPSA id 64sm210982otm.37.2021.11.02.19.39.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Nov 2021 19:39:53 -0700 (PDT) Message-ID: <019e96b5-4047-6458-0cfa-c9ef8f0d0470@gmail.com> Date: Tue, 2 Nov 2021 20:39:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH v2 09/25] tcp: authopt: Disable via sysctl by default Content-Language: en-US To: Leonard Crestez , David Ahern , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com>, Eric Dumazet Cc: "David S. Miller" , Herbert Xu , Kuniyuki Iwashima , Hideaki YOSHIFUJI , Jakub Kicinski , Yuchung Cheng , Francesco Ruggeri , Mat Martineau , Christoph Paasch , Ivan Delalande , Priyaranjan Jha , netdev@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <137399b962131c278acbfa5446a3b6d59aa0547b.1635784253.git.cdleonard@gmail.com> From: David Ahern In-Reply-To: <137399b962131c278acbfa5446a3b6d59aa0547b.1635784253.git.cdleonard@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 11/1/21 10:34 AM, Leonard Crestez wrote: > diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c > index 97eb54774924..cc34de6e4817 100644 > --- a/net/ipv4/sysctl_net_ipv4.c > +++ b/net/ipv4/sysctl_net_ipv4.c > @@ -17,10 +17,11 @@ > #include > #include > #include > #include > #include > +#include > > static int two = 2; > static int three __maybe_unused = 3; > static int four = 4; > static int thousand = 1000; > @@ -583,10 +584,19 @@ static struct ctl_table ipv4_table[] = { > .mode = 0644, > .proc_handler = proc_douintvec_minmax, > .extra1 = &sysctl_fib_sync_mem_min, > .extra2 = &sysctl_fib_sync_mem_max, > }, > +#ifdef CONFIG_TCP_AUTHOPT > + { > + .procname = "tcp_authopt", > + .data = &sysctl_tcp_authopt, > + .maxlen = sizeof(int), > + .mode = 0644, > + .proc_handler = proc_dointvec, Just add it to the namespace set, and this could be a u8 (try to plug a hole if possible) with min/max specified: .maxlen = sizeof(u8), .mode = 0644, .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE see icmp_echo_enable_probe as an example. And if you are not going to clean up when toggled off, you need a handler that tells the user it can not be disabled by erroring out on attempts to disable it.