Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5215699ybi; Tue, 30 Jul 2019 16:19:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxf33P2oz+s/F4FFQ9qA6QWulGhNZVI//3XabAkeixfwSGA4IeONgdtgNubeknMgEZ2DRjB X-Received: by 2002:a62:fb18:: with SMTP id x24mr43208238pfm.231.1564528758277; Tue, 30 Jul 2019 16:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564528758; cv=none; d=google.com; s=arc-20160816; b=uuOuNb98j9gcq/WkNsDgb5HERvHSd6irCLgh72/cNXJebR96oY/lwQwR8xVNtJSjHy Tq2bqwrqkMfIEpvTq/cKad05Uhm5wLfkbEs8ylMITJo9Z/abdq2CHU+agICjKKv6Rl/G JOSORxRs4AVZTzDV+SOswaC3nAVOcQJTxlT53jgfXCyMOyL44LlC87mvQ3ppmR+MHzLl go0dLoOWNZcaRZt4GmwqaBDsYxnmRjxBPuImoZvAOtziFq924wztb4A6s/rte4togDl2 dhLH9SJ61ae+xysfZh+nGq2Dkx4P9Kzrdkqq4MKG1zhrgz2sIde2/Rd+nDgjO3cUQt/Z QNXg== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=8dIgffZgZXQcYwne7zms8VHOhkKRbdeMoBICsIkm568=; b=OQFXpdLRdocmU73tLySlq6KC2SNY/rCdBfNGLm5y3iF5pZWrVdya1drL/iLFjhZ9iM 85XghaapR3kRHEbEtvxgM6iI0K+2CPrEosPoEGBf7L0jwhtKAg90l7OSCWAfggCrfPhz vNnbBw4P26AFVwSy+jCyodGz8RaUlqZx+9dZBTToJGP3YfQ9dYzg0lLEXk5BkBqXVTkI nX049XzIlA5kCD+cH45u2tm+SA6PZYPtSe6Pt2v0TuqcNcy+W2uy3IDPP1OCyrTthc+a Qm8IYJAZ6OOX+Mbw7EmLMXPz1plIQr9nK1HZwQFPcjK91/HEYrmr7nguXmCyW09IeeIX WQKw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba9si28670487plb.308.2019.07.30.16.19.03; Tue, 30 Jul 2019 16:19:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728245AbfG3UiP (ORCPT + 99 others); Tue, 30 Jul 2019 16:38:15 -0400 Received: from gate.crashing.org ([63.228.1.57]:50696 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbfG3UiO (ORCPT ); Tue, 30 Jul 2019 16:38:14 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x6UKbpqf027328; Tue, 30 Jul 2019 15:37:51 -0500 Message-ID: Subject: Re: [PATCH] drivers/macintosh/smu.c: Mark expected switch fall-through From: Benjamin Herrenschmidt To: Kees Cook , Michael Ellerman Cc: Stephen Rothwell , PowerPC , "Gustavo A. R. Silva" , Linux kernel Mailing List Date: Tue, 30 Jul 2019 13:37:50 -0700 In-Reply-To: <201907301005.0661E63CF@keescook> References: <20190730143704.060a2606@canb.auug.org.au> <878ssfzjdk.fsf@concordia.ellerman.id.au> <201907301005.0661E63CF@keescook> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-07-30 at 10:07 -0700, Kees Cook wrote: > > > Why do we think it's an expected fall through? I can't really > > convince > > myself from the surrounding code that it's definitely intentional. > > Yeah, good question. Just now when I went looking for who > used SMU_I2C_TRANSFER_COMBINED, I found the only caller in > arch/powerpc/platforms/powermac/low_i2c.c and it is clearly using a > fall-through for building the command for "stdsub" and "combined", > so I think that's justification enough: Yes, sorry for the delay, the fall through is intentional. Cheers, Ben.