Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2210410ybk; Sun, 17 May 2020 13:49:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2xsZnsVDiW3HMLvTbk3/oRdBqfITIgzR2i9TkPtuWkdCH601s4+k8yFbB0ygZZX2WxGC2 X-Received: by 2002:a50:98a3:: with SMTP id j32mr9767869edb.34.1589748566611; Sun, 17 May 2020 13:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589748566; cv=none; d=google.com; s=arc-20160816; b=Y1CdBR5dcEYSbkIeokgX9jVpvOJ3AVsfwpITaqCnbVXu6Unyk0UQod1oN0kH6DhrBs 35ut7eL1DRXo5Jl8GqUU+AK+yfb/YioMuLVLU3mNfzfkd0VE3Qhzk9T9IUWq5IOARHNb JQuyDjzEVeZsjEGoWzwU4ansWsx88rtTBLDck6i8zCMzFez03YllZsDvpVnuXIjUM3Me CrJr0GKyKaUGOTtaptx0tOLvpxQUvv4ZTvZSrQTMe3zi2Mt4QPZMw5K4Vtqt0wEJBwmH rEXj410SLZfBCwEdrcEQHOTkP82W76MdpQu5ytLwh2177p3XfmmiYmb3KyQw8zuzR3LW VQLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aOGW5X0TGnwvfdKrZMYAVQyL8pOL2pG3Yh6nQN7pc+k=; b=SvGyjcvpwC+6s3cXVHF8k47yZdDbqETbZ5QgIBC2d8Shjdh3wKyKpx18dK1liunPM3 y+E3pFcSoe1qJQyyh9tEZX48kSZIylJdSpVOVcYpflmXG0PysEAsJGviP9m+dqdCmq27 H2pzIPB2Y3wRmGnzBNq1q0sqcKLckNPAGmL0DaqRCK4SuqFmS/dOg1tNS0s+WnUTTfG5 Sxj/4rnpvBOdoYtmm5Sr1Zp6sorPegKhgWlytDbf67WLPwxQ+iaevODmtnwDSC8jZ6WM Zz+oUlCifg/YB2Em20YfPX3s8Wok3r3QPugfzCX22885FgX6WrF6DcDdNpMwSvPBJZBu 0YvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LJQu5C9+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec9si5547171ejb.160.2020.05.17.13.49.03; Sun, 17 May 2020 13:49:26 -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=@gmail.com header.s=20161025 header.b=LJQu5C9+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbgEQUqx (ORCPT + 99 others); Sun, 17 May 2020 16:46:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726288AbgEQUqw (ORCPT ); Sun, 17 May 2020 16:46:52 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C945C061A0C for ; Sun, 17 May 2020 13:46:51 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id l6so1453382oic.9 for ; Sun, 17 May 2020 13:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aOGW5X0TGnwvfdKrZMYAVQyL8pOL2pG3Yh6nQN7pc+k=; b=LJQu5C9+BvFHQQ5nC51OFsHjqNeamH4oP3ywmBTTvspp8YNzR+qxuFO376WYn5hDg/ Q15X4+hHrcdVeLSIN1izTyXWrlua5s1tY87NTS+1G0THJc2krCFs5IRnoKyAAZESninv 4+Y//hPl8/FNRDSGa4VRiUEu+yokLxksiC2N4cXDb93kBD0ECkGRmrKLfrfe9JelwyQE 2OtIk4Eurk75RnnhyijTNr8veIFjB8ApCR5og16NtuZqI65BnHdXmtQHTZX+572cMEe7 BUL5vB36laCsy/blvdz9qmIRhIopkbD8Lk2HMoz5cani+SuME8drs+9sUGsPUCM/f4PE UHzg== 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=aOGW5X0TGnwvfdKrZMYAVQyL8pOL2pG3Yh6nQN7pc+k=; b=QV5eAB993oN9v+sWSyXImeK/pKGwkiVJVcBxLVNJoKBTrT9MHuUVpRVOueS4j2cRv/ d9NjNMOb3s2xh5MwMaUAfy9LpHNk0FduwCZC0COOv1/z1JFlah3k3RUkqL+LoFOkVVMZ la2X4Zvpa8TK+cBfc4IujksTUUD4YOMXsTE35n90D/A8aIFX1ErR92NYgePvGoKmnoYS LuCfV/okBZ4RyhdgTEvBsCa1tdepA/ug6fVCRcV+CmkVGy0lpK8iRB1ndSzY4Kcfz/JL Yy9PS5JAWLa7xNItV9MLIstWmUA1SIizNG6BtTCc4mChQYN+YT1YDvnFTZHWapse4Gji 62Bg== X-Gm-Message-State: AOAM530OdA974oQiqN/TeLn58h9fNMKtahdIRbZBXvrK2fXfYZkVqlhn DECX4IViK7tkjS+cKljXmIVB7LhQtUHh3mmloRU= X-Received: by 2002:aca:e1d6:: with SMTP id y205mr164891oig.142.1589748410745; Sun, 17 May 2020 13:46:50 -0700 (PDT) MIME-Version: 1.0 References: <374485.1589637193@turing-police> In-Reply-To: From: Cong Wang Date: Sun, 17 May 2020 13:46:39 -0700 Message-ID: Subject: Re: general protection fault vs Oops To: Subhashini Rao Beerisetty Cc: Randy Dunlap , =?UTF-8?Q?Valdis_Kl=C4=93tnieks?= , kernelnewbies , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 16, 2020 at 9:16 AM Subhashini Rao Beerisetty wrote: > Yes, those are out-of-tree modules. Basically, my question is, in > general what is the difference between 'general protection fault' and > 'Oops' failure in kernel mode. For your case, they are likely just different consequences of a same memory error. Let's assume it is a use-after-free, the behavior is UAF is undefined: If that memory freed by kernel is also unmapped from kernel address space, you would get a page fault when using it afterward, that is an Oops. Or if that memory freed by kernel gets reallocated and remapped as read-only, you would get a general protection error when you writing to it afterward.