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 X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2108EC433EF for ; Fri, 10 Sep 2021 20:13:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A5EC7611F2 for ; Fri, 10 Sep 2021 20:13:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A5EC7611F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id CA054900002; Fri, 10 Sep 2021 16:13:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C4FEA6B0072; Fri, 10 Sep 2021 16:13:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF0AF900002; Fri, 10 Sep 2021 16:13:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id 9F7976B0071 for ; Fri, 10 Sep 2021 16:13:32 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 330A71813B4E8 for ; Fri, 10 Sep 2021 20:13:32 +0000 (UTC) X-FDA: 78572763864.14.58808BF Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by imf06.hostedemail.com (Postfix) with ESMTP id E1E91801A89F for ; Fri, 10 Sep 2021 20:13:31 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id lb1-20020a17090b4a4100b001993f863df2so1401206pjb.5 for ; Fri, 10 Sep 2021 13:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=iePa+QJwyypIcxS3XgZtAGnALz0TqV4Q+j6tPAq5kjc=; b=IsHb274uPH9FPLgOtvnWx7raGr0U3XdM/HtccgychtOnJvhTAta6jhijpXFohaIsQW bZoWz/q4e0kzF75ln08/dBHmi8xsIkXqp6BWQJq0MhM9s5K07fWEdQ2Tpe09rK7FumiM YzHzB3Wl3E4BacbtocMVpqC70kN/f262nczy8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iePa+QJwyypIcxS3XgZtAGnALz0TqV4Q+j6tPAq5kjc=; b=AGYHn0afNKIMXogFrsOSExFFR+p4kj/M7tHkAQ7UTaa2YJo9aXEowFjQs8OER7/gER WPBOzxAgEZSnIgrru148jUY5o+9A8iOHbWVRckaXqeV6gw1YtTCOB0hlR11Oe4zZ2N11 MxBVSfDuPlSSzixHEJUrWmEKanzPejyVGs49FNFkLhQhgfKBzndw6nhy/iNsh3gkan7a xAw3tAwbH5o9gq3yNWMWgX3J36OkJUnXp1DVhI8AMPAlpeePnXt/1C22dxsy1qzmObpM Sd0CHZpX9rOLUeAue6iFh+a8HgREAbrOaABApKj31lY7niUaAMPBpQLySk+9Iyc4LTdX mXZw== X-Gm-Message-State: AOAM533FCv9L1xquD5EijHJFjZQHPhR8yTDBLzAPWNDvMItFXsOcAy7W 95qKPrzF1uE2zdKoGUfOkZcN6vJMyHiWow== X-Google-Smtp-Source: ABdhPJzIXuCxHsDcf3kB/8sJIGUFvSUANIwT7WrHR5D8g478XSdun3ts3kErWKLttx0O/HnwKe3dtQ== X-Received: by 2002:a17:90b:4a8e:: with SMTP id lp14mr11619185pjb.79.1631304810547; Fri, 10 Sep 2021 13:13:30 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id s5sm6614726pgp.81.2021.09.10.13.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 13:13:30 -0700 (PDT) Date: Fri, 10 Sep 2021 13:13:29 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Andrew Morton , linux-mm@kvack.org, mm-commits@vger.kernel.org Subject: Re: incoming Message-ID: <202109101312.C145D4F@keescook> References: <20210909200948.090d4e213ca34b5ad1325a7e@linux-foundation.org> <202109101009.13A90EBB6@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202109101009.13A90EBB6@keescook> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E1E91801A89F Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=IsHb274u; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf06.hostedemail.com: domain of keescook@chromium.org designates 209.85.216.47 as permitted sender) smtp.mailfrom=keescook@chromium.org X-Stat-Signature: s1qx8m9etrbybohga793bd7xdxjw1j7y X-HE-Tag: 1631304811-673991 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Sep 10, 2021 at 10:11:53AM -0700, Kees Cook wrote: > On Thu, Sep 09, 2021 at 08:09:48PM -0700, Andrew Morton wrote: > > > > More post linux-next material. > > > > 9 patches, based on f154c806676ad7153c6e161f30c53a44855329d6. > > > > Subsystems affected by this patch series: > > > > mm/slab-generic > > rapidio > > mm/debug > > > > Subsystem: mm/slab-generic > > > > "Matthew Wilcox (Oracle)" : > > mm: move kvmalloc-related functions to slab.h > > > > Subsystem: rapidio > > > > Kees Cook : > > rapidio: avoid bogus __alloc_size warning > > > > Subsystem: mm/debug > > > > Kees Cook : > > Patch series "Add __alloc_size() for better bounds checking", v2: > > Compiler Attributes: add __alloc_size() for better bounds checking > > checkpatch: add __alloc_size() to known $Attribute > > slab: clean up function declarations > > slab: add __alloc_size attributes for better bounds checking > > mm/page_alloc: add __alloc_size attributes for better bounds checking > > percpu: add __alloc_size attributes for better bounds checking > > mm/vmalloc: add __alloc_size attributes for better bounds checking > > Hi, > > FYI, in overnight build testing I found yet another corner case in > GCC's handling of the __alloc_size attribute. It's the gift that keeps > on giving. The fix is here: > > https://lore.kernel.org/lkml/20210910165851.3296624-1-keescook@chromium.org/ I'm so glad it's Friday. Here's the v2 fix... *sigh* https://lore.kernel.org/lkml/20210910201132.3809437-1-keescook@chromium.org/ -Kees > > > > > Makefile | 15 +++ > > drivers/of/kexec.c | 1 > > drivers/rapidio/devices/rio_mport_cdev.c | 9 +- > > include/linux/compiler_attributes.h | 6 + > > include/linux/gfp.h | 2 > > include/linux/mm.h | 34 -------- > > include/linux/percpu.h | 3 > > include/linux/slab.h | 122 ++++++++++++++++++++++--------- > > include/linux/vmalloc.h | 11 ++ > > scripts/checkpatch.pl | 3 > > 10 files changed, 132 insertions(+), 74 deletions(-) > > > > -- > Kees Cook -- Kees Cook