Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp630685lql; Mon, 11 Mar 2024 12:28:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5FdNsio07zU8e7yo6LRYv+BnYFNxK8oGEqTy7TNoUzrrsSOqeb1X2biwhsuHOBv316+M7gXn0q0yAZTF1dk10McNCKyCksbn47+OGSA== X-Google-Smtp-Source: AGHT+IHz+1X0blj9fhzgF7EVsISRgHle4zxZU/Qv9RmVtn3hcidO7aLfDZJjGwekLqtUW7KBvhYD X-Received: by 2002:ae9:ee08:0:b0:787:ef0f:f809 with SMTP id i8-20020ae9ee08000000b00787ef0ff809mr7941163qkg.24.1710185321212; Mon, 11 Mar 2024 12:28:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710185321; cv=pass; d=google.com; s=arc-20160816; b=tLTNQ8DWaml1E1RRL0wMk1Qbe+iudeZtIrMI7ZLIFYwwaxVDHnW4iSGm5ouwQRPm6d BFU50ItRRWE6iuFxV/DMb5YwnnHNIUn7DiEKWhVak2SdRqUhlHBKV+3r2LDxvzR+x3rz edvM5Tpk/R+376jZWBXFP0A6St9GPX5bkYT3gX6anbujXMRWsEUOv9+zB85iljH97ciU j3sh2LDclhUCy8aCawXzlgVU4kT9bzUtjTnumuDwrgqdvPCnkUNm2Q3d915IHyX6aOSb ZtS9hFwciNIQhoDzZJmMzxSNasjkltlIpF8VDRx+sqy338gXeCLHRHS5F7mxT+3xHy9L L46A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FAVXB/mXoK7CZU4s1o0G19dHxslq0BXaeV69BqYUoiw=; fh=c5ISKp/6+sAgdmW2pyNYFLGobfynu1IJN1vPSy74Cg8=; b=MSKoWFzVEAykQdG5ogJlyRw25Q2bdWuycXmFrJD0q3CFfwEUiBG8gkEj+54M8V4xD/ vZFrU9HeRwz/KOgv9WMbfxyYwIEJvjOqsXL1c50Gk82hlQQXuFMSC1ZADfZ/hRrg3/Ot L4sa0lhY4qWViJctb00mTdPFAo2M3PnRGjFB+3lyiNaOkAJIqgZsAn9N0xP7rS5g5zeT 9pCEtFJpJwZBJedASXtYBLqbjOdla91BLZLSNtNIkOhPtScTN8jnZwLWYVcOVOHHsDIB 3bElHGK6FB+QfMjqqc9e4TDifKLcDbPdFGOyI7ZPRUyk5jxtIkPC223qidtTbXCW+236 Zq0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PhJVSfHI; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-99470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99470-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j22-20020a05620a0a5600b0078842405561si5951727qka.734.2024.03.11.12.28.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 12:28:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PhJVSfHI; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-99470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99470-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DDD7E1C20DEC for ; Mon, 11 Mar 2024 19:28:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23C8A54FB7; Mon, 11 Mar 2024 19:28:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PhJVSfHI" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B172154BCC for ; Mon, 11 Mar 2024 19:28:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710185314; cv=none; b=NAXWM1miW3+73jb8o0sxNyCmGnR5Btg9wRi4+jhFKfTJIISvCFkjE7V2r4nQzwIF0IJm/EA9fWhO+ROtNpqXFXSr83yeJw64jzJVF3LSonlRAEqkErSKcYUpPBBtBU1wD8co6ShdnAUhzc4g0K8O9lLCh9PZyqB5c/lcCG8Abmg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710185314; c=relaxed/simple; bh=o2h7eUf6KHi6kWXMN+bTe9GJKu4J7HhYQa+OrrVRTI8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N8Kyi64Rl8Ank45YoLM59Yygrsg2SiDAgRHHXkklDhmoJ8pG+BhjnYVoiX+fmZXNHDL6S+BFwqWfbuZld4bTUpjBzDi1w5NF+YrvnQZ6NpFw7ljDBZHJ0wBxmby4woTeeElduUh7sB/RwIFV2eaFWtNQNnA8vKhp5QGx7V8Az70= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PhJVSfHI; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710185311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FAVXB/mXoK7CZU4s1o0G19dHxslq0BXaeV69BqYUoiw=; b=PhJVSfHI2DRTSafBU7gJKuIAWZhB2mKMXxo690c4EwMjOkG2jUjtpuSlBGRmVrezJVUbzl ydDFowJAfYlUQnanclwdNtbxcWtOTqp4uKFDZYwSfV7kWkPYlieIUdIKyd6pXMvDp577oP gmdsEze2kGEIE0+YszXg8FiICAqmRLY= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-y62_UMvMMkaEPLSgua7WKA-1; Mon, 11 Mar 2024 15:28:30 -0400 X-MC-Unique: y62_UMvMMkaEPLSgua7WKA-1 Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-6e4e54fb7b4so2215639a34.0 for ; Mon, 11 Mar 2024 12:28:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710185309; x=1710790109; 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=FAVXB/mXoK7CZU4s1o0G19dHxslq0BXaeV69BqYUoiw=; b=glzpmm4XmUkS+rcuF2BcMspX0ISufoVd4KNzs9FkP0sItqQIMUDkmVkuNu8UoADSwQ Mx/WyKMlQBdMMJB8HCEuz6LQ0oFihWydfjBoMAAABWa9GsU2l2eF2fERI6NqmewEj/QW Ql0Ay85oDYgIBcFxfJsGFAr56H2YwJSfXN1XKxI/GsFY6wb0GdAvPMOXXWG+KlGkEmRZ L6rUWOP1mT+aH15z4Sv2ziC47O5BWhRacmp/ciEn9skfhQufNLF2uyPn+WHxxehOMsqb 0Sc1u3TyWOi05FgfWooPOFVfRrDfLdoVnnhtSU2bU18xxneQD1Vgu58gfkCwCUzVHQC5 zE0Q== X-Forwarded-Encrypted: i=1; AJvYcCWDByEmfvP0Ic2cAHVRZ1Hx9dyI/eLku0KRyyr/m4xumBblxtSuRBrvvkA7VfWNMgAMhZn3j/+8hHpKyNSDw+s5hcnYf8LTPSXkgtiT X-Gm-Message-State: AOJu0Yw9QGQY1IJ0OlRcm55w/n0kH7b97uqvPF0M2Y6s/Wn1xqSvclAg jdZkRzIsGelDvGLDaxnslehbhIAzqKm1/NLsrv3bo0pqww6OL4wlLIvZdZAcEbhvTmTIgwqdPl8 UMFLS3QFnxzCmDjmHl8W30Ar8zZ5JzzmjyU8TYqfjwyvGcr/9sfFLq4qj0A4fbg== X-Received: by 2002:a4a:a44c:0:b0:5a2:3c1:a624 with SMTP id w12-20020a4aa44c000000b005a203c1a624mr3727472ool.1.1710185309492; Mon, 11 Mar 2024 12:28:29 -0700 (PDT) X-Received: by 2002:a4a:a44c:0:b0:5a2:3c1:a624 with SMTP id w12-20020a4aa44c000000b005a203c1a624mr3727456ool.1.1710185309168; Mon, 11 Mar 2024 12:28:29 -0700 (PDT) Received: from x1n (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id h7-20020a05620a400700b007882e50260fsm2950520qko.104.2024.03.11.12.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 12:28:28 -0700 (PDT) Date: Mon, 11 Mar 2024 15:28:26 -0400 From: Peter Xu To: Axel Rasmussen Cc: David Hildenbrand , Mirsad Todorovac , linux-mm@kvack.org, Andrew Morton , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: BUG selftests/mm] Message-ID: References: <4a5c8d28-7f73-4c15-b288-641f0ccc91c2@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Mon, Mar 11, 2024 at 11:59:59AM -0700, Axel Rasmussen wrote: > I'd prefer not to require root or CAP_SYS_ADMIN or similar for > UFFDIO_POISON, because those control access to lots more things > besides, which we don't necessarily want the process using UFFD to be > able to do. :/ > > Ratelimiting seems fairly reasonable to me. I do see the concern about > dropping some addresses though. Do you know how much could an admin rely on such addresses? How frequent would MCE generate normally in a sane system? > Perhaps we can mitigate that concern by defining our own ratelimit > interval/burst configuration? Any details? > Another idea would be to only ratelimit it if !CONFIG_DEBUG_VM or > similar. Not sure if that's considered valid or not. :) This, OTOH, sounds like an overkill.. I just checked again on the detail of ratelimit code, where we by default it has: #define DEFAULT_RATELIMIT_INTERVAL (5 * HZ) #define DEFAULT_RATELIMIT_BURST 10 So it allows a 10 times burst rather than 2.. IIUC it means even if there're continous 10 MCEs it won't get suppressed, until the 11th came, in 5 seconds interval. I think it means it's possibly even less of a concern to directly use pr_err_ratelimited(). Thanks, -- Peter Xu