Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 11 Mar 2002 19:59:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 11 Mar 2002 19:58:52 -0500 Received: from codepoet.org ([166.70.14.212]:1958 "EHLO winder.codepoet.org") by vger.kernel.org with ESMTP id ; Mon, 11 Mar 2002 19:58:40 -0500 Date: Mon, 11 Mar 2002 17:58:41 -0700 From: Erik Andersen To: Jeff Garzik Cc: Bill Davidsen , Linus Torvalds , LKML Subject: Re: [patch] My AMD IDE driver, v2.7 Message-ID: <20020312005840.GA13955@codepoet.org> Reply-To: andersen@codepoet.org Mail-Followup-To: Erik Andersen , Jeff Garzik , Bill Davidsen , Linus Torvalds , LKML In-Reply-To: <3C8D4D12.90606@mandrakesoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C8D4D12.90606@mandrakesoft.com> User-Agent: Mutt/1.3.27i X-Operating-System: Linux 2.4.18-rmk1, Rebel-NetWinder(Intel StrongARM 110 rev 3), 185.95 BogoMips X-No-Junk-Mail: I do not want to get *any* junk mail. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon Mar 11, 2002 at 07:34:26PM -0500, Jeff Garzik wrote: > Reason 1: Standard kernel convention. In other ioctls, we check basic > arguments and return EINVAL when they are wrong, even for privieleged > ioctls. I have no argument with basic command validation. But take a look at ide_cmd_type_parser(), for example. Do we really need a giant switch statement listing all the allowed commands, just so we can throw back a IDE_DRIVE_TASK_INVALID to user-space if they decide to send down some undocumeted firmware wiping commands? Especially since that giant struct of allowed commands is duplicated in ide_pre_handler_parser() and ide_handler_parser() -Erik -- Erik B. Andersen http://codepoet-consulting.com/ --This message was written using 73% post-consumer electrons-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/