Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5373509rwd; Wed, 24 May 2023 00:19:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7D7tRIcWY/1wk65hbl5dPPbEHFSb7m5fzh+S9EBROe8UXv+UsnQYNdNiT3la25dM9UbOZU X-Received: by 2002:a05:6a20:a590:b0:102:5e06:1544 with SMTP id bc16-20020a056a20a59000b001025e061544mr14635181pzb.30.1684912774244; Wed, 24 May 2023 00:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684912774; cv=none; d=google.com; s=arc-20160816; b=F6nNyWHxh0i+6eXG6TH9dC/ysHIcnkaGJET+yw19xXhIygTl2GrqIP8v4kUW0oeJ7A lw4pwtTDhNAdlPqpZ6tVnkyk/gMPqnaX/m0yReYTb2b+cbMuz5TnHpVQMXQmmVdyUsTp splIJze55IQuHE7ST6HR+MBLW2SRN/5ifPMRFRJvx9cVkQxLo6bBf9X+LJV3zodOnOW5 e8qUwZ7nCMi0ToJRcxnTvgBKcADFf83vG+NhtYGOdFwwZcgGaBzBAHsoAoOb7x3+kmkg Zov5/T8g9IXXAUh3kzhO7HYvmo1SCZrgAZZ8GAI7hOFgoYjz81jlJY4WmckqpT4Fv6kU vlug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QTwUX3qEpiLdoo2WOruxY9BVcBrptDaoYsD2JHxAesc=; b=mY/M7LtFd8kiPcDC1zHaBJScCj5M/aYezTMm/j8LLQvTvjJ0BFgEvYzQLnxWjIWMJc A+vXdC7fIpGJr9OzyGib8iBSe+s7owG2CtM95W1sB18txfvaiqNNVzFnveukbwmeL93D F/OmRLHepHP0qnCk9kjH52jMSbarqsxt2owoNVBT3g8AC3uQkd/fycsfyAaoOIz0s5jm d8AJAc9/fD6mzUOim3CQjxEFf+6nnyjHgU6/cJgi/8ywfI3VC5m4t6J2yeDFC+TAE6qo ihlOg2NWrKAhohYWGaxG3KdfFIg3LbiyJRk6mWm3itk1DfcRTO25thpEZIasLc719YD5 nslQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=j8e8aqmI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f30-20020a63381e000000b0053040aaf8adsi7949595pga.112.2023.05.24.00.19.19; Wed, 24 May 2023 00:19:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=j8e8aqmI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239656AbjEXHQe (ORCPT + 99 others); Wed, 24 May 2023 03:16:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239505AbjEXHPv (ORCPT ); Wed, 24 May 2023 03:15:51 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F185690; Wed, 24 May 2023 00:15:26 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-30a95ec7744so386165f8f.3; Wed, 24 May 2023 00:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684912525; x=1687504525; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QTwUX3qEpiLdoo2WOruxY9BVcBrptDaoYsD2JHxAesc=; b=j8e8aqmI8nrYA59qDNX4vMDiOXCYqlzQxVL4aYAfwG42G4CYrBVAzwMIaQ1Erv4hSX kGnV/G7awoKyLM0rQLSvaUFEp3Hpw4ah+4cG8HaHB56syFLX7L0MYR65eGXbihrEsIoD SKFnAIVtSLLkt1jAT0tsSLblry/Honk98G/08iXl1PQRBddaPXBvuSyHUw1Kmn+ylCCT sV7KZtxCVJuQCifkRIaVp8pQX52QrXsytC2TEwVxo/cqI6OlZidu3v4eKWO7B/5iLSJY xGr6RyW9Eu6cY4erU9ajh/uOeMhMdmwf7XUieuntprkeSa6X871PlVGHWwJZJh9y1mF0 A1Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684912525; x=1687504525; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QTwUX3qEpiLdoo2WOruxY9BVcBrptDaoYsD2JHxAesc=; b=DViwCu5oYZMQo/t7wXh8255Z5MDB4232QD0aQSCnW3pFmpw5XiCrreI6vDp+yhZ7ex CBcxWMF94GyUQoFGQY/fowzI9JD6hh1Uo5wELYVkDhrwjdufJmGr3/zSS6TTJ2Ga2XgR JKx+WSk2UDA9qMzHQ+vPm2EGrBFBTa20Wb0ZOETHvZ0fE1jKCx0wWO3+NvmQQVaLRC2m ABgskU0S4LJjcENwbGWTBCOpQp281h/K1+EJE6YL7HjSDqc84QCZiGw8Fc1lAdWnDNFu TKYWNPKzJcjyeVf1Huqwr68QWX2QE+HJDEps/LErItU+IcrDndRcV/MMVYl30bHuqbuC s15Q== X-Gm-Message-State: AC+VfDxpXIxeEKAeFwUiAm79Xtsnl8UUBW8CGAwe02W9qUYXzntWi8u2 aVGXAxIK6v80iwW9nc0y4MY= X-Received: by 2002:adf:e912:0:b0:307:7e64:4b52 with SMTP id f18-20020adfe912000000b003077e644b52mr14169357wrm.36.1684912525160; Wed, 24 May 2023 00:15:25 -0700 (PDT) Received: from localhost (host81-154-179-160.range81-154.btcentralplus.com. [81.154.179.160]) by smtp.gmail.com with ESMTPSA id a2-20020a5d53c2000000b002ffbf2213d4sm13537164wrw.75.2023.05.24.00.15.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 00:15:23 -0700 (PDT) Date: Wed, 24 May 2023 08:15:23 +0100 From: Lorenzo Stoakes To: David Hildenbrand Cc: Vlastimil Babka , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Kees Cook , linux-mm@kvack.org, linux-hardening@vger.kernel.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/slab: remove HAVE_HARDENED_USERCOPY_ALLOCATOR Message-ID: References: <20230523073136.4900-1-vbabka@suse.cz> <310077ed-6f3f-41fe-afcf-36500a9408ec@lucifer.local> <623a87c6-c0d2-799a-c39e-0d14dcdfa6df@suse.cz> <4674f97f-5f97-45b7-a4b9-a19ca46b7ce1@lucifer.local> <9191d9b0-3318-4e70-a81b-69acff184fc6@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9191d9b0-3318-4e70-a81b-69acff184fc6@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue, May 23, 2023 at 10:28:32AM +0200, David Hildenbrand wrote: [snip] > > > The file is only compiled with CONFIG_HARDENED_USERCOPY: > > > > > > mm/Makefile:obj-$(CONFIG_HARDENED_USERCOPY) += usercopy.o > > > > > > > Yeah ugh at this sort of implicit thing. Anyway it'd be preferable to stick > > #ifdef CONFIG_HARDENED_USERCOPY around the prototype just so it's > > abundantly clear this function doesn't exist unless that is set. > > I recall that it is very common to not use ifdefs unless really required. > Because less ifefs are obviously preferable ;) > > Compilation+linking will fail in any case. > I don't want to insist so hard on something that doesn't really matter, the bike shed can be blue, green or red it's fine :P So, Reviewed-by: Lorenzo Stoakes