Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1758177pxb; Fri, 10 Sep 2021 13:14:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBYVceSqo8Pf+ywJKi74nkje7eMBpvh6xIVMKnt88P4OvW3ArvLpUo4ogERsymrv+f/D7w X-Received: by 2002:a92:cc0d:: with SMTP id s13mr7476954ilp.95.1631304894022; Fri, 10 Sep 2021 13:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631304894; cv=none; d=google.com; s=arc-20160816; b=SPRNhNV4EktAwlXCsYtBqbVEd7aTuW/G0ekpOHLxo28NFOlC1d+8pTvGp8tZR1f7oo Z8hw5Ed9KkstPXX53inyz+l2KsOsKnwPN5Dd89BiHJgJGqcPAfrYRV2LD9f8KJ4WaiIM gZtjRbaUUdlSqU3geprh3394ApR7Fi77s/DwcHLv8n4om2ChcCTjCAY2BNru5ICvjFsx Vz1MFdWUYWM9MO1lhGDsN2aFPI3OEcHh8dBOde9CXh0dLT46xmzMpC3JkMS1QMIL3QAo ichRkgEQ5SE8L2XAhVkeo7XzoLzvuyi3FmH8yv2CWeXUZA7FR386pcR/GgOVVktJUhIi 9QBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iePa+QJwyypIcxS3XgZtAGnALz0TqV4Q+j6tPAq5kjc=; b=Uba9XEjfeP5trZVga04FCfKyPtv+9zbZBX2aJh4j1bKjBI8gDls+TqH99xNyAz+YYd N0kFCPCpVYDoOuBfP9WHAMrVSkTvHaFY8LgqsRzcbVqFTyCa1/Wj6+PXMRc+njQdSi9s i73YGOJPozo+PNVrLSVAzdFexzNUgAYH3vD+pncFFSBnJWBA0ngJSHI4FIPNH/2MP6xO 2nAmJ1rqJfGkhFD1H3wugdJonUBE1eGEwO/lM/KbC2qRy1B6VS2FmpEMXZd4YPEBEslD YOhRS4IxgjIP2LJ7bCOCy7y1Fv2CD+ToU6DNRnpl/aiT5eHFVGaBQxiHsadYxQZvvIi+ zWpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IsHb274u; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si5612496jac.26.2021.09.10.13.14.42; Fri, 10 Sep 2021 13:14:54 -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=@chromium.org header.s=google header.b=IsHb274u; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233492AbhIJUOn (ORCPT + 99 others); Fri, 10 Sep 2021 16:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233384AbhIJUOm (ORCPT ); Fri, 10 Sep 2021 16:14:42 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 974B1C061574 for ; Fri, 10 Sep 2021 13:13:31 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id w19-20020a17090aaf9300b00191e6d10a19so2226082pjq.1 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=t+7lupiL88EUbBB0cTU0H+XptBajWxaCtK6fBAwnVhi3Dq33YMQ/1yLUcdg6pGjVCJ ZSibk66wKbr2ypkcRjzODarl2UWLAanwmBwq9+0ksLoZ8W75pz47JAsFtwIEA4znIKMI RrnQOeLsXG4HUFpG0fCHyQ7XJ/rUFAc6s6z8JuQP1tphuXn9bxB6xZdaL99/jkn6ntKZ PqZvVgpVIQ3UkC5SVphZNguu27Uhz2dhppmOVPFoXgrsakeATvBhgyRYrZGFtEsTvv3e nt1Dsk6FM/p7PpcUnfg68S7d3H6TMq0YjSJExDtaT92jflktFUnu0cxfbgSy72xHP83E XqCQ== X-Gm-Message-State: AOAM530b2lcFWxeakZCewAONoWpQWdDH/uXCUjExUyCh+VusoEKdRUl0 oMoazgXS2+LaKRq6vmQQIJKBeLF2rGipDw== 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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