lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Jan 2017 19:31:02 +0100
From:   SF Markus Elfring <>
To:     Eric Paris <>,,,
        Eric Paris <>
Cc:     James Morris <>,
        Paul Moore <>,
        "Serge E. Hallyn" <>,
        Stephen Smalley <>,
        William Roberts <>,
        LKML <>,
Subject: Re: SELinux: Checking source code positions for the setting of error

> I have a personal style preference for
> rc = -ENOMEM;
> val = kalloc();
> if (!val)
>   goto err;
> vs
> val = kalloc();
> if (!val) {
>   rc = -ENOMEM;
>   goto err;
> }
> because it saves 1 line

Thanks for your feedback.

> and I think the compiler does the right/same thing.

* Did you check any corresponding code generation results in more detail?

* Can misplaced variable assignments result in unwanted run time consequences
  because of the previous approach for a control flow specification?

* How do you think about to achieve that error codes will only be set
  after a specific software failure was detected?


Powered by blists - more mailing lists