Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1465688pxk; Fri, 18 Sep 2020 13:18:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCWI4FK7uFcR8G2v0qkmE+DWKIOon3pnd2J5U9veImAIvCNEF4ml0ojz9GkifypYXCaKLL X-Received: by 2002:a50:d987:: with SMTP id w7mr15405442edj.113.1600460311864; Fri, 18 Sep 2020 13:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600460311; cv=none; d=google.com; s=arc-20160816; b=02WVc3MMnfh4hzAMirqK+6Ybx475Jw6Ld/I/pJBxvSweyFi9fVSHVkX0xbKYDPDhHv HsGQYcwS8N6GeWzNDYMJtkPQxnWB+8YfY1ic5QUMp1vVpI4ga3GgtjuDJxjqjJkH7kfp J/scYCExDGluGq1FJjEs1RAnYzzNgGDBt2hz9182ZCGKMmqLD5DUeRAiGOEldHB0LIm/ RDBchJ9RtWuHelui45ffLbiPzD/y704eIychVhkAxFfSqGngmm1z455LegSwUeVvWCVO 0JOI1po2qmQPM4ghMCjdjA7xwk0akfsld+gcstLnPNP2pvuBFMvq1d6XpN9U7fxIwcMm vXdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=m7wRTSQKv2G8T9rvlgl07npRBcyQo+x1v+qxYjLlUtg=; b=NYM15HDpJuiaJytPYRVCgGKDOJfXc6R/Xgle9OhSwiyd58Zqzg0M/PDmNIN/ZRVN0Y TfDWKzyKHMHtRSXISLDWZmfHwDKngRqBbi8vZ5BbqXDOZPeQ6m4iQHUzglNHCCgpGgPs LpAvGl7JnEmsJ/Y6J4tdU3zRYpqLBwnA4HjnYMTE/2aFooDl8pO7RmDbaCg1nNBhWY9y UnIpT6P7SGMa7DgPYA/fdLIYkWSW89OluQR1dWZtMnom4NuVzkc3uaVKncvF/cDBPG5R ZhE08448+D/hfOL1xP5vcBmHX+KmOJ8+7x/x7pEmF/ABl675gxoX+oyQbroJCpvfy7kF AhPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="a/MoGb74"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si2826495eje.545.2020.09.18.13.18.08; Fri, 18 Sep 2020 13:18:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linux-foundation.org header.s=google header.b="a/MoGb74"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726802AbgIRUQf (ORCPT + 99 others); Fri, 18 Sep 2020 16:16:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726559AbgIRUPR (ORCPT ); Fri, 18 Sep 2020 16:15:17 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B85FFC0613CE for ; Fri, 18 Sep 2020 13:15:16 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id y9so7578190ilq.2 for ; Fri, 18 Sep 2020 13:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m7wRTSQKv2G8T9rvlgl07npRBcyQo+x1v+qxYjLlUtg=; b=a/MoGb74B+N/fY+wzX0p6UfnTR4H8tn9bFK/sJo7+36IcYVIGPxHvIe7oFXqONZ9BG FsSO8I51cgdirTidYKn8jrJzUwAavL5wMgP1Pa9+6vKLCAZ4T2dEgoDSOzfVZ9w+dk84 fOklnwiL3ZSHcU6cPG5zDq/2dAZMUiIPw7TWE= 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=m7wRTSQKv2G8T9rvlgl07npRBcyQo+x1v+qxYjLlUtg=; b=ohJmYxjaz85jIw7Izmdlce0m/q2VuAJ/+5c0TzkRnFImkpPpXFAXgUkpBQgZcGYfEB xWLlQUGOC6gdqjPpOuidflARgr8GGLGh6rPDmuPZk7qFXew8Y5vLSlAm7uttscaVvmig dlsINJ8jXW1abyjyuUCaK9BuvSuJrX/5YJNLMah56hB/SJNY0MFv4sxoirx+YcCQH2z+ TmTRRYpoVNSsxCfBYqJ3jIh59mFWxusFKTgJKkW4DXakd6Vqq/T4f16gBjcEhwWUmSz0 c5mW7zrKsnX2tBhoDHgrWrWvFtGVPR10k2secR3PMfLKCsQoSAvim2Xm0H1zys/X0oeN 8GNQ== X-Gm-Message-State: AOAM531yJBMMMZE1ZLr2lZAJq2tilISIX4/PKwOAst3wH2gefUJLBFPi uj7E58pothd2iamaFmkg2nmBTEkv0uKVoA== X-Received: by 2002:a92:194b:: with SMTP id e11mr30369227ilm.43.1600460115954; Fri, 18 Sep 2020 13:15:15 -0700 (PDT) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com. [209.85.166.178]) by smtp.gmail.com with ESMTPSA id c7sm2055812ilo.61.2020.09.18.13.15.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2020 13:15:15 -0700 (PDT) Received: by mail-il1-f178.google.com with SMTP id t18so7550030ilp.5 for ; Fri, 18 Sep 2020 13:15:15 -0700 (PDT) X-Received: by 2002:a92:2e0b:: with SMTP id v11mr32233591ile.112.1600460114870; Fri, 18 Sep 2020 13:15:14 -0700 (PDT) MIME-Version: 1.0 References: <20200917204514.GA2880159@google.com> <20200918162305.GB25599@embeddedor> <20200918193426.GA15213@embeddedor> <20200918200252.GH32101@casper.infradead.org> In-Reply-To: <20200918200252.GH32101@casper.infradead.org> From: Linus Torvalds Date: Fri, 18 Sep 2020 13:14:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] percpu fix for v5.9-rc6 To: Matthew Wilcox Cc: "Gustavo A. R. Silva" , Dennis Zhou , Tejun Heo , Christoph Lameter , Linux-MM , Linux Kernel Mailing List , Kees Cook Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 18, 2020 at 1:02 PM Matthew Wilcox wrote: > > I suppose it's not really necessary, we could do offsetof here, right? Yup, that would make a lot more sense. But right now, the sizeof() obviously silently works. As do a number of other fairly nonsensical things, like assigning a struct etc. And yes, I realize we may well do that too. But I think that's a dangerous pattern too, ie doing *a = *b; silently works, and copies everything but the final array. And yes - none of this is _worse_ than using zero-sized arrays, but the point is that it isn't better either. Linus