Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5076419iob; Mon, 9 May 2022 08:09:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA+8VMxoI+qgNp2QzheoBlU3uQrG2cAKhlXG5XIV1wn25n4amL/e8Chm1gZ+tUFUVdZDVK X-Received: by 2002:a17:902:e38c:b0:15b:40ca:37c8 with SMTP id g12-20020a170902e38c00b0015b40ca37c8mr16779243ple.23.1652108974106; Mon, 09 May 2022 08:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652108974; cv=none; d=google.com; s=arc-20160816; b=pNYmAniqiJwn1FvVlbxefQwhnZxGHcHWvh2PPwvJP5co+yYHTwaMbxroE4kllLzGcz BiDWkhgIbl+e4aSwC2JRwk+WZjYCgi5LENow3BXJSzNRaK1SZ3ChSADkJH1zQIVTmR/O xjDVIOB1GM89mOz9aLY1uyQl6llolb4XZcTE4QOT97DC0n3YfyTSE66AKcBngm2bb9h4 BD3ogmDxg3/6B1M6Wv+brYlrfpaS6PaIGLNdTYJZphe8zSIPJ4avzYTzRSuj11X/AkX6 aJd/XDvLt/kIjEIOUmCN1CcjgP1nabEnME252oI5Er1UgInKAbxSyA7B7BbRtR2K6SS4 801g== 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=5D+7YOUX/BbYyXU7j9leMetgcXcP++cXNdjZ9nYajuk=; b=kRLl9cJDCHBl3WVdrZ4HvRGbl32QasEUe1MAvXRzr849kapo0paHcOMlfMAiUCSANz 1RU/Rs0RKYhpEQU8NYtZVAAZfI4g5rffDiJuZkLWymoPrgM5Awja01P9Di8ksYirjiid y/04au6Z8A9nUZqd8tKEOKMm1VZEiaWZBwlGs0cT6t+/f8rUSqB49XIm4hN1dGWMUpbC CPFRbz8/+4mmOL6DwTzXpwvgXCGzsVsuDD5kuebao3i741VU/USncIUS29O8tz8aqhbn rK10AhlXEW9w/ns6NHMMl4L7tkenQhwnGTJZmkxYAk+QbCJXLjUT/RZEX2iAujEKy86d YuBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kXPcRKLS; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h36-20020a632124000000b003c637ec7ce2si12379443pgh.840.2022.05.09.08.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 08:09:34 -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=@linaro.org header.s=google header.b=kXPcRKLS; 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=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 426131FCD4; Mon, 9 May 2022 08:03:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237897AbiEIPGx (ORCPT + 99 others); Mon, 9 May 2022 11:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238102AbiEIPGr (ORCPT ); Mon, 9 May 2022 11:06:47 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4C23403DA for ; Mon, 9 May 2022 08:02:50 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id q23so19873216wra.1 for ; Mon, 09 May 2022 08:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5D+7YOUX/BbYyXU7j9leMetgcXcP++cXNdjZ9nYajuk=; b=kXPcRKLSpMppbzKAJxk80Bn1imqlSkeewx9AM6pUJZyEYn3hyf7lo0JnOw0l6L0Fc3 npkP8zDB1AXJZKAX8BTyU26F/dbaQJD6H07XdLR5jyfoDrT8lIZrVHw9EDDA3IO1qqXm 2yJY7rSZQEBIPphnBW7r4lpm1r4RD4gek0YLweu0cwsWdSzWgxOAml7CBQKOvQZ+oO0i B/YAfSLWAOL1S9KQfhkeaMYpOAD+O8yfBzBq+Jym2gfZCAUWJ+x6maP6Cyc8IboADdCE DtRi34BIrMqmo9R8HmMQdJLW9ALh7cxkxQD4imAxGW78HCfD1SJRD0v575WGg60wrZew yzwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5D+7YOUX/BbYyXU7j9leMetgcXcP++cXNdjZ9nYajuk=; b=l5IRLKOdfNkcqivTJDE16bAPck+7dg1dm6rt6PaJE11gfEc631kY6sQ5tmESwmq5rS qxMfMk0ZORja+kv/rDBW0KqYxEj0I8Su1BhOlQUF2ucvmqSUuNS2bdBHlG1+XB3Xk647 gyBIX7ZZbjTuy1HQLqozP8J8ewNsva+xPXeYmxKS0IyF+W9AxymlPmxFp/znfTOlz8TH rwax9xI+sOhdUpPhzSnVm04NZZP8v8kAjcec9ya7SfbC9qeK+3T0dqvS6mrZtHByzmG2 qvrAgn8FdohFKqAUwGvliZNAjxzB5iXXBRICIpBzgDQz1082XbqqyKFxjxgry+RFUrFq 2Hiw== X-Gm-Message-State: AOAM531R052NP1aIBFG1OcPG1wvYpnTurLb+lKLOUNQUV8MfTveCI3AK pShd5PQCgqtDH3yj+4HeH9M7e5WX6Iz8tIyv X-Received: by 2002:a5d:4f8b:0:b0:20c:6970:fb3c with SMTP id d11-20020a5d4f8b000000b0020c6970fb3cmr14313394wru.554.1652108569340; Mon, 09 May 2022 08:02:49 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id t8-20020a7bc3c8000000b0038eba413181sm17488890wmj.1.2022.05.09.08.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 08:02:48 -0700 (PDT) Date: Mon, 9 May 2022 16:02:24 +0100 From: Jean-Philippe Brucker To: Linus Torvalds Cc: Thomas Gleixner , Zhangfei Gao , Fenghua Yu , Jacob Pan , Dave Hansen , Linux Kernel Mailing List , the arch/x86 maintainers Subject: Re: [GIT pull] core/urgent for v5.18-rc6 Message-ID: References: <165201148069.536527.1960632033331546251.tglx@xen13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TUID: khSyPKKmr9ko X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi, On Sun, May 08, 2022 at 11:36:23AM -0700, Linus Torvalds wrote: > And yes, the mmu notifiers do then take that mmgrab reference to the > mm, so it all works. > > But it sure looks horrendously ugly. Saving off a 'struct mm_struct' > pointer with having basically an accidental reference to it is WRONG. Yes it is fragile. We're currently reworking iommu_sva_bind_device() to factor more code into the IOMMU core and to add explicit mmgrab/mmdrop, so once this lands we won't depend on mmu_notifier_register() anymore to hold the mm reference. https://lore.kernel.org/linux-iommu/20220502014842.991097-9-baolu.lu@linux.intel.com/ Thanks, Jean