From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EEB8C04A6A for ; Wed, 9 Aug 2023 13:28:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79FD36B0071; Wed, 9 Aug 2023 09:28:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 74F2E6B0072; Wed, 9 Aug 2023 09:28:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6173B8E0001; Wed, 9 Aug 2023 09:28:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4F1176B0071 for ; Wed, 9 Aug 2023 09:28:01 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 14AA0120E7E for ; Wed, 9 Aug 2023 13:28:01 +0000 (UTC) X-FDA: 81104644362.15.EDB5D9C Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by imf09.hostedemail.com (Postfix) with ESMTP id 3AABF14002D for ; Wed, 9 Aug 2023 13:27:57 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=LRLOMkzq; spf=pass (imf09.hostedemail.com: domain of fmdefrancesco@gmail.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=fmdefrancesco@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691587678; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=d8Y1G49lBNQm8I61OnbJNB7Y67Rqrzuj0UzklKCPsaE=; b=jSCVesENl+m2UNWaBOL+BoCXhEt+IfvRlJpIkFfGvNtclkyLdQrsNVIn7+dtihYVjyJveO 80Tin4uLgQCuOi7Djb7d+ljWNXwWqdtzErpI6ULrwIwalredUl9zpEQMQx8zu+kGvabNoM /MwIV1iZ9FaKSC0KGNfo6YWGxSctCT0= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=LRLOMkzq; spf=pass (imf09.hostedemail.com: domain of fmdefrancesco@gmail.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=fmdefrancesco@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691587678; a=rsa-sha256; cv=none; b=5Lb3s9KlW0OkgE6+B6/vkhhwaJPFTuqtzrNOrdezE5rBgGwDVDq5TpR7ffYelj7EgT3/kk VI5wWSnZWKjfd/6GjB+ffIB7CcaDKdhmcGpUYwDi1eZLJy+AATq+Bki4vIb5U9I0UinyWN qbFOvWLtyUj9s3Dco9+xp11of0lmd1Y= Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3fe4ad22eb0so48009425e9.3 for ; Wed, 09 Aug 2023 06:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691587676; x=1692192476; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d8Y1G49lBNQm8I61OnbJNB7Y67Rqrzuj0UzklKCPsaE=; b=LRLOMkzq5roM5+UL4g24JUK02KJZ1tOyaeAU+G/++qDurykvmZs+k5ToiSnichUqEk cUdyvurpRYxwlIy2uQA34E9ug3E4QUF5feALGH3VTp0TBgx+yGcXUIMUIDnlgLBUX48C ruOh9y/mgCf1ARxdu2q+MDxvEw0s9HyN68BRdrfPYZ7YZeohcB0sbvG5C+r4iqXdPyai ptyD7QmhbiuAe82unuLMetKaRt8X7pznMl7qCmLi0jO2fPjFr6zSghRsE3Cx8Zvx+xVc 9HnxpplXvU9U5D1IUPk62u0CCiGGNdr5PWo/gqjA8Jlm7PdMWn+wlfXCDRaoe4feejP8 lcUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691587676; x=1692192476; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d8Y1G49lBNQm8I61OnbJNB7Y67Rqrzuj0UzklKCPsaE=; b=BqsZ8cIHGe3yMIS4um3tETD8AwXKavlBJRm25R7KpphWecB44OD3AJ35ulSo1vLJHW ab58BlbtMIybrXBBlaFByJnGkLEMIYRw2891uFzOsazrA4spIT7Gk51rfsYadoOUpRKQ 7tRXHuTmg4uVzjEy0E41SfBSeNO0QKwHfPJt7H3uLIFLNhungv1XqUbrM1jIHveEdngR xPIlXdbrJbJ6IdazHrxQuGAEEyoup6RgWLB2P0/RwM66yt94r9j8HhmoA2+jUNig4KnV MtFr09+MSdgsoMSlRhiAGwarym80Kxn3Vgs2abdM4oOuxV3WJZuPFyOJdjDGcx/fB4F4 mVAQ== X-Gm-Message-State: AOJu0YxOH1rl4dB0nnjpBu3GtQ+vgXgGqhddo7yzKAlXwDPzXhhOX4qq dNGBRWqAFFqjcZOPYagufyw= X-Google-Smtp-Source: AGHT+IHDxGd450rRdsFhBnDQgcJyvMYyTZ+kwjhYbRwkfXfZOLa5tVOHOjbRM12m2W0onKTwRwDXew== X-Received: by 2002:a1c:4b1a:0:b0:3fb:e573:4172 with SMTP id y26-20020a1c4b1a000000b003fbe5734172mr2307215wma.31.1691587676297; Wed, 09 Aug 2023 06:27:56 -0700 (PDT) Received: from suse.localnet (host-95-233-25-82.retail.telecomitalia.it. [95.233.25.82]) by smtp.gmail.com with ESMTPSA id 20-20020a05600c021400b003fe1e3937aesm1990130wmi.20.2023.08.09.06.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 06:27:55 -0700 (PDT) From: "Fabio M. De Francesco" To: Linus Walleij Cc: Jonathan Corbet , Jonathan Cameron , Mike Rapoport , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Ira Weiny , Matthew Wilcox , Randy Dunlap Subject: Re: [PATCH] Documentation/page_tables: Add info about MMU/TLB and Page Faults Date: Wed, 09 Aug 2023 15:27:53 +0200 Message-ID: <2443562.jE0xQCEvom@suse> In-Reply-To: References: <20230728120054.12306-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Rspamd-Queue-Id: 3AABF14002D X-Rspam-User: X-Stat-Signature: k8r71jywwnrzn5h1mk9u5xqn16jc51yx X-Rspamd-Server: rspam01 X-HE-Tag: 1691587677-303981 X-HE-Meta: U2FsdGVkX1/Tqjpr3ppJQhG1OH1j8kDQzFboXmGr88LVPElkgO3LDAMUA4ma+Gm2z8tSy3eAf3lOXCRnJpTxdvPJXMFPMn48PYqi+gYGXQJyV2yD1rJBeZLOMkvf7VQqqi4roGDfd1kPYmgPyqjHg3Gg8ABFqjzzLEla+5af6Q6aQCFcI9nQLA+3dq680yBBTrXte4s2tQkNzeFKYB3Pz32H3saWl9ketXg3Wy+FQxyxeJScK0DUrgPSi5YPjVpay1qKLukLdk0PsBsUTqQqAyNed3sXBLk9lffpB8ftvC5hgO6/geeWlvLJHLMbt6c8k8+DNed+XXOMtfXVl1zpS4HXcZdFcJ2492cBEm2ipv0OWlBwiNqfn1F+45kWa5qNT+7SrncRVfJ6eJ3LFFSU5FE7SM4t4aX45IcDjSXFbVCGu2wUs5YQMPLHFfsJ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=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On luned=C3=AC 7 agosto 2023 11:40:30 CEST Linus Walleij wrote: > Hi Fabio, >=20 > I'm back from vacation! Overall this documentation looks good and > in line with the reset in this section. >=20 > On Fri, Jul 28, 2023 at 2:01=E2=80=AFPM Fabio M. De Francesco >=20 > wrote: > > +One cause of page faults is due to bugs (or maliciously crafted=20 addresses) > > and +happens when a process tries to access a range of memory that it > > doesn't have +permission to. This could be because the memory is reserv= ed > > for the kernel or +for another process, or because the process is tryin= g=20 to > > write to a read-only +section of memory. When this happens, the kernel > > sends a Segmentation Fault +(SIGSEGV) signal to the process, which usua= lly > > causes the process to terminate. > This "segmentation fault" (SIGSEGV reads "signal segmentation violation) > is actually a bit hard to understand for people not familiar > with the 1970ies hardware.=20 Linus, Actually, I see a lot of "Segmentation fault (core dumped)" because I still= =20 develop in user space. Stupid distractions are enough to get that message printed... #include #include int main() { int *p1, *p2; p2 =3D malloc(sizeof(int)); *p2 =3D 9; printf("*p2 is %d\n", *p1); return 0; } fabio@suse:/tmp> gcc -o test test.c=20 fabio@suse:/tmp> ./test Segmentation fault (core dumped) =46urthermore, everybody can still type "man signal.h" (document written in= =20 2017) and lookup the table of the POSIX signals and see that SIGSEGV is for= =20 "Invalid memory reference.".=20 > > [Snip] > > Other programs and the kernel memory are also in inaccessible segments, > so accessing any of the own segments in the wrong way, or another programs > segment, or an unmapped segment (virtual memory) would all result in the > SIGSEGV opaque message "segmentation fault" >=20 > I don't know how to reflect this in a good way in the documentation > though, maybe > copy/paste/edit some of my text or I can try to write something as an > additional patch if you prefer. I suspect that people is much more used to get more "Segmentation fault" th= ese=20 days than in the 1970's (when developers probably were a little more carefu= l=20 with pointers - at least this is what I have heard about this subject :-)). BTW, please feel free to change / extend this paragraph with a follow up=20 patch. Thanks for your comments, =46abio > Yours, > Linus Walleij