Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1212339ybl; Fri, 30 Aug 2019 13:49:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrHrdiYMHCIqlFNKp3w5NYdxHmYflpi1zJfe+xCNgdP0DeXAK6x6Vq3y9Wymd3vWWiJLOp X-Received: by 2002:a17:90a:35e3:: with SMTP id r90mr499563pjb.34.1567198180549; Fri, 30 Aug 2019 13:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567198180; cv=none; d=google.com; s=arc-20160816; b=JXsVqp2NrfHd3q0H3trRNl+mET0vgosEh+5PUHw/C1gN0AoFDhcdYwcH2HKP7MNjI8 kfv4vcSR2NyYQRWKsghtD/dCIupfrIEX6PxiSBc0f+8+ZlD2Bt4uSPxfD4sag7uEHwnn itXmXPX3bT5ng/ka6VRfGIFdLUDBoQIlxE4Fj/jBxnCr9oZ3I7a9vo4P5/jvNk/gcYwD Ed2t7L3vx3mlBHFdqv8ldtgR5o0qmT/hkFwdHipOK6/xXJ7sPlIQYM2M0RlLoqs25n/W BnK6vLEg556U5yI1Q4yLf6bVEJWvuzqQi0rYu2QbjoObgh/I/7vr6kcBl0YKmpaYiDl+ SBDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=b8u2magLfJVwljZAGYTURbma2mpmy7TrJLGdd0rfPWc=; b=Cq27TjK31jkfb9RvVCm90ajg+bp8fHXN+PrU6YJZ9F1lTyhs57f01+fEIpNgwUJ9zZ mc79tcq2Bt7UXO8X9QNl4s+6ILqfL35Z+CSg4BTn6JuQXDfj6wpXUiyLt3mrB7VsLK5f HaCbDzkb/zyOhUoDupDDB6chfvi0V5vJ6W39RxOih6khZ6kji6H3LHm8XTWTueeMUo+1 sSbqYzYfbhVZqJGTUIAKyoIAmI04pSDiWbHFYHGZ6vXT6HVVzZxOOQP0+AEIjAn0SsiA XqRHXFdr0ZakNsSCEYBmF+J6Hc0Y1jCOmQ9NQXRiG1UFSP7cQPcr6VDGBxrdV9rTaqFo cdOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BLGMZDX1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id i21si5136321pgj.37.2019.08.30.13.49.25; Fri, 30 Aug 2019 13:49:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BLGMZDX1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728195AbfH3Urb (ORCPT + 99 others); Fri, 30 Aug 2019 16:47:31 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:41605 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728145AbfH3Urb (ORCPT ); Fri, 30 Aug 2019 16:47:31 -0400 Received: by mail-pf1-f194.google.com with SMTP id 196so5363149pfz.8 for ; Fri, 30 Aug 2019 13:47:30 -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=b8u2magLfJVwljZAGYTURbma2mpmy7TrJLGdd0rfPWc=; b=BLGMZDX18kpe0sWfZwyNEN/x3wCg+PtSQX4ScBTDAaLkBAWub1CujNM5iGHBliKpEU ZrPu9ZzDjWPu5GHyQ7cmon0yZhz9fIJ+8H+HoH7SsGtQ4F++HJxCiy/VyWKWt+Xzw1WX O1OneofCTD2sRQcU4Aw0RD+89IEooAKz8I5pI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b8u2magLfJVwljZAGYTURbma2mpmy7TrJLGdd0rfPWc=; b=titPgnizg04l68KfosfaL5ebRjeKYuT4Vn6icd+XBztQAWI8W5c2YAQubdedpHXX+k 5QOx4u908KJA1v7pnA+rWmiulGWi7dy5lVNd1lOPF8PWp8buAdfMJvueMjCFeR5AQ1L3 QYaWA4V++rwaCgb/y5aXKcEErfSNe7pIzOaedenHxrcQvCAu+9boFislWUcH13/Iwdur iBZRLWGtkfQ1j3+0Mvo9qi4UOAGD25NGpENy12K9WTpmKzqtkvY+qShzYGGcFGawHOb2 7Oj8oJP07s3i+04vYEtsxRQ5ChDDZDSp1WBqt48yBsMsb0y3Sm0Cgky0QA3oNL9gcSSM LciA== X-Gm-Message-State: APjAAAUPReKxyDBlniL5kcfENj06C1XlfEMUCPZzFhQ7x11+JmBzwJ3z oVHuJZ6GQtqbhN4z2rV0pS/TmA== X-Received: by 2002:aa7:9d8d:: with SMTP id f13mr5969012pfq.196.1567198050541; Fri, 30 Aug 2019 13:47:30 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t4sm8770187pfd.109.2019.08.30.13.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2019 13:47:29 -0700 (PDT) Date: Fri, 30 Aug 2019 13:47:28 -0700 From: Kees Cook To: Arnd Bergmann Cc: Denis Efremov , Linux Kernel Mailing List , linux-arch , Andrew Morton , Stephen Rothwell Subject: Re: [PATCH] asm-generic: add unlikely to default BUG_ON(x) Message-ID: <201908301347.60905D1675@keescook> References: <20190828210934.17711-1-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 30, 2019 at 10:08:49PM +0200, Arnd Bergmann wrote: > On Wed, Aug 28, 2019 at 11:09 PM Denis Efremov wrote: > > > > Add unlikely to default BUG_ON(x) in !CONFIG_BUG. It makes > > the define consistent with BUG_ON(x) in CONFIG_BUG. > > > > Signed-off-by: Denis Efremov > > Cc: Arnd Bergmann > > Cc: > > This makes sense, I've applied it to the asm-generic tree for now. > > Two concerns though: > > - adding unlikely() can cause new (usually false-postive) compile time > warnings to show up in random configurations, so we'll have to see what > the build bots think > > - Kees Cook has recently sent a series for asm/bug.h that was merged by > Andrew Morton. If there are is a conflict with your patch, it may be better > to merge both through the same tree, either linux-mm or asm-generic. FWIW, this patch looks sensible to me. :) Reviewed-by: Kees Cook -- Kees Cook