From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C7F2D3854177; Mon, 31 Oct 2022 14:13:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7F2D3854177 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667225612; bh=UY8aBLBeRelAoeMMw3Mf13uj1gE9pZZjCqSMkEqJtDg=; h=From:To:Subject:Date:From; b=XZ8VYZz/poBnNRx6gfm5zixHkDgZr6K8VeiklW0TEBfRTTE8zWgOoQZnE9JQ97hah v/MZgq0DycP1/umipRO1VQbfaeuBkIQnjjbnuzcmiarmGtSll13E1aGY9wVM37bgvw uiNb1rDWYQl6BJHl1xV+q/TeevXvNXJs9W0Ujjvo= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107472] New: Support for the Linux kernel's memory-management APIs Date: Mon, 31 Oct 2022 14:13:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter dependson blocked target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107472 Bug ID: 107472 Summary: Support for the Linux kernel's memory-management APIs Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Depends on: 106302 Blocks: 106358 Target Milestone: --- A suggestion at LPC 2022 was that -fanalyzer could gain knowledge (perhaps = via a plugin) about the behavior of the Linux kernel's memory allocation routin= es. See https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html In particular, note the GPF flags; there seem to be a bunch of contextual r= ules about which flags should be set, which perhaps a -fanalyzer plugin could enforce. Grokking all these flags seems like another instance of PR 106302. Plus we ought to do sm-malloc.cc-style checking for leaks, double-free, etc. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106302 [Bug 106302] RFE: provide a way for -fanalyzer to use target flags https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106358 [Bug 106358] [meta-bug] tracker bug for building the Linux kernel with -fanalyzer=