Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4445837ybg; Mon, 8 Jun 2020 08:03:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOoLGqIFOKvG7bLG2TQw/N5Mv6UTx3JWuEk/nnlJPESBD/4AYAk8PiialPIdUiFzQQ8HT/ X-Received: by 2002:a17:906:4b18:: with SMTP id y24mr20977055eju.366.1591628619234; Mon, 08 Jun 2020 08:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591628619; cv=none; d=google.com; s=arc-20160816; b=V7wN0e54wh1n2MqnTwfZlA6CviJmNzp7hea9iHMfUrvlWzoy+m6SNywL4mkvxhp2mB 194AAnJ13/VjEx2o7z4VyFLswsbHy9iCiwmW365HyvPZC1fBsWhQp9ZLGqe06frejIrD pb0cL53gGvgwPKBw6mFDZSmoTR/Ws0PWpJr1+HL7q7FVPmPjbyOjYPwvAco6YAUqOvTl ULVdfxh/XgKTrQvICNRw0Makb8wYmoTIB8nS0WqEPi8YL6dO3mT6xOL4HY6BWpTnoNa7 wnKTMs2dTDz2CBZ0hDR5b8vzvkP+jsZc84hIG1sF11Fh0HP/du4OS+9I2y3msjFf7sIm sRFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=exJpUcD9iTuoeD+RQrF+EIXmGMlhgaTXtJncvvlvAk0=; b=H6qDhpjLBlziAc2qbM5WtVZzqrMHFr0sbWdUwjKhVjYezCyp7Tt7jlTlQ9+7rZW87i 1F+euAPYdBgoAWEOdTrWKXKdbTZxvwSJEeVL3K9bKolm1V6K0fJgcygADobOD6kNPlYA 8DsMRbfNza96QkqRbEGDuUXH74R2EcnHk0PEGcWWEYJjPOcmzINEJhMFRJ2TYVQN49SL INLglMwft0G1aDbrlfqI4/8ded4UxuvaTYWhS/HRC7LvP/QFgXQOZpVCl8i1mCwuZlZK AwqL+G/Cl534OR4CR2kJhm4OlrCnVNrDI9d/w61lOS0XlzS6hU05UtUurjoDogONjNOR LDGA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di24si5427536edb.461.2020.06.08.08.03.15; Mon, 08 Jun 2020 08:03:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730152AbgFHPBN (ORCPT + 99 others); Mon, 8 Jun 2020 11:01:13 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42366 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729612AbgFHPBN (ORCPT ); Mon, 8 Jun 2020 11:01:13 -0400 Received: by mail-lj1-f194.google.com with SMTP id y11so19252268ljm.9 for ; Mon, 08 Jun 2020 08:01:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=exJpUcD9iTuoeD+RQrF+EIXmGMlhgaTXtJncvvlvAk0=; b=uGir2OpahHpWGpoS5PSjlkZF7HzYFUSaPJVrp0jn88LMmfKkVYjxvKbnOCfO8KoB+d ba+ymAr61Xum4HkmzpNz6CF5L83I9WNiZsqoEWKPe2Llo54/tMo4yJU3aLJNdDcRHF/W TPsagiqLWjVWmmbGXTyHAQaPAxJ3rIIU4e91Ozy4AvlajrDftywAYpLk3CTTo05GojVv O2+uImLDAd6S/BnE272YF6+GRuK1KLMIbJbdZ0DR5DFGz4cToZ7XikbDUD6r1NDS6TWm 8mqn/y3QSfG2KWcYyQAy6WZezF8Y7xSwBr4rwAzeMDU46Fb5oAtRrXO5nfZwjUW6Gra+ uQZw== X-Gm-Message-State: AOAM530TEwzWYjeWIxIRJyNikQUeL/ATkVWQanMU0Lz1oYj5ThaMwlbm m1ZZhrYHcVuOilfLOYbgobXtLc2lFHE= X-Received: by 2002:a2e:9855:: with SMTP id e21mr11002311ljj.214.1591628470929; Mon, 08 Jun 2020 08:01:10 -0700 (PDT) Received: from localhost.localdomain ([213.87.137.116]) by smtp.googlemail.com with ESMTPSA id r16sm279228ljn.106.2020.06.08.08.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 08:01:10 -0700 (PDT) From: Denis Efremov To: Julia Lawall Cc: Denis Efremov , linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Subject: [PATCH v2 0/4] Update memdup_user.cocci Date: Mon, 8 Jun 2020 18:00:34 +0300 Message-Id: <20200608150038.223747-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add GFP_USER to the allocation flags and handle vmemdup_user(). The third patch supresses memdup_user(), vmemdup_user() functions detection. Last patch is a proof of concept for the rule selfchecking. Gives the ability to detect that an open-coded pattern in a function definition that we search for in the kernel sources changed. Denis Efremov (4): coccinelle: api: extend memdup_user transformation with GFP_USER coccinelle: api: extend memdup_user rule with vmemdup_user() coccinelle: api: filter out memdup_user definitions coccinelle: api: add selfcheck for memdup_user rule scripts/coccinelle/api/memdup_user.cocci | 106 ++++++++++++++++++++++- 1 file changed, 103 insertions(+), 3 deletions(-) -- 2.26.2