Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp730867imm; Wed, 1 Aug 2018 04:29:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfLJehynrH+y/gbwzrc76jV1su1Z1/zwW5aLHD7DYDRN0pKlA6ZHL398lxbyL69kG3tnlEU X-Received: by 2002:a62:9d14:: with SMTP id i20-v6mr26442224pfd.3.1533122998629; Wed, 01 Aug 2018 04:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533122998; cv=none; d=google.com; s=arc-20160816; b=nwAFjiN9C44n1Kkc0V1ik/3wHVhT1IUePdAj12pRkFiEBvCpZke8JTJV4Jh7QIpZ4D 8X9pHOrVsKutK3xCvdTO9vRar4XBYEIzdUZy0Vj3PMwf7eAbxWHwkwjkvBeCSZ94OdGb RatemylUtV25zw5YbZHsbzN1iZ6tNouf/FN2Js07X95P/n3Thzo/aLRsogx8OG7zI4Bm SZAfmA4KfdZWepathZfpwmkCooBSateisyFAb1XzoYWbdLPl75gOoS54uv+BRAdvkfIz tPV2O6A2JG/QblbOAVdIV/ASXy6sY2IHOyJE6nwvz10+E+lskQa7wxG1Air9nDnUm5N0 pV/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=axBW+C2qhs8KpcwuTnehyg1qCt8MA3c1BUtzovIwVUg=; b=wVf8yZWPMhPo1ilhm819VVukQ8XZaKUwvwdwY0eih7rsfyTkfmaFvJWBcxT3n+TTKs rHWefxHZezWRuqg19+Xe/06Oa/mi5wivO3LQhpmvyc00PKtbAJla6vmQZ/6Df9ceeEuK sIltt0Xd+sH+hyhUWaiIVg6fA59gI7Q9i+eWhWBCfk9Qgd92ODqbCflPRDQfG5Er3ODz HSHnJF8jjO9qM+gSjx+pkbtFJzgoxcfYvjShVpuva2y3NW1HYf1lT2bU7qon2WVEUuan 9sGo0ehDoOD1kkF2Sm/5VwmS5/RNaH5zm0gKqd0rOok4HnOqv5df8spt+YpBFO9hw6Vl DVuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a5CpSO0X; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r21-v6si10939924pgi.690.2018.08.01.04.29.44; Wed, 01 Aug 2018 04:29:58 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=a5CpSO0X; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389111AbeHANOL (ORCPT + 99 others); Wed, 1 Aug 2018 09:14:11 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41714 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387552AbeHANOK (ORCPT ); Wed, 1 Aug 2018 09:14:10 -0400 Received: by mail-pf1-f196.google.com with SMTP id y10-v6so7702097pfn.8; Wed, 01 Aug 2018 04:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=axBW+C2qhs8KpcwuTnehyg1qCt8MA3c1BUtzovIwVUg=; b=a5CpSO0X/ZQnZPLY8PG4ROm89i91XAcfX15i1cF8F2Hs2M7jt/A0qwgW+gbi9DsoK4 nWqBFrgBulJ6rt5FIKhBaRdg9/RFF/s0DxAhC+LWlTPNk2yZHgcNUaNv/bkGXCkdwE9M pWlYwvioJFRF3+IroSyJVxB/G16ktewcKCuyYNS3WbkaIT8XK55U1W7Q0on1/4kI+QCX L49bfO9Ml2GPYtcKq8QM3uC4mgBud4BpAoUEAcEd294oJ7juEf04xza+6RAHU9YM/Sn0 FBRkMyEFht1+JTd1E+J28odFWsCORC14OzotXmiWMAzqtiqXaKwZXbtDGumyjFWhdB+B NtQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=axBW+C2qhs8KpcwuTnehyg1qCt8MA3c1BUtzovIwVUg=; b=my6YMK7LS6VLynXB2Bv2+uwOaEsmZLOIbju8TuvA4riytoCMbf0As9XN+iGuaEjW/c e2sr253XCvbBSrh5wEJOSGzTHdjzwDrK82av11AY+z2gQeeJWIZPoN9WjgPIpb4zWQId GXCt7/nFcS+8WVlNGCp22SyLDJ1a9z2dCL6XZ3phXiY8LZA6HNOnid3oXhx6F5IhHK8j EahKBsvWpY+PVTUSD4L/WJEncW6weVYM3xZPhsxz5uI3sP61yiIN1MSDLsSbe96t8gI9 c9OhdZpR3m+iCAYW384dBErYk/odKJ2Xvf6qQs+nnyteAAiqufPdpsA4EUNjYQs46kpE O0MQ== X-Gm-Message-State: AOUpUlGeqnN4sTRQYXgM8RwgmGOLMhWXMlI9GUzdclLqmIbeGVEU5t6O vJ6Foj4IJMvhyz8sK0gH28w= X-Received: by 2002:a62:234d:: with SMTP id j74-v6mr2592232pfj.106.1533122929996; Wed, 01 Aug 2018 04:28:49 -0700 (PDT) Received: from [192.168.86.235] (c-67-180-167-114.hsd1.ca.comcast.net. [67.180.167.114]) by smtp.gmail.com with ESMTPSA id 5-v6sm24652882pgc.86.2018.08.01.04.28.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 04:28:49 -0700 (PDT) Subject: Re: SLAB_TYPESAFE_BY_RCU without constructors (was Re: [PATCH v4 13/17] khwasan: add hooks implementation) To: Dmitry Vyukov , Eric Dumazet Cc: Andrey Ryabinin , Linus Torvalds , Christoph Lameter , Theodore Ts'o , Jan Kara , linux-ext4@vger.kernel.org, Greg Kroah-Hartman , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , David Miller , NetFilter , coreteam@netfilter.org, Network Development , Gerrit Renker , dccp@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Dave Airlie , intel-gfx , DRI , Eric Dumazet , Alexey Kuznetsov , Hideaki YOSHIFUJI , Ursula Braun , linux-s390 , Linux Kernel Mailing List , Andrew Morton , linux-mm , Andrey Konovalov References: <01000164f169bc6b-c73a8353-d7d9-47ec-a782-90aadcb86bfb-000000@email.amazonses.com> <30ee6c72-dc90-275a-8e23-54221f393cb0@virtuozzo.com> From: Eric Dumazet Message-ID: Date: Wed, 1 Aug 2018 04:28:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/01/2018 03:34 AM, Dmitry Vyukov wrote: > On Wed, Aug 1, 2018 at 12:23 PM, Eric Dumazet wrote: >> On 08/01/2018 02:03 AM, Andrey Ryabinin wrote: >> >>> I can't think of any advantage in not having the constructor. >> >> I can't see any advantage adding another indirect call, >> in RETPOLINE world. > > Can you please elaborate what's the problem here? > If slab ctor call have RETPOLINE, then using ctors more does not > introduce any security problems and they are not _that_ slow. They _are_ slow, when we have dozens of them in a code path. I object "having to add" yet another indirect call, if this can be avoided [*] If some people want to use ctor, fine, but do not request this. [*] This can be tricky, but worth the pain.