Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752484AbdGEVsd (ORCPT ); Wed, 5 Jul 2017 17:48:33 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:36275 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261AbdGEVsc (ORCPT ); Wed, 5 Jul 2017 17:48:32 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170705050500.GA72383@beast> From: Arnd Bergmann Date: Wed, 5 Jul 2017 23:48:30 +0200 X-Google-Sender-Auth: oSns_YmWhoX-H_4HpPQLvYjNG-E Message-ID: Subject: Re: [GIT PULL] gcc-plugins updates for v4.13-rc1 To: Linus Torvalds Cc: Ard Biesheuvel , Kees Cook , Linux Kernel Mailing List , Jean Delvare Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 585 Lines: 22 On Wed, Jul 5, 2017 at 11:35 PM, Linus Torvalds wrote: > So the issue I think would be good to fix is perhaps best explained by > pseudo-code > > int testfn(struct somestruct __user *p) > { > struct somestruct a; > > initialize_struct(&a); > if (copy_to_user(p, &a, sizeof(a))) > return -EFAULT; > return 0; > } > > which is obviously made-up code, but is not actually entirely unrealistic. This particular example should be handled by scripts/gcc-plugins/structleak_plugin.c, right? Arnd