Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1460680rbb; Mon, 26 Feb 2024 09:56:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUMD5VfZzadBqE1bTRrAUj+CbCGiFXwADrfsJDmJIPK1Tt+KKq4VoWvnhL3B3hsvp3/gPAPVGd4JKHgK3DNmJpflCfCCc1XMr+pgSgU4g== X-Google-Smtp-Source: AGHT+IHv29ToSF/p+ypm+U16LyDXkXLpifsOiOYIPwiXbzIHpaObE2BJu52Oimog9s3VYltpWIMk X-Received: by 2002:a05:6e02:1bce:b0:365:b00:14ee with SMTP id x14-20020a056e021bce00b003650b0014eemr11363026ilv.26.1708970188251; Mon, 26 Feb 2024 09:56:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708970188; cv=pass; d=google.com; s=arc-20160816; b=B8P+7kHHvvjy8rfx0c4bUPR/ELxiJzLTHDUlx52CJoIILQCe+TFlrYu+dzzOCKVYvU /ULWSbapF9id3fjpSM2V+h/FzgL7gfKw0bn3yLxhQcWzM4wo752RAvqOjmzXwbQVrPI+ mV9PP+b7jKw3JbAGhJUwbuQZLmVNjlwl35i+Mi9DmaGoprNj9Ue2Sf/sOPWzhhQKEQZG 2inhEBbZckLou3jMaX+8kKJvT/9hitJwY6hXvw/Rae0fVR/Mw+7lMUYdQqfcekOBxK/d gN3muCLBOFqY7IAiNwhiRUpRcXBMVZpqnlCPQgUyLGDn08Bq/hVyusI72K+bkJ7Lhfku LPvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=EyV42V4YwospafBlBP85zlF0CzzIrV0ckGMLg38+cps=; fh=lgIVuQ2IV6lqMXZetPHgaZts9niRCG38hFeBTRG3RBE=; b=E6JyiNkK8EKTpXSiia7/ZFfzIAL1P1nRe8RhzXzhLvn/LTRID2YGAPIRHEqc7rZQSt bcV2Wy7j4etdNztyueqk1TR+9pyOE843igq9EANLxphlLkbSPOuMEPYJNfw2V3BwFb4d VGEo/AOqJt3ffhjRzwh55wgqiuMbMShU/UbS6TZImWtpbH2LB+/QP9m0zDteqMIsZSQy ip/lVaOjov/el82LZilSHWkElTfSxWk9BuRslJLbIbjQHZQ2xdO2twzbVigBo6Seohcz GK+XQXDO8Hug4PhyyN7IXDsCnxCEm1NkM9urNTvwq1xADfteWe8Wt+ruwCDI/wsjGsFi JhyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=0fViydWZ; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-82035-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82035-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r11-20020a63204b000000b005dc962cfb64si4049433pgm.89.2024.02.26.09.56.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:56:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82035-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=0fViydWZ; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-82035-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82035-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 734C7B2CE0A for ; Mon, 26 Feb 2024 17:20:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EF1D1332A8; Mon, 26 Feb 2024 17:13:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="0fViydWZ" Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7F5612CD97 for ; Mon, 26 Feb 2024 17:13:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708967612; cv=none; b=fynOCKqTF+pKlLC27ibbb/aZjtXtvfK0hiIeyI2JjaCkMVQhHs6JDKcE/R9iYAfU9f/17I9F03w9BpNFadJFjFUk/RUE4xleyXvUDfW2fLfwOEyy51wapUMroBoBiR38eUg2F/ScAcPVkMhN8RxnRt05Rw6Tdoll/NkGa2IMnZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708967612; c=relaxed/simple; bh=EyV42V4YwospafBlBP85zlF0CzzIrV0ckGMLg38+cps=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VeJRAn6LiJP0y1GurzXmzwVexY/Y4r7PD91HHAUb5AnJVLhQ48rjeDjOdI3fmVS3ONgNczYvfBPThz9EjGEk75TxVTM5rzUY38LcTi4136Po+ILOrslY7sfa8gPz1WEI8rU9q/Vg3G0sG4LSAiXnprSCbe/8tS2qoiu4xRNML2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=0fViydWZ; arc=none smtp.client-ip=209.85.128.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-6089b64f4eeso33163557b3.2 for ; Mon, 26 Feb 2024 09:13:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708967609; x=1709572409; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EyV42V4YwospafBlBP85zlF0CzzIrV0ckGMLg38+cps=; b=0fViydWZafBwJ3xL0F3ZTuvRSwyOFSrmHfEq0669FdAat5dooHz4w4ydcwe76KJq26 LLK1Innl8Ozcr4ZzRFS8wOBZXfz8XVvIsM1Lpl41+dDr0LuROfLdG53dNGlA9b9h4eMF G1BrAsi2HgrrmZVytsbBCN43zN48wzi+DBMamTdoOdAkkld+5uUZGlksQA++8+kDhnB4 8YisjaPtufsIlwnzZjkqcK4rgrYZZUtUJ6qGAZVZozShNglx+FJnTn12ouCxp4XPVmkD /ODSKBsJ4q/ATs5/nmT5Fa36KV2ZLF/J1cucEBLoNSKhvXKtX5V2YN3O0AKtgJFesZaz HUSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708967609; x=1709572409; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EyV42V4YwospafBlBP85zlF0CzzIrV0ckGMLg38+cps=; b=EWRvreW9/bcFZak0YR4c/Ma7MV4KLcb5AI+iymQIhZM1+KY+SFutKUj3UUPa/19QCp q4QTo/1Ky3eNVpDmcHrFRgtr4c62BuwZi+mBw/fhA65XfxfGjYA14rBHM0iryS2b1X5k Qr4EzCY6sMeGnnIiM+/A9byoFho3O+yu1FjZTWKM+x34R9jG8o7kTTrQh/XS73OqJW7t Udygfe7XLMl/A9LZwPdWWSnwaIzB2L1OxoIq7ueh4BPtneHZLZoKRpNpAMUWv5F1CXEU BwJ6+e14Yn25a/IkW08OSe6OkZIB/opoazWyNOrAnalcWJy6OgAYrN/doxddsXCqo0RL MhSA== X-Forwarded-Encrypted: i=1; AJvYcCVZvNF/31dzbS6u2E3LXtant5iLh4OifcZygq8CUoIqrFHBwEwxdMVWZTkN825TGjr2xanf5Fcndi8r7YX0dliSI5XOZWdMOUKPkpw7 X-Gm-Message-State: AOJu0YzG/orE5wjWZSq4e6Dnh/wayhcpfi3qUBVy9p+sM6RRhSw1bzi5 JtZwkjAhGs/niidKvRvb4UxZaq0nlRUbMQkUUcH0oi3Mfaxc3TnCfrPm340rKOnRKWLGRsGyl90 qnmQPdjzHSqqZVom5wfEcK48RNPkMSKOWjl20 X-Received: by 2002:a05:6902:210e:b0:dcd:1f17:aaea with SMTP id dk14-20020a056902210e00b00dcd1f17aaeamr6639276ybb.26.1708967608014; Mon, 26 Feb 2024 09:13:28 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240221194052.927623-1-surenb@google.com> <20240221194052.927623-14-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Mon, 26 Feb 2024 09:13:17 -0800 Message-ID: Subject: Re: [PATCH v4 13/36] lib: prevent module unloading if memory is not freed To: Vlastimil Babka Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, mhocko@suse.com, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 26, 2024 at 8:58=E2=80=AFAM Vlastimil Babka wr= ote: > > On 2/21/24 20:40, Suren Baghdasaryan wrote: > > Skip freeing module's data section if there are non-zero allocation tag= s > > because otherwise, once these allocations are freed, the access to thei= r > > code tag would cause UAF. > > > > Signed-off-by: Suren Baghdasaryan > > I know that module unloading was never considered really supported etc. > But should we printk something so the admin knows why it didn't unload, a= nd > can go check those outstanding allocations? Yes, that sounds reasonable. I'll add a pr_warn() in the next version. Thanks! > > -- > To unsubscribe from this group and stop receiving emails from it, send an= email to kernel-team+unsubscribe@android.com. >